@@ -96,9 +96,9 @@ Module SBisimNotations.
9696 Notation "t (≃ [ Q ] ) u" := (sbisim (Lvrel Q) t u) (at level 79).
9797 Notation "t (≃ L ) u" := (sbisim L t u) (at level 79).
9898
99- Notation "t '[≃]' u" := (sb Leq (` _) t u) (at level 90, only printing).
100- Notation "t '[≃' [ R ] ']' u" := (sb (Lvrel R) (` _) t u) (at level 90, only printing).
101- Notation "t '[≃' R ']' u" := (sb R (` _) t u) (at level 90, only printing).
99+ Notation "t '[≃]' u" := (sb Leq _ t u) (at level 90, only printing).
100+ Notation "t '[≃' [ R ] ']' u" := (sb (Lvrel R) _ t u) (at level 90, only printing).
101+ Notation "t '[≃' R ']' u" := (sb R _ t u) (at level 90, only printing).
102102
103103End SBisimNotations.
104104
@@ -146,7 +146,7 @@ Ltac fold_sbisim :=
146146
147147Tactic Notation "__step_sbisim" :=
148148 match goal with
149- | |- context[@sbisim ?E ?F ?C ?D ?X ?Y ?LR ] =>
149+ | |- context[@sbisim ?E ?F ?C ?D ?X ?Y ?L ] =>
150150 unfold sbisim;
151151 step;
152152 fold (@sbisim E F C D X Y L)
@@ -155,7 +155,7 @@ Tactic Notation "__step_sbisim" :=
155155
156156Ltac __step_in_sbisim H :=
157157 match type of H with
158- | context[@sbisim ?E ?F ?C ?D ?X ?Y ?LR ] =>
158+ | context[@sbisim ?E ?F ?C ?D ?X ?Y ?L ] =>
159159 unfold sbisim in H;
160160 step in H;
161161 fold (@sbisim E F C D X Y L) in H
@@ -1436,16 +1436,12 @@ Section WithParams.
14361436 br2 Stuck t ≃ t.
14371437 Proof .
14381438 intros; play; inv_trans; answer.
1439- (* todo: have inv_trans support stuck stepping *)
1440- exfalso; eapply trans_stuck_inv; eauto.
14411439 Qed .
14421440
14431441 Lemma br2_stuck_r {X} : forall (t : ctree E C X),
14441442 br2 t Stuck ≃ t.
14451443 Proof .
14461444 intros; play; inv_trans; answer.
1447- (* todo: have inv_trans support stuck stepping *)
1448- exfalso; eapply trans_stuck_inv; eauto.
14491445 Qed .
14501446
14511447 Lemma br2_spin_l {X} : forall (t : ctree E C X),
@@ -1517,25 +1513,45 @@ Section Incompat.
15171513
15181514 Lemma sbisim_absurd {X} (t u : ctree E C X) :
15191515 are_bisim_incompat t u -> t ≃ u -> False.
1520- Admitted .
1516+ Proof .
1517+ intros * IC EQ.
1518+ unfold are_bisim_incompat in IC.
1519+ setoid_rewrite ctree_eta in EQ.
1520+ genobs t ot. genobs u ou.
1521+ destruct ot, ou.
1522+ all: inv IC.
1523+ all: try now unshelve (playR in EQ; inv_trans); auto.
1524+ all: try now unshelve (playL in EQ; inv_trans); auto.
1525+ Qed .
1526+
1527+ Ltac sb_abs h :=
1528+ eapply sbisim_absurd; [| eassumption]; cbn; try reflexivity.
15211529
15221530 Lemma sbisim_ret_vis_inv {X Y} (r : Y) (e : E X) (k : X -> ctree E C Y) :
15231531 (Ret r : ctree E C _) ≃ Vis e k -> False.
1524- Admitted .
1532+ Proof .
1533+ intros * abs. sb_abs abs.
1534+ Qed .
15251535
15261536 Lemma sbisim_ret_BrS_inv {X Y} (r : Y) (c : C X) (k : X -> ctree E C Y) :
15271537 (Ret r : ctree E C _) ≃ BrS c k -> False.
1528- Admitted .
1538+ Proof .
1539+ intros EQ; playL in EQ; inv_trans; invL.
1540+ Qed .
15291541
15301542 Lemma sbisim_vis_BrS_inv {X Y Z}
15311543 (e : E X) (k1 : X -> ctree E C Z) (c : C Y) (k2 : Y -> ctree E C Z) (y : Y) :
15321544 Vis e k1 ≃ BrS c k2 -> False.
1533- Admitted .
1545+ Proof .
1546+ unshelve (intros EQ; playR in EQ; inv_trans); auto; invL.
1547+ Qed .
15341548
15351549 Lemma sbisim_vis_BrS_inv' {X Y Z}
15361550 (e : E X) (k1 : X -> ctree E C Z) (c : C Y) (k2 : Y -> ctree E C Z) (x : X) :
15371551 Vis e k1 ≃ BrS c k2 -> False.
1538- Admitted .
1552+ Proof .
1553+ unshelve (intros EQ; playL in EQ; inv_trans); auto; invL.
1554+ Qed .
15391555
15401556End Incompat.
15411557
0 commit comments