Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rodolphe Lepigre
Iris
Commits
0a1c37a3
Commit
0a1c37a3
authored
Aug 02, 2016
by
Robbert Krebbers
Browse files
Syntax for framing the entire persistent context.
parent
095086fe
Changes
2
Hide whitespace changes
Inline
Sidebyside
ProofMode.md
View file @
0a1c37a3
...
...
@@ 70,8 +70,10 @@ Elimination of logical connectives
Separating logic specific tactics


`iFrame "H0 ... Hn"`
: cancel the hypotheses
`H0 ... Hn`
in the goal. When
`iFrame`
is called without arguments, it attempts to frame all spatial

`iFrame "H0 ... Hn"`
: cancel the hypotheses
`H0 ... Hn`
in the goal. The
symbol
`★`
can be used to frame as much of the spatial context as possible,
and the symbol
`#`
can be used to repeatedly frame as much of the persistent
context as possible. When without arguments, it attempts to frame all spatial
hypotheses.

`iCombine "H1" "H2" as "H"`
: turns
`H1 : P1`
and
`H2 : P2`
into
`H : P1 ★ P2`
.
...
...
proofmode/tactics.v
View file @
0a1c37a3
...
...
@@ 399,29 +399,6 @@ Local Tactic Notation "iSepDestruct" constr(H) "as" constr(H1) constr(H2) :=
apply
_

fail
"iSepDestruct:"
H
":"
P
"not separating destructable"

env_cbv
;
reflexivity

fail
"iSepDestruct:"
H1
"or"
H2
" not fresh"
].
Tactic
Notation
"iFrame"
constr
(
Hs
)
:
=
let
rec
go
Hs
:
=
match
Hs
with

[]
=>
idtac

?H
::
?Hs
=>
eapply
tac_frame
with
_
H
_
_
_;
[
env_cbv
;
reflexivity

fail
"iFrame:"
H
"not found"

let
R
:
=
match
goal
with

Frame
?R
_
_
=>
R
end
in
apply
_

fail
"iFrame: cannot frame"
R

lazy
iota
beta
;
go
Hs
]
end
in
let
Hs
:
=
words
Hs
in
go
Hs
.
Tactic
Notation
"iFrame"
:
=
let
rec
go
Hs
:
=
match
Hs
with

[]
=>
idtac

?H
::
?Hs
=>
try
iFrame
H
;
go
Hs
end
in
match
goal
with


of_envs
?
Δ
⊢
_
=>
let
Hs
:
=
eval
cbv
in
(
env_dom
(
env_spatial
Δ
))
in
go
Hs
end
.
Tactic
Notation
"iCombine"
constr
(
H1
)
constr
(
H2
)
"as"
constr
(
H
)
:
=
eapply
tac_combine
with
_
_
_
H1
_
_
H2
_
_
H
_;
[
env_cbv
;
reflexivity

fail
"iCombine:"
H1
"not found"
...
...
@@ 431,6 +408,42 @@ Tactic Notation "iCombine" constr(H1) constr(H2) "as" constr(H) :=
apply
_

fail
"iCombine: cannot combine"
H1
":"
P1
"and"
H2
":"
P2

env_cbv
;
reflexivity

fail
"iCombine:"
H
"not fresh"
].
(** Framing *)
Local
Ltac
iFrameHyp
H
:
=
eapply
tac_frame
with
_
H
_
_
_;
[
env_cbv
;
reflexivity

fail
"iFrame:"
H
"not found"

let
R
:
=
match
goal
with

Frame
?R
_
_
=>
R
end
in
apply
_

fail
"iFrame: cannot frame"
R

lazy
iota
beta
].
Local
Ltac
iFramePersistent
:
=
let
rec
go
Hs
:
=
match
Hs
with
[]
=>
idtac

?H
::
?Hs
=>
repeat
iFrameHyp
H
;
go
Hs
end
in
match
goal
with


of_envs
?
Δ
⊢
_
=>
let
Hs
:
=
eval
cbv
in
(
env_dom
(
env_persistent
Δ
))
in
go
Hs
end
.
Local
Ltac
iFrameSpatial
:
=
let
rec
go
Hs
:
=
match
Hs
with
[]
=>
idtac

?H
::
?Hs
=>
try
iFrameHyp
H
;
go
Hs
end
in
match
goal
with


of_envs
?
Δ
⊢
_
=>
let
Hs
:
=
eval
cbv
in
(
env_dom
(
env_spatial
Δ
))
in
go
Hs
end
.
Tactic
Notation
"iFrame"
constr
(
Hs
)
:
=
let
rec
go
Hs
:
=
match
Hs
with

[]
=>
idtac

"#"
::
?Hs
=>
iFramePersistent
;
go
Hs

"★"
::
?Hs
=>
iFrameSpatial
;
go
Hs

?H
::
?Hs
=>
iFrameHyp
H
;
go
Hs
end
in
let
Hs
:
=
words
Hs
in
go
Hs
.
Tactic
Notation
"iFrame"
:
=
iFrameSpatial
.
(** * Existential *)
Tactic
Notation
"iExists"
uconstr
(
x1
)
:
=
eapply
tac_exist
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment