Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Roux
Iris
Commits
99929dca
Commit
99929dca
authored
7 years ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Add hint mode. Add Implicit types.
parent
96d145ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/bi/embedding.v
+11
-5
11 additions, 5 deletions
theories/bi/embedding.v
theories/bi/monpred.v
+1
-1
1 addition, 1 deletion
theories/bi/monpred.v
with
12 additions
and
6 deletions
theories/bi/embedding.v
+
11
−
5
View file @
99929dca
...
@@ -11,6 +11,9 @@ Notation "⎡ P ⎤" := (bi_embed P) : bi_scope.
...
@@ -11,6 +11,9 @@ Notation "⎡ P ⎤" := (bi_embed P) : bi_scope.
Instance
:
Params
(
@
bi_embed
)
3
.
Instance
:
Params
(
@
bi_embed
)
3
.
Typeclasses
Opaque
bi_embed
.
Typeclasses
Opaque
bi_embed
.
Hint
Mode
BiEmbed
!
-
:
typeclass_instances
.
Hint
Mode
BiEmbed
-
!
:
typeclass_instances
.
Class
BiEmbedding
(
PROP1
PROP2
:
bi
)
`{
BiEmbed
PROP1
PROP2
}
:=
{
Class
BiEmbedding
(
PROP1
PROP2
:
bi
)
`{
BiEmbed
PROP1
PROP2
}
:=
{
bi_embed_ne
:>
NonExpansive
bi_embed
;
bi_embed_ne
:>
NonExpansive
bi_embed
;
bi_embed_mono
:>
Proper
((
⊢
)
==>
(
⊢
))
bi_embed
;
bi_embed_mono
:>
Proper
((
⊢
)
==>
(
⊢
))
bi_embed
;
...
@@ -33,6 +36,8 @@ Class SbiEmbedding (PROP1 PROP2 : sbi) `{BiEmbed PROP1 PROP2} := {
...
@@ -33,6 +36,8 @@ Class SbiEmbedding (PROP1 PROP2 : sbi) `{BiEmbed PROP1 PROP2} := {
Section
bi_embedding
.
Section
bi_embedding
.
Context
`{
BiEmbedding
PROP1
PROP2
}
.
Context
`{
BiEmbedding
PROP1
PROP2
}
.
Local
Notation
bi_embed
:=
(
bi_embed
(
A
:=
PROP1
)
(
B
:=
PROP2
))
.
Implicit
Types
P
Q
R
:
PROP1
.
Global
Instance
bi_embed_proper
:
Proper
((
≡
)
==>
(
≡
))
bi_embed
.
Global
Instance
bi_embed_proper
:
Proper
((
≡
)
==>
(
≡
))
bi_embed
.
Proof
.
apply
(
ne_proper
_)
.
Qed
.
Proof
.
apply
(
ne_proper
_)
.
Qed
.
...
@@ -44,7 +49,7 @@ Section bi_embedding.
...
@@ -44,7 +49,7 @@ Section bi_embedding.
rewrite
EQ
//.
rewrite
EQ
//.
Qed
.
Qed
.
Lemma
bi_embed_valid
(
P
:
PROP1
)
:
@
bi_embed
PROP1
PROP2
_
P
↔
P
.
Lemma
bi_embed_valid
(
P
:
PROP1
)
:
bi_embed
P
↔
P
.
Proof
.
Proof
.
by
rewrite
/
bi_valid
-
bi_embed_emp
;
split
=>?;
[
apply
(
inj
bi_embed
)|
f_equiv
]
.
by
rewrite
/
bi_valid
-
bi_embed_emp
;
split
=>?;
[
apply
(
inj
bi_embed
)|
f_equiv
]
.
Qed
.
Qed
.
...
@@ -73,7 +78,7 @@ Section bi_embedding.
...
@@ -73,7 +78,7 @@ Section bi_embedding.
apply
bi
.
equiv_spec
;
split
;
[|
apply
bi_embed_wand_2
]
.
apply
bi
.
equiv_spec
;
split
;
[|
apply
bi_embed_wand_2
]
.
apply
bi
.
wand_intro_l
.
by
rewrite
-
bi_embed_sep
bi
.
wand_elim_r
.
apply
bi
.
wand_intro_l
.
by
rewrite
-
bi_embed_sep
bi
.
wand_elim_r
.
Qed
.
Qed
.
Lemma
bi_embed_pure
φ
:
⎡
⌜
φ
⌝
⎤
⊣⊢
⌜
φ
⌝.
Lemma
bi_embed_pure
φ
:
bi_embed
⌜
φ
⌝
⊣⊢
⌜
φ
⌝.
Proof
.
Proof
.
rewrite
(
@
bi
.
pure_alt
PROP1
)
(
@
bi
.
pure_alt
PROP2
)
bi_embed_exist
.
rewrite
(
@
bi
.
pure_alt
PROP1
)
(
@
bi
.
pure_alt
PROP2
)
bi_embed_exist
.
do
2
f_equiv
.
apply
bi
.
equiv_spec
.
split
;
[
apply
bi
.
True_intro
|]
.
do
2
f_equiv
.
apply
bi
.
equiv_spec
.
split
;
[
apply
bi
.
True_intro
|]
.
...
@@ -81,7 +86,7 @@ Section bi_embedding.
...
@@ -81,7 +86,7 @@ Section bi_embedding.
last
apply
bi
.
True_intro
.
last
apply
bi
.
True_intro
.
apply
bi
.
impl_intro_l
.
by
rewrite
right_id
.
apply
bi
.
impl_intro_l
.
by
rewrite
right_id
.
Qed
.
Qed
.
Lemma
bi_embed_internal_eq
(
A
:
ofeT
)
(
x
y
:
A
)
:
⎡
x
≡
y
⎤
⊣⊢
x
≡
y
.
Lemma
bi_embed_internal_eq
(
A
:
ofeT
)
(
x
y
:
A
)
:
bi_embed
(
x
≡
y
)
⊣⊢
x
≡
y
.
Proof
.
Proof
.
apply
bi
.
equiv_spec
;
split
;
[
apply
bi_embed_internal_eq_1
|]
.
apply
bi
.
equiv_spec
;
split
;
[
apply
bi_embed_internal_eq_1
|]
.
etrans
;
[
apply
(
bi
.
internal_eq_rewrite
x
y
(
λ
y
,
⎡
x
≡
y
⎤%
I
));
solve_proper
|]
.
etrans
;
[
apply
(
bi
.
internal_eq_rewrite
x
y
(
λ
y
,
⎡
x
≡
y
⎤%
I
));
solve_proper
|]
.
...
@@ -97,10 +102,10 @@ Section bi_embedding.
...
@@ -97,10 +102,10 @@ Section bi_embedding.
Lemma
bi_embed_absorbingly
P
:
⎡
bi_absorbingly
P
⎤
⊣⊢
bi_absorbingly
⎡
P
⎤.
Lemma
bi_embed_absorbingly
P
:
⎡
bi_absorbingly
P
⎤
⊣⊢
bi_absorbingly
⎡
P
⎤.
Proof
.
by
rewrite
bi_embed_sep
bi_embed_pure
.
Qed
.
Proof
.
by
rewrite
bi_embed_sep
bi_embed_pure
.
Qed
.
Lemma
bi_embed_plainly_if
P
b
:
⎡
bi_plainly_if
b
P
⎤
⊣⊢
bi_plainly_if
b
⎡
P
⎤.
Lemma
bi_embed_plainly_if
P
b
:
⎡
bi_plainly_if
b
P
⎤
⊣⊢
bi_plainly_if
b
⎡
P
⎤.
Proof
.
destruct
b
;
auto
using
bi_embed_plainly
.
Qed
.
Proof
.
destruct
b
;
simpl
;
auto
using
bi_embed_plainly
.
Qed
.
Lemma
bi_embed_persistently_if
P
b
:
Lemma
bi_embed_persistently_if
P
b
:
⎡
bi_persistently_if
b
P
⎤
⊣⊢
bi_persistently_if
b
⎡
P
⎤.
⎡
bi_persistently_if
b
P
⎤
⊣⊢
bi_persistently_if
b
⎡
P
⎤.
Proof
.
destruct
b
;
auto
using
bi_embed_persistently
.
Qed
.
Proof
.
destruct
b
;
simpl
;
auto
using
bi_embed_persistently
.
Qed
.
Lemma
bi_embed_affinely_if
P
b
:
⎡
bi_affinely_if
b
P
⎤
⊣⊢
bi_affinely_if
b
⎡
P
⎤.
Lemma
bi_embed_affinely_if
P
b
:
⎡
bi_affinely_if
b
P
⎤
⊣⊢
bi_affinely_if
b
⎡
P
⎤.
Proof
.
destruct
b
;
simpl
;
auto
using
bi_embed_affinely
.
Qed
.
Proof
.
destruct
b
;
simpl
;
auto
using
bi_embed_affinely
.
Qed
.
Lemma
bi_embed_hforall
{
As
}
(
Φ
:
himpl
As
PROP1
):
Lemma
bi_embed_hforall
{
As
}
(
Φ
:
himpl
As
PROP1
):
...
@@ -141,6 +146,7 @@ End bi_embedding.
...
@@ -141,6 +146,7 @@ End bi_embedding.
Section
sbi_embedding
.
Section
sbi_embedding
.
Context
`{
SbiEmbedding
PROP1
PROP2
}
.
Context
`{
SbiEmbedding
PROP1
PROP2
}
.
Implicit
Types
P
Q
R
:
PROP1
.
Lemma
sbi_embed_laterN
n
P
:
⎡▷^
n
P
⎤
⊣⊢
▷^
n
⎡
P
⎤.
Lemma
sbi_embed_laterN
n
P
:
⎡▷^
n
P
⎤
⊣⊢
▷^
n
⎡
P
⎤.
Proof
.
induction
n
=>
//=.
rewrite
sbi_embed_later
.
by
f_equiv
.
Qed
.
Proof
.
induction
n
=>
//=.
rewrite
sbi_embed_later
.
by
f_equiv
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
theories/bi/monpred.v
+
1
−
1
View file @
99929dca
...
@@ -119,7 +119,7 @@ Next Obligation. solve_proper. Qed.
...
@@ -119,7 +119,7 @@ Next Obligation. solve_proper. Qed.
Definition
monPred_embed_def
(
P
:
PROP
)
:
monPred
:=
MonPred
(
λ
_,
P
)
_
.
Definition
monPred_embed_def
(
P
:
PROP
)
:
monPred
:=
MonPred
(
λ
_,
P
)
_
.
Definition
monPred_embed_aux
:
seal
(
@
monPred_embed_def
)
.
by
eexists
.
Qed
.
Definition
monPred_embed_aux
:
seal
(
@
monPred_embed_def
)
.
by
eexists
.
Qed
.
Global
Instance
monPred_embed
:
BiEmbed
PROP
monPred
:=
unseal
monPred_embed_aux
.
Global
Instance
monPred_embed
:
BiEmbed
PROP
monPred
:=
unseal
monPred_embed_aux
.
Definition
monPred_embed_eq
:
bi_embed
=
_
:=
seal_eq
_
.
Definition
monPred_embed_eq
:
bi_embed
(
A
:=
PROP
)
=
_
:=
seal_eq
_
.
Definition
monPred_pure
(
φ
:
Prop
)
:
monPred
:=
⎡⌜
φ
⌝⎤%
I
.
Definition
monPred_pure
(
φ
:
Prop
)
:
monPred
:=
⎡⌜
φ
⌝⎤%
I
.
Definition
monPred_emp
:
monPred
:=
⎡
emp
⎤%
I
.
Definition
monPred_emp
:
monPred
:=
⎡
emp
⎤%
I
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment