fix(library/blast/congruence_closure): add missing eq => heq lifting
This commit is contained in:
parent
cf8307ee20
commit
799317c43e
2 changed files with 33 additions and 3 deletions
|
@ -1379,6 +1379,8 @@ expr congruence_closure::mk_congr_proof_core(name const & R, expr const & lhs, e
|
|||
}
|
||||
if (lemma->m_lift_needed)
|
||||
r = b.lift_from_eq(R, *r);
|
||||
if (g_heq_based && heq_proofs)
|
||||
r = b.mk_heq_of_eq(*r);
|
||||
return *r;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,34 @@ by blast
|
|||
example : a1 == x a2 → a2 == y a1 → mk_B1 (x (y a1)) == mk_B1 (x (y (x a2))) :=
|
||||
by blast
|
||||
|
||||
-- The following one needs subsingleton support
|
||||
-- example : a1 == y a2 → mk_B1 a1 == mk_B2 (y a2) → f (mk_C1 (mk_B2 a1)) == f (mk_C2 (mk_B1 (y a2))) :=
|
||||
-- by blast
|
||||
-- The following examples need subsingleton equality propagation
|
||||
set_option blast.cc.subsingleton true
|
||||
|
||||
example : a1 == y a2 → mk_B1 a1 == mk_B2 (y a2) → f (mk_C1 (mk_B2 a1)) == f (mk_C2 (mk_B1 (y a2))) :=
|
||||
by blast
|
||||
|
||||
example : a1 == y a2 → tr_B (mk_B1 a1) == mk_B2 (y a2) → f (mk_C1 (mk_B2 a1)) == f (mk_C2 (tr_B (mk_B1 (y a2)))) :=
|
||||
by blast
|
||||
|
||||
example : a1 == y a2 → mk_B1 a1 == mk_B2 (y a2) → g (f (mk_C1 (mk_B2 a1))) == g (f (mk_C2 (mk_B1 (y a2)))) :=
|
||||
by blast
|
||||
|
||||
example : a1 == y a2 → tr_B (mk_B1 a1) == mk_B2 (y a2) → g (f (mk_C1 (mk_B2 a1))) == g (f (mk_C2 (tr_B (mk_B1 (y a2))))) :=
|
||||
by blast
|
||||
|
||||
example : a1 == y a2 → a2 == z a3 → a3 == x a1 → mk_B1 a1 == mk_B2 (y (z (x a1))) →
|
||||
f (mk_C1 (mk_B2 (y (z (x a1))))) == f' (mk_C2 (mk_B1 a1)) →
|
||||
g (f (mk_C1 (mk_B2 (y (z (x a1)))))) == g (f' (mk_C2 (mk_B1 a1))) :=
|
||||
by blast
|
||||
|
||||
example : a1 == y a2 → a2 == z a3 → a3 == x a1 → mk_B1 a1 == mk_B2 (y (z (x a1))) →
|
||||
f (mk_C1 (mk_B2 (y (z (x a1))))) == f' (mk_C2 (mk_B1 a1)) →
|
||||
f' (mk_C1 (mk_B1 a1)) == f (mk_C2 (mk_B2 (y (z (x a1))))) →
|
||||
g (f (mk_C1 (mk_B1 (y (z (x a1)))))) == g (f' (mk_C2 (mk_B2 a1))) :=
|
||||
by blast
|
||||
|
||||
example : a1 == y a2 → a2 == z a3 → a3 == x a1 → tr_B (mk_B1 a1) == mk_B2 (y (z (x a1))) →
|
||||
f (mk_C1 (mk_B2 (y (z (x a1))))) == f' (mk_C2 (tr_B (mk_B1 a1))) →
|
||||
f' (mk_C1 (tr_B (mk_B1 a1))) == f (mk_C2 (mk_B2 (y (z (x a1))))) →
|
||||
g (f (mk_C1 (tr_B (mk_B1 (y (z (x a1))))))) == g (f' (mk_C2 (mk_B2 a1))) :=
|
||||
by blast
|
||||
|
|
Loading…
Reference in a new issue