Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
116
Issues
116
List
Boards
Labels
Service Desk
Milestones
Merge Requests
19
Merge Requests
19
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
c70cc173
Commit
c70cc173
authored
Aug 04, 2016
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show that having saved propositions without a \later is inconsistent
parent
9ba4ad2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
0 deletions
+78
-0
_CoqProject
_CoqProject
+1
-0
algebra/upred.v
algebra/upred.v
+7
-0
program_logic/counter_examples.v
program_logic/counter_examples.v
+70
-0
No files found.
_CoqProject
View file @
c70cc173
...
...
@@ -85,6 +85,7 @@ program_logic/auth.v
program_logic/sts.v
program_logic/namespaces.v
program_logic/boxes.v
program_logic/counter_examples.v
heap_lang/lang.v
heap_lang/tactics.v
heap_lang/wp_tactics.v
...
...
algebra/upred.v
View file @
c70cc173
...
...
@@ -345,11 +345,18 @@ Proof.
Qed
.
Global
Instance
:
AntiSymm
(
⊣
⊢
)
(@
uPred_entails
M
).
Proof
.
intros
P
Q
HPQ
HQP
;
split
=>
x
n
;
by
split
;
[
apply
HPQ
|
apply
HQP
].
Qed
.
Lemma
sound
:
¬
(
True
⊢
False
).
Proof
.
unseal
.
intros
[
H
].
apply
(
H
0
∅
)
;
last
done
.
apply
ucmra_unit_validN
.
Qed
.
Lemma
equiv_spec
P
Q
:
(
P
⊣
⊢
Q
)
↔
(
P
⊢
Q
)
∧
(
Q
⊢
P
).
Proof
.
split
;
[|
by
intros
[??]
;
apply
(
anti_symm
(
⊢
))].
intros
HPQ
;
split
;
split
=>
x
i
;
apply
HPQ
.
Qed
.
Lemma
equiv_entails
P
Q
:
(
P
⊣
⊢
Q
)
→
(
P
⊢
Q
).
Proof
.
apply
equiv_spec
.
Qed
.
Lemma
equiv_entails_sym
P
Q
:
(
Q
⊣
⊢
P
)
→
(
P
⊢
Q
).
...
...
program_logic/counter_examples.v
0 → 100644
View file @
c70cc173
From
iris
.
algebra
Require
Import
upred
.
From
iris
.
proofmode
Require
Import
tactics
.
(** This proves that we need the ▷ in a "Saved Proposition" construction with
name-dependend allocation. *)
(** We fork in [uPred M] for any M, but the proof would work in any BI. *)
Section
savedprop
.
Context
(
M
:
ucmraT
).
Notation
iProp
:
=
(
uPred
M
).
Notation
"¬ P"
:
=
(
□
(
P
→
False
))%
I
:
uPred_scope
.
(* Saved Propositions. *)
Context
(
sprop
:
Type
)
(
saved
:
sprop
→
iProp
→
iProp
).
Hypothesis
sprop_persistent
:
forall
i
P
,
PersistentP
(
saved
i
P
).
Hypothesis
sprop_alloc_dep
:
forall
(
P
:
sprop
→
iProp
),
True
⊢
∃
i
,
saved
i
(
P
i
).
Hypothesis
sprop_agree
:
forall
i
P
Q
,
saved
i
P
∧
saved
i
Q
⊢
P
↔
Q
.
(* Self-contradicting assertions are inconsistent *)
Lemma
no_self_contradiction
(
P
:
iProp
)
`
{!
PersistentP
P
}
:
□
(
P
↔
¬
P
)
⊢
False
.
Proof
.
(* FIXME: Cannot destruct the <-> as two implications. iApply with <-> also does not work. *)
rewrite
/
uPred_iff
.
iIntros
"#[H1 H2]"
.
(* FIXME: Cannot iApply "H1". *)
iAssert
P
as
"#HP"
.
{
iApply
"H2"
.
iIntros
"!#HP"
.
by
iApply
(
"H1"
with
"HP"
).
}
by
iApply
(
"H1"
with
"HP HP"
).
Qed
.
(* "Assertion with name [i]" is equivalent to any assertion P s.t. [saved i P] *)
Definition
A
(
i
:
sprop
)
:
iProp
:
=
∃
P
,
saved
i
P
★
□
P
.
Lemma
saved_is_A
i
P
`
{!
PersistentP
P
}
:
saved
i
P
⊢
□
(
A
i
↔
P
).
Proof
.
rewrite
/
uPred_iff
.
iIntros
"#HS !"
.
iSplit
.
-
iIntros
"H"
.
iDestruct
"H"
as
(
Q
)
"[#HSQ HQ]"
.
iPoseProof
(
sprop_agree
i
P
Q
with
"[]"
)
as
"Heq"
;
first
by
eauto
.
rewrite
/
uPred_iff
.
by
iApply
"Heq"
.
-
iIntros
"#HP"
.
iExists
P
.
by
iSplit
.
Qed
.
(* Define [Q i] to be "negated assertion with name [i]". Show that this
implies that assertion with name [i] is equivalent to its own negation. *)
Definition
Q
i
:
=
saved
i
(
¬
A
i
).
Lemma
Q_self_contradiction
i
:
Q
i
⊢
□
(
A
i
↔
¬
A
i
).
Proof
.
iIntros
"#HQ"
.
iApply
(@
saved_is_A
i
(
¬
A
i
)%
I
_
).
(* FIXME: If we already introduced the box, this iApply does not work. *)
done
.
Qed
.
(* We can obtain such a [Q i]. *)
Lemma
make_Q
:
True
⊢
∃
i
,
Q
i
.
Proof
.
apply
sprop_alloc_dep
.
Qed
.
(* Put together all the pieces to derive a contradiction. *)
Lemma
contradiction
:
False
.
Proof
.
apply
(@
uPred
.
sound
M
).
iIntros
""
.
iPoseProof
make_Q
as
"HQ"
.
iDestruct
"HQ"
as
(
i
)
"HQ"
.
iApply
(@
no_self_contradiction
(
A
i
)
_
).
by
iApply
Q_self_contradiction
.
Qed
.
End
savedprop
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment