Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Michael Sammler
iris-coq
Commits
f17ce8f1
Commit
f17ce8f1
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Turn some foralls into unicode foralls.
parent
b0bd1855
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program_logic/counter_examples.v
+19
-19
19 additions, 19 deletions
program_logic/counter_examples.v
with
19 additions
and
19 deletions
program_logic/counter_examples.v
+
19
−
19
View file @
f17ce8f1
...
@@ -70,25 +70,25 @@ Module inv. Section inv.
...
@@ -70,25 +70,25 @@ Module inv. Section inv.
(* We have view shifts (two classes: empty/full mask) *)
(* We have view shifts (two classes: empty/full mask) *)
Context
(
pvs0
pvs1
:
iProp
→
iProp
)
.
Context
(
pvs0
pvs1
:
iProp
→
iProp
)
.
Hypothesis
pvs0_intro
:
forall
P
,
P
⊢
pvs0
P
.
Hypothesis
pvs0_intro
:
∀
P
,
P
⊢
pvs0
P
.
Hypothesis
pvs0_mono
:
forall
P
Q
,
(
P
⊢
Q
)
→
pvs0
P
⊢
pvs0
Q
.
Hypothesis
pvs0_mono
:
∀
P
Q
,
(
P
⊢
Q
)
→
pvs0
P
⊢
pvs0
Q
.
Hypothesis
pvs0_pvs0
:
forall
P
,
pvs0
(
pvs0
P
)
⊢
pvs0
P
.
Hypothesis
pvs0_pvs0
:
∀
P
,
pvs0
(
pvs0
P
)
⊢
pvs0
P
.
Hypothesis
pvs0_frame_l
:
forall
P
Q
,
P
★
pvs0
Q
⊢
pvs0
(
P
★
Q
)
.
Hypothesis
pvs0_frame_l
:
∀
P
Q
,
P
★
pvs0
Q
⊢
pvs0
(
P
★
Q
)
.
Hypothesis
pvs1_mono
:
forall
P
Q
,
(
P
⊢
Q
)
→
pvs1
P
⊢
pvs1
Q
.
Hypothesis
pvs1_mono
:
∀
P
Q
,
(
P
⊢
Q
)
→
pvs1
P
⊢
pvs1
Q
.
Hypothesis
pvs1_pvs1
:
forall
P
,
pvs1
(
pvs1
P
)
⊢
pvs1
P
.
Hypothesis
pvs1_pvs1
:
∀
P
,
pvs1
(
pvs1
P
)
⊢
pvs1
P
.
Hypothesis
pvs1_frame_l
:
forall
P
Q
,
P
★
pvs1
Q
⊢
pvs1
(
P
★
Q
)
.
Hypothesis
pvs1_frame_l
:
∀
P
Q
,
P
★
pvs1
Q
⊢
pvs1
(
P
★
Q
)
.
Hypothesis
pvs0_pvs1
:
forall
P
,
pvs0
P
⊢
pvs1
P
.
Hypothesis
pvs0_pvs1
:
∀
P
,
pvs0
P
⊢
pvs1
P
.
(* We have invariants *)
(* We have invariants *)
Context
(
name
:
Type
)
(
inv
:
name
→
iProp
→
iProp
)
.
Context
(
name
:
Type
)
(
inv
:
name
→
iProp
→
iProp
)
.
Hypothesis
inv_persistent
:
forall
i
P
,
PersistentP
(
inv
i
P
)
.
Hypothesis
inv_persistent
:
∀
i
P
,
PersistentP
(
inv
i
P
)
.
Hypothesis
inv_alloc
:
Hypothesis
inv_alloc
:
forall
(
P
:
iProp
),
P
⊢
pvs1
(
∃
i
,
inv
i
P
)
.
∀
(
P
:
iProp
),
P
⊢
pvs1
(
∃
i
,
inv
i
P
)
.
Hypothesis
inv_open
:
Hypothesis
inv_open
:
forall
i
P
Q
R
,
(
P
★
Q
⊢
pvs0
(
P
★
R
))
→
(
inv
i
P
★
Q
⊢
pvs1
R
)
.
∀
i
P
Q
R
,
(
P
★
Q
⊢
pvs0
(
P
★
R
))
→
(
inv
i
P
★
Q
⊢
pvs1
R
)
.
(* We have tokens for a little "two-state STS": [start] -> [finish].
(* We have tokens for a little "two-state STS": [start] -> [finish].
state. [start] also asserts the exact state; it is only ever owned by the
state. [start] also asserts the exact state; it is only ever owned by the
...
@@ -97,11 +97,11 @@ Module inv. Section inv.
...
@@ -97,11 +97,11 @@ Module inv. Section inv.
Context
(
start
finished
:
gname
→
iProp
)
.
Context
(
start
finished
:
gname
→
iProp
)
.
Hypothesis
sts_alloc
:
True
⊢
pvs0
(
∃
γ
,
start
γ
)
.
Hypothesis
sts_alloc
:
True
⊢
pvs0
(
∃
γ
,
start
γ
)
.
Hypotheses
start_finish
:
forall
γ
,
start
γ
⊢
pvs0
(
finished
γ
)
.
Hypotheses
start_finish
:
∀
γ
,
start
γ
⊢
pvs0
(
finished
γ
)
.
Hypothesis
finished_not_start
:
forall
γ
,
start
γ
★
finished
γ
⊢
False
.
Hypothesis
finished_not_start
:
∀
γ
,
start
γ
★
finished
γ
⊢
False
.
Hypothesis
finished_dup
:
forall
γ
,
finished
γ
⊢
finished
γ
★
finished
γ
.
Hypothesis
finished_dup
:
∀
γ
,
finished
γ
⊢
finished
γ
★
finished
γ
.
(* We assume that we cannot view shift to false. *)
(* We assume that we cannot view shift to false. *)
Hypothesis
soundness
:
¬
(
True
⊢
pvs1
False
)
.
Hypothesis
soundness
:
¬
(
True
⊢
pvs1
False
)
.
...
@@ -133,11 +133,11 @@ Module inv. Section inv.
...
@@ -133,11 +133,11 @@ Module inv. Section inv.
apply
(
anti_symm
(
⊢
));
apply
pvs1_mono
;
by
rewrite
?Heq
-
?Heq
.
apply
(
anti_symm
(
⊢
));
apply
pvs1_mono
;
by
rewrite
?Heq
-
?Heq
.
Qed
.
Qed
.
Lemma
pvs0_frame_r
:
forall
P
Q
,
(
pvs0
P
★
Q
)
⊢
pvs0
(
P
★
Q
)
.
Lemma
pvs0_frame_r
P
Q
:
(
pvs0
P
★
Q
)
⊢
pvs0
(
P
★
Q
)
.
Proof
.
Proof
.
intros
.
rewrite
comm
pvs0_frame_l
.
apply
pvs0_mono
.
by
rewrite
comm
.
intros
.
rewrite
comm
pvs0_frame_l
.
apply
pvs0_mono
.
by
rewrite
comm
.
Qed
.
Qed
.
Lemma
pvs1_frame_r
:
forall
P
Q
,
(
pvs1
P
★
Q
)
⊢
pvs1
(
P
★
Q
)
.
Lemma
pvs1_frame_r
P
Q
:
(
pvs1
P
★
Q
)
⊢
pvs1
(
P
★
Q
)
.
Proof
.
Proof
.
intros
.
rewrite
comm
pvs1_frame_l
.
apply
pvs1_mono
.
by
rewrite
comm
.
intros
.
rewrite
comm
pvs1_frame_l
.
apply
pvs1_mono
.
by
rewrite
comm
.
Qed
.
Qed
.
...
@@ -179,7 +179,7 @@ Module inv. Section inv.
...
@@ -179,7 +179,7 @@ Module inv. Section inv.
(** Now to the actual counterexample. We start with a weird for of saved propositions. *)
(** Now to the actual counterexample. We start with a weird for of saved propositions. *)
Definition
saved
(
γ
:
gname
)
(
P
:
iProp
)
:
iProp
:=
Definition
saved
(
γ
:
gname
)
(
P
:
iProp
)
:
iProp
:=
∃
i
,
inv
i
(
start
γ
∨
(
finished
γ
★
□
P
))
.
∃
i
,
inv
i
(
start
γ
∨
(
finished
γ
★
□
P
))
.
Global
Instance
:
forall
γ
P
,
PersistentP
(
saved
γ
P
)
:=
_
.
Global
Instance
:
∀
γ
P
,
PersistentP
(
saved
γ
P
)
:=
_
.
Lemma
saved_alloc
(
P
:
gname
→
iProp
)
:
Lemma
saved_alloc
(
P
:
gname
→
iProp
)
:
True
⊢
pvs1
(
∃
γ
,
saved
γ
(
P
γ
))
.
True
⊢
pvs1
(
∃
γ
,
saved
γ
(
P
γ
))
.
...
@@ -215,14 +215,14 @@ Module inv. Section inv.
...
@@ -215,14 +215,14 @@ Module inv. Section inv.
(** And now we tie a bad knot. *)
(** And now we tie a bad knot. *)
Notation
"¬ P"
:=
(
□
(
P
-★
pvs1
False
))
%
I
:
uPred_scope
.
Notation
"¬ P"
:=
(
□
(
P
-★
pvs1
False
))
%
I
:
uPred_scope
.
Definition
A
i
:
iProp
:=
∃
P
,
¬
P
★
saved
i
P
.
Definition
A
i
:
iProp
:=
∃
P
,
¬
P
★
saved
i
P
.
Global
Instance
:
forall
i
,
PersistentP
(
A
i
)
:=
_
.
Global
Instance
:
∀
i
,
PersistentP
(
A
i
)
:=
_
.
Lemma
A_alloc
:
Lemma
A_alloc
:
True
⊢
pvs1
(
∃
i
,
saved
i
(
A
i
))
.
True
⊢
pvs1
(
∃
i
,
saved
i
(
A
i
))
.
Proof
.
by
apply
saved_alloc
.
Qed
.
Proof
.
by
apply
saved_alloc
.
Qed
.
Lemma
alloc_NA
i
:
Lemma
alloc_NA
i
:
saved
i
(
A
i
)
⊢
(
¬
A
i
)
.
saved
i
(
A
i
)
⊢
¬
A
i
.
Proof
.
Proof
.
iIntros
"#Hi !# #HA"
.
iPoseProof
"HA"
as
"HA'"
.
iIntros
"#Hi !# #HA"
.
iPoseProof
"HA"
as
"HA'"
.
iDestruct
"HA'"
as
(
P
)
"#[HNP Hi']"
.
iDestruct
"HA'"
as
(
P
)
"#[HNP Hi']"
.
...
...
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