Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Khalanskiy
Iris
Commits
c208c95d
Commit
c208c95d
authored
Sep 19, 2016
by
Robbert Krebbers
Browse files
New iFresh' H tactic that generates names starting with H.
parent
efcef7e0
Changes
1
Hide whitespace changes
Inline
Sidebyside
proofmode/tactics.v
View file @
c208c95d
...
...
@@ 19,15 +19,17 @@ Ltac env_cbv :=
match
goal
with

?u
=>
let
v
:
=
eval
env_cbv
in
u
in
change
v
end
.
(** * Misc *)
Ltac
iFresh
:
=
(* Tactic Notation tactics cannot return terms *)
Ltac
iFresh'
H
:
=
lazymatch
goal
with

of_envs
?
Δ
⊢
_
=>
(* [vm_compute fails] if any of the hypotheses in [Δ] contain evars, so
first use [cbv] to compute the domain of [Δ] *)
let
Hs
:
=
eval
cbv
in
(
envs_dom
Δ
)
in
eval
vm_compute
in
(
fresh_string_of_set
"~"
(
of_list
Hs
))

_
=>
constr
:
(
"~"
)
eval
vm_compute
in
(
fresh_string_of_set
H
(
of_list
Hs
))

_
=>
H
end
.
Ltac
iFresh
:
=
iFresh'
"~"
.
Tactic
Notation
"iTypeOf"
constr
(
H
)
tactic
(
tac
)
:
=
let
Δ
:
=
match
goal
with

of_envs
?
Δ
⊢
_
=>
Δ
end
in
...
...
@@ 785,7 +787,7 @@ Tactic Notation "iIntros" "(" simple_intropattern(x1) simple_intropattern(x2)
Tactic
Notation
"iRevertIntros"
"with"
tactic
(
tac
)
:
=
match
goal
with


of_envs
?
Δ
⊢
_
=>
let
Hs
:
=
constr
:
(
reverse
(
env_dom
(
env_spatial
Δ
)))
in
let
Hs
:
=
eval
cbv
in
(
reverse
(
env_dom
(
env_spatial
Δ
)))
in
iRevert
[
"★"
]
;
tac
;
iIntros
Hs
end
.
Tactic
Notation
"iRevertIntros"
"("
ident
(
x1
)
")"
"with"
tactic
(
tac
)
:
=
...
...
Write
Preview
Supports
Markdown
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