Closed jhjourdan closed 1 month ago
Probably the most principled way to fix this would be to encode invariants in a way which is much closer to Why3's type invariants.
This would require eliminating clones as it means that the module defining the type needs to reference the invariant predicate itself. That just re-emphasizes how much we (I) need to eliminate cloning over the next few weeks.
This is fixed by #1096. Mappings have valid as well as invalid values as keys.
We don't enforce invariants for mappings, and the extentionnality law for them does not take invariants into account.
See https://github.com/xldenis/creusot/pull/865#issuecomment-1729463440 and the following comments.
Probably the most principled way to fix this would be to encode invariants in a way which is much closer to Why3's type invariants.