@@ -18,9 +18,6 @@ module PT = EcProofTerm
1818module TTC = EcProofTyping
1919
2020(* -------------------------------------------------------------------- *)
21- let conseq_cond_old pre post spre spost =
22- f_imp pre spre, f_imp spost post
23-
2421let conseq_cond_ss pre post spre spost =
2522 map_ss_inv2 f_imp pre spre, map_ss_inv2 f_imp spost post
2623
@@ -103,14 +100,6 @@ let t_ehoareS_conseq pre post tc =
103100 FApi. xmutate1 tc `HlConseq [concl1; concl2; concl3]
104101
105102(* -------------------------------------------------------------------- *)
106- let bdHoare_conseq_conds_old cmp pr po new_pr new_po =
107- let cond1, cond2 = conseq_cond_old pr po new_pr new_po in
108- let cond2 = match cmp with
109- | FHle -> f_imp po new_po
110- | FHeq -> f_iff po new_po
111- | FHge -> cond2
112- in
113- cond1, cond2
114103
115104let bdHoare_conseq_conds cmp pr po new_pr new_po =
116105 let cond1, cond2 = conseq_cond_ss pr po new_pr new_po in
@@ -127,6 +116,8 @@ let t_bdHoareF_conseq pre post tc =
127116 let env = FApi. tc1_env tc in
128117 let bhf = tc1_as_bdhoareF tc in
129118 let mpr,mpo = EcEnv.Fun. hoareF_memenv bhf.bhf_m bhf.bhf_f env in
119+ let pre = ss_inv_rebind pre bhf.bhf_m in
120+ let post = ss_inv_rebind post bhf.bhf_m in
130121 let cond1, cond2 =
131122 bdHoare_conseq_conds bhf.bhf_cmp (bhf_pr bhf) (bhf_po bhf) pre post in
132123 let concl1 = f_forall_mems_ss_inv mpr cond1 in
@@ -137,6 +128,8 @@ let t_bdHoareF_conseq pre post tc =
137128(* -------------------------------------------------------------------- *)
138129let t_bdHoareS_conseq pre post tc =
139130 let bhs = tc1_as_bdhoareS tc in
131+ let pre = ss_inv_rebind pre (fst bhs.bhs_m) in
132+ let post = ss_inv_rebind post (fst bhs.bhs_m) in
140133 let cond1, cond2 =
141134 bdHoare_conseq_conds bhs.bhs_cmp (bhs_pr bhs) (bhs_po bhs) pre post in
142135 let concl1 = f_forall_mems_ss_inv bhs.bhs_m cond1 in
@@ -170,6 +163,8 @@ let t_equivF_conseq pre post tc =
170163 let ef = tc1_as_equivF tc in
171164 let (mprl,mprr), (mpol,mpor) =
172165 EcEnv.Fun. equivF_memenv ef.ef_ml ef.ef_mr ef.ef_fl ef.ef_fr env in
166+ let pre = ts_inv_rebind pre ef.ef_ml ef.ef_mr in
167+ let post = ts_inv_rebind post ef.ef_ml ef.ef_mr in
173168 let cond1, cond2 = conseq_cond_ts (ef_pr ef) (ef_po ef) pre post in
174169 let concl1 = f_forall_mems_ts_inv mprl mprr cond1 in
175170 let concl2 = f_forall_mems_ts_inv mpol mpor cond2 in
@@ -182,6 +177,8 @@ let t_eagerF_conseq pre post tc =
182177 let eg = tc1_as_eagerF tc in
183178 let (mprl,mprr), (mpol,mpor) =
184179 EcEnv.Fun. equivF_memenv eg.eg_ml eg.eg_mr eg.eg_fl eg.eg_fr env in
180+ let pre = ts_inv_rebind pre eg.eg_ml eg.eg_mr in
181+ let post = ts_inv_rebind post eg.eg_ml eg.eg_mr in
185182 let cond1, cond2 = conseq_cond_ts (eg_pr eg) (eg_po eg) pre post in
186183 let concl1 = f_forall_mems_ts_inv mprl mprr cond1 in
187184 let concl2 = f_forall_mems_ts_inv mpol mpor cond2 in
0 commit comments