Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
George Pirlea
Iris
Commits
09ae3206
Commit
09ae3206
authored
Apr 04, 2018
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate type class for `■ ⎡P⎤ ⊢ ⎡■ P⎤`.
parent
9a745670
Changes
3
Hide whitespace changes
Inline
Sidebyside
Showing
3 changed files
with
25 additions
and
8 deletions
+25
8
theories/bi/embedding.v
theories/bi/embedding.v
+20
7
theories/bi/monpred.v
theories/bi/monpred.v
+4
0
theories/proofmode/class_instances_sbi.v
theories/proofmode/class_instances_sbi.v
+1
1
No files found.
theories/bi/embedding.v
View file @
09ae3206
...
...
@@ 62,6 +62,13 @@ Class BiEmbedFUpd (PROP1 PROP2 : sbi)
Hint
Mode
BiEmbedFUpd

!



:
typeclass_instances
.
Hint
Mode
BiEmbedFUpd
!




:
typeclass_instances
.
Class
BiEmbedPlainly
(
PROP1
PROP2
:
sbi
)
`
{
BiEmbed
PROP1
PROP2
,
BiPlainly
PROP1
,
BiPlainly
PROP2
}
:
=
{
embed_plainly_2
(
P
:
PROP1
)
:
■
⎡
P
⎤
⊢
(
⎡■
P
⎤
:
PROP2
)
}.
Hint
Mode
BiEmbedPlainly

!



:
typeclass_instances
.
Hint
Mode
BiEmbedPlainly
!




:
typeclass_instances
.
Section
embed_laws
.
Context
`
{
BiEmbed
PROP1
PROP2
}.
Local
Notation
embed
:
=
(
embed
(
A
:
=
PROP1
)
(
B
:
=
PROP2
)).
...
...
@@ 270,6 +277,14 @@ Section sbi_embed.
Lemma
embed_except_0
P
:
⎡◇
P
⎤
⊣
⊢
◇
⎡
P
⎤
.
Proof
.
by
rewrite
embed_or
embed_later
embed_pure
.
Qed
.
(* Not an instance, since it may cause overlap *)
Lemma
bi_embed_plainly_emp
`
{!
BiPlainly
PROP1
,
!
BiPlainly
PROP2
}
:
BiEmbedEmp
PROP1
PROP2
→
BiEmbedPlainly
PROP1
PROP2
.
Proof
.
intros
.
constructor
=>
P
.
rewrite
!
plainly_alt
embed_internal_eq
.
by
rewrite

embed_affinely

embed_emp
embed_interal_inj
.
Qed
.
Lemma
embed_plainly_1
`
{!
BiPlainly
PROP1
,
!
BiPlainly
PROP2
}
P
:
⎡■
P
⎤
⊢
■
⎡
P
⎤
.
Proof
.
assert
(
∀
P
,
<
affine
>
⎡
P
⎤
⊣
⊢
(<
affine
>
⎡
<
affine
>
P
⎤
:
PROP2
))
as
Hhelp
.
...
...
@@ 282,16 +297,14 @@ Section sbi_embed.

apply
bi
.
and_intro
;
auto
using
embed_emp_2
.
}
rewrite
!
plainly_alt
embed_internal_eq
.
by
rewrite
Hhelp

Hemp
!
bi
.
f_equiv
.
Qed
.
Lemma
embed_plainly
`
{!
Bi
EmbedEmp
PROP1
PROP2
,
!
BiPlainly
PROP1
,
!
BiPlainly
PROP2
}
P
:
⎡■
P
⎤
⊣
⊢
■
⎡
P
⎤
.
Lemma
embed_plainly
`
{!
Bi
Plainly
PROP1
,
!
BiPlainly
PROP2
,
!
Bi
Embed
Plainly
PROP1
PROP2
}
P
:
⎡■
P
⎤
⊣
⊢
■
⎡
P
⎤
.
Proof
.
apply
(
anti_symm
_
)
;
first
by
apply
embed_plainly_1
.
rewrite
!
plainly_alt
embed_internal_eq
.
by
rewrite

embed_affinely

embed_emp
embed_interal_inj
.
apply
(
anti_symm
_
).
by
apply
embed_plainly_1
.
by
apply
embed_plainly_2
.
Qed
.
Lemma
embed_plainly_if
`
{!
Bi
EmbedEmp
PROP1
PROP2
,
!
BiPlainly
PROP1
,
!
BiPlainly
PROP2
}
p
P
:
⎡■
?p
P
⎤
⊣
⊢
■
?p
⎡
P
⎤
.
Lemma
embed_plainly_if
`
{!
Bi
Plainly
PROP1
,
!
BiPlainly
PROP2
,
!
Bi
Embed
Plainly
PROP1
PROP2
}
p
P
:
⎡■
?p
P
⎤
⊣
⊢
■
?p
⎡
P
⎤
.
Proof
.
destruct
p
;
simpl
;
auto
using
embed_plainly
.
Qed
.
Lemma
embed_plainly_if_1
`
{!
BiPlainly
PROP1
,
!
BiPlainly
PROP2
}
p
P
:
⎡■
?p
P
⎤
⊢
■
?p
⎡
P
⎤
.
...
...
theories/bi/monpred.v
View file @
09ae3206
...
...
@@ 933,6 +933,10 @@ Proof.
apply
bi
.
forall_intro
=>?.
by
do
2
f_equiv
.
Qed
.
Global
Instance
monPred_bi_embed_plainly
`
{
BiPlainly
PROP
}
:
BiEmbedPlainly
PROP
monPredSI
.
Proof
.
apply
bi_embed_plainly_emp
,
_
.
Qed
.
Lemma
monPred_plainly_unfold
`
{
BiPlainly
PROP
}
:
plainly
=
λ
P
,
⎡
∀
i
,
■
(
P
i
)
⎤
%
I
.
Proof
.
by
rewrite
monPred_plainly_eq
monPred_embed_eq
.
Qed
.
Lemma
monPred_at_plainly
`
{
BiPlainly
PROP
}
i
P
:
(
■
P
)
i
⊣
⊢
∀
j
,
■
(
P
j
).
...
...
theories/proofmode/class_instances_sbi.v
View file @
09ae3206
...
...
@@ 417,7 +417,7 @@ Global Instance from_modal_plainly `{BiPlainly PROP} P :
Proof
.
by
rewrite
/
FromModal
.
Qed
.
Global
Instance
from_modal_plainly_embed
`
{
BiPlainly
PROP
,
BiPlainly
PROP'
,
BiEmbed
Emp
PROP
PROP'
,
!
SbiEmbed
PROP
PROP'
}
`
(
sel
:
A
)
P
Q
:
BiEmbed
Plainly
PROP
PROP'
,
!
SbiEmbed
PROP
PROP'
}
`
(
sel
:
A
)
P
Q
:
FromModal
modality_plainly
sel
P
Q
→
FromModal
modality_plainly
sel
⎡
P
⎤
⎡
Q
⎤

100
.
Proof
.
rewrite
/
FromModal
/=
=><.
by
rewrite
embed_plainly
.
Qed
.
...
...
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