Commit 83c9c1c1 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Merge branch 'big_rename' into 'master'

Fix some longstanding renaming issues

See merge request FP/iris-coq!63
parents d9417f9a 2a92f265
...@@ -131,7 +131,7 @@ Proof. ...@@ -131,7 +131,7 @@ Proof.
- destruct (elem_of_agree x1); naive_solver. - destruct (elem_of_agree x1); naive_solver.
Qed. Qed.
Definition agree_cmra_mixin : CMRAMixin (agree A). Definition agree_cmra_mixin : CmraMixin (agree A).
Proof. Proof.
apply cmra_total_mixin; try apply _ || by eauto. apply cmra_total_mixin; try apply _ || by eauto.
- intros n x; rewrite !agree_validN_def; eauto using dist_S. - intros n x; rewrite !agree_validN_def; eauto using dist_S.
...@@ -142,19 +142,19 @@ Proof. ...@@ -142,19 +142,19 @@ Proof.
+ by rewrite agree_idemp. + by rewrite agree_idemp.
+ by move: Hval; rewrite Hx; move=> /agree_op_invN->; rewrite agree_idemp. + by move: Hval; rewrite Hx; move=> /agree_op_invN->; rewrite agree_idemp.
Qed. Qed.
Canonical Structure agreeR : cmraT := CMRAT (agree A) agree_cmra_mixin. Canonical Structure agreeR : cmraT := CmraT (agree A) agree_cmra_mixin.
Global Instance agree_total : CMRATotal agreeR. Global Instance agree_cmra_total : CmraTotal agreeR.
Proof. rewrite /CMRATotal; eauto. Qed. Proof. rewrite /CmraTotal; eauto. Qed.
Global Instance agree_persistent (x : agree A) : Persistent x. Global Instance agree_core_id (x : agree A) : CoreId x.
Proof. by constructor. Qed. Proof. by constructor. Qed.
Global Instance agree_discrete : Discrete A CMRADiscrete agreeR. Global Instance agree_cmra_discrete : OfeDiscrete A CmraDiscrete agreeR.
Proof. Proof.
intros HD. split. intros HD. split.
- intros x y [H H'] n; split=> a; setoid_rewrite <-(timeless_iff_0 _ _); auto. - intros x y [H H'] n; split=> a; setoid_rewrite <-(discrete_iff_0 _ _); auto.
- intros x; rewrite agree_validN_def=> Hv n. apply agree_validN_def=> a b ??. - intros x; rewrite agree_validN_def=> Hv n. apply agree_validN_def=> a b ??.
apply timeless_iff_0; auto. apply discrete_iff_0; auto.
Qed. Qed.
Program Definition to_agree (a : A) : agree A := Program Definition to_agree (a : A) : agree A :=
...@@ -267,7 +267,7 @@ Section agree_map. ...@@ -267,7 +267,7 @@ Section agree_map.
- intros (a&->&?). exists (f a). rewrite -Hfg; eauto. - intros (a&->&?). exists (f a). rewrite -Hfg; eauto.
Qed. Qed.
Global Instance agree_map_morphism : CMRAMorphism (agree_map f). Global Instance agree_map_morphism : CmraMorphism (agree_map f).
Proof using Hf. Proof using Hf.
split; first apply _. split; first apply _.
- intros n x. rewrite !agree_validN_def=> Hv b b' /=. - intros n x. rewrite !agree_validN_def=> Hv b b' /=.
......
...@@ -49,10 +49,10 @@ Proof. ...@@ -49,10 +49,10 @@ Proof.
(λ x, (authoritative x, auth_own x))); by repeat intro. (λ x, (authoritative x, auth_own x))); by repeat intro.
Qed. Qed.
Global Instance Auth_timeless a b : Global Instance Auth_discrete a b :
Timeless a Timeless b Timeless (Auth a b). Discrete a Discrete b Discrete (Auth a b).
Proof. by intros ?? [??] [??]; split; apply: timeless. Qed. Proof. by intros ?? [??] [??]; split; apply: discrete. Qed.
Global Instance auth_discrete : Discrete A Discrete authC. Global Instance auth_ofe_discrete : OfeDiscrete A OfeDiscrete authC.
Proof. intros ? [??]; apply _. Qed. Proof. intros ? [??]; apply _. Qed.
Global Instance auth_leibniz : LeibnizEquiv A LeibnizEquiv (auth A). Global Instance auth_leibniz : LeibnizEquiv A LeibnizEquiv (auth A).
Proof. by intros ? [??] [??] [??]; f_equal/=; apply leibniz_equiv. Qed. Proof. by intros ? [??] [??] [??]; f_equal/=; apply leibniz_equiv. Qed.
...@@ -113,7 +113,7 @@ Proof. ...@@ -113,7 +113,7 @@ Proof.
destruct x as [[[]|]]; naive_solver eauto using cmra_validN_includedN. destruct x as [[[]|]]; naive_solver eauto using cmra_validN_includedN.
Qed. Qed.
Lemma auth_valid_discrete `{CMRADiscrete A} x : Lemma auth_valid_discrete `{CmraDiscrete A} x :
x match authoritative x with x match authoritative x with
| Excl' a => auth_own x a a | Excl' a => auth_own x a a
| None => auth_own x | None => auth_own x
...@@ -125,18 +125,18 @@ Proof. ...@@ -125,18 +125,18 @@ Proof.
Qed. Qed.
Lemma auth_validN_2 n a b : {n} ( a b) b {n} a {n} a. Lemma auth_validN_2 n a b : {n} ( a b) b {n} a {n} a.
Proof. by rewrite auth_validN_eq /= left_id. Qed. Proof. by rewrite auth_validN_eq /= left_id. Qed.
Lemma auth_valid_discrete_2 `{CMRADiscrete A} a b : ( a b) b a a. Lemma auth_valid_discrete_2 `{CmraDiscrete A} a b : ( a b) b a a.
Proof. by rewrite auth_valid_discrete /= left_id. Qed. Proof. by rewrite auth_valid_discrete /= left_id. Qed.
Lemma authoritative_valid x : x authoritative x. Lemma authoritative_valid x : x authoritative x.
Proof. by destruct x as [[[]|]]. Qed. Proof. by destruct x as [[[]|]]. Qed.
Lemma auth_own_valid `{CMRADiscrete A} x : x auth_own x. Lemma auth_own_valid `{CmraDiscrete A} x : x auth_own x.
Proof. Proof.
rewrite auth_valid_discrete. rewrite auth_valid_discrete.
destruct x as [[[]|]]; naive_solver eauto using cmra_valid_included. destruct x as [[[]|]]; naive_solver eauto using cmra_valid_included.
Qed. Qed.
Lemma auth_cmra_mixin : CMRAMixin (auth A). Lemma auth_cmra_mixin : CmraMixin (auth A).
Proof. Proof.
apply cmra_total_mixin. apply cmra_total_mixin.
- eauto. - eauto.
...@@ -166,9 +166,9 @@ Proof. ...@@ -166,9 +166,9 @@ Proof.
as (b1&b2&?&?&?); auto using auth_own_validN. as (b1&b2&?&?&?); auto using auth_own_validN.
by exists (Auth ea1 b1), (Auth ea2 b2). by exists (Auth ea1 b1), (Auth ea2 b2).
Qed. Qed.
Canonical Structure authR := CMRAT (auth A) auth_cmra_mixin. Canonical Structure authR := CmraT (auth A) auth_cmra_mixin.
Global Instance auth_cmra_discrete : CMRADiscrete A CMRADiscrete authR. Global Instance auth_cmra_discrete : CmraDiscrete A CmraDiscrete authR.
Proof. Proof.
split; first apply _. split; first apply _.
intros [[[?|]|] ?]; rewrite auth_valid_eq auth_validN_eq /=; auto. intros [[[?|]|] ?]; rewrite auth_valid_eq auth_validN_eq /=; auto.
...@@ -178,17 +178,17 @@ Proof. ...@@ -178,17 +178,17 @@ Proof.
Qed. Qed.
Instance auth_empty : Unit (auth A) := Auth ε ε. Instance auth_empty : Unit (auth A) := Auth ε ε.
Lemma auth_ucmra_mixin : UCMRAMixin (auth A). Lemma auth_ucmra_mixin : UcmraMixin (auth A).
Proof. Proof.
split; simpl. split; simpl.
- rewrite auth_valid_eq /=. apply ucmra_unit_valid. - rewrite auth_valid_eq /=. apply ucmra_unit_valid.
- by intros x; constructor; rewrite /= left_id. - by intros x; constructor; rewrite /= left_id.
- do 2 constructor; simpl; apply (persistent_core _). - do 2 constructor; simpl; apply (core_id_core _).
Qed. Qed.
Canonical Structure authUR := UCMRAT (auth A) auth_ucmra_mixin. Canonical Structure authUR := UcmraT (auth A) auth_ucmra_mixin.
Global Instance auth_frag_persistent a : Persistent a Persistent ( a). Global Instance auth_frag_core_id a : CoreId a CoreId ( a).
Proof. do 2 constructor; simpl; auto. by apply persistent_core. Qed. Proof. do 2 constructor; simpl; auto. by apply core_id_core. Qed.
(** Internalized properties *) (** Internalized properties *)
Lemma auth_equivI {M} (x y : auth A) : Lemma auth_equivI {M} (x y : auth A) :
...@@ -274,7 +274,7 @@ Proof. ...@@ -274,7 +274,7 @@ Proof.
apply option_fmap_ne; [|done]=> x y ?; by apply excl_map_ne. apply option_fmap_ne; [|done]=> x y ?; by apply excl_map_ne.
Qed. Qed.
Instance auth_map_cmra_morphism {A B : ucmraT} (f : A B) : Instance auth_map_cmra_morphism {A B : ucmraT} (f : A B) :
CMRAMorphism f CMRAMorphism (auth_map f). CmraMorphism f CmraMorphism (auth_map f).
Proof. Proof.
split; try apply _. split; try apply _.
- intros n [[[a|]|] b]; rewrite !auth_validN_eq; try - intros n [[[a|]|] b]; rewrite !auth_validN_eq; try
......
This diff is collapsed.
...@@ -39,12 +39,12 @@ Section coPset. ...@@ -39,12 +39,12 @@ Section coPset.
Qed. Qed.
Canonical Structure coPsetR := discreteR coPset coPset_ra_mixin. Canonical Structure coPsetR := discreteR coPset coPset_ra_mixin.
Global Instance coPset_cmra_discrete : CMRADiscrete coPsetR. Global Instance coPset_cmra_discrete : CmraDiscrete coPsetR.
Proof. apply discrete_cmra_discrete. Qed. Proof. apply discrete_cmra_discrete. Qed.
Lemma coPset_ucmra_mixin : UCMRAMixin coPset. Lemma coPset_ucmra_mixin : UcmraMixin coPset.
Proof. split. done. intros X. by rewrite coPset_op_union left_id_L. done. Qed. Proof. split. done. intros X. by rewrite coPset_op_union left_id_L. done. Qed.
Canonical Structure coPsetUR := UCMRAT coPset coPset_ucmra_mixin. Canonical Structure coPsetUR := UcmraT coPset coPset_ucmra_mixin.
Lemma coPset_opM X mY : X ? mY = X from_option id mY. Lemma coPset_opM X mY : X ? mY = X from_option id mY.
Proof. destruct mY; by rewrite /= ?right_id_L. Qed. Proof. destruct mY; by rewrite /= ?right_id_L. Qed.
...@@ -112,10 +112,10 @@ Section coPset_disj. ...@@ -112,10 +112,10 @@ Section coPset_disj.
Qed. Qed.
Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin. Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
Global Instance coPset_disj_cmra_discrete : CMRADiscrete coPset_disjR. Global Instance coPset_disj_cmra_discrete : CmraDiscrete coPset_disjR.
Proof. apply discrete_cmra_discrete. Qed. Proof. apply discrete_cmra_discrete. Qed.
Lemma coPset_disj_ucmra_mixin : UCMRAMixin coPset_disj. Lemma coPset_disj_ucmra_mixin : UcmraMixin coPset_disj.
Proof. split; try apply _ || done. intros [X|]; coPset_disj_solve. Qed. Proof. split; try apply _ || done. intros [X|]; coPset_disj_solve. Qed.
Canonical Structure coPset_disjUR := UCMRAT coPset_disj coPset_disj_ucmra_mixin. Canonical Structure coPset_disjUR := UcmraT coPset_disj coPset_disj_ucmra_mixin.
End coPset_disj. End coPset_disj.
...@@ -96,16 +96,17 @@ Next Obligation. ...@@ -96,16 +96,17 @@ Next Obligation.
+ rewrite (conv_compl n (csum_chain_r c b')) /=. destruct (c n); naive_solver. + rewrite (conv_compl n (csum_chain_r c b')) /=. destruct (c n); naive_solver.
Qed. Qed.
Global Instance csum_discrete : Discrete A Discrete B Discrete csumC. Global Instance csum_ofe_discrete :
Proof. by inversion_clear 3; constructor; apply (timeless _). Qed. OfeDiscrete A OfeDiscrete B OfeDiscrete csumC.
Proof. by inversion_clear 3; constructor; apply (discrete _). Qed.
Global Instance csum_leibniz : Global Instance csum_leibniz :
LeibnizEquiv A LeibnizEquiv B LeibnizEquiv (csumC A B). LeibnizEquiv A LeibnizEquiv B LeibnizEquiv (csumC A B).
Proof. by destruct 3; f_equal; apply leibniz_equiv. Qed. Proof. by destruct 3; f_equal; apply leibniz_equiv. Qed.
Global Instance Cinl_timeless a : Timeless a Timeless (Cinl a). Global Instance Cinl_discrete a : Discrete a Discrete (Cinl a).
Proof. by inversion_clear 2; constructor; apply (timeless _). Qed. Proof. by inversion_clear 2; constructor; apply (discrete _). Qed.
Global Instance Cinr_timeless b : Timeless b Timeless (Cinr b). Global Instance Cinr_discrete b : Discrete b Discrete (Cinr b).
Proof. by inversion_clear 2; constructor; apply (timeless _). Qed. Proof. by inversion_clear 2; constructor; apply (discrete _). Qed.
End cofe. End cofe.
Arguments csumC : clear implicits. Arguments csumC : clear implicits.
...@@ -202,7 +203,7 @@ Proof. ...@@ -202,7 +203,7 @@ Proof.
+ exists (Cinr c); by constructor. + exists (Cinr c); by constructor.
Qed. Qed.
Lemma csum_cmra_mixin : CMRAMixin (csum A B). Lemma csum_cmra_mixin : CmraMixin (csum A B).
Proof. Proof.
split. split.
- intros [] n; destruct 1; constructor; by ofe_subst. - intros [] n; destruct 1; constructor; by ofe_subst.
...@@ -246,19 +247,19 @@ Proof. ...@@ -246,19 +247,19 @@ Proof.
exists (Cinr z1), (Cinr z2). by repeat constructor. exists (Cinr z1), (Cinr z2). by repeat constructor.
+ by exists CsumBot, CsumBot; destruct y1, y2; inversion_clear Hx'. + by exists CsumBot, CsumBot; destruct y1, y2; inversion_clear Hx'.
Qed. Qed.
Canonical Structure csumR := CMRAT (csum A B) csum_cmra_mixin. Canonical Structure csumR := CmraT (csum A B) csum_cmra_mixin.
Global Instance csum_cmra_discrete : Global Instance csum_cmra_discrete :
CMRADiscrete A CMRADiscrete B CMRADiscrete csumR. CmraDiscrete A CmraDiscrete B CmraDiscrete csumR.
Proof. Proof.
split; first apply _. split; first apply _.
by move=>[a|b|] HH /=; try apply cmra_discrete_valid. by move=>[a|b|] HH /=; try apply cmra_discrete_valid.
Qed. Qed.
Global Instance Cinl_persistent a : Persistent a Persistent (Cinl a). Global Instance Cinl_core_id a : CoreId a CoreId (Cinl a).
Proof. rewrite /Persistent /=. inversion_clear 1; by repeat constructor. Qed. Proof. rewrite /CoreId /=. inversion_clear 1; by repeat constructor. Qed.
Global Instance Cinr_persistent b : Persistent b Persistent (Cinr b). Global Instance Cinr_core_id b : CoreId b CoreId (Cinr b).
Proof. rewrite /Persistent /=. inversion_clear 1; by repeat constructor. Qed. Proof. rewrite /CoreId /=. inversion_clear 1; by repeat constructor. Qed.
Global Instance Cinl_exclusive a : Exclusive a Exclusive (Cinl a). Global Instance Cinl_exclusive a : Exclusive a Exclusive (Cinl a).
Proof. by move=> H[]? =>[/H||]. Qed. Proof. by move=> H[]? =>[/H||]. Qed.
...@@ -357,7 +358,7 @@ Arguments csumR : clear implicits. ...@@ -357,7 +358,7 @@ Arguments csumR : clear implicits.
(* Functor *) (* Functor *)
Instance csum_map_cmra_morphism {A A' B B' : cmraT} (f : A A') (g : B B') : Instance csum_map_cmra_morphism {A A' B B' : cmraT} (f : A A') (g : B B') :
CMRAMorphism f CMRAMorphism g CMRAMorphism (csum_map f g). CmraMorphism f CmraMorphism g CmraMorphism (csum_map f g).
Proof. Proof.
split; try apply _. split; try apply _.
- intros n [a|b|]; simpl; auto using cmra_morphism_validN. - intros n [a|b|]; simpl; auto using cmra_morphism_validN.
......
...@@ -50,13 +50,13 @@ Qed. ...@@ -50,13 +50,13 @@ Qed.
Canonical Structure dec_agreeR : cmraT := Canonical Structure dec_agreeR : cmraT :=
discreteR (dec_agree A) dec_agree_ra_mixin. discreteR (dec_agree A) dec_agree_ra_mixin.
Global Instance dec_agree_cmra_discrete : CMRADiscrete dec_agreeR. Global Instance dec_agree_cmra_discrete : CmraDiscrete dec_agreeR.
Proof. apply discrete_cmra_discrete. Qed. Proof. apply discrete_cmra_discrete. Qed.
Global Instance dec_agree_total : CMRATotal dec_agreeR. Global Instance dec_agree_cmra_total : CmraTotal dec_agreeR.
Proof. intros x. by exists x. Qed. Proof. intros x. by exists x. Qed.
(* Some properties of this CMRA *) (* Some properties of this CMRA *)
Global Instance dec_agree_persistent (x : dec_agreeR) : Persistent x. Global Instance dec_agree_core_id (x : dec_agreeR) : CoreId x.
Proof. by constructor. Qed. Proof. by constructor. Qed.
Lemma dec_agree_ne a b : a b DecAgree a DecAgree b = DecAgreeBot. Lemma dec_agree_ne a b : a b DecAgree a DecAgree b = DecAgreeBot.
......
From iris.algebra Require Export cmra updates. From iris.algebra Require Export cmra updates.
Set Default Proof Using "Type". Set Default Proof Using "Type".
Record DRAMixin A `{Equiv A, Core A, Disjoint A, Op A, Valid A} := { Record DraMixin A `{Equiv A, Core A, Disjoint A, Op A, Valid A} := {
(* setoids *) (* setoids *)
mixin_dra_equivalence : Equivalence (() : relation A); mixin_dra_equivalence : Equivalence (() : relation A);
mixin_dra_op_proper : Proper (() ==> () ==> ()) (); mixin_dra_op_proper : Proper (() ==> () ==> ()) ();
...@@ -24,16 +24,16 @@ Record DRAMixin A `{Equiv A, Core A, Disjoint A, Op A, Valid A} := { ...@@ -24,16 +24,16 @@ Record DRAMixin A `{Equiv A, Core A, Disjoint A, Op A, Valid A} := {
mixin_dra_core_mono x y : mixin_dra_core_mono x y :
z, x y x y core (x y) core x z z core x z z, x y x y core (x y) core x z z core x z
}. }.
Structure draT := DRAT { Structure draT := DraT {
dra_car :> Type; dra_car :> Type;
dra_equiv : Equiv dra_car; dra_equiv : Equiv dra_car;
dra_core : Core dra_car; dra_core : Core dra_car;
dra_disjoint : Disjoint dra_car; dra_disjoint : Disjoint dra_car;
dra_op : Op dra_car; dra_op : Op dra_car;
dra_valid : Valid dra_car; dra_valid : Valid dra_car;
dra_mixin : DRAMixin dra_car dra_mixin : DraMixin dra_car
}. }.
Arguments DRAT _ {_ _ _ _ _} _. Arguments DraT _ {_ _ _ _ _} _.
Arguments dra_car : simpl never. Arguments dra_car : simpl never.
Arguments dra_equiv : simpl never. Arguments dra_equiv : simpl never.
Arguments dra_core : simpl never. Arguments dra_core : simpl never.
...@@ -177,10 +177,10 @@ Qed. ...@@ -177,10 +177,10 @@ Qed.
Canonical Structure validityR : cmraT := Canonical Structure validityR : cmraT :=
discreteR (validity A) validity_ra_mixin. discreteR (validity A) validity_ra_mixin.
Global Instance validity_cmra_disrete : CMRADiscrete validityR. Global Instance validity_disrete_cmra : CmraDiscrete validityR.
Proof. apply discrete_cmra_discrete. Qed. Proof. apply discrete_cmra_discrete. Qed.
Global Instance validity_cmra_total : CMRATotal validityR. Global Instance validity_cmra_total : CmraTotal validityR.
Proof. rewrite /CMRATotal; eauto. Qed. Proof. rewrite /CmraTotal; eauto. Qed.
Lemma validity_update x y : Lemma validity_update x y :
( c, x c validity_car x c y validity_car y c) x ~~> y. ( c, x c validity_car x c y validity_car y c) x ~~> y.
......
...@@ -59,14 +59,14 @@ Proof. ...@@ -59,14 +59,14 @@ Proof.
- by intros []; constructor. - by intros []; constructor.
Qed. Qed.
Global Instance excl_discrete : Discrete A Discrete exclC. Global Instance excl_ofe_discrete : OfeDiscrete A OfeDiscrete exclC.
Proof. by inversion_clear 2; constructor; apply (timeless _). Qed. Proof. by inversion_clear 2; constructor; apply (discrete _). Qed.
Global Instance excl_leibniz : LeibnizEquiv A LeibnizEquiv (excl A). Global Instance excl_leibniz : LeibnizEquiv A LeibnizEquiv (excl A).
Proof. by destruct 2; f_equal; apply leibniz_equiv. Qed. Proof. by destruct 2; f_equal; apply leibniz_equiv. Qed.
Global Instance Excl_timeless a : Timeless a Timeless (Excl a). Global Instance Excl_discrete a : Discrete a Discrete (Excl a).
Proof. by inversion_clear 2; constructor; apply (timeless _). Qed. Proof. by inversion_clear 2; constructor; apply (discrete _). Qed.
Global Instance ExclBot_timeless : Timeless (@ExclBot A). Global Instance ExclBot_discrete : Discrete (@ExclBot A).
Proof. by inversion_clear 1; constructor. Qed. Proof. by inversion_clear 1; constructor. Qed.
(* CMRA *) (* CMRA *)
...@@ -77,7 +77,7 @@ Instance excl_validN : ValidN (excl A) := λ n x, ...@@ -77,7 +77,7 @@ Instance excl_validN : ValidN (excl A) := λ n x,
Instance excl_pcore : PCore (excl A) := λ _, None. Instance excl_pcore : PCore (excl A) := λ _, None.
Instance excl_op : Op (excl A) := λ x y, ExclBot. Instance excl_op : Op (excl A) := λ x y, ExclBot.
Lemma excl_cmra_mixin : CMRAMixin (excl A). Lemma excl_cmra_mixin : CmraMixin (excl A).
Proof. Proof.
split; try discriminate. split; try discriminate.
- by intros n []; destruct 1; constructor. - by intros n []; destruct 1; constructor.
...@@ -89,9 +89,9 @@ Proof. ...@@ -89,9 +89,9 @@ Proof.
- by intros n [?|] [?|]. - by intros n [?|] [?|].
- intros n x [?|] [?|] ?; inversion_clear 1; eauto. - intros n x [?|] [?|] ?; inversion_clear 1; eauto.
Qed. Qed.
Canonical Structure exclR := CMRAT (excl A) excl_cmra_mixin. Canonical Structure exclR := CmraT (excl A) excl_cmra_mixin.
Global Instance excl_cmra_discrete : Discrete A CMRADiscrete exclR. Global Instance excl_cmra_discrete : OfeDiscrete A CmraDiscrete exclR.
Proof. split. apply _. by intros []. Qed. Proof. split. apply _. by intros []. Qed.
(** Internalized properties *) (** Internalized properties *)
...@@ -142,7 +142,7 @@ Instance excl_map_ne {A B : ofeT} n : ...@@ -142,7 +142,7 @@ Instance excl_map_ne {A B : ofeT} n :
Proper ((dist n ==> dist n) ==> dist n ==> dist n) (@excl_map A B). Proper ((dist n ==> dist n) ==> dist n ==> dist n) (@excl_map A B).
Proof. by intros f f' Hf; destruct 1; constructor; apply Hf. Qed. Proof. by intros f f' Hf; destruct 1; constructor; apply Hf. Qed.
Instance excl_map_cmra_morphism {A B : ofeT} (f : A B) : Instance excl_map_cmra_morphism {A B : ofeT} (f : A B) :
NonExpansive f CMRAMorphism (excl_map f). NonExpansive f CmraMorphism (excl_map f).
Proof. split; try done; try apply _. by intros n [a|]. Qed. Proof. split; try done; try apply _. by intros n [a|]. Qed.
Definition exclC_map {A B} (f : A -n> B) : exclC A -n> exclC B := Definition exclC_map {A B} (f : A -n> B) : exclC A -n> exclC B :=
CofeMor (excl_map f). CofeMor (excl_map f).
......
...@@ -26,7 +26,7 @@ Proof. ...@@ -26,7 +26,7 @@ Proof.
Qed. Qed.
Canonical Structure fracR := discreteR frac frac_ra_mixin. Canonical Structure fracR := discreteR frac frac_ra_mixin.
Global Instance frac_cmra_discrete : CMRADiscrete fracR. Global Instance frac_cmra_discrete : CmraDiscrete fracR.
Proof. apply discrete_cmra_discrete. Qed. Proof. apply discrete_cmra_discrete. Qed.
End frac. End frac.
......
...@@ -34,10 +34,10 @@ Section frac_auth. ...@@ -34,10 +34,10 @@ Section frac_auth.
Global Instance frac_auth_frag_proper q : Proper (() ==> ()) (@frac_auth_frag A q). Global Instance frac_auth_frag_proper q : Proper (() ==> ()) (@frac_auth_frag A q).
Proof. solve_proper. Qed. Proof. solve_proper. Qed.
Global Instance frac_auth_auth_timeless a : Timeless a Timeless (! a). Global Instance frac_auth_auth_discrete a : Discrete a Discrete (! a).
Proof. intros; apply Auth_timeless; apply _. Qed. Proof. intros; apply Auth_discrete; apply _. Qed.
Global Instance frac_auth_frag_timeless a : Timeless a Timeless (! a). Global Instance frac_auth_frag_discrete a : Discrete a Discrete (! a).
Proof. intros; apply Auth_timeless, Some_timeless; apply _. Qed. Proof. intros; apply Auth_discrete, Some_discrete; apply _. Qed.
Lemma frac_auth_validN n a : {n} a {n} (! a ! a). Lemma frac_auth_validN n a : {n} a {n} (! a ! a).
Proof. done. Qed. Proof. done. Qed.
...@@ -58,13 +58,13 @@ Section frac_auth. ...@@ -58,13 +58,13 @@ Section frac_auth.
Lemma frac_auth_includedN n q a b : {n} (! a !{q} b) Some b {n} Some a. Lemma frac_auth_includedN n q a b : {n} (! a !{q} b) Some b {n} Some a.
Proof. by rewrite auth_validN_eq /= => -[/Some_pair_includedN [_ ?] _]. Qed. Proof. by rewrite auth_validN_eq /= => -[/Some_pair_includedN [_ ?] _]. Qed.
Lemma frac_auth_included `{CMRADiscrete A} q a b : Lemma frac_auth_included `{CmraDiscrete A} q a b :
(! a !{q} b) Some b Some a. (! a !{q} b) Some b Some a.
Proof. by rewrite auth_valid_discrete /= => -[/Some_pair_included [_ ?] _]. Qed. Proof. by rewrite auth_valid_discrete /= => -[/Some_pair_included [_ ?] _]. Qed.