Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
97038d6c
Commit
97038d6c
authored
Feb 20, 2018
by
Robbert Krebbers
Browse files
Simplify `iAssumptionInv`.
parent
694425f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/tactics.v
View file @
97038d6c
...
...
@@ -1871,17 +1871,14 @@ Tactic Notation "iMod" open_constr(lem) "as" "%" simple_intropattern(pat) :=
namespace [N]. To do so, we check whether for each hypothesis
["H":P] we can find an instance of [IntoInv P N] *)
Tactic
Notation
"iAssumptionInv"
constr
(
N
)
:
=
let
rec
find
Γ
i
P
:
=
let
rec
find
Γ
i
:
=
lazymatch
Γ
with
|
Esnoc
?
Γ
?j
?P'
=>
first
[(
let
H
:
=
constr
:
(
_:
IntoInv
P'
N
)
in
unify
P
P'
;
unify
i
j
)|
find
Γ
i
P
]
first
[
let
H
:
=
constr
:
(
_:
IntoInv
P'
N
)
in
unify
i
j
|
find
Γ
i
]
end
in
match
goal
with
|
|-
envs_lookup_delete
_
?i
(
Envs
?
Γ
p
?
Γ
s
)
=
Some
(
_
,
?P
,
_
)
=>
first
[
is_evar
i
;
fail
1
|
env_reflexivity
]
|
|-
envs_lookup_delete
_
?i
(
Envs
?
Γ
p
?
Γ
s
)
=
Some
(
_
,
?P
,
_
)
=>
is_evar
i
;
first
[
find
Γ
p
i
P
|
find
Γ
s
i
P
]
;
env_reflexivity
lazymatch
goal
with
|
|-
envs_lookup_delete
_
?i
(
Envs
?
Γ
p
?
Γ
s
)
=
Some
_
=>
first
[
find
Γ
p
i
|
find
Γ
s
i
]
;
env_reflexivity
end
.
(* The argument [select] is the namespace [N] or hypothesis name ["H"] of the
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment