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
00bfe453
Commit
00bfe453
authored
May 25, 2019
by
Robbert Krebbers
Browse files
Port `tac_specialize_assert`.
parent
1cb1dd6f
Pipeline
#17219
passed with stage
in 13 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/coq_tactics.v
View file @
00bfe453
...
...
@@ -270,16 +270,24 @@ Proof.
-
by
rewrite
HR
assoc
!
wand_elim_r
.
Qed
.
Lemma
tac_specialize_assert
Δ
Δ
1
Δ
2
'
j
q
neg
js
R
P1
P2
P1'
Q
:
Lemma
tac_specialize_assert
Δ
j
q
neg
js
R
P1
P2
P1'
Q
:
envs_lookup
j
Δ
=
Some
(
q
,
R
)
→
IntoWand
q
false
R
P1
P2
→
AddModal
P1'
P1
Q
→
(
''
(
Δ
1
,
Δ
2
)
←
envs_split
(
if
neg
is
true
then
Right
else
Left
)
js
(
envs_delete
true
j
q
Δ
)
;
match
''
(
Δ
1
,
Δ
2
)
←
envs_split
(
if
neg
is
true
then
Right
else
Left
)
js
(
envs_delete
true
j
q
Δ
)
;
Δ
2
'
←
envs_app
false
(
Esnoc
Enil
j
P2
)
Δ
2
;
Some
(
Δ
1
,
Δ
2
'
))
=
Some
(
Δ
1
,
Δ
2
'
)
→
(* does not preserve position of [j] *)
envs_entails
Δ
1
P1'
→
envs_entails
Δ
2
'
Q
→
envs_entails
Δ
Q
.
Some
(
Δ
1
,
Δ
2
'
)
(* does not preserve position of [j] *)
with
|
Some
(
Δ
1
,
Δ
2
'
)
=>
(* The constructor [conj] of [∧] still stores the contexts [Δ1] and [Δ2'] *)
envs_entails
Δ
1
P1'
∧
envs_entails
Δ
2
'
Q
|
None
=>
False
end
→
envs_entails
Δ
Q
.
Proof
.
rewrite
envs_entails_eq
.
intros
????
HP1
HQ
.
rewrite
envs_entails_eq
.
intros
???
HQ
.
destruct
(
_
≫
=
_
)
as
[[
Δ
1
Δ
2
'
]|]
eqn
:
?
;
last
done
.
destruct
HQ
as
[
HP1
HQ
].
destruct
(
envs_split
_
_
_
)
as
[[?
Δ
2
]|]
eqn
:
?
;
simplify_eq
/=
;
destruct
(
envs_app
_
_
_
)
eqn
:
?
;
simplify_eq
/=.
rewrite
envs_lookup_sound
//
envs_split_sound
//.
...
...
theories/proofmode/ltac_tactics.v
View file @
00bfe453
...
...
@@ -851,7 +851,7 @@ Ltac iSpecializePat_go H1 pats :=
fail
"iSpecialize: cannot select hypotheses for intuitionistic premise"
|
SGoal
(
SpecGoal
?m
?lr
?Hs_frame
?Hs
?d
)
::
?pats
=>
let
Hs'
:
=
eval
cbv
in
(
if
lr
then
Hs
else
Hs_frame
++
Hs
)
in
notypeclasses
refine
(
tac_specialize_assert
_
_
_
H1
_
lr
Hs'
_
_
_
_
_
_
_
_
_
_
_
)
;
notypeclasses
refine
(
tac_specialize_assert
_
H1
_
lr
Hs'
_
_
_
_
_
_
_
_
_
)
;
[
pm_reflexivity
||
let
H1
:
=
pretty_ident
H1
in
fail
"iSpecialize:"
H1
"not found"
...
...
@@ -860,11 +860,16 @@ Ltac iSpecializePat_go H1 pats :=
|
GSpatial
=>
class_apply
add_modal_id
|
GModal
=>
iSolveTC
||
fail
"iSpecialize: goal not a modality"
end
|
pm_reflexivity
||
let
Hs'
:
=
iMissingHyps
Hs'
in
fail
"iSpecialize: hypotheses"
Hs'
"not found"
|
iFrame
Hs_frame
;
solve_done
d
(*goal*)
|
iSpecializePat_go
H1
pats
]
|
pm_reduce
;
lazymatch
goal
with
|
|-
False
=>
let
Hs'
:
=
iMissingHyps
Hs'
in
fail
"iSpecialize: hypotheses"
Hs'
"not found"
|
_
=>
split
;
[
iFrame
Hs_frame
;
solve_done
d
(*goal*)
|
iSpecializePat_go
H1
pats
]
end
]
|
SAutoFrame
GIntuitionistic
::
?pats
=>
notypeclasses
refine
(
tac_specialize_assert_intuitionistic
_
H1
_
_
_
_
_
_
_
_
_
_
_
_
)
;
[
pm_reflexivity
||
...
...
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