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
1bc26dc9
Commit
1bc26dc9
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Better error messages for iRevert.
This fixes issue #44.
parent
e4d5fc87
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
+11
-5
11 additions, 5 deletions
proofmode/tactics.v
with
11 additions
and
5 deletions
proofmode/tactics.v
+
11
−
5
View file @
1bc26dc9
...
@@ -36,7 +36,7 @@ Tactic Notation "iTypeOf" constr(H) tactic(tac):=
...
@@ -36,7 +36,7 @@ Tactic Notation "iTypeOf" constr(H) tactic(tac):=
|
Some
(
?p
,
?P
)
=>
tac
p
P
|
Some
(
?p
,
?P
)
=>
tac
p
P
end
.
end
.
Ltac
iMatchGoal
tac
:=
Tactic
Notation
"iMatchHyp"
tactic1
(
tac
)
:=
match
goal
with
match
goal
with
|
|
-
context
[
environments
.
Esnoc
_
?x
?P
]
=>
tac
x
P
|
|
-
context
[
environments
.
Esnoc
_
?x
?P
]
=>
tac
x
P
end
.
end
.
...
@@ -431,11 +431,17 @@ Tactic Notation "iApply" open_constr(lem) :=
...
@@ -431,11 +431,17 @@ Tactic Notation "iApply" open_constr(lem) :=
(** * Revert *)
(** * Revert *)
Local
Tactic
Notation
"iForallRevert"
ident
(
x
)
:=
Local
Tactic
Notation
"iForallRevert"
ident
(
x
)
:=
let
err
x
:=
intros
x
;
iMatchHyp
(
fun
H
P
=>
lazymatch
P
with
|
context
[
x
]
=>
fail
2
"iRevert:"
x
"is used in hypothesis"
H
end
)
in
let
A
:=
type
of
x
in
let
A
:=
type
of
x
in
lazymatch
type
of
A
with
lazymatch
type
of
A
with
|
Prop
=>
revert
x
;
apply
tac_pure_revert
|
Prop
=>
revert
x
;
first
[
apply
tac_pure_revert
|
err
x
]
|
_
=>
revert
x
;
apply
tac_forall_revert
|
_
=>
revert
x
;
first
[
apply
tac_forall_revert
|
err
x
]
end
||
fail
"iRevert: cannot revert"
x
.
end
.
Tactic
Notation
"iRevert"
constr
(
Hs
)
:=
Tactic
Notation
"iRevert"
constr
(
Hs
)
:=
let
rec
go
Hs
:=
let
rec
go
Hs
:=
...
@@ -1169,7 +1175,7 @@ Tactic Notation "iRewrite" "-" open_constr(lem) "in" constr(H) :=
...
@@ -1169,7 +1175,7 @@ Tactic Notation "iRewrite" "-" open_constr(lem) "in" constr(H) :=
iRewriteCore
true
lem
in
H
.
iRewriteCore
true
lem
in
H
.
Ltac
iSimplifyEq
:=
repeat
(
Ltac
iSimplifyEq
:=
repeat
(
iMatch
Goal
ltac
:
(
fun
H
P
=>
match
P
with
⌜_
=
_
⌝%
I
=>
iDestruct
H
as
%
?
end
)
iMatch
Hyp
(
fun
H
P
=>
match
P
with
⌜_
=
_
⌝%
I
=>
iDestruct
H
as
%
?
end
)
||
simplify_eq
/=
)
.
||
simplify_eq
/=
)
.
(** * Update modality *)
(** * Update modality *)
...
...
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