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

Misc stuff about sigC.

parent 8d55728b
No related branches found
No related tags found
No related merge requests found
...@@ -1106,9 +1106,14 @@ Section sigma. ...@@ -1106,9 +1106,14 @@ Section sigma.
should not depend on A being an OFE. *) should not depend on A being an OFE. *)
Instance sig_equiv : Equiv (sig P) := λ x1 x2, `x1 `x2. Instance sig_equiv : Equiv (sig P) := λ x1 x2, `x1 `x2.
Instance sig_dist : Dist (sig P) := λ n x1 x2, `x1 {n} `x2. Instance sig_dist : Dist (sig P) := λ n x1 x2, `x1 {n} `x2.
Definition sig_equiv_alt x y : x y `x `y := reflexivity _.
Definition sig_dist_alt n x y : x {n} y `x {n} `y := reflexivity _.
Lemma exist_ne n a1 a2 (H1 : P a1) (H2 : P a2) : Lemma exist_ne n a1 a2 (H1 : P a1) (H2 : P a2) :
a1 {n} a2 a1 H1 {n} a2 H2. a1 {n} a2 a1 H1 {n} a2 H2.
Proof. done. Qed. Proof. done. Qed.
Global Instance proj1_sig_ne : NonExpansive (@proj1_sig _ P). Global Instance proj1_sig_ne : NonExpansive (@proj1_sig _ P).
Proof. by intros n [a Ha] [b Hb] ?. Qed. Proof. by intros n [a Ha] [b Hb] ?. Qed.
Definition sig_ofe_mixin : OfeMixin (sig P). Definition sig_ofe_mixin : OfeMixin (sig P).
...@@ -1126,13 +1131,8 @@ Section sigma. ...@@ -1126,13 +1131,8 @@ Section sigma.
intros ?? n c. apply (conv_compl n (chain_map proj1_sig c)). intros ?? n c. apply (conv_compl n (chain_map proj1_sig c)).
Qed. Qed.
Global Instance sig_timeless (x : sig P) : Global Instance sig_timeless (x : sig P) : Timeless (`x) Timeless x.
Timeless (proj1_sig x) Timeless x. Proof. intros ? y. rewrite sig_dist_alt sig_equiv_alt. apply (timeless _). Qed.
Proof.
intros ? [b ?]; destruct x as [a ?].
rewrite /dist /ofe_dist /= /sig_dist /equiv /ofe_equiv /= /sig_equiv /=.
apply (timeless _).
Qed.
Global Instance sig_discrete_ofe : Discrete A Discrete sigC. Global Instance sig_discrete_ofe : Discrete A Discrete sigC.
Proof. intros ??. apply _. Qed. Proof. intros ??. apply _. Qed.
End sigma. End sigma.
......
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