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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
George Pirlea
Iris
Commits
116b381d
Commit
116b381d
authored
Apr 30, 2018
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ElimInv generalized to any BI actually works fine
parent
b2711d60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
25 deletions
+21
-25
theories/proofmode/classes.v
theories/proofmode/classes.v
+1
-4
theories/proofmode/coq_tactics.v
theories/proofmode/coq_tactics.v
+20
-21
No files found.
theories/proofmode/classes.v
View file @
116b381d
...
...
@@ -571,11 +571,8 @@ Hint Mode IntoAcc + - ! - - - - - - - - : typeclass_instances.
still benefit from [iInv].
TODO: Add support for a binder (like accessors have it).
This is defined on sbi instead of bi as typeclass search otherwise
fails (e.g. in the iInv as used in cancelable_invariants.v).
*)
Class
ElimInv
{
PROP
:
s
bi
}
{
X
:
Type
}
(
φ
:
Prop
)
Class
ElimInv
{
PROP
:
bi
}
{
X
:
Type
}
(
φ
:
Prop
)
(
Pinv
Pin
:
PROP
)
(
Pout
:
X
→
PROP
)
(
Pclose
:
option
(
X
→
PROP
))
(
Q
:
PROP
)
(
Q'
:
X
→
PROP
)
:
=
elim_inv
:
φ
→
Pinv
∗
Pin
∗
(
∀
x
,
Pout
x
∗
(
default
(
λ
_
,
emp
)
Pclose
id
)
x
-
∗
Q'
x
)
⊢
Q
.
...
...
theories/proofmode/coq_tactics.v
View file @
116b381d
...
...
@@ -1093,6 +1093,26 @@ Proof.
rewrite
envs_entails_eq
=>
<-.
by
setoid_rewrite
<-
envs_incr_counter_equiv
.
Qed
.
(** * Invariants *)
Lemma
tac_inv_elim
{
X
:
Type
}
Δ
Δ
'
i
j
φ
p
Pinv
Pin
Pout
(
Pclose
:
option
(
X
→
PROP
))
Q
(
Q'
:
X
→
PROP
)
:
envs_lookup_delete
false
i
Δ
=
Some
(
p
,
Pinv
,
Δ
'
)
→
ElimInv
φ
Pinv
Pin
Pout
Pclose
Q
Q'
→
φ
→
(
∀
R
,
∃
Δ
''
,
envs_app
false
(
Esnoc
Enil
j
(
Pin
-
∗
(
∀
x
,
Pout
x
-
∗
default
(
Q'
x
)
Pclose
(
λ
Pclose
,
Pclose
x
-
∗
Q'
x
))
-
∗
R
)%
I
)
Δ
'
=
Some
Δ
''
∧
envs_entails
Δ
''
R
)
→
envs_entails
Δ
Q
.
Proof
.
rewrite
envs_entails_eq
=>
/
envs_lookup_delete_Some
[?
->]
Hinv
?
/(
_
Q
)
[
Δ
''
[?
<-]].
rewrite
(
envs_lookup_sound'
_
false
)
//
envs_app_singleton_sound
//
;
simpl
.
apply
wand_elim_r'
,
wand_mono
;
last
done
.
apply
wand_intro_r
,
wand_intro_r
.
rewrite
intuitionistically_if_elim
-
assoc
.
destruct
Pclose
;
simpl
in
*.
-
setoid_rewrite
wand_curry
.
auto
.
-
setoid_rewrite
<-(
right_id
emp
%
I
_
(
Pout
_
)).
auto
.
Qed
.
End
bi_tactics
.
...
...
@@ -1324,27 +1344,6 @@ Implicit Types Γ : env PROP.
Implicit
Types
Δ
:
envs
PROP
.
Implicit
Types
P
Q
:
PROP
.
(** * Invariants *)
Lemma
tac_inv_elim
{
X
:
Type
}
Δ
Δ
'
i
j
φ
p
Pinv
Pin
Pout
(
Pclose
:
option
(
X
→
PROP
))
Q
(
Q'
:
X
→
PROP
)
:
envs_lookup_delete
false
i
Δ
=
Some
(
p
,
Pinv
,
Δ
'
)
→
ElimInv
φ
Pinv
Pin
Pout
Pclose
Q
Q'
→
φ
→
(
∀
R
,
∃
Δ
''
,
envs_app
false
(
Esnoc
Enil
j
(
Pin
-
∗
(
∀
x
,
Pout
x
-
∗
default
(
Q'
x
)
Pclose
(
λ
Pclose
,
Pclose
x
-
∗
Q'
x
))
-
∗
R
)%
I
)
Δ
'
=
Some
Δ
''
∧
envs_entails
Δ
''
R
)
→
envs_entails
Δ
Q
.
Proof
.
rewrite
envs_entails_eq
=>
/
envs_lookup_delete_Some
[?
->]
Hinv
?
/(
_
Q
)
[
Δ
''
[?
<-]].
rewrite
(
envs_lookup_sound'
_
false
)
//
envs_app_singleton_sound
//
;
simpl
.
apply
wand_elim_r'
,
wand_mono
;
last
done
.
apply
wand_intro_r
,
wand_intro_r
.
rewrite
intuitionistically_if_elim
-
assoc
.
destruct
Pclose
;
simpl
in
*.
-
setoid_rewrite
wand_curry
.
auto
.
-
setoid_rewrite
<-(
right_id
emp
%
I
_
(
Pout
_
)).
auto
.
Qed
.
(** * Rewriting *)
Lemma
tac_rewrite
Δ
i
p
Pxy
d
Q
:
envs_lookup
i
Δ
=
Some
(
p
,
Pxy
)
→
...
...
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