Skip to content
Snippets Groups Projects
Commit 1df177bd authored by Ralf Jung's avatar Ralf Jung
Browse files

uPred: show that the definition in the appendix is equivalent to the one in Coq

parent a27982f7
No related branches found
No related tags found
No related merge requests found
...@@ -107,6 +107,23 @@ Proof. ...@@ -107,6 +107,23 @@ Proof.
intros [Hne] ???. eapply Hne; try done. eauto using uPred_mono, cmra_validN_le. intros [Hne] ???. eapply Hne; try done. eauto using uPred_mono, cmra_validN_le.
Qed. Qed.
(* Equivalence to the definition of uPred in the appendix. *)
Lemma uPred_alt {M : ucmraT} (P: nat M Prop) :
( n1 n2 x1 x2, P n1 x1 x1 {n1} x2 n2 n1 P n2 x2)
( ( x n1 n2, n2 n1 P n1 x P n2 x) (* Pointwise down-closed *)
( n x1 x2, x1 {n} x2 m, m n P m x1 P m x2) (* Non-expansive *)
( n x1 x2, x1 {n} x2 m, m n P m x1 P m x2) (* Monotonicity *)
).
Proof.
(* Provide this lemma to eauto. *)
assert ( n1 n2 (x1 x2 : M), n2 n1 x1 {n1} x2 x1 {n2} x2).
{ intros ????? H. eapply cmra_includedN_le; last done. by rewrite H. }
(* Now go ahead. *)
split.
- intros Hupred. repeat split; eauto using cmra_includedN_le.
- intros (Hdown & _ & Hmono) **. eapply Hmono; [done..|]. eapply Hdown; done.
Qed.
(** functor *) (** functor *)
Program Definition uPred_map {M1 M2 : ucmraT} (f : M2 -n> M1) Program Definition uPred_map {M1 M2 : ucmraT} (f : M2 -n> M1)
`{!CmraMorphism f} (P : uPred M1) : `{!CmraMorphism f} (P : uPred M1) :
......
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