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

Tests, the same we have for `⌜ φ ⌝ → ...`.

parent 25131c02
No related branches found
No related tags found
No related merge requests found
...@@ -178,6 +178,50 @@ Tactic failure: iSpecialize: Q not persistent. ...@@ -178,6 +178,50 @@ Tactic failure: iSpecialize: Q not persistent.
⌜φ⌝ ⌜φ⌝
1 goal 1 goal
PROP : bi
BiAffine0 : BiAffine PROP
φ : Prop
P, Q : PROP
H : φ
============================
"H1" : P
--------------------------------------□
⌜φ⌝
"test_iSpecialize_impl_pure"
: string
1 goal
PROP : bi
φ : Prop
P, Q : PROP
H : φ
============================
--------------------------------------∗
<affine> ⌜φ⌝
1 goal
PROP : bi
φ : Prop
P, Q : PROP
H : φ
============================
"H1" : P
--------------------------------------□
<affine> ⌜φ⌝
"test_iSpecialize_impl_pure_affine"
: string
1 goal
PROP : bi
BiAffine0 : BiAffine PROP
φ : Prop
P, Q : PROP
H : φ
============================
--------------------------------------∗
⌜φ⌝
1 goal
PROP : bi PROP : bi
BiAffine0 : BiAffine PROP BiAffine0 : BiAffine PROP
φ : Prop φ : Prop
......
...@@ -480,6 +480,38 @@ Restart. ...@@ -480,6 +480,38 @@ Restart.
by iFrame. by iFrame.
Abort. Abort.
Check "test_iSpecialize_impl_pure".
Lemma test_iSpecialize_forall_pure (φ : Prop) P Q :
φ ( _ : φ, P) -∗ ( _ : φ, Q) -∗ P Q.
Proof.
iIntros (?) "#H1 H2".
(* Adds an affine modality *)
iSpecialize ("H1" with "[]"). { Show. done. }
iSpecialize ("H2" with "[]"). { Show. done. }
Restart.
iIntros (?) "#H1 H2".
(* Solving it directly as a pure goal also works. *)
iSpecialize ("H1" with "[% //]").
iSpecialize ("H2" with "[% //]").
by iFrame.
Abort.
Check "test_iSpecialize_impl_pure_affine".
Lemma test_iSpecialize_forall_pure_affine `{!BiAffine PROP} (φ : Prop) P Q :
φ ( _ : φ, P) -∗ ( _ : φ, Q) -∗ P Q.
Proof.
iIntros (?) "#H1 H2".
(* Does not add an affine modality *)
iSpecialize ("H1" with "[]"). { Show. done. }
iSpecialize ("H2" with "[]"). { Show. done. }
Restart.
iIntros (?) "#H1 H2".
(* Solving it directly as a pure goal also works. *)
iSpecialize ("H1" with "[% //]").
iSpecialize ("H2" with "[% //]").
by iFrame.
Abort.
Check "test_iAssert_intuitionistic". Check "test_iAssert_intuitionistic".
Lemma test_iAssert_intuitionistic `{!BiBUpd PROP} P : Lemma test_iAssert_intuitionistic `{!BiBUpd PROP} P :
P -∗ |==> P. P -∗ |==> P.
......
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