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
Rice Wine
Iris
Commits
0d68d6b6
Commit
0d68d6b6
authored
Apr 26, 2016
by
Robbert Krebbers
Browse files
Simplify iClear and iRevert tactics.
parent
674fc37e
Changes
1
Show whitespace changes
Inline
Side-by-side
proofmode/tactics.v
View file @
0d68d6b6
...
...
@@ -53,15 +53,13 @@ Tactic Notation "iClear" constr(Hs) :=
let
rec
go
Hs
:
=
match
Hs
with
|
[]
=>
idtac
|
"★"
::
?Hs
=>
eapply
tac_clear_spatial
;
[
env_cbv
;
reflexivity
|
go
Hs
]
|
?H
::
?Hs
=>
eapply
tac_clear
with
_
H
_
_;
(* (i:=H) *)
[
env_cbv
;
reflexivity
||
fail
"iClear:"
H
"not found"
|
go
Hs
]
end
in
let
Hs
:
=
words
Hs
in
go
Hs
.
Tactic
Notation
"iClear"
"★"
:
=
eapply
tac_clear_spatial
;
[
env_cbv
;
reflexivity
|].
(** * Assumptions *)
Tactic
Notation
"iExact"
constr
(
H
)
:
=
eapply
tac_assumption
with
H
_
_;
(* (i:=H) *)
...
...
@@ -373,8 +371,6 @@ Tactic Notation "iApply" open_constr (H) "{" open_constr(x1) open_constr(x2)
iSpecialize
H
{
x1
x2
x3
x4
x5
x6
x7
x8
}
;
last
iApply
H
Hs
.
(** * Revert *)
Tactic
Notation
"iRevert"
"★"
:
=
eapply
tac_revert_spatial
;
env_cbv
.
Local
Tactic
Notation
"iForallRevert"
ident
(
x
)
:
=
let
A
:
=
type
of
x
in
lazymatch
type
of
A
with
...
...
@@ -382,14 +378,17 @@ Local Tactic Notation "iForallRevert" ident(x) :=
|
_
=>
revert
x
;
apply
tac_forall_revert
end
||
fail
"iRevert: cannot revert"
x
.
Local
Tactic
Notation
"iImplRevert"
constr
(
H
)
:
=
eapply
tac_revert
with
_
H
_
_;
(* (i:=H) *)
[
env_cbv
;
reflexivity
||
fail
"iRevert:"
H
"not found"
|
env_cbv
].
Tactic
Notation
"iRevert"
constr
(
Hs
)
:
=
let
rec
go
H2s
:
=
match
H2s
with
[]
=>
idtac
|
?H2
::
?H2s
=>
go
H2s
;
iImplRevert
H2
end
in
match
H2s
with
|
[]
=>
idtac
|
"★"
::
?H2s
=>
go
H2s
;
eapply
tac_revert_spatial
;
env_cbv
|
?H2
::
?H2s
=>
go
H2s
;
eapply
tac_revert
with
_
H2
_
_;
(* (i:=H2) *)
[
env_cbv
;
reflexivity
||
fail
"iRevert:"
H2
"not found"
|
env_cbv
]
end
in
let
Hs
:
=
words
Hs
in
go
Hs
.
Tactic
Notation
"iRevert"
"{"
ident
(
x1
)
"}"
:
=
...
...
@@ -769,8 +768,8 @@ idents I do not know how to do this better. *)
Local
Ltac
iL
ö
bCore
IH
tac_before
tac_after
:
=
match
goal
with
|
|-
of_envs
?
Δ
⊢
_
=>
let
Hs
:
=
constr
:
(
rev
(
env_dom_list
(
env_spatial
Δ
)))
in
iRevert
★
;
tac_before
;
let
Hs
:
=
constr
:
(
rev
erse
(
env_dom_list
(
env_spatial
Δ
)))
in
iRevert
[
"★"
]
;
tac_before
;
eapply
tac_l
ö
b
with
_
IH
;
[
reflexivity
|
env_cbv
;
reflexivity
||
fail
"iLöb:"
IH
"not fresh"
|]
;
...
...
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