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
9b14f90a
Commit
9b14f90a
authored
May 29, 2018
by
Ralf Jung
Browse files
fix into_wand for monpred proofmode
parent
daeeaf05
Pipeline
#9057
passed with stage
in 24 minutes and 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/proofmode_monpred.v
View file @
9b14f90a
...
...
@@ -91,10 +91,18 @@ Section tests.
□
P
-
∗
⎡◇
𝓟⎤
-
∗
⎡◇
𝓠⎤
-
∗
⎡
◇
(
𝓟
∗
𝓠
)
⎤
.
Proof
.
iIntros
"#H1 H2 H3"
.
iModIntro
⎡
_
⎤
%
I
.
by
iSplitL
"H2"
.
Qed
.
(* This is a hack to avoid avoid coq bug #5735: sections variables
ignore hint modes. So we assume the instances in a way that
cannot be used by type class resolution, and then declare the
instance. as such. *)
Lemma
test_into_wand_embed
𝓟
𝓠
:
(
𝓟
-
∗
◇
𝓠
)
→
⎡𝓟⎤
⊢
@{
monPredSI
}
◇
⎡𝓠⎤
.
Proof
.
iIntros
(
HPQ
)
"HP"
.
iMod
(
HPQ
with
"[-]"
)
as
"$"
;
last
by
auto
.
iAssumption
.
Qed
.
(* This is a hack to avoid avoid coq bug #5735: sections variables ignore hint
modes. So we assume the instances in a way that cannot be used by type
class resolution, and then separately declare the instance as such. *)
Context
(
FU0
:
BiFUpd
PROP
*
unit
).
Instance
FU
:
BiFUpd
PROP
:
=
fst
FU0
.
...
...
theories/proofmode/class_instances_bi.v
View file @
9b14f90a
...
...
@@ -396,8 +396,9 @@ Global Instance into_wand_persistently_false q R P Q :
Absorbing
R
→
IntoWand
false
q
R
P
Q
→
IntoWand
false
q
(<
pers
>
R
)
P
Q
.
Proof
.
intros
?.
by
rewrite
/
IntoWand
persistently_elim
.
Qed
.
Global
Instance
into_wand_embed
`
{
BiEmbed
PROP
PROP'
}
p
q
(
PP
QQ
RR
:
PROP
)
(
P
:
PROP'
)
:
IntoWand
p
q
RR
PP
QQ
→
IntoEmbed
P
PP
→
IntoWand
p
q
RR
PP
QQ
→
IntoWand
p
q
⎡
RR
⎤
P
⎡
QQ
⎤
.
IntoWand
p
q
⎡
RR
⎤
P
⎡
QQ
⎤
.
Proof
.
rewrite
/
IntoEmbed
/
IntoWand
!
embed_intuitionistically_if_2
=>
->
->.
apply
bi
.
wand_intro_l
.
...
...
theories/proofmode/classes.v
View file @
9b14f90a
...
...
@@ -482,12 +482,14 @@ Proof. apply _. Qed.
(** The class [IntoEmbed P Q] is used to transform hypotheses while introducing
embeddings using [iModIntro].
Input: the proposition [P], output: the proposition [Q] so that [P ⊢ ⎡Q⎤] *)
Input: the proposition [P], output: the proposition [Q] so that [P ⊢ ⎡Q⎤].
Also used backwards, i.e. Input [Q] and output [P]. *)
Class
IntoEmbed
{
PROP
PROP'
:
bi
}
`
{
BiEmbed
PROP
PROP'
}
(
P
:
PROP'
)
(
Q
:
PROP
)
:
=
into_embed
:
P
⊢
⎡
Q
⎤
.
Arguments
IntoEmbed
{
_
_
_
}
_
%
I
_
%
I
.
Arguments
into_embed
{
_
_
_
}
_
%
I
_
%
I
{
_
}.
Hint
Mode
IntoEmbed
+
+
+
!
-
:
typeclass_instances
.
Hint
Mode
IntoEmbed
+
+
+
-
!
:
typeclass_instances
.
(* We use two type classes for [AsEmpValid], in order to avoid loops in
typeclass search. Indeed, the [as_emp_valid_embed] instance would try
...
...
Robbert Krebbers
@robbertkrebbers
mentioned in commit
545eea68
·
May 29, 2018
mentioned in commit
545eea68
mentioned in commit 545eea68d54732f1f76a1a5a5f575d8b1c8ee7df
Toggle commit list
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