Skip to content
Snippets Groups Projects
Commit fa43edc5 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Merge branch 'master' into gen_proofmode

parents a06fe198 e67830a6
No related branches found
No related tags found
No related merge requests found
...@@ -11,5 +11,5 @@ install: [make "install"] ...@@ -11,5 +11,5 @@ install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris"] remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris"]
depends: [ depends: [
"coq" { (>= "8.7.1" & < "8.9~") | (= "dev") } "coq" { (>= "8.7.1" & < "8.9~") | (= "dev") }
"coq-stdpp" { (= "dev.2018-04-27.1.32c8182a") | (= "dev") } "coq-stdpp" { (= "dev.2018-05-14.0.8fdeb77f") | (= "dev") }
] ]
...@@ -105,4 +105,17 @@ Section frac_auth. ...@@ -105,4 +105,17 @@ Section frac_auth.
Proof. Proof.
intros. by apply auth_update, option_local_update, prod_local_update_2. intros. by apply auth_update, option_local_update, prod_local_update_2.
Qed. Qed.
Lemma frac_auth_update_alloc q a b c :
( n : nat, {n} a {n} (c a))
●! a ◯!{q} b ~~> ●! (c a) ◯!{q} (c b).
Proof. intros ?. by apply frac_auth_update, op_local_update. Qed.
Lemma frac_auth_dealloc q a b c `{!Cancelable c} :
●! (c a) ◯!{q} (c b) ~~> ●! a ◯!{q} b.
Proof.
apply frac_auth_update.
move=> n [x|] /= Hvalid Heq; split; eauto using cmra_validN_op_r.
eapply (cancelableN c); by rewrite ?assoc.
Qed.
End frac_auth. End frac_auth.
...@@ -50,6 +50,11 @@ Section gmultiset. ...@@ -50,6 +50,11 @@ Section gmultiset.
Proof. split. done. intros X. by rewrite gmultiset_op_union left_id_L. done. Qed. Proof. split. done. intros X. by rewrite gmultiset_op_union left_id_L. done. Qed.
Canonical Structure gmultisetUR := UcmraT (gmultiset K) gmultiset_ucmra_mixin. Canonical Structure gmultisetUR := UcmraT (gmultiset K) gmultiset_ucmra_mixin.
Global Instance gmultiset_cancelable X : Cancelable X.
Proof.
apply: discrete_cancelable=> Y Z _ ?. fold_leibniz. by apply (inj (X )).
Qed.
Lemma gmultiset_opM X mY : X ? mY = X from_option id mY. Lemma gmultiset_opM X mY : X ? mY = X from_option id mY.
Proof. destruct mY; by rewrite /= ?right_id_L. Qed. Proof. destruct mY; by rewrite /= ?right_id_L. Qed.
...@@ -71,7 +76,6 @@ Section gmultiset. ...@@ -71,7 +76,6 @@ Section gmultiset.
repeat (rewrite multiplicity_difference || rewrite multiplicity_union). repeat (rewrite multiplicity_difference || rewrite multiplicity_union).
omega. omega.
Qed. Qed.
End gmultiset. End gmultiset.
Arguments gmultisetC _ {_ _}. Arguments gmultisetC _ {_ _}.
......
...@@ -101,7 +101,7 @@ Section ectx_language. ...@@ -101,7 +101,7 @@ Section ectx_language.
Definition head_irreducible (e : expr Λ) (σ : state Λ) := Definition head_irreducible (e : expr Λ) (σ : state Λ) :=
e' σ' efs, ¬head_step e σ e' σ' efs. e' σ' efs, ¬head_step e σ e' σ' efs.
Definition head_stuck (e : expr Λ) (σ : state Λ) := Definition head_stuck (e : expr Λ) (σ : state Λ) :=
to_val e = None K e', e = fill K e' head_irreducible e' σ. to_val e = None head_irreducible e σ.
(* All non-value redexes are at the root. In other words, all sub-redexes are (* All non-value redexes are at the root. In other words, all sub-redexes are
values. *) values. *)
...@@ -168,9 +168,8 @@ Section ectx_language. ...@@ -168,9 +168,8 @@ Section ectx_language.
Lemma head_stuck_stuck e σ : Lemma head_stuck_stuck e σ :
head_stuck e σ sub_redexes_are_values e stuck e σ. head_stuck e σ sub_redexes_are_values e stuck e σ.
Proof. Proof.
move=>[] ? Hirr ?. split; first done. intros [] ?. split; first done.
apply prim_head_irreducible; last done. by apply prim_head_irreducible.
apply (Hirr empty_ectx). by rewrite fill_empty.
Qed. Qed.
Lemma ectx_language_atomic a e : Lemma ectx_language_atomic a e :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment