Commit 1d3902ca by Robbert Krebbers

### Misc tweaks.

parent 86967a81
 ... @@ -991,28 +991,25 @@ End limit_preserving. ... @@ -991,28 +991,25 @@ End limit_preserving. Section sigma. Section sigma. Context {A : ofeT} {P : A → Prop}. Context {A : ofeT} {P : A → Prop}. Implicit Types x : sig P. (* TODO: Find a better place for this Equiv instance. It also (* TODO: Find a better place for this Equiv instance. It also should not depend on A being an OFE. *) should not depend on A being an OFE. *) Instance sig_equiv : Equiv (sig P) := Instance sig_equiv : Equiv (sig P) := λ x1 x2, `x1 ≡ `x2. λ x1 x2, (proj1_sig x1) ≡ (proj1_sig x2). Instance sig_dist : Dist (sig P) := λ n x1 x2, `x1 ≡{n}≡ `x2. Instance sig_dist : Dist (sig P) := Lemma exist_ne n a1 a2 (H1 : P a1) (H2 : P a2) : λ n x1 x2, (proj1_sig x1) ≡{n}≡ (proj1_sig x2). a1 ≡{n}≡ a2 → a1 ↾ H1 ≡{n}≡ a2 ↾ H2. Lemma exist_ne : Proof. done. Qed. ∀ n x1 x2, x1 ≡{n}≡ x2 → ∀ (H1 : P x1) (H2 : P x2), (exist P x1 H1) ≡{n}≡ (exist P x2 H2). Proof. intros n ?? Hx ??. exact Hx. Qed. Global Instance proj1_sig_ne : Proper (dist n ==> dist n) (@proj1_sig _ P). Global Instance proj1_sig_ne : Proper (dist n ==> dist n) (@proj1_sig _ P). Proof. intros n [] [] ?. done. Qed. Proof. by intros n [a Ha] [b Hb] ?. Qed. Definition sig_ofe_mixin : OfeMixin (sig P). Definition sig_ofe_mixin : OfeMixin (sig P). Proof. Proof. split. split. - intros x y. unfold dist, sig_dist, equiv, sig_equiv. - intros [a ?] [b ?]. rewrite /dist /sig_dist /equiv /sig_equiv /=. destruct x, y. apply equiv_dist. apply equiv_dist. - unfold dist, sig_dist. intros n. - intros n. rewrite /dist /sig_dist. split; [intros [] | intros [] [] | intros [] [] []]; simpl; try done. split; [intros []| intros [] []| intros [] [] []]=> //= -> //. intros. by etrans. - intros n [a ?] [b ?]. rewrite /dist /sig_dist /=. apply dist_S. - intros n [??] [??]. unfold dist, sig_dist. simpl. apply dist_S. Qed. Qed. Canonical Structure sigC : ofeT := OfeT (sig P) sig_ofe_mixin. Canonical Structure sigC : ofeT := OfeT (sig P) sig_ofe_mixin. ... @@ -1020,13 +1017,11 @@ Section sigma. ... @@ -1020,13 +1017,11 @@ Section sigma. suddenly becomes explicit...? *) suddenly becomes explicit...? *) Program Definition sig_compl `{LimitPreserving _ P} : Compl sigC := Program Definition sig_compl `{LimitPreserving _ P} : Compl sigC := λ c, exist P (compl (chain_map proj1_sig c)) _. λ c, exist P (compl (chain_map proj1_sig c)) _. Next Obligation. Next Obligation. intros ? Hlim c. apply Hlim=> n /=. by destruct (c n). Qed. intros ? Hlim c. apply Hlim. move=>n /=. destruct (c n). done. Program Definition sig_cofe `{Cofe A, !LimitPreserving P} : Cofe sigC := Qed. Program Definition sig_cofe `{LimitPreserving _ P} : Cofe sigC := {| compl := sig_compl |}. {| compl := sig_compl |}. Next Obligation. Next Obligation. intros ? Hlim 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) : ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!