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

Misc auth consistency fixes.

parent e561f965
No related branches found
No related tags found
No related merge requests found
...@@ -21,9 +21,9 @@ Instance: Params (@Auth) 1 := {}. ...@@ -21,9 +21,9 @@ Instance: Params (@Auth) 1 := {}.
Instance: Params (@auth_auth_proj) 1 := {}. Instance: Params (@auth_auth_proj) 1 := {}.
Instance: Params (@auth_frag_proj) 1 := {}. Instance: Params (@auth_frag_proj) 1 := {}.
Definition auth_frag {A: ucmraT} (a: A) : auth A := (Auth None a). Definition auth_frag {A: ucmraT} (a: A) : auth A := Auth None a.
Definition auth_auth {A: ucmraT} (q: Qp) (a: A): auth A := Definition auth_auth {A: ucmraT} (q: Qp) (a: A) : auth A :=
(Auth (Some (q, to_agree a)) ε). Auth (Some (q, to_agree a)) ε.
Typeclasses Opaque auth_auth auth_frag. Typeclasses Opaque auth_auth auth_frag.
...@@ -34,8 +34,8 @@ Notation "◯ a" := (auth_frag a) (at level 20). ...@@ -34,8 +34,8 @@ Notation "◯ a" := (auth_frag a) (at level 20).
Notation "●{ q } a" := (auth_auth q a) (at level 20, format "●{ q } a"). Notation "●{ q } a" := (auth_auth q a) (at level 20, format "●{ q } a").
Notation "● a" := (auth_auth 1 a) (at level 20). Notation "● a" := (auth_auth 1 a) (at level 20).
(* COFE *) (* Ofe *)
Section cofe. Section ofe.
Context {A : ofeT}. Context {A : ofeT}.
Implicit Types a : option (frac * agree A). Implicit Types a : option (frac * agree A).
Implicit Types b : A. Implicit Types b : A.
...@@ -69,11 +69,11 @@ Global Instance Auth_discrete a b : ...@@ -69,11 +69,11 @@ Global Instance Auth_discrete a b :
Proof. by intros ?? [??] [??]; split; apply: discrete. Qed. Proof. by intros ?? [??] [??]; split; apply: discrete. Qed.
Global Instance auth_ofe_discrete : OfeDiscrete A OfeDiscrete authC. Global Instance auth_ofe_discrete : OfeDiscrete A OfeDiscrete authC.
Proof. intros ? [??]; apply _. Qed. Proof. intros ? [??]; apply _. Qed.
End cofe. End ofe.
Arguments authC : clear implicits. Arguments authC : clear implicits.
(* CMRA *) (* Camera *)
Section cmra. Section cmra.
Context {A : ucmraT}. Context {A : ucmraT}.
Implicit Types a b : A. Implicit Types a b : A.
...@@ -288,7 +288,7 @@ Lemma auth_frag_mono a b : a ≼ b → ◯ a ≼ ◯ b. ...@@ -288,7 +288,7 @@ Lemma auth_frag_mono a b : a ≼ b → ◯ a ≼ ◯ b.
Proof. intros [c ->]. rewrite auth_frag_op. apply cmra_included_l. Qed. Proof. intros [c ->]. rewrite auth_frag_op. apply cmra_included_l. Qed.
Global Instance auth_frag_sep_homomorphism : Global Instance auth_frag_sep_homomorphism :
MonoidHomomorphism op op () (@Auth A None). MonoidHomomorphism op op () (@auth_frag A).
Proof. by split; [split; try apply _|]. Qed. Proof. by split; [split; try apply _|]. Qed.
Lemma auth_both_frac_op q a b : Auth (Some (q,to_agree a)) b {q} a b. Lemma auth_both_frac_op q a b : Auth (Some (q,to_agree a)) b {q} a b.
......
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