Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simcha van Collem
Iris
Commits
0d68d6b6
Commit
0d68d6b6
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Simplify iClear and iRevert tactics.
parent
674fc37e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proofmode/tactics.v
+13
-14
13 additions, 14 deletions
proofmode/tactics.v
with
13 additions
and
14 deletions
proofmode/tactics.v
+
13
−
14
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,12 +768,12 @@ 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"
|];
tac_after
;
iIntros
Hs
tac_after
;
iIntros
Hs
end
.
Tactic
Notation
"iLöb"
"as"
constr
(
IH
)
:=
iLöbCore
IH
idtac
idtac
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment