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
Gaëtan Gilbert
Iris
Commits
0972d9c6
Commit
0972d9c6
authored
1 year ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add `with_ltac1_nil`.
parent
f0b64a73
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iris/proofmode/base.v
+11
-0
11 additions, 0 deletions
iris/proofmode/base.v
iris/proofmode/ltac_tactics.v
+8
-15
8 additions, 15 deletions
iris/proofmode/ltac_tactics.v
with
19 additions
and
15 deletions
iris/proofmode/base.v
+
11
−
0
View file @
0972d9c6
...
...
@@ -47,6 +47,17 @@ Ltac ltac1_list_rev_iter tac l :=
(
List
.
rev
(
of_ltac1_list
l
)))
in
go
tac
l
.
(** Since the Ltac1-Ltac2 API only supports unit-returning functions, there is
no nice way to call [Ltac]s such as [iTactic_] above with the empty list. We
therefore often define a special version [iTactic0_] for the empty list. This
version can be created using [with_ltac1_nil]:
Ltac iTactic0_ := with_ltac1_nil ltac:(fun xs => iTactic_ xs)
*)
Ltac
with_ltac1_nil
tac
:=
let
go
:=
ltac2
:(
tac
|
-
ltac1
:(
tac
l
|
-
tac
l
)
tac
(
Ltac1
.
of_list
[]))
in
go
tac
.
(* Directions of rewrites *)
Inductive
direction
:=
Left
|
Right
.
...
...
This diff is collapsed.
Click to expand it.
iris/proofmode/ltac_tactics.v
+
8
−
15
View file @
0972d9c6
...
...
@@ -1761,16 +1761,9 @@ Ltac iHypsContaining x :=
let
Γs
:=
lazymatch
goal
with
|
-
envs_entails
(
Envs
_
?Γs
_)
_
=>
Γs
end
in
let
Hs
:=
go
Γp
x
(
@
nil
ident
)
in
go
Γs
x
Hs
.
Ltac
iInduction0_
x
Hs
tac
IH
:=
iRevertIntros0_
Hs
ltac
:(
fun
_
=>
iRevertIntros0_
"∗"
ltac
:(
fun
_
=>
let
Hsx
:=
iHypsContaining
x
in
iRevertIntros0_
Hsx
ltac
:(
fun
_
=>
iInductionCore
tac
as
IH
)
)
)
.
Ltac
iInduction_
x
xs
Hs
tac
IH
:=
(* FIXME: We should be able to do this in a more sane way, by concatenating
the spec patterns instead of calling [iRevertIntros] multiple times. *)
iRevertIntros0_
Hs
ltac
:(
fun
_
=>
iRevertIntros_
xs
"∗"
ltac
:(
fun
_
=>
let
Hsx
:=
iHypsContaining
x
in
...
...
@@ -1779,6 +1772,8 @@ Ltac iInduction_ x xs Hs tac IH :=
)
)
)
.
Ltac
iInduction0_
x
Hs
tac
IH
:=
with_ltac1_nil
ltac
:(
fun
xs
=>
iInduction_
x
xs
Hs
tac
IH
)
.
(* Without induction scheme *)
Tactic
Notation
"iInduction"
constr
(
x
)
"as"
simple_intropattern
(
pat
)
constr
(
IH
)
:=
...
...
@@ -1826,18 +1821,16 @@ Tactic Notation "iLöbCore" "as" constr (IH) :=
|
_
=>
idtac
end
]
.
Ltac
iLöb0_
Hs
IH
:=
iRevertIntros0_
Hs
ltac
:(
fun
_
=>
iRevertIntros0_
"∗"
ltac
:(
fun
_
=>
iLöbCore
as
IH
)
)
.
Ltac
iLöb_
xs
Hs
IH
:=
(* FIXME: We should be able to do this in a more sane way, by concatenating
the spec patterns instead of calling [iRevertIntros] multiple times. *)
iRevertIntros0_
Hs
ltac
:(
fun
_
=>
iRevertIntros_
xs
"∗"
ltac
:(
fun
_
=>
iLöbCore
as
IH
)
)
.
Ltac
iLöb0_
Hs
IH
:=
with_ltac1_nil
ltac
:(
fun
xs
=>
iLöb_
xs
Hs
IH
)
.
Tactic
Notation
"iLöb"
"as"
constr
(
IH
)
:=
iLöb0_
""
IH
.
...
...
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