Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Roux
Iris
Commits
741ca1f7
Commit
741ca1f7
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More tests.
parent
634a873d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/proofmode.ref
+59
-0
59 additions, 0 deletions
tests/proofmode.ref
tests/proofmode.v
+56
-0
56 additions, 0 deletions
tests/proofmode.v
with
115 additions
and
0 deletions
tests/proofmode.ref
+
59
−
0
View file @
741ca1f7
...
...
@@ -147,6 +147,65 @@ Tactic failure: iSpecialize: Q not persistent.
: string
The command has indeed failed with message:
Tactic failure: iSpecialize: (|==> P)%I not persistent.
"test_iFrame_affinely_emp"
: string
1 goal
PROP : bi
P : PROP
============================
"H" : P
--------------------------------------□
∃ _ : nat, emp
"test_iFrame_affinely_True"
: string
1 goal
PROP : bi
BiAffine0 : BiAffine PROP
P : PROP
============================
"H" : P
--------------------------------------□
∃ _ : nat, True
"test_iFrame_or_1"
: string
1 goal
PROP : bi
P1, P2, P3 : PROP
============================
--------------------------------------∗
▷ (∃ _ : nat, emp)
"test_iFrame_or_2"
: string
1 goal
PROP : bi
P1, P2, P3 : PROP
============================
--------------------------------------∗
▷ (∃ x : nat, emp ∧ ⌜x = 0⌝ ∨ emp)
"test_iFrame_or_affine_1"
: string
1 goal
PROP : bi
BiAffine0 : BiAffine PROP
P1, P2, P3 : PROP
============================
--------------------------------------∗
▷ (∃ _ : nat, True)
"test_iFrame_or_affine_2"
: string
1 goal
PROP : bi
BiAffine0 : BiAffine PROP
P1, P2, P3 : PROP
============================
--------------------------------------∗
▷ (∃ _ : nat, True)
"test_iInduction_multiple_IHs"
: string
1 goal
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
56
−
0
View file @
741ca1f7
...
...
@@ -557,6 +557,62 @@ Lemma test_iFrame_affinely_2 P Q `{!Affine P, !Affine Q} :
P
-∗
Q
-∗
<
affine
>
(
P
∗
Q
)
.
Proof
.
iIntros
"HP HQ"
.
iFrame
"HQ"
.
by
iModIntro
.
Qed
.
Check
"test_iFrame_affinely_emp"
.
Lemma
test_iFrame_affinely_emp
P
:
□
P
-∗
∃
_
:
nat
,
<
affine
>
P
.
(* The ∃ makes sure [iFrame] does not solve the
goal and we can [Show] the result *)
Proof
.
iIntros
"#H"
.
iFrame
"H"
.
Show
.
(* This should become [∃ _ : nat, emp]. *)
by
iExists
1
.
Qed
.
Check
"test_iFrame_affinely_True"
.
Lemma
test_iFrame_affinely_True
`{
!
BiAffine
PROP
}
P
:
□
P
-∗
∃
x
:
nat
,
<
affine
>
P
.
Proof
.
iIntros
"#H"
.
iFrame
"H"
.
Show
.
(* This should become [∃ _ : nat, True]. Since we are in an affine BI,
no unnecessary [emp]s should be created. *)
by
iExists
1
.
Qed
.
Check
"test_iFrame_or_1"
.
Lemma
test_iFrame_or_1
P1
P2
P3
:
P1
∗
P2
∗
P3
-∗
P1
∗
▷
(
P2
∗
∃
x
,
(
P3
∗
<
affine
>
⌜
x
=
0
⌝
)
∨
P3
)
.
Proof
.
iIntros
"($ & $ & $)"
.
Show
.
(* By framing [P3], the disjunction becomes [<affine> ⌜x = 0⌝ ∨ emp],
since [<affine> ⌜x = 0⌝] is trivially affine, the disjunction is simplified
to [emp] *)
by
iExists
0
.
Qed
.
Check
"test_iFrame_or_2"
.
Lemma
test_iFrame_or_2
P1
P2
P3
:
P1
∗
P2
∗
P3
-∗
P1
∗
▷
(
P2
∗
∃
x
,
(
P3
∧
⌜
x
=
0
⌝
)
∨
P3
)
.
Proof
.
iIntros
"($ & $ & $)"
.
Show
.
(* By framing [P3], the disjunction becomes [emp ∧ ⌜x = 0⌝ ∨ emp],
since [emp ∧ ⌜x = 0⌝] is not trivially affine (i.e., by just looking at the
head symbol), this not simplified to [emp] *)
iExists
0
.
auto
.
Qed
.
Check
"test_iFrame_or_affine_1"
.
Lemma
test_iFrame_or_affine_1
`{
!
BiAffine
PROP
}
P1
P2
P3
:
P1
∗
P2
∗
P3
-∗
P1
∗
▷
(
P2
∗
∃
x
,
(
P3
∗
⌜
x
=
0
⌝
)
∨
P3
)
.
Proof
.
iIntros
"($ & $ & $)"
.
Show
.
(* If the BI is affine, the disjunction should be turned into [True]. *)
by
iExists
0
.
Qed
.
Check
"test_iFrame_or_affine_2"
.
Lemma
test_iFrame_or_affine_2
`{
!
BiAffine
PROP
}
P1
P2
P3
:
P1
∗
P2
∗
P3
-∗
P1
∗
▷
(
P2
∗
∃
x
,
(
P3
∧
⌜
x
=
0
⌝
)
∨
P3
)
.
Proof
.
iIntros
"($ & $ & $)"
.
Show
.
(* If the BI is affine, the disjunction should be turned into [True]. *)
by
iExists
0
.
Qed
.
Lemma
test_iAssert_modality
P
:
◇
False
-∗
▷
P
.
Proof
.
iIntros
"HF"
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment