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
71b66d70
Commit
71b66d70
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Plain Diff
Merge branch 'ralf/rename-by-pat' into 'master'
add rename-by-pattern tactic See merge request
!218
parents
96cb4bc9
0710439b
No related branches found
No related tags found
1 merge request
!218
add rename-by-pattern tactic
Pipeline
#40739
passed
4 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
tests/tactics.v
+7
-4
7 additions, 4 deletions
tests/tactics.v
theories/tactics.v
+3
-0
3 additions, 0 deletions
theories/tactics.v
with
12 additions
and
4 deletions
CHANGELOG.md
+
2
−
0
View file @
71b66d70
...
@@ -43,6 +43,8 @@ Coq 8.8 and 8.9 are no longer supported.
...
@@ -43,6 +43,8 @@ Coq 8.8 and 8.9 are no longer supported.
-
Rename
`seq_S_end_app`
to
`seq_S`
. (The lemma
`seq_S`
is also in Coq's stdlib
-
Rename
`seq_S_end_app`
to
`seq_S`
. (The lemma
`seq_S`
is also in Coq's stdlib
since Coq 8.12.)
since Coq 8.12.)
-
Remove
`omega`
import and hint database in
`tactics`
file.
-
Remove
`omega`
import and hint database in
`tactics`
file.
-
Add
`rename select <pat> into <name>`
tactic to find a hypothesis by pattern
and give it a fixed name.
The following
`sed`
script should perform most of the renaming
The following
`sed`
script should perform most of the renaming
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
):
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
):
...
...
This diff is collapsed.
Click to expand it.
tests/tactics.v
+
7
−
4
View file @
71b66d70
From
stdpp
Require
Import
tactics
.
From
stdpp
Require
Import
tactics
.
Goal
forall
P1
P2
P3
P4
(
P
:
Prop
),
Goal
∀
P1
P2
P3
P4
(
P
:
Prop
),
P1
∨
(
Is_true
(
P2
||
P3
))
∨
P4
→
P1
∨
(
Is_true
(
P2
||
P3
))
∨
P4
→
(
P1
→
P
)
→
(
P1
→
P
)
→
(
P2
→
P
)
→
(
P2
→
P
)
→
...
@@ -12,7 +12,7 @@ Proof.
...
@@ -12,7 +12,7 @@ Proof.
destruct_or
?
HH
;
[
exact
(
X1
HH
)
|
exact
(
X2
HH
)
|
exact
(
X3
HH
)
|
exact
(
X4
HH
)
]
.
destruct_or
?
HH
;
[
exact
(
X1
HH
)
|
exact
(
X2
HH
)
|
exact
(
X3
HH
)
|
exact
(
X4
HH
)
]
.
Qed
.
Qed
.
Goal
forall
P1
P2
P3
P4
(
P
:
Prop
),
Goal
∀
P1
P2
P3
P4
(
P
:
Prop
),
P1
∨
P2
→
P1
∨
P2
→
P3
∨
P4
→
P3
∨
P4
→
(
P1
→
P3
→
P
)
→
(
P1
→
P3
→
P
)
→
...
@@ -25,7 +25,7 @@ Proof.
...
@@ -25,7 +25,7 @@ Proof.
destruct_or
?;
[
exact
(
X1
HH1
HH2
)
|
exact
(
X3
HH1
HH2
)
|
exact
(
X2
HH1
HH2
)
|
exact
(
X4
HH1
HH2
)
]
.
destruct_or
?;
[
exact
(
X1
HH1
HH2
)
|
exact
(
X3
HH1
HH2
)
|
exact
(
X2
HH1
HH2
)
|
exact
(
X4
HH1
HH2
)
]
.
Qed
.
Qed
.
Goal
forall
P1
P2
P3
P4
(
P
:
Prop
),
Goal
∀
P1
P2
P3
P4
(
P
:
Prop
),
id
(
P1
∨
P2
)
→
id
(
P1
∨
P2
)
→
id
(
P3
∨
P4
)
→
id
(
P3
∨
P4
)
→
(
P1
→
P3
→
P
)
→
(
P1
→
P3
→
P
)
→
...
@@ -41,10 +41,13 @@ Proof.
...
@@ -41,10 +41,13 @@ Proof.
[
exact
(
X1
HH1
HH2
)
|
exact
(
X2
HH1
HH2
)
|
exact
(
X3
HH1
HH2
)
|
exact
(
X4
HH1
HH2
)
]
.
[
exact
(
X1
HH1
HH2
)
|
exact
(
X2
HH1
HH2
)
|
exact
(
X3
HH1
HH2
)
|
exact
(
X4
HH1
HH2
)
]
.
Qed
.
Qed
.
Goal
forall
P1
P2
P3
P4
,
Goal
∀
P1
P2
P3
P4
,
P1
∧
(
Is_true
(
P2
&&
P3
))
∧
P4
→
P1
∧
(
Is_true
(
P2
&&
P3
))
∧
P4
→
P1
∧
P2
∧
P3
.
P1
∧
P2
∧
P3
.
Proof
.
Proof
.
intros
*
HH
.
split_and
!
;
[
destruct_and
?
HH
;
assumption
|
destruct_and
?;
assumption
|
]
.
intros
*
HH
.
split_and
!
;
[
destruct_and
?
HH
;
assumption
|
destruct_and
?;
assumption
|
]
.
destruct_and
?
.
Fail
destruct_and
!.
assumption
.
destruct_and
?
.
Fail
destruct_and
!.
assumption
.
Qed
.
Qed
.
Goal
∀
(
n
:
nat
),
∃
m
:
nat
,
True
.
Proof
.
intros
?
.
rename
select
nat
into
m
.
exists
m
.
done
.
Qed
.
This diff is collapsed.
Click to expand it.
theories/tactics.v
+
3
−
0
View file @
71b66d70
...
@@ -537,6 +537,9 @@ Tactic Notation "select" open_constr(pat) tactic3(tac) :=
...
@@ -537,6 +537,9 @@ Tactic Notation "select" open_constr(pat) tactic3(tac) :=
(** [select_revert] reverts the first hypothesis matching [pat]. *)
(** [select_revert] reverts the first hypothesis matching [pat]. *)
Tactic
Notation
"revert"
"select"
open_constr
(
pat
)
:=
select
pat
(
fun
H
=>
revert
H
)
.
Tactic
Notation
"revert"
"select"
open_constr
(
pat
)
:=
select
pat
(
fun
H
=>
revert
H
)
.
Tactic
Notation
"rename"
"select"
open_constr
(
pat
)
"into"
ident
(
name
)
:=
select
pat
(
fun
H
=>
rename
H
into
name
)
.
(** 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
...
...
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