Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Model registry
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
Iris
stdpp
Commits
8f0d5ae3
Commit
8f0d5ae3
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Remove injection' tactic.
The tactic injection H as H is doing exactly that.
parent
1331d75b
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
theories/tactics.v
+8
-26
8 additions, 26 deletions
theories/tactics.v
with
8 additions
and
26 deletions
theories/tactics.v
+
8
−
26
View file @
8f0d5ae3
...
...
@@ -117,25 +117,6 @@ does the converse. *)
Ltac
var_eq
x1
x2
:=
match
x1
with
x2
=>
idtac
|
_
=>
fail
1
end
.
Ltac
var_neq
x1
x2
:=
match
x1
with
x2
=>
fail
1
|
_
=>
idtac
end
.
(** The tactics [block_hyps] and [unblock_hyps] can be used to temporarily mark
certain hypothesis as being blocked. The tactic changes all hypothesis [H: T]
into [H: blocked T], where [blocked] is the identity function. If a hypothesis
is already blocked, it will not be blocked again. The tactic [unblock_hyps]
removes [blocked] everywhere. *)
Ltac
block_hyp
H
:=
lazymatch
type
of
H
with
|
block
_
=>
idtac
|
?T
=>
change
T
with
(
block
T
)
in
H
end
.
Ltac
block_hyps
:=
repeat_on_hyps
(
fun
H
=>
match
type
of
H
with
block
_
=>
idtac
|
?T
=>
change
(
block
T
)
in
H
end
)
.
Ltac
unblock_hyps
:=
unfold
block
in
*
|
-.
(** The tactic [injection' H] is a variant of injection that introduces the
generated equalities. *)
Ltac
injection'
H
:=
block_goal
;
injection
H
;
clear
H
;
intros
H
;
intros
;
unblock_goal
.
(** The tactic [simplify_equality] repeatedly substitutes, discriminates,
and injects equalities, and tries to contradict impossible inequalities. *)
Ltac
fold_classes
:=
...
...
@@ -189,13 +170,14 @@ Ltac simplify_equality := repeat
|
H
:
_
=
_
|
-
_
=>
discriminate
H
|
H
:
?f
_
=
?f
_
|
-
_
=>
apply
(
inj
f
)
in
H
|
H
:
?f
_
_
=
?f
_
_
|
-
_
=>
apply
(
inj2
f
)
in
H
;
destruct
H
(* before [injection'] to circumvent bug #2939 in some situations *)
|
H
:
?f
_
=
?f
_
|
-
_
=>
injection'
H
|
H
:
?f
_
_
=
?f
_
_
|
-
_
=>
injection'
H
|
H
:
?f
_
_
_
=
?f
_
_
_
|
-
_
=>
injection'
H
|
H
:
?f
_
_
_
_
=
?f
_
_
_
_
|
-
_
=>
injection'
H
|
H
:
?f
_
_
_
_
_
=
?f
_
_
_
_
_
|
-
_
=>
injection'
H
|
H
:
?f
_
_
_
_
_
_
=
?f
_
_
_
_
_
_
|
-
_
=>
injection'
H
(* before [injection] to circumvent bug #2939 in some situations *)
|
H
:
?f
_
=
?f
_
|
-
_
=>
injection
H
as
H
(* first hyp will be named [H], subsequent hyps will be given fresh names *)
|
H
:
?f
_
_
=
?f
_
_
|
-
_
=>
injection
H
as
H
|
H
:
?f
_
_
_
=
?f
_
_
_
|
-
_
=>
injection
H
as
H
|
H
:
?f
_
_
_
_
=
?f
_
_
_
_
|
-
_
=>
injection
H
as
H
|
H
:
?f
_
_
_
_
_
=
?f
_
_
_
_
_
|
-
_
=>
injection
H
as
H
|
H
:
?f
_
_
_
_
_
_
=
?f
_
_
_
_
_
_
|
-
_
=>
injection
H
as
H
|
H
:
?x
=
?x
|
-
_
=>
clear
H
(* unclear how to generalize the below *)
|
H1
:
?o
=
Some
?x
,
H2
:
?o
=
Some
?y
|
-
_
=>
...
...
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