Commit 0fd7e635 authored by Robbert Krebbers's avatar Robbert Krebbers

Misc big op nitpicks

- The direction of big_sepS_later and big_sepM_later is now like later_sep.
- Do not use generated variables in the proofs.
parent ffb0a675
...@@ -708,10 +708,7 @@ Qed. ...@@ -708,10 +708,7 @@ Qed.
Global Instance later_mono' : Proper (() ==> ()) (@uPred_later M). Global Instance later_mono' : Proper (() ==> ()) (@uPred_later M).
Proof. intros P Q; apply later_mono. Qed. Proof. intros P Q; apply later_mono. Qed.
Lemma later_True : ( True : uPred M)%I True%I. Lemma later_True : ( True : uPred M)%I True%I.
Proof. Proof. apply (anti_symm ()); auto using later_True'. Qed.
apply (anti_symm ()); first done.
apply later_True'.
Qed.
Lemma later_impl P Q : (P Q) ( P Q). Lemma later_impl P Q : (P Q) ( P Q).
Proof. Proof.
apply impl_intro_l; rewrite -later_and. apply impl_intro_l; rewrite -later_and.
......
...@@ -142,18 +142,15 @@ Section gmap. ...@@ -142,18 +142,15 @@ Section gmap.
Lemma big_sepM_sepM P Q m : Lemma big_sepM_sepM P Q m :
(Π★{map m} (λ i x, P i x Q i x))%I (Π★{map m} P Π★{map m} Q)%I. (Π★{map m} (λ i x, P i x Q i x))%I (Π★{map m} P Π★{map m} Q)%I.
Proof. Proof.
rewrite /uPred_big_sepM. induction (map_to_list m); simpl; rewrite /uPred_big_sepM.
first by rewrite right_id. induction (map_to_list m) as [|[i x] l IH]; csimpl; rewrite ?right_id //.
destruct a. rewrite IHl /= -!assoc. apply sep_proper; first done. by rewrite IH -!assoc (assoc _ (Q _ _)) [(Q _ _ _)%I]comm -!assoc.
rewrite !assoc [(_ Q _ _)%I]comm -!assoc. apply sep_proper; done.
Qed. Qed.
Lemma big_sepM_later P m : ( Π★{map m} P)%I (Π★{map m} (λ i x, P i x))%I.
Lemma big_sepM_later P m :
(Π★{map m} (λ i x, P i x))%I ( Π★{map m} P)%I.
Proof. Proof.
rewrite /uPred_big_sepM. induction (map_to_list m); simpl; rewrite /uPred_big_sepM.
first by rewrite later_True. induction (map_to_list m) as [|[i x] l IH]; csimpl; rewrite ?later_True //.
destruct a. by rewrite IHl later_sep. by rewrite later_sep IH.
Qed. Qed.
End gmap. End gmap.
...@@ -205,18 +202,16 @@ Section gset. ...@@ -205,18 +202,16 @@ Section gset.
Lemma big_sepS_sepS P Q X : Lemma big_sepS_sepS P Q X :
(Π★{set X} (λ x, P x Q x))%I (Π★{set X} P Π★{set X} Q)%I. (Π★{set X} (λ x, P x Q x))%I (Π★{set X} P Π★{set X} Q)%I.
Proof. Proof.
rewrite /uPred_big_sepS. induction (elements X); simpl; rewrite /uPred_big_sepS.
first by rewrite right_id. induction (elements X) as [|x l IH]; csimpl; first by rewrite ?right_id.
rewrite IHl -!assoc. apply uPred.sep_proper; first done. by rewrite IH -!assoc (assoc _ (Q _)) [(Q _ _)%I]comm -!assoc.
rewrite !assoc [(_ Q a)%I]comm -!assoc. apply sep_proper; done.
Qed. Qed.
Lemma big_sepS_later P X : Lemma big_sepS_later P X : ( Π★{set X} P)%I (Π★{set X} (λ x, P x))%I.
(Π★{set X} (λ x, P x))%I ( Π★{set X} P)%I.
Proof. Proof.
rewrite /uPred_big_sepS. induction (elements X); simpl; rewrite /uPred_big_sepS.
first by rewrite later_True. induction (elements X) as [|x l IH]; csimpl; first by rewrite ?later_True.
by rewrite IHl later_sep. by rewrite later_sep IH.
Qed. Qed.
End gset. End gset.
......
...@@ -203,7 +203,7 @@ Section proof. ...@@ -203,7 +203,7 @@ Section proof.
(* Now we come to the core of the proof: Updating from waiting to ress. *) (* Now we come to the core of the proof: Updating from waiting to ress. *)
rewrite /waiting /ress sep_exist_l. apply exist_elim=>{Q} Q. rewrite /waiting /ress sep_exist_l. apply exist_elim=>{Q} Q.
rewrite later_wand {1}(later_intro P) !assoc wand_elim_r. rewrite later_wand {1}(later_intro P) !assoc wand_elim_r.
rewrite -big_sepS_later -big_sepS_sepS. apply big_sepS_mono'=>i. rewrite big_sepS_later -big_sepS_sepS. apply big_sepS_mono'=>i.
rewrite -(exist_intro (Q i)) comm. done. rewrite -(exist_intro (Q i)) comm. done.
Qed. Qed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment