Skip to content

Commit e19ac79

Browse files
Fixed bind in SSimAlt
1 parent 5c06ffd commit e19ac79

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

theories/Eq/SSimAlt.v

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,12 +1112,13 @@ Section bind_restore.
11121112
forall (t : ctree E B X) (t' : ctree F B X)
11131113
(k : X -> ctree E B X') (k' : X -> ctree F B X'),
11141114
ssim uvr (Active t) (Active t') ->
1115-
(forall x x', R0 x x' -> ssim' L (Active (k x)) (Active (k' x'))) ->
1115+
(forall x x', R0 x x' -> ` R (Active (k x)) (Active (k' x'))) ->
11161116
` R (Active (x <- t;; k x)) (Active (x <- t';; k' x)).
11171117
Proof.
11181118
apply tower.
11191119
- intros ? INC t t' k k' tt kk ? ?; red.
11201120
apply INC; auto.
1121+
intros. now apply kk.
11211122
- clear; intros R IH t t' k k' tt kk.
11221123
split.
11231124
+ intros s l Hne TR.
@@ -1136,7 +1137,7 @@ Section bind_restore.
11361137
destruct RESP as [m STAR STEPv].
11371138
unfold trans_alt in STEPv; cbn in STEPv; dependent destruction STEPv.
11381139
specialize (kk x x' Hx).
1139-
step in kk; destruct kk as (kkA & _).
1140+
destruct kk as (kkA & _).
11401141
destruct (kkA _ _ Hne TRk) as (l' & u' & RESP2 & Hgfp & HL').
11411142
exists l', u'; ssplit.
11421143
-- destruct RESP2 as [m2 STAR2 STEP2].
@@ -1146,7 +1147,7 @@ Section bind_restore.
11461147
++ eapply estar_trans; [| exact STAR2].
11471148
apply estar_seq; constructor.
11481149
rewrite H, bind_ret_l; reflexivity.
1149-
-- apply (gfp_chain R); exact Hgfp.
1150+
-- exact Hgfp.
11501151
-- exact HL'.
11511152
* assert (cT : ((trans_alt ε)^* ⋅ trans_alt τ) (Active t) (Active t1))
11521153
by (apply trans_star_l; exact TRt).
@@ -1160,7 +1161,7 @@ Section bind_restore.
11601161
-- exists (Active (x <- t0;; k' x)).
11611162
++ apply estar_bind; exact STAR.
11621163
++ apply trans_bind_l_τ; eapply Transstep; eauto.
1163-
-- rewrite SQ; apply IH; [exact Htt' | exact kk].
1164+
-- rewrite SQ; apply IH; [exact Htt' | intros; step; now apply kk].
11641165
-- exact HLττ.
11651166
* easy.
11661167
(* a short trip is needed: active -> passive -> active
@@ -1201,7 +1202,7 @@ Section bind_restore.
12011202
assert (SQ5 : (Active (x <- t1;; k' x) : @SS F B X')
12021203
⩸ (Active (x <- k0 w';; k' x))).
12031204
{ constructor; rewrite EQ0, <- (EQ w'); reflexivity. }
1204-
rewrite <- SQ5; apply IH; [exact Htt2 | exact kk].
1205+
rewrite <- SQ5; apply IH; [exact Htt2 | intros; step; now apply kk].
12051206
** exact HLrr.
12061207
++ intros s2 TR2.
12071208
apply trans_passive_inv' in TR2 as (z & _ & Habs); easy.
@@ -1222,19 +1223,19 @@ Section bind_restore.
12221223
destruct RESP as [m STAR STEPv].
12231224
unfold trans_alt in STEPv; cbn in STEPv; dependent destruction STEPv.
12241225
specialize (kk x x' Hx).
1225-
step in kk; destruct kk as (_ & kkB).
1226+
destruct kk as (_ & kkB).
12261227
destruct (kkB _ TRk) as (u2 & STARu & Hgfp2).
12271228
exists u2; split.
12281229
-- eapply estar_trans.
12291230
++ apply estar_bind; exact STAR.
12301231
++ eapply estar_trans; [| exact STARu].
12311232
apply estar_seq; constructor.
12321233
rewrite H, bind_ret_l; reflexivity.
1233-
-- apply (gfp_chain R); exact Hgfp2.
1234+
-- exact Hgfp2.
12341235
* easy.
12351236
* exists (Active (x <- t';; k' x)); split.
12361237
-- apply trans_star_self.
1237-
-- rewrite SQ; apply IH; [| exact kk].
1238+
-- rewrite SQ; apply IH; [| intros; step; now apply kk].
12381239
eapply ssim_eps_l; [exact tt | exact TRt].
12391240
* easy.
12401241
Qed.

0 commit comments

Comments
 (0)