Skip to content
Snippets Groups Projects
Commit a200a35f authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan
Browse files

Define disjointness of namespaces in terms of masks.\n\nThe proofs are made...

Define disjointness of namespaces in terms of masks.\n\nThe proofs are made simpler and some lemmas get more general.
parent 69b10ed1
Branches
Tags
No related merge requests found
...@@ -43,41 +43,27 @@ Proof. apply nclose_subseteq with x, encode_nclose. Qed. ...@@ -43,41 +43,27 @@ Proof. apply nclose_subseteq with x, encode_nclose. Qed.
Lemma nclose_infinite N : ¬set_finite (nclose N). Lemma nclose_infinite N : ¬set_finite (nclose N).
Proof. rewrite nclose_eq. apply coPset_suffixes_infinite. Qed. Proof. rewrite nclose_eq. apply coPset_suffixes_infinite. Qed.
Instance ndisjoint : Disjoint namespace := λ N1 N2, Instance ndisjoint : Disjoint namespace := λ N1 N2, nclose N1 nclose N2.
N1' N2', N1' `suffix_of` N1 N2' `suffix_of` N2
length N1' = length N2' N1' N2'.
Typeclasses Opaque ndisjoint.
Section ndisjoint. Section ndisjoint.
Context `{Countable A}. Context `{Countable A}.
Implicit Types x y : A. Implicit Types x y : A.
Global Instance ndisjoint_symmetric : Symmetric ndisjoint.
Proof. intros N1 N2. rewrite /disjoint /ndisjoint; naive_solver. Qed.
Lemma ndot_ne_disjoint N x y : x y N .@ x N .@ y. Lemma ndot_ne_disjoint N x y : x y N .@ x N .@ y.
Proof. intros. exists (N .@ x), (N .@ y); rewrite ndot_eq; naive_solver. Qed.
Lemma ndot_preserve_disjoint_l N1 N2 x : N1 N2 N1 .@ x N2.
Proof. Proof.
intros (N1' & N2' & Hpr1 & Hpr2 & Hl & Hne). exists N1', N2'. intros Hxy a. rewrite !nclose_eq !elem_coPset_suffixes !ndot_eq.
split_and?; try done; []. rewrite ndot_eq. by apply suffix_of_cons_r. intros [qx ->] [qy]. by intros [= ?%encode_inj]%list_encode_suffix_eq.
Qed. Qed.
Lemma ndot_preserve_disjoint_r N1 N2 x : N1 N2 N1 N2 .@ x . Lemma ndot_preserve_disjoint_l N E x : nclose N E nclose (N .@ x) E.
Proof. intros. by apply symmetry, ndot_preserve_disjoint_l. Qed. Proof. intros. pose proof (nclose_subseteq N x). set_solver. Qed.
Lemma ndisj_disjoint N1 N2 : N1 N2 nclose N1 nclose N2. Lemma ndot_preserve_disjoint_r N E x : E nclose N E nclose (N .@ x).
Proof. Proof. intros. by apply symmetry, ndot_preserve_disjoint_l. Qed.
intros (N1' & N2' & [N1'' ->] & [N2'' ->] & Hl & Hne) p.
rewrite nclose_eq /nclose.
rewrite !elem_coPset_suffixes; intros [q ->] [q' Hq]; destruct Hne.
by rewrite !list_encode_app !assoc in Hq; apply list_encode_suffix_eq in Hq.
Qed.
Lemma ndisj_subseteq_difference N1 N2 E : Lemma ndisj_subseteq_difference N E F :
N1 N2 nclose N1 E nclose N1 E nclose N2. E nclose N E F E F nclose N.
Proof. intros ?%ndisj_disjoint. set_solver. Qed. Proof. set_solver. Qed.
End ndisjoint. End ndisjoint.
(* The hope is that registering these will suffice to solve most goals (* The hope is that registering these will suffice to solve most goals
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment