Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ecPV.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,11 @@ module Mpv2 = struct
when EcReduction.EqTest.for_type env ty1 ty2
&& EcReduction.EqTest.for_type env b1.e_ty b2.e_ty ->
List.fold_left2 (add_eqs_loc env local) eqs (b1::es1) (b2::es2)
| _, _ when EcReduction.EqTest.for_expr env e1 e2 ->
let fv1 = e_read env e1 in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you take the union.
Normally you should take the intersection.
The success of EqTest.for_expr should garantie
That the exists a term e such that e1 --> e and e2 --> e
So the free variable of e is in the intersection of e1 and e2.
If you take the union you may have variable bound in the first memory that will be unbound in the other.

let fv2 = e_read env e2 in
union eqs (eq_refl (PV.union fv1 fv2))

| _, _ -> raise EqObsInError

let add_eqs env e1 e2 eqs = add_eqs_loc env Mid.empty eqs e1 e2
Expand Down
Loading