Skip to content
Snippets Groups Projects
Commit 9ff3a924 authored by Simon Friis Vindum's avatar Simon Friis Vindum
Browse files

Update proofs

parent 4d2f128e
No related branches found
No related tags found
No related merge requests found
...@@ -366,14 +366,13 @@ Lemma auth_update a b a' b' : ...@@ -366,14 +366,13 @@ Lemma auth_update a b a' b' :
(a,b) ~l~> (a',b') a b ~~> a' b'. (a,b) ~l~> (a',b') a b ~~> a' b'.
Proof. Proof.
intros Hup; apply cmra_total_update. intros Hup; apply cmra_total_update.
move=> n [[[??]|] bf1] [/= VL [a0 [Eq [[bf2 Ha] VL2]]]]; do 2 red; simpl in *. move=> n [[qa|] bf1] [/= Hq [a0 [Haa0 [[bf2 Ha] Ha0]]]]; do 2 red; simpl in *.
+ exfalso. move : VL => /frac_valid'. { by apply (exclusiveN_l _ _) in Hq. }
rewrite frac_op'. by apply Qp_not_plus_q_ge_1. split; [done|]. apply (inj to_agree) in Haa0.
+ split; [done|]. apply (inj to_agree) in Eq. move: Ha; rewrite !left_id -assoc=> Ha.
move: Ha; rewrite !left_id -assoc => Ha. destruct (Hup n (Some (bf1 bf2))); [by rewrite Haa0..|]; simpl in *.
destruct (Hup n (Some (bf1 bf2))); [by rewrite Eq..|]. simpl in *. exists a'. split_and!; [done| |done].
exists a'. split; [done|]. split; [|done]. exists bf2. exists bf2. by rewrite left_id -assoc.
by rewrite left_id -assoc.
Qed. Qed.
Lemma auth_update_alloc a a' b' : (a,ε) ~l~> (a',b') a ~~> a' b'. Lemma auth_update_alloc a a' b' : (a,ε) ~l~> (a',b') a ~~> a' b'.
...@@ -388,16 +387,14 @@ Qed. ...@@ -388,16 +387,14 @@ Qed.
Lemma auth_update_core_id q a b `{!CoreId b} : Lemma auth_update_core_id q a b `{!CoreId b} :
b a {q} a ~~> {q} a b. b a {q} a ~~> {q} a b.
Proof. Proof.
intros Heq%core_id_extract; last done. apply cmra_total_update. intros Ha%(core_id_extract _ _). apply cmra_total_update.
move=> n [[[q' ag]|] bf1] [/= VL [a0 [Eq [[bf2 Ha] VL2]]]]; do 2 red; simpl in *. move=> n [[[q' ag]|] bf1] [Hq [a0 [Haa0 [Hbf1 Ha0]]]]; do 2 red; simpl in *.
+ split; first done. + split; [done|]. exists a0. split_and!; [done| |done].
exists a0. split; last split; try done. exists bf2. assert (a {n} a0) as Haa0' by (apply to_agree_includedN; by exists ag).
assert (a {n} a0) as Eq2. { apply to_agree_includedN. exists ag. done. } rewrite -Haa0' Ha Haa0' -assoc (comm _ b) assoc. by apply cmra_monoN_r.
by rewrite left_id -Eq2 -assoc -comm Heq Eq2 Ha left_id. + split; [done|]. exists a0. split_and!; [done| |done].
+ split; first done. exists a0. apply (inj to_agree) in Haa0.
split; first done. split; last done. exists bf2. rewrite -Haa0 Ha Haa0 -assoc (comm _ b) assoc. by apply cmra_monoN_r.
apply (inj to_agree) in Eq.
by rewrite left_id -Eq -assoc -comm Heq Eq Ha left_id.
Qed. Qed.
Lemma auth_update_dealloc a b a' : (a,b) ~l~> (a',ε) a b ~~> a'. Lemma auth_update_dealloc a b a' : (a,b) ~l~> (a',ε) a b ~~> a'.
......
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