Skip to content
GitLab
Menu
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
1cb1dd6f
Commit
1cb1dd6f
authored
May 25, 2019
by
Robbert Krebbers
Browse files
Port `tac_specialize`.
parent
911412f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/coq_tactics.v
View file @
1cb1dd6f
...
...
@@ -250,9 +250,9 @@ Qed.
(* This is pretty much [tac_specialize_assert] with [js:=[j]] and [tac_exact],
but it is doing some work to keep the order of hypotheses preserved. *)
(* TODO: convert to not take Δ' *)
Lemma
tac_specialize
remove_intuitionistic
Δ
Δ
'
i
p
j
q
P1
P2
R
Q
:
envs_lookup
_delete
remove_intuitionistic
i
Δ
=
Some
(
p
,
P1
,
Δ
'
)
→
Lemma
tac_specialize
remove_intuitionistic
Δ
i
p
j
q
P1
P2
R
Q
:
envs_lookup
i
Δ
=
Some
(
p
,
P1
)
→
let
Δ
'
:
=
envs
_delete
remove_intuitionistic
i
p
Δ
in
envs_lookup
j
Δ
'
=
Some
(
q
,
R
)
→
IntoWand
q
p
R
P1
P2
→
match
envs_replace
j
q
(
p
&&
q
)
(
Esnoc
Enil
j
P2
)
Δ
'
with
...
...
@@ -260,8 +260,7 @@ Lemma tac_specialize remove_intuitionistic Δ Δ' i p j q P1 P2 R Q :
|
None
=>
False
end
→
envs_entails
Δ
Q
.
Proof
.
rewrite
envs_entails_eq
/
IntoWand
.
intros
[?
->]%
envs_lookup_delete_Some
?
HR
?.
rewrite
envs_entails_eq
/
IntoWand
.
intros
??
HR
?.
destruct
(
envs_replace
_
_
_
_
_
)
as
[
Δ
''
|]
eqn
:
?
;
last
done
.
rewrite
(
envs_lookup_sound'
_
remove_intuitionistic
)
//.
rewrite
envs_replace_singleton_sound
//.
destruct
p
;
simpl
in
*.
...
...
theories/proofmode/ltac_tactics.v
View file @
1cb1dd6f
...
...
@@ -784,7 +784,7 @@ Ltac iSpecializePat_go H1 pats :=
|
SIdent
?H2
[]
::
?pats
=>
(* If we not need to specialize [H2] we can avoid a lot of unncessary
context manipulation. *)
notypeclasses
refine
(
tac_specialize
false
_
_
H2
_
H1
_
_
_
_
_
_
_
_
_
)
;
notypeclasses
refine
(
tac_specialize
false
_
H2
_
H1
_
_
_
_
_
_
_
_
_
)
;
[
pm_reflexivity
||
let
H2
:
=
pretty_ident
H2
in
fail
"iSpecialize:"
H2
"not found"
...
...
@@ -811,7 +811,7 @@ Ltac iSpecializePat_go H1 pats :=
Ltac backtraces (which would otherwise include the whole closure). *)
[..
(* side-conditions of [iSpecialize] *)
|
(* Use [remove_intuitionistic = true] to remove the copy [Htmp]. *)
notypeclasses
refine
(
tac_specialize
true
_
_
H2tmp
_
H1
_
_
_
_
_
_
_
_
_
)
;
notypeclasses
refine
(
tac_specialize
true
_
H2tmp
_
H1
_
_
_
_
_
_
_
_
_
)
;
[
pm_reflexivity
||
let
H2tmp
:
=
pretty_ident
H2tmp
in
fail
"iSpecialize:"
H2tmp
"not found"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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