Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Abel Nieto
Iris
Commits
50dcb71c
Commit
50dcb71c
authored
6 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Fix indentation at some places.
parent
370f01fe
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/proofmode/ltac_tactics.v
+80
-80
80 additions, 80 deletions
theories/proofmode/ltac_tactics.v
with
80 additions
and
80 deletions
theories/proofmode/ltac_tactics.v
+
80
−
80
View file @
50dcb71c
...
@@ -593,21 +593,21 @@ like `apply`, `split` and `eexists` wrongly trigger type class search to resolve
...
@@ -593,21 +593,21 @@ like `apply`, `split` and `eexists` wrongly trigger type class search to resolve
these holes. To avoid TC being triggered too eagerly, this tactic uses `refine`
these holes. To avoid TC being triggered too eagerly, this tactic uses `refine`
at most places instead of `apply`. *)
at most places instead of `apply`. *)
Local
Ltac
iSpecializeArgs_go
H
xs
:=
Local
Ltac
iSpecializeArgs_go
H
xs
:=
lazymatch
xs
with
lazymatch
xs
with
|
hnil
=>
idtac
|
hnil
=>
idtac
|
hcons
?x
?xs
=>
|
hcons
?x
?xs
=>
notypeclasses
refine
(
tac_forall_specialize
_
_
H
_
_
_
_
_
_
_);
notypeclasses
refine
(
tac_forall_specialize
_
_
H
_
_
_
_
_
_
_);
[
pm_reflexivity
||
[
pm_reflexivity
||
let
H
:=
pretty_ident
H
in
let
H
:=
pretty_ident
H
in
fail
"iSpecialize:"
H
"not found"
fail
"iSpecialize:"
H
"not found"
|
iSolveTC
||
|
iSolveTC
||
let
P
:=
match
goal
with
|
-
IntoForall
?P
_
=>
P
end
in
let
P
:=
match
goal
with
|
-
IntoForall
?P
_
=>
P
end
in
fail
"iSpecialize: cannot instantiate"
P
"with"
x
fail
"iSpecialize: cannot instantiate"
P
"with"
x
|
lazymatch
goal
with
(* Force [A] in [ex_intro] to deal with coercions. *)
|
lazymatch
goal
with
(* Force [A] in [ex_intro] to deal with coercions. *)
|
|
-
∃
_
:
?A
,
_
=>
|
|
-
∃
_
:
?A
,
_
=>
notypeclasses
refine
(
@
ex_intro
A
_
x
(
conj
_
_))
notypeclasses
refine
(
@
ex_intro
A
_
x
(
conj
_
_))
end
;
[
shelve
..|
pm_reflexivity
|
iSpecializeArgs_go
H
xs
]]
end
;
[
shelve
..|
pm_reflexivity
|
iSpecializeArgs_go
H
xs
]]
end
.
end
.
Local
Tactic
Notation
"iSpecializeArgs"
constr
(
H
)
open_constr
(
xs
)
:=
Local
Tactic
Notation
"iSpecializeArgs"
constr
(
H
)
open_constr
(
xs
)
:=
iSpecializeArgs_go
H
xs
.
iSpecializeArgs_go
H
xs
.
...
@@ -1127,44 +1127,44 @@ Tactic Notation "iModCore" constr(H) :=
...
@@ -1127,44 +1127,44 @@ Tactic Notation "iModCore" constr(H) :=
(** * Basic destruct tactic *)
(** * Basic destruct tactic *)
Local
Ltac
iDestructHypGo
Hz
pat
:=
Local
Ltac
iDestructHypGo
Hz
pat
:=
lazymatch
pat
with
lazymatch
pat
with
|
IAnom
=>
|
IAnom
=>
lazymatch
Hz
with
lazymatch
Hz
with
|
IAnon
_
=>
idtac
|
IAnon
_
=>
idtac
|
INamed
?Hz
=>
let
Hz'
:=
iFresh
in
iRename
Hz
into
Hz'
|
INamed
?Hz
=>
let
Hz'
:=
iFresh
in
iRename
Hz
into
Hz'
end
end
|
IDrop
=>
iClearHyp
Hz
|
IDrop
=>
iClearHyp
Hz
|
IFrame
=>
iFrameHyp
Hz
|
IFrame
=>
iFrameHyp
Hz
|
IIdent
?y
=>
iRename
Hz
into
y
|
IIdent
?y
=>
iRename
Hz
into
y
|
IList
[[]]
=>
iExFalso
;
iExact
Hz
|
IList
[[]]
=>
iExFalso
;
iExact
Hz
|
IList
[[
?pat1
;
IDrop
]]
=>
iAndDestructChoice
Hz
as
Left
Hz
;
iDestructHypGo
Hz
pat1
|
IList
[[
?pat1
;
IDrop
]]
=>
iAndDestructChoice
Hz
as
Left
Hz
;
iDestructHypGo
Hz
pat1
|
IList
[[
IDrop
;
?pat2
]]
=>
iAndDestructChoice
Hz
as
Right
Hz
;
iDestructHypGo
Hz
pat2
|
IList
[[
IDrop
;
?pat2
]]
=>
iAndDestructChoice
Hz
as
Right
Hz
;
iDestructHypGo
Hz
pat2
|
IList
[[
?pat1
;
?pat2
]]
=>
|
IList
[[
?pat1
;
?pat2
]]
=>
let
Hy
:=
iFresh
in
iAndDestruct
Hz
as
Hz
Hy
;
iDestructHypGo
Hz
pat1
;
iDestructHypGo
Hy
pat2
let
Hy
:=
iFresh
in
iAndDestruct
Hz
as
Hz
Hy
;
iDestructHypGo
Hz
pat1
;
iDestructHypGo
Hy
pat2
|
IList
[[
?pat1
];[
?pat2
]]
=>
iOrDestruct
Hz
as
Hz
Hz
;
[
iDestructHypGo
Hz
pat1
|
iDestructHypGo
Hz
pat2
]
|
IList
[[
?pat1
];[
?pat2
]]
=>
iOrDestruct
Hz
as
Hz
Hz
;
[
iDestructHypGo
Hz
pat1
|
iDestructHypGo
Hz
pat2
]
|
IPureElim
=>
iPure
Hz
as
?
|
IPureElim
=>
iPure
Hz
as
?
|
IRewrite
Right
=>
iPure
Hz
as
->
|
IRewrite
Right
=>
iPure
Hz
as
->
|
IRewrite
Left
=>
iPure
Hz
as
<-
|
IRewrite
Left
=>
iPure
Hz
as
<-
|
IAlwaysElim
?pat
=>
iPersistent
Hz
;
iDestructHypGo
Hz
pat
|
IAlwaysElim
?pat
=>
iPersistent
Hz
;
iDestructHypGo
Hz
pat
|
IModalElim
?pat
=>
iModCore
Hz
;
iDestructHypGo
Hz
pat
|
IModalElim
?pat
=>
iModCore
Hz
;
iDestructHypGo
Hz
pat
|
_
=>
fail
"iDestruct:"
pat
"invalid"
|
_
=>
fail
"iDestruct:"
pat
"invalid"
end
.
end
.
Local
Ltac
iDestructHypFindPat
Hgo
pat
found
pats
:=
Local
Ltac
iDestructHypFindPat
Hgo
pat
found
pats
:=
lazymatch
pats
with
lazymatch
pats
with
|
[]
=>
|
[]
=>
lazymatch
found
with
lazymatch
found
with
|
true
=>
pm_prettify
(* post-tactic prettification *)
|
true
=>
pm_prettify
(* post-tactic prettification *)
|
false
=>
fail
"iDestruct:"
pat
"should contain exactly one proper introduction pattern"
|
false
=>
fail
"iDestruct:"
pat
"should contain exactly one proper introduction pattern"
end
end
|
ISimpl
::
?pats
=>
simpl
;
iDestructHypFindPat
Hgo
pat
found
pats
|
ISimpl
::
?pats
=>
simpl
;
iDestructHypFindPat
Hgo
pat
found
pats
|
IClear
?H
::
?pats
=>
iClear
H
;
iDestructHypFindPat
Hgo
pat
found
pats
|
IClear
?H
::
?pats
=>
iClear
H
;
iDestructHypFindPat
Hgo
pat
found
pats
|
IClearFrame
?H
::
?pats
=>
iFrame
H
;
iDestructHypFindPat
Hgo
pat
found
pats
|
IClearFrame
?H
::
?pats
=>
iFrame
H
;
iDestructHypFindPat
Hgo
pat
found
pats
|
?pat
::
?pats
=>
|
?pat
::
?pats
=>
lazymatch
found
with
lazymatch
found
with
|
false
=>
iDestructHypGo
Hgo
pat
;
iDestructHypFindPat
Hgo
pat
true
pats
|
false
=>
iDestructHypGo
Hgo
pat
;
iDestructHypFindPat
Hgo
pat
true
pats
|
true
=>
fail
"iDestruct:"
pat
"should contain exactly one proper introduction pattern"
|
true
=>
fail
"iDestruct:"
pat
"should contain exactly one proper introduction pattern"
end
end
end
.
end
.
Tactic
Notation
"iDestructHyp"
constr
(
H
)
"as"
constr
(
pat
)
:=
Tactic
Notation
"iDestructHyp"
constr
(
H
)
"as"
constr
(
pat
)
:=
let
pats
:=
intro_pat
.
parse
pat
in
let
pats
:=
intro_pat
.
parse
pat
in
iDestructHypFindPat
H
pat
false
pats
.
iDestructHypFindPat
H
pat
false
pats
.
...
@@ -1221,34 +1221,34 @@ Tactic Notation "iCombine" constr(H1) constr(H2) "as" constr(pat) :=
...
@@ -1221,34 +1221,34 @@ Tactic Notation "iCombine" constr(H1) constr(H2) "as" constr(pat) :=
(** * Introduction tactic *)
(** * Introduction tactic *)
Ltac
iIntros_go
pats
startproof
:=
Ltac
iIntros_go
pats
startproof
:=
lazymatch
pats
with
lazymatch
pats
with
|
[]
=>
|
[]
=>
lazymatch
startproof
with
lazymatch
startproof
with
|
true
=>
iStartProof
|
true
=>
iStartProof
|
false
=>
idtac
|
false
=>
idtac
end
end
(* Optimizations to avoid generating fresh names *)
(* Optimizations to avoid generating fresh names *)
|
IPureElim
::
?pats
=>
iIntro
(?);
iIntros_go
pats
startproof
|
IPureElim
::
?pats
=>
iIntro
(?);
iIntros_go
pats
startproof
|
IAlwaysElim
(
IIdent
?H
)
::
?pats
=>
iIntro
#
H
;
iIntros_go
pats
false
|
IAlwaysElim
(
IIdent
?H
)
::
?pats
=>
iIntro
#
H
;
iIntros_go
pats
false
|
IDrop
::
?pats
=>
iIntro
_;
iIntros_go
pats
startproof
|
IDrop
::
?pats
=>
iIntro
_;
iIntros_go
pats
startproof
|
IIdent
?H
::
?pats
=>
iIntro
H
;
iIntros_go
pats
startproof
|
IIdent
?H
::
?pats
=>
iIntro
H
;
iIntros_go
pats
startproof
(* Introduction patterns that can only occur at the top-level *)
(* Introduction patterns that can only occur at the top-level *)
|
IPureIntro
::
?pats
=>
iPureIntro
;
iIntros_go
pats
false
|
IPureIntro
::
?pats
=>
iPureIntro
;
iIntros_go
pats
false
|
IAlwaysIntro
::
?pats
=>
iAlways
;
iIntros_go
pats
false
|
IAlwaysIntro
::
?pats
=>
iAlways
;
iIntros_go
pats
false
|
IModalIntro
::
?pats
=>
iModIntro
;
iIntros_go
pats
false
|
IModalIntro
::
?pats
=>
iModIntro
;
iIntros_go
pats
false
|
IForall
::
?pats
=>
repeat
iIntroForall
;
iIntros_go
pats
startproof
|
IForall
::
?pats
=>
repeat
iIntroForall
;
iIntros_go
pats
startproof
|
IAll
::
?pats
=>
repeat
(
iIntroForall
||
iIntro
);
iIntros_go
pats
startproof
|
IAll
::
?pats
=>
repeat
(
iIntroForall
||
iIntro
);
iIntros_go
pats
startproof
(* Clearing and simplifying introduction patterns *)
(* Clearing and simplifying introduction patterns *)
|
ISimpl
::
?pats
=>
simpl
;
iIntros_go
pats
startproof
|
ISimpl
::
?pats
=>
simpl
;
iIntros_go
pats
startproof
|
IClear
?H
::
?pats
=>
iClear
H
;
iIntros_go
pats
false
|
IClear
?H
::
?pats
=>
iClear
H
;
iIntros_go
pats
false
|
IClearFrame
?H
::
?pats
=>
iFrame
H
;
iIntros_go
pats
false
|
IClearFrame
?H
::
?pats
=>
iFrame
H
;
iIntros_go
pats
false
|
IDone
::
?pats
=>
try
done
;
iIntros_go
pats
startproof
|
IDone
::
?pats
=>
try
done
;
iIntros_go
pats
startproof
(* Introduction + destruct *)
(* Introduction + destruct *)
|
IAlwaysElim
?pat
::
?pats
=>
|
IAlwaysElim
?pat
::
?pats
=>
let
H
:=
iFresh
in
iIntro
#
H
;
iDestructHyp
H
as
pat
;
iIntros_go
pats
false
let
H
:=
iFresh
in
iIntro
#
H
;
iDestructHyp
H
as
pat
;
iIntros_go
pats
false
|
?pat
::
?pats
=>
|
?pat
::
?pats
=>
let
H
:=
iFresh
in
iIntro
H
;
iDestructHyp
H
as
pat
;
iIntros_go
pats
false
let
H
:=
iFresh
in
iIntro
H
;
iDestructHyp
H
as
pat
;
iIntros_go
pats
false
end
.
end
.
Tactic
Notation
"iIntros"
constr
(
pat
)
:=
Tactic
Notation
"iIntros"
constr
(
pat
)
:=
let
pats
:=
intro_pat
.
parse
pat
in
iIntros_go
pats
true
.
let
pats
:=
intro_pat
.
parse
pat
in
iIntros_go
pats
true
.
Tactic
Notation
"iIntros"
:=
iIntros
[
IAll
]
.
Tactic
Notation
"iIntros"
:=
iIntros
[
IAll
]
.
...
...
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