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
Merge requests
!142
Added select and select_revert tactics
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added select and select_revert tactics
msammler/select_tac
into
master
Overview
48
Commits
1
Pipelines
0
Changes
2
Merged
Michael Sammler
requested to merge
msammler/select_tac
into
master
5 years ago
Overview
48
Commits
1
Pipelines
0
Changes
2
Expand
As discussed with
@robbertkrebbers
open points:
Names of the tactics (What are the names in Mtac?
@janno
)
Changelog entry?
Edited
5 years ago
by
Michael Sammler
0
0
Merge request reports
Compare
master
version 10
19d3058a
5 years ago
version 9
c4cd8f33
5 years ago
version 8
92213810
5 years ago
version 7
23984e60
5 years ago
version 6
e25a9be2
5 years ago
version 5
18113ce2
5 years ago
version 4
f9beb585
5 years ago
version 3
bc565b4e
5 years ago
version 2
087d31c2
5 years ago
version 1
f42e0d06
5 years ago
master (base)
and
version 5
latest version
199d011d
1 commit,
5 years ago
version 10
19d3058a
1 commit,
5 years ago
version 9
c4cd8f33
1 commit,
5 years ago
version 8
92213810
1 commit,
5 years ago
version 7
23984e60
1 commit,
5 years ago
version 6
e25a9be2
1 commit,
5 years ago
version 5
18113ce2
1 commit,
5 years ago
version 4
f9beb585
1 commit,
5 years ago
version 3
bc565b4e
1 commit,
5 years ago
version 2
087d31c2
1 commit,
5 years ago
version 1
f42e0d06
1 commit,
5 years ago
2 files
+
16
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
theories/tactics.v
+
14
−
0
Options
@@ -520,6 +520,20 @@ Ltac find_pat pat tac :=
@@ -520,6 +520,20 @@ Ltac find_pat pat tac :=
tryif
tac
x
then
idtac
else
fail
2
tryif
tac
x
then
idtac
else
fail
2
end
.
end
.
(** [select] finds the first hypothesis matching [pat] and passes it
to the continuation [tac]. It's main advantage over using [match goal
with ] directly is that it is shorter. This tactic does not backtrack
if [tac] fails or in case of ambiguous matches. *)
Tactic
Notation
"select"
open_constr
(
pat
)
tactic
(
tac
)
:=
lazymatch
goal
with
(* The unify is necessary, otherwise holes in p stay as sideconditions *)
|
H
:
pat
|
-
_
=>
let
T
:=
(
type
of
H
)
in
unify
T
pat
;
tac
H
end
.
(** [select_revert] reverts the first hypothesis matching [pat] and
reverts it. *)
Tactic
Notation
"revert"
"select"
open_constr
(
pat
)
:=
select
pat
(
fun
H
=>
revert
H
)
.
(** Coq's [firstorder] tactic fails or loops on rather small goals already. In
(** Coq's [firstorder] tactic fails or loops on rather small goals already. In
particular, on those generated by the tactic [unfold_elem_ofs] which is used
particular, on those generated by the tactic [unfold_elem_ofs] which is used
to solve propositions on sets. The [naive_solver] tactic implements an
to solve propositions on sets. The [naive_solver] tactic implements an
Loading