Commit 685148ab by Robbert Krebbers

### Use scheme - then + then * for bullets.

parent a8591b70
 ... @@ -33,17 +33,17 @@ Qed. ... @@ -33,17 +33,17 @@ Qed. Definition agree_cofe_mixin : CofeMixin (agree A). Definition agree_cofe_mixin : CofeMixin (agree A). Proof. Proof. split. split. * intros x y; split. - intros x y; split. + by intros Hxy n; split; intros; apply Hxy. + by intros Hxy n; split; intros; apply Hxy. + by intros Hxy; split; intros; apply Hxy with n. + by intros Hxy; split; intros; apply Hxy with n. * split. - split. + by split. + by split. + by intros x y Hxy; split; intros; symmetry; apply Hxy; auto; apply Hxy. + by intros x y Hxy; split; intros; symmetry; apply Hxy; auto; apply Hxy. + intros x y z Hxy Hyz; split; intros n'; intros. + intros x y z Hxy Hyz; split; intros n'; intros. - transitivity (agree_is_valid y n'). by apply Hxy. by apply Hyz. * transitivity (agree_is_valid y n'). by apply Hxy. by apply Hyz. - transitivity (y n'). by apply Hxy. by apply Hyz, Hxy. * transitivity (y n'). by apply Hxy. by apply Hyz, Hxy. * intros n x y Hxy; split; intros; apply Hxy; auto. - intros n x y Hxy; split; intros; apply Hxy; auto. * intros c n; apply and_wlog_r; intros; - intros c n; apply and_wlog_r; intros; symmetry; apply (chain_cauchy c); naive_solver. symmetry; apply (chain_cauchy c); naive_solver. Qed. Qed. Canonical Structure agreeC := CofeT agree_cofe_mixin. Canonical Structure agreeC := CofeT agree_cofe_mixin. ... @@ -74,8 +74,8 @@ Proof. ... @@ -74,8 +74,8 @@ Proof. intros n x y1 y2 [Hy' Hy]; split; [|done]. intros n x y1 y2 [Hy' Hy]; split; [|done]. split; intros (?&?&Hxy); repeat (intro || split); split; intros (?&?&Hxy); repeat (intro || split); try apply Hy'; eauto using agree_valid_le. try apply Hy'; eauto using agree_valid_le. * etransitivity; [apply Hxy|apply Hy]; eauto using agree_valid_le. - etransitivity; [apply Hxy|apply Hy]; eauto using agree_valid_le. * etransitivity; [apply Hxy|symmetry; apply Hy, Hy']; - etransitivity; [apply Hxy|symmetry; apply Hy, Hy']; eauto using agree_valid_le. eauto using agree_valid_le. Qed. Qed. Instance: Proper (dist n ==> dist n ==> dist n) (@op (agree A) _). Instance: Proper (dist n ==> dist n ==> dist n) (@op (agree A) _). ... @@ -95,13 +95,13 @@ Qed. ... @@ -95,13 +95,13 @@ Qed. Definition agree_cmra_mixin : CMRAMixin (agree A). Definition agree_cmra_mixin : CMRAMixin (agree A). Proof. Proof. split; try (apply _ || done). split; try (apply _ || done). * by intros n x1 x2 Hx y1 y2 Hy. - by intros n x1 x2 Hx y1 y2 Hy. * intros n x [? Hx]; split; [by apply agree_valid_S|intros n' ?]. - intros n x [? Hx]; split; [by apply agree_valid_S|intros n' ?]. rewrite (Hx n'); last auto. rewrite (Hx n'); last auto. symmetry; apply dist_le with n; try apply Hx; auto. symmetry; apply dist_le with n; try apply Hx; auto. * intros x; apply agree_idemp. - intros x; apply agree_idemp. * by intros x y n [(?&?&?) ?]. - by intros x y n [(?&?&?) ?]. * by intros x y n; rewrite agree_includedN. - by intros x y n; rewrite agree_includedN. Qed. Qed. Lemma agree_op_inv (x1 x2 : agree A) n : ✓{n} (x1 ⋅ x2) → x1 ≡{n}≡ x2. Lemma agree_op_inv (x1 x2 : agree A) n : ✓{n} (x1 ⋅ x2) → x1 ≡{n}≡ x2. Proof. intros Hxy; apply Hxy. Qed. Proof. intros Hxy; apply Hxy. Qed. ... @@ -113,8 +113,8 @@ Qed. ... @@ -113,8 +113,8 @@ Qed. Definition agree_cmra_extend_mixin : CMRAExtendMixin (agree A). Definition agree_cmra_extend_mixin : CMRAExtendMixin (agree A). Proof. Proof. intros n x y1 y2 Hval Hx; exists (x,x); simpl; split. intros n x y1 y2 Hval Hx; exists (x,x); simpl; split. * by rewrite agree_idemp. - by rewrite agree_idemp. * by move: Hval; rewrite Hx; move=> /agree_op_inv->; rewrite agree_idemp. - by move: Hval; rewrite Hx; move=> /agree_op_inv->; rewrite agree_idemp. Qed. Qed. Canonical Structure agreeRA : cmraT := Canonical Structure agreeRA : cmraT := CMRAT agree_cofe_mixin agree_cmra_mixin agree_cmra_extend_mixin. CMRAT agree_cofe_mixin agree_cmra_mixin agree_cmra_extend_mixin. ... ...
 ... @@ -39,14 +39,14 @@ Instance auth_compl : Compl (auth A) := λ c, ... @@ -39,14 +39,14 @@ Instance auth_compl : Compl (auth A) := λ c, Definition auth_cofe_mixin : CofeMixin (auth A). Definition auth_cofe_mixin : CofeMixin (auth A). Proof. Proof. split. split. * intros x y; unfold dist, auth_dist, equiv, auth_equiv. - intros x y; unfold dist, auth_dist, equiv, auth_equiv. rewrite !equiv_dist; naive_solver. rewrite !equiv_dist; naive_solver. * intros n; split. - intros n; split. + by intros ?; split. + by intros ?; split. + by intros ?? [??]; split; symmetry. + by intros ?? [??]; split; symmetry. + intros ??? [??] [??]; split; etransitivity; eauto. + intros ??? [??] [??]; split; etransitivity; eauto. * by intros ? [??] [??] [??]; split; apply dist_S. - by intros ? [??] [??] [??]; split; apply dist_S. * intros c n; split. apply (conv_compl (chain_map authoritative c) n). - intros c n; split. apply (conv_compl (chain_map authoritative c) n). apply (conv_compl (chain_map own c) n). apply (conv_compl (chain_map own c) n). Qed. Qed. Canonical Structure authC := CofeT auth_cofe_mixin. Canonical Structure authC := CofeT auth_cofe_mixin. ... @@ -99,24 +99,24 @@ Proof. destruct x as [[]]; naive_solver eauto using cmra_validN_includedN. Qed. ... @@ -99,24 +99,24 @@ Proof. destruct x as [[]]; naive_solver eauto using cmra_validN_includedN. Qed. Definition auth_cmra_mixin : CMRAMixin (auth A). Definition auth_cmra_mixin : CMRAMixin (auth A). Proof. Proof. split. split. * by intros n x y1 y2 [Hy Hy']; split; simpl; rewrite ?Hy ?Hy'. - by intros n x y1 y2 [Hy Hy']; split; simpl; rewrite ?Hy ?Hy'. * by intros n y1 y2 [Hy Hy']; split; simpl; rewrite ?Hy ?Hy'. - by intros n y1 y2 [Hy Hy']; split; simpl; rewrite ?Hy ?Hy'. * intros n [x a] [y b] [Hx Ha]; simpl in *; - intros n [x a] [y b] [Hx Ha]; simpl in *; destruct Hx; intros ?; cofe_subst; auto. destruct Hx; intros ?; cofe_subst; auto. * by intros n x1 x2 [Hx Hx'] y1 y2 [Hy Hy']; - by intros n x1 x2 [Hx Hx'] y1 y2 [Hy Hy']; split; simpl; rewrite ?Hy ?Hy' ?Hx ?Hx'. split; simpl; rewrite ?Hy ?Hy' ?Hx ?Hx'. * intros n [[] ?] ?; naive_solver eauto using cmra_includedN_S, cmra_validN_S. - intros n [[] ?] ?; naive_solver eauto using cmra_includedN_S, cmra_validN_S. * by split; simpl; rewrite assoc. - by split; simpl; rewrite assoc. * by split; simpl; rewrite comm. - by split; simpl; rewrite comm. * by split; simpl; rewrite ?cmra_unit_l. - by split; simpl; rewrite ?cmra_unit_l. * by split; simpl; rewrite ?cmra_unit_idemp. - by split; simpl; rewrite ?cmra_unit_idemp. * intros n ??; rewrite! auth_includedN; intros [??]. - intros n ??; rewrite! auth_includedN; intros [??]. by split; simpl; apply cmra_unit_preservingN. by split; simpl; apply cmra_unit_preservingN. * assert (∀ n (a b1 b2 : A), b1 ⋅ b2 ≼{n} a → b1 ≼{n} a). - assert (∀ n (a b1 b2 : A), b1 ⋅ b2 ≼{n} a → b1 ≼{n} a). { intros n a b1 b2 <-; apply cmra_includedN_l. } { intros n a b1 b2 <-; apply cmra_includedN_l. } intros n [[a1| |] b1] [[a2| |] b2]; intros n [[a1| |] b1] [[a2| |] b2]; naive_solver eauto using cmra_validN_op_l, cmra_validN_includedN. naive_solver eauto using cmra_validN_op_l, cmra_validN_includedN. * by intros n ??; rewrite auth_includedN; - by intros n ??; rewrite auth_includedN; intros [??]; split; simpl; apply cmra_op_minus. intros [??]; split; simpl; apply cmra_op_minus. Qed. Qed. Definition auth_cmra_extend_mixin : CMRAExtendMixin (auth A). Definition auth_cmra_extend_mixin : CMRAExtendMixin (auth A). ... @@ -150,9 +150,9 @@ Context `{Empty A, !CMRAIdentity A}. ... @@ -150,9 +150,9 @@ Context `{Empty A, !CMRAIdentity A}. Global Instance auth_cmra_identity : CMRAIdentity authRA. Global Instance auth_cmra_identity : CMRAIdentity authRA. Proof. Proof. split; simpl. split; simpl. * by apply (@cmra_empty_valid A _). - by apply (@cmra_empty_valid A _). * by intros x; constructor; rewrite /= left_id. - by intros x; constructor; rewrite /= left_id. * apply _. - apply _. Qed. Qed. Lemma auth_frag_op a b : ◯ (a ⋅ b) ≡ ◯ a ⋅ ◯ b. Lemma auth_frag_op a b : ◯ (a ⋅ b) ≡ ◯ a ⋅ ◯ b. Proof. done. Qed. Proof. done. Qed. ... @@ -221,9 +221,9 @@ Instance auth_map_cmra_monotone {A B : cmraT} (f : A → B) : ... @@ -221,9 +221,9 @@ Instance auth_map_cmra_monotone {A B : cmraT} (f : A → B) : CMRAMonotone f → CMRAMonotone (auth_map f). CMRAMonotone f → CMRAMonotone (auth_map f). Proof. Proof. split. split. * by intros n [x a] [y b]; rewrite !auth_includedN /=; - by intros n [x a] [y b]; rewrite !auth_includedN /=; intros [??]; split; simpl; apply: includedN_preserving. intros [??]; split; simpl; apply: includedN_preserving. * intros n [[a| |] b]; rewrite /= /cmra_validN; - intros n [[a| |] b]; rewrite /= /cmra_validN; naive_solver eauto using @includedN_preserving, @validN_preserving. naive_solver eauto using @includedN_preserving, @validN_preserving. Qed. Qed. Definition authC_map {A B} (f : A -n> B) : authC A -n> authC B := Definition authC_map {A B} (f : A -n> B) : authC A -n> authC B := ... ...
 ... @@ -243,8 +243,8 @@ Qed. ... @@ -243,8 +243,8 @@ Qed. Global Instance cmra_includedN_preorder n : PreOrder (@includedN A _ _ n). Global Instance cmra_includedN_preorder n : PreOrder (@includedN A _ _ n). Proof. Proof. split. split. * by intros x; exists (unit x); rewrite cmra_unit_r. - by intros x; exists (unit x); rewrite cmra_unit_r. * intros x y z [z1 Hy] [z2 Hz]; exists (z1 ⋅ z2). - intros x y z [z1 Hy] [z2 Hz]; exists (z1 ⋅ z2). by rewrite assoc -Hy -Hz. by rewrite assoc -Hy -Hz. Qed. Qed. Global Instance cmra_included_preorder: PreOrder (@included A _ _). Global Instance cmra_included_preorder: PreOrder (@included A _ _). ... @@ -349,8 +349,8 @@ Proof. split. by intros x y. intros x y y' ?? z ?; naive_solver. Qed. ... @@ -349,8 +349,8 @@ Proof. split. by intros x y. intros x y y' ?? z ?; naive_solver. Qed. Lemma cmra_update_updateP x y : x ~~> y ↔ x ~~>: (y =). Lemma cmra_update_updateP x y : x ~~> y ↔ x ~~>: (y =). Proof. Proof. split. split. * by intros Hx z ?; exists y; split; [done|apply (Hx z)]. - by intros Hx z ?; exists y; split; [done|apply (Hx z)]. * by intros Hx z n ?; destruct (Hx z n) as (?&<-&?). - by intros Hx z n ?; destruct (Hx z n) as (?&<-&?). Qed. Qed. Lemma cmra_updateP_id (P : A → Prop) x : P x → x ~~>: P. Lemma cmra_updateP_id (P : A → Prop) x : P x → x ~~>: P. Proof. by intros ? z n ?; exists x. Qed. Proof. by intros ? z n ?; exists x. Qed. ... @@ -402,8 +402,8 @@ Instance cmra_monotone_compose {A B C : cmraT} (f : A → B) (g : B → C) : ... @@ -402,8 +402,8 @@ Instance cmra_monotone_compose {A B C : cmraT} (f : A → B) (g : B → C) : CMRAMonotone f → CMRAMonotone g → CMRAMonotone (g ∘ f). CMRAMonotone f → CMRAMonotone g → CMRAMonotone (g ∘ f). Proof. Proof. split. split. * move=> n x y Hxy /=. by apply includedN_preserving, includedN_preserving. - move=> n x y Hxy /=. by apply includedN_preserving, includedN_preserving. * move=> n x Hx /=. by apply validN_preserving, validN_preserving. - move=> n x Hx /=. by apply validN_preserving, validN_preserving. Qed. Qed. Section cmra_monotone. Section cmra_monotone. ... @@ -527,20 +527,20 @@ Section prod. ... @@ -527,20 +527,20 @@ Section prod. Definition prod_cmra_mixin : CMRAMixin (A * B). Definition prod_cmra_mixin : CMRAMixin (A * B). Proof. Proof. split; try apply _. split; try apply _. * by intros n x y1 y2 [Hy1 Hy2]; split; rewrite /= ?Hy1 ?Hy2. - by intros n x y1 y2 [Hy1 Hy2]; split; rewrite /= ?Hy1 ?Hy2. * by intros n y1 y2 [Hy1 Hy2]; split; rewrite /= ?Hy1 ?Hy2. - by intros n y1 y2 [Hy1 Hy2]; split; rewrite /= ?Hy1 ?Hy2. * by intros n y1 y2 [Hy1 Hy2] [??]; split; rewrite /= -?Hy1 -?Hy2. - by intros n y1 y2 [Hy1 Hy2] [??]; split; rewrite /= -?Hy1 -?Hy2. * by intros n x1 x2 [Hx1 Hx2] y1 y2 [Hy1 Hy2]; - by intros n x1 x2 [Hx1 Hx2] y1 y2 [Hy1 Hy2]; split; rewrite /= ?Hx1 ?Hx2 ?Hy1 ?Hy2. split; rewrite /= ?Hx1 ?Hx2 ?Hy1 ?Hy2. * by intros n x [??]; split; apply cmra_validN_S. - by intros n x [??]; split; apply cmra_validN_S. * by split; rewrite /= assoc. - by split; rewrite /= assoc. * by split; rewrite /= comm. - by split; rewrite /= comm. * by split; rewrite /= cmra_unit_l. - by split; rewrite /= cmra_unit_l. * by split; rewrite /= cmra_unit_idemp. - by split; rewrite /= cmra_unit_idemp. * intros n x y; rewrite !prod_includedN. - intros n x y; rewrite !prod_includedN. by intros [??]; split; apply cmra_unit_preservingN. by intros [??]; split; apply cmra_unit_preservingN. * intros n x y [??]; split; simpl in *; eauto using cmra_validN_op_l. - intros n x y [??]; split; simpl in *; eauto using cmra_validN_op_l. * intros x y n; rewrite prod_includedN; intros [??]. - intros x y n; rewrite prod_includedN; intros [??]. by split; apply cmra_op_minus. by split; apply cmra_op_minus. Qed. Qed. Definition prod_cmra_extend_mixin : CMRAExtendMixin (A * B). Definition prod_cmra_extend_mixin : CMRAExtendMixin (A * B). ... @@ -556,9 +556,9 @@ Section prod. ... @@ -556,9 +556,9 @@ Section prod. CMRAIdentity A → CMRAIdentity B → CMRAIdentity prodRA. CMRAIdentity A → CMRAIdentity B → CMRAIdentity prodRA. Proof. Proof. split. split. * split; apply cmra_empty_valid. - split; apply cmra_empty_valid. * by split; rewrite /=left_id. - by split; rewrite /=left_id. * by intros ? [??]; split; apply (timeless _). - by intros ? [??]; split; apply (timeless _). Qed. Qed. Lemma prod_update x y : x.1 ~~> y.1 → x.2 ~~> y.2 → x ~~> y. Lemma prod_update x y : x.1 ~~> y.1 → x.2 ~~> y.2 → x ~~> y. Proof. intros ?? z n [??]; split; simpl in *; auto. Qed. Proof. intros ?? z n [??]; split; simpl in *; auto. Qed. ... @@ -579,7 +579,7 @@ Instance prod_map_cmra_monotone {A A' B B' : cmraT} (f : A → A') (g : B → B' ... @@ -579,7 +579,7 @@ Instance prod_map_cmra_monotone {A A' B B' : cmraT} (f : A → A') (g : B → B' CMRAMonotone f → CMRAMonotone g → CMRAMonotone (prod_map f g). CMRAMonotone f → CMRAMonotone g → CMRAMonotone (prod_map f g). Proof. Proof. split. split. * intros n x y; rewrite !prod_includedN; intros [??]; simpl. - intros n x y; rewrite !prod_includedN; intros [??]; simpl. by split; apply includedN_preserving. by split; apply includedN_preserving. * by intros n x [??]; split; simpl; apply validN_preserving. - by intros n x [??]; split; simpl; apply validN_preserving. Qed. Qed.
 ... @@ -21,9 +21,9 @@ Proof. done. Qed. ... @@ -21,9 +21,9 @@ Proof. done. Qed. Global Instance big_op_permutation : Proper ((≡ₚ) ==> (≡)) big_op. Global Instance big_op_permutation : Proper ((≡ₚ) ==> (≡)) big_op. Proof. Proof. induction 1 as [|x xs1 xs2 ? IH|x y xs|xs1 xs2 xs3]; simpl; auto. induction 1 as [|x xs1 xs2 ? IH|x y xs|xs1 xs2 xs3]; simpl; auto. * by rewrite IH. - by rewrite IH. * by rewrite !assoc (comm _ x). - by rewrite !assoc (comm _ x). * by transitivity (big_op xs2). - by transitivity (big_op xs2). Qed. Qed. Global Instance big_op_proper : Proper ((≡) ==> (≡)) big_op. Global Instance big_op_proper : Proper ((≡) ==> (≡)) big_op. Proof. by induction 1; simpl; repeat apply (_ : Proper (_ ==> _ ==> _) op). Qed. Proof. by induction 1; simpl; repeat apply (_ : Proper (_ ==> _ ==> _) op). Qed. ... @@ -35,10 +35,10 @@ Qed. ... @@ -35,10 +35,10 @@ Qed. Lemma big_op_contains xs ys : xs `contains` ys → big_op xs ≼ big_op ys. Lemma big_op_contains xs ys : xs `contains` ys → big_op xs ≼ big_op ys. Proof. Proof. induction 1 as [|x xs ys|x y xs|x xs ys|xs ys zs]; rewrite //=. induction 1 as [|x xs ys|x y xs|x xs ys|xs ys zs]; rewrite //=. * by apply cmra_preserving_l. - by apply cmra_preserving_l. * by rewrite !assoc (comm _ y). - by rewrite !assoc (comm _ y). * by transitivity (big_op ys); last apply cmra_included_r. - by transitivity (big_op ys); last apply cmra_included_r. * by transitivity (big_op ys). - by transitivity (big_op ys). Qed. Qed. Lemma big_op_delete xs i x : Lemma big_op_delete xs i x : xs !! i = Some x → x ⋅ big_op (delete i xs) ≡ big_op xs. xs !! i = Some x → x ⋅ big_op (delete i xs) ≡ big_op xs. ... ...
 ... @@ -97,15 +97,15 @@ Section cofe. ... @@ -97,15 +97,15 @@ Section cofe. Global Instance cofe_equivalence : Equivalence ((≡) : relation A). Global Instance cofe_equivalence : Equivalence ((≡) : relation A). Proof. Proof. split. split. * by intros x; rewrite equiv_dist. - by intros x; rewrite equiv_dist. * by intros x y; rewrite !equiv_dist. - by intros x y; rewrite !equiv_dist. * by intros x y z; rewrite !equiv_dist; intros; transitivity y. - by intros x y z; rewrite !equiv_dist; intros; transitivity y. Qed. Qed. Global Instance dist_ne n : Proper (dist n ==> dist n ==> iff) (@dist A _ n). Global Instance dist_ne n : Proper (dist n ==> dist n ==> iff) (@dist A _ n). Proof. Proof. intros x1 x2 ? y1 y2 ?; split; intros. intros x1 x2 ? y1 y2 ?; split; intros. * by transitivity x1; [|transitivity y1]. - by transitivity x1; [|transitivity y1]. * by transitivity x2; [|transitivity y2]. - by transitivity x2; [|transitivity y2]. Qed. Qed. Global Instance dist_proper n : Proper ((≡) ==> (≡) ==> iff) (@dist A _ n). Global Instance dist_proper n : Proper ((≡) ==> (≡) ==> iff) (@dist A _ n). Proof. Proof. ... @@ -158,8 +158,8 @@ Program Definition fixpoint_chain {A : cofeT} `{Inhabited A} (f : A → A) ... @@ -158,8 +158,8 @@ Program Definition fixpoint_chain {A : cofeT} `{Inhabited A} (f : A → A) `{!Contractive f} : chain A := {| chain_car i := Nat.iter (S i) f inhabitant |}. `{!Contractive f} : chain A := {| chain_car i := Nat.iter (S i) f inhabitant |}. Next Obligation. Next Obligation. intros A ? f ? n. induction n as [|n IH]; intros [|i] ?; simpl; try omega. intros A ? f ? n. induction n as [|n IH]; intros [|i] ?; simpl; try omega. * apply (contractive_0 f). - apply (contractive_0 f). * apply (contractive_S f), IH; auto with omega. - apply (contractive_S f), IH; auto with omega. Qed. Qed. Program Definition fixpoint {A : cofeT} `{Inhabited A} (f : A → A) Program Definition fixpoint {A : cofeT} `{Inhabited A} (f : A → A) `{!Contractive f} : A := compl (fixpoint_chain f). `{!Contractive f} : A := compl (fixpoint_chain f). ... @@ -212,14 +212,14 @@ Section cofe_mor. ... @@ -212,14 +212,14 @@ Section cofe_mor. Definition cofe_mor_cofe_mixin : CofeMixin (cofeMor A B). Definition cofe_mor_cofe_mixin : CofeMixin (cofeMor A B). Proof. Proof. split. split. * intros f g; split; [intros Hfg n k; apply equiv_dist, Hfg|]. - intros f g; split; [intros Hfg n k; apply equiv_dist, Hfg|]. intros Hfg k; apply equiv_dist; intros n; apply Hfg. intros Hfg k; apply equiv_dist; intros n; apply Hfg. * intros n; split. - intros n; split. + by intros f x. + by intros f x. + by intros f g ? x. + by intros f g ? x. + by intros f g h ?? x; transitivity (g x). + by intros f g h ?? x; transitivity (g x). * by intros n f g ? x; apply dist_S. - by intros n f g ? x; apply dist_S. * intros c n x; simpl. - intros c n x; simpl. by rewrite (conv_compl (fun_chain c x) n) /=. by rewrite (conv_compl (fun_chain c x) n) /=. Qed. Qed. Canonical Structure cofe_mor : cofeT := CofeT cofe_mor_cofe_mixin. Canonical Structure cofe_mor : cofeT := CofeT cofe_mor_cofe_mixin. ... @@ -274,11 +274,11 @@ Section product. ... @@ -274,11 +274,11 @@ Section product. Definition prod_cofe_mixin : CofeMixin (A * B). Definition prod_cofe_mixin : CofeMixin (A * B). Proof. Proof. split. split. * intros x y; unfold dist, prod_dist, equiv, prod_equiv, prod_relation. - intros x y; unfold dist, prod_dist, equiv, prod_equiv, prod_relation. rewrite !equiv_dist; naive_solver. rewrite !equiv_dist; naive_solver. * apply _. - apply _. * by intros n [x1 y1] [x2 y2] [??]; split; apply dist_S. - by intros n [x1 y1] [x2 y2] [??]; split; apply dist_S. * intros c n; split. apply (conv_compl (chain_map fst c) n). - intros c n; split. apply (conv_compl (chain_map fst c) n). apply (conv_compl (chain_map snd c) n). apply (conv_compl (chain_map snd c) n). Qed. Qed. Canonical Structure prodC : cofeT := CofeT prod_cofe_mixin. Canonical Structure prodC : cofeT := CofeT prod_cofe_mixin. ... @@ -308,10 +308,10 @@ Section discrete_cofe. ... @@ -308,10 +308,10 @@ Section discrete_cofe. Definition discrete_cofe_mixin : CofeMixin A. Definition discrete_cofe_mixin : CofeMixin A. Proof. Proof. split. split. * intros x y; split; [done|intros Hn; apply (Hn 0)]. - intros x y; split; [done|intros Hn; apply (Hn 0)]. * done. - done. * done. - done. * intros c n. rewrite /compl /discrete_compl /=. - intros c n. rewrite /compl /discrete_compl /=. symmetry; apply (chain_cauchy c 0 (S n)); omega. symmetry; apply (chain_cauchy c 0 (S n)); omega. Qed. Qed. Definition discreteC : cofeT := CofeT discrete_cofe_mixin. Definition discreteC : cofeT := CofeT discrete_cofe_mixin. ... @@ -347,14 +347,14 @@ Section later. ... @@ -347,14 +347,14 @@ Section later. Definition later_cofe_mixin : CofeMixin (later A). Definition later_cofe_mixin : CofeMixin (later A). Proof. Proof. split. split. * intros x y; unfold equiv, later_equiv; rewrite !equiv_dist. - intros x y; unfold equiv, later_equiv; rewrite !equiv_dist. split. intros Hxy [|n]; [done|apply Hxy]. intros Hxy n; apply (Hxy (S n)). split. intros Hxy [|n]; [done|apply Hxy]. intros Hxy n; apply (Hxy (S n)). * intros [|n]; [by split|split]; unfold dist, later_dist. - intros [|n]; [by split|split]; unfold dist, later_dist. + by intros [x]. + by intros [x]. + by intros [x] [y]. + by intros [x] [y]. + by intros [x] [y] [z] ??; transitivity y. + by intros [x] [y] [z] ??; transitivity y. * intros [|n] [x] [y] ?; [done|]; unfold dist, later_dist; by apply dist_S. - intros [|n] [x] [y] ?; [done|]; unfold dist, later_dist; by apply dist_S. * intros c [|n]; [done|by apply (conv_compl (later_chain c) n)]. - intros c [|n]; [done|by apply (conv_compl (later_chain c) n)]. Qed. Qed. Canonical Structure laterC : cofeT := CofeT later_cofe_mixin. Canonical Structure laterC : cofeT := CofeT later_cofe_mixin. Global Instance Next_contractive : Contractive (@Next A). Global Instance Next_contractive : Contractive (@Next A). ... ...
 ... @@ -43,8 +43,8 @@ Qed. ... @@ -43,8 +43,8 @@ Qed. Lemma fg {k} (x : A (S (S k))) : f (S k) (g (S k) x) ≡{k}≡ x. Lemma fg {k} (x : A (S (S k))) : f (S k) (g (S k) x) ≡{k}≡ x. Proof. Proof. induction k as [|k IH]; simpl. induction k as [|k IH]; simpl. * rewrite f_S g_S -{2}(map_id _ _ x) -map_comp. apply (contractive_0 map). - rewrite f_S g_S -{2}(map_id _ _ x) -map_comp. apply (contractive_0 map). * rewrite f_S g_S -{2}(map_id _ _ x) -map_comp. by apply (contractive_S map). - rewrite f_S g_S -{2}(map_id _ _ x) -map_comp. by apply (contractive_S map). Qed. Qed. Record tower := { Record tower := { ... @@ -66,15 +66,15 @@ Qed. ... @@ -66,15 +66,15 @@ Qed. Definition tower_cofe_mixin : CofeMixin tower. Definition tower_cofe_mixin : CofeMixin tower. Proof. Proof. split. split. * intros X Y; split; [by intros HXY n k; apply equiv_dist|]. - intros X Y; split; [by intros HXY n k; apply equiv_dist|]. intros HXY k; apply equiv_dist; intros n; apply HXY. intros HXY k; apply equiv_dist; intros n; apply HXY. * intros k; split. - intros k; split. + by intros X n. + by intros X n. + by intros X Y ? n. + by intros X Y ? n. + by intros X Y Z ?? n; transitivity (Y n). + by intros X Y Z ?? n; transitivity (Y n). * intros k X Y HXY n; apply dist_S. - intros k X Y HXY n; apply dist_S. by rewrite -(g_tower X) (HXY (S n)) g_tower. by rewrite -(g_tower X) (HXY (S n)) g_tower. * intros c n k; rewrite /= (conv_compl (tower_chain c k) n). - intros c n k; rewrite /= (conv_compl (tower_chain c k) n). apply (chain_cauchy c); lia. apply (chain_cauchy c); lia. Qed. Qed. Definition T : cofeT := CofeT tower_cofe_mixin. Definition T : cofeT := CofeT tower_cofe_mixin. ... @@ -136,12 +136,12 @@ Lemma g_embed_coerce {k i} (x : A k) : ... @@ -136,12 +136,12 @@ Lemma g_embed_coerce {k i} (x : A k) : g i (embed_coerce (S i) x) ≡ embed_coerce i x. g i (embed_coerce (S i) x) ≡ embed_coerce i x. Proof. Proof. unfold embed_coerce; destruct (le_lt_dec (S i) k), (le_lt_dec i k); simpl. unfold embed_coerce; destruct (le_lt_dec (S i) k), (le_lt_dec i k); simpl. * symmetry; by erewrite (@gg_gg _ _ 1 (k - S i)); simpl.