Commit ca0bc234 authored by Ralf Jung's avatar Ralf Jung
Browse files

strengthen sep_and

parent de653fa6
...@@ -648,11 +648,11 @@ Qed. ...@@ -648,11 +648,11 @@ Qed.
Lemma sep_elim_r P Q `{H : TCOr (Affine P) (Absorbing Q)} : P Q Q. Lemma sep_elim_r P Q `{H : TCOr (Affine P) (Absorbing Q)} : P Q Q.
Proof. by rewrite comm sep_elim_l. Qed. Proof. by rewrite comm sep_elim_l. Qed.
Lemma sep_and P Q Lemma sep_and P Q :
`{HPQ : TCOr (TCAnd (Affine P) (Affine Q)) (TCAnd (Absorbing P) (Absorbing Q))} : TCOr (Affine P) (Absorbing Q) TCOr (Absorbing P) (Affine Q)
P Q P Q. P Q P Q.
Proof. Proof.
destruct HPQ as [[??]|[??]]; intros [?|?] [?|?];
apply and_intro; apply: sep_elim_l || apply: sep_elim_r. apply and_intro; apply: sep_elim_l || apply: sep_elim_r.
Qed. Qed.
......
...@@ -477,7 +477,7 @@ Proof. intros. by rewrite /FromAnd big_opL_app persistent_and_sep_1. Qed. ...@@ -477,7 +477,7 @@ Proof. intros. by rewrite /FromAnd big_opL_app persistent_and_sep_1. Qed.
Global Instance from_sep_sep P1 P2 : FromSep (P1 P2) P1 P2 | 100. Global Instance from_sep_sep P1 P2 : FromSep (P1 P2) P1 P2 | 100.
Proof. by rewrite /FromSep. Qed. Proof. by rewrite /FromSep. Qed.
Global Instance from_sep_and P1 P2 : Global Instance from_sep_and P1 P2 :
TCOr (TCAnd (Affine P1) (Affine P2)) (TCAnd (Absorbing P1) (Absorbing P2)) TCOr (Affine P1) (Absorbing P2) TCOr (Absorbing P1) (Affine P2)
FromSep (P1 P2) P1 P2 | 101. FromSep (P1 P2) P1 P2 | 101.
Proof. intros. by rewrite /FromSep sep_and. Qed. Proof. intros. by rewrite /FromSep sep_and. Qed.
...@@ -532,7 +532,7 @@ Proof. ...@@ -532,7 +532,7 @@ Proof.
by rewrite /IntoAnd /= persistently_sep -and_sep_persistently persistently_and. by rewrite /IntoAnd /= persistently_sep -and_sep_persistently persistently_and.
Qed. Qed.
Global Instance into_and_sep_affine P Q : Global Instance into_and_sep_affine P Q :
TCOr (TCAnd (Affine P) (Affine Q)) (TCAnd (Absorbing P) (Absorbing Q)) TCOr (Affine P) (Absorbing Q) TCOr (Absorbing P) (Affine Q)
IntoAnd true (P Q) P Q. IntoAnd true (P Q) P Q.
Proof. intros. by rewrite /IntoAnd /= sep_and. Qed. Proof. intros. by rewrite /IntoAnd /= sep_and. Qed.
...@@ -621,10 +621,10 @@ Global Instance into_sep_plainly `{BiPositive PROP} P Q1 Q2 : ...@@ -621,10 +621,10 @@ Global Instance into_sep_plainly `{BiPositive PROP} P Q1 Q2 :
Proof. rewrite /IntoSep /= => ->. by rewrite plainly_sep. Qed. Proof. rewrite /IntoSep /= => ->. by rewrite plainly_sep. Qed.
Global Instance into_sep_plainly_affine P Q1 Q2 : Global Instance into_sep_plainly_affine P Q1 Q2 :
IntoSep P Q1 Q2 IntoSep P Q1 Q2
TCOr (TCAnd (Affine Q1) (Affine Q2)) (TCAnd (Absorbing Q1) (Absorbing Q2)) TCOr (Affine Q1) (Absorbing Q2) TCOr (Absorbing Q1) (Affine Q2)
IntoSep (bi_plainly P) (bi_plainly Q1) (bi_plainly Q2). IntoSep (bi_plainly P) (bi_plainly Q1) (bi_plainly Q2).
Proof. Proof.
rewrite /IntoSep /= => -> ?. by rewrite sep_and plainly_and plainly_and_sep_l_1. rewrite /IntoSep /= => -> ??. by rewrite sep_and plainly_and plainly_and_sep_l_1.
Qed. Qed.
Global Instance into_sep_persistently `{BiPositive PROP} P Q1 Q2 : Global Instance into_sep_persistently `{BiPositive PROP} P Q1 Q2 :
...@@ -633,18 +633,18 @@ Global Instance into_sep_persistently `{BiPositive PROP} P Q1 Q2 : ...@@ -633,18 +633,18 @@ Global Instance into_sep_persistently `{BiPositive PROP} P Q1 Q2 :
Proof. rewrite /IntoSep /= => ->. by rewrite persistently_sep. Qed. Proof. rewrite /IntoSep /= => ->. by rewrite persistently_sep. Qed.
Global Instance into_sep_persistently_affine P Q1 Q2 : Global Instance into_sep_persistently_affine P Q1 Q2 :
IntoSep P Q1 Q2 IntoSep P Q1 Q2
TCOr (TCAnd (Affine Q1) (Affine Q2)) (TCAnd (Absorbing Q1) (Absorbing Q2)) TCOr (Affine Q1) (Absorbing Q2) TCOr (Absorbing Q1) (Affine Q2)
IntoSep (bi_persistently P) (bi_persistently Q1) (bi_persistently Q2). IntoSep (bi_persistently P) (bi_persistently Q1) (bi_persistently Q2).
Proof. Proof.
rewrite /IntoSep /= => -> ?. rewrite /IntoSep /= => -> ??.
by rewrite sep_and persistently_and persistently_and_sep_l_1. by rewrite sep_and persistently_and persistently_and_sep_l_1.
Qed. Qed.
Global Instance into_sep_affinely_persistently_affine P Q1 Q2 : Global Instance into_sep_affinely_persistently_affine P Q1 Q2 :
IntoSep P Q1 Q2 IntoSep P Q1 Q2
TCOr (TCAnd (Affine Q1) (Affine Q2)) (TCAnd (Absorbing Q1) (Absorbing Q2)) TCOr (Affine Q1) (Absorbing Q2) TCOr (Absorbing Q1) (Affine Q2)
IntoSep ( P) ( Q1) ( Q2). IntoSep ( P) ( Q1) ( Q2).
Proof. Proof.
rewrite /IntoSep /= => -> ?. rewrite /IntoSep /= => -> ??.
by rewrite sep_and affinely_persistently_and and_sep_affinely_persistently. by rewrite sep_and affinely_persistently_and and_sep_affinely_persistently.
Qed. Qed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment