Module RML := Rmaps_Lemmas(R).
Export RML.
Export R.
Definition mk_rshare: forall p: Share.t, pure_readable_share p -> rshare := exist pure_readable_share.
Definition rshare_sh (p: rshare) : Share.t := proj1_sig p.
(* Definition mk_pshare : forall p: Share.t, nonunit p -> pshare := exist nonunit. *)
Definition fixup_splitting
(a:address -> Share.t) (z: address -> option (rshare * kind)) : address -> option (rshare * kind) :=
fun l =>
match z l with
| Some (sh, k) =>
match dec_readable (a l) with
| left p => Some (readable_part p,  k)
| right _ => None
end
| None => None
end.
Definition share_of (x: option (rshare * kind)) : Share.t :=
match x with Some (p,_) => proj1_sig p | None => Share.bot end.
Definition Join_pk := (Join_lower (Join_prod rshare _ kind (Join_equiv _))).

Lemma pure_readable_glb_Rsh:
forall sh, pure_readable_share sh -> Share.glb Share.Rsh sh = sh.