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
9d661288
Commit
9d661288
authored
Feb 15, 2017
by
Ralf Jung
Browse files
fix types of the new instances
parent
0de297e1
Pipeline
#3903
passed with stage
in 3 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/class_instances.v
View file @
9d661288
...
...
@@ -43,32 +43,32 @@ Global Instance into_pure_cmra_valid `{CMRADiscrete A} (a : A) :
@
IntoPure
M
(
✓
a
)
(
✓
a
).
Proof
.
by
rewrite
/
IntoPure
discrete_valid
.
Qed
.
Global
Instance
into_pure_pure_conj
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
IntoPure
φ
1
P
1
->
IntoPure
φ
2
P
2
->
IntoPure
(
φ
1
∧
φ
2
)
(
P
1
∧
P
2
).
Global
Instance
into_pure_pure_conj
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
IntoPure
P
1
φ
1
->
IntoPure
P
2
φ
2
->
IntoPure
(
P
1
∧
P
2
)
(
φ
1
∧
φ
2
).
Proof
.
rewrite
/
IntoPure
pure_and
.
by
intros
->
->.
Qed
.
Global
Instance
into_pure_pure_sep
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
IntoPure
φ
1
P
1
->
IntoPure
φ
2
P
2
->
IntoPure
(
φ
1
∗
φ
2
)
(
P
1
∧
P
2
).
Global
Instance
into_pure_pure_sep
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
IntoPure
P
1
φ
1
->
IntoPure
P
2
φ
2
->
IntoPure
(
P
1
∗
P
2
)
(
φ
1
∧
φ
2
).
Proof
.
rewrite
/
IntoPure
sep_and
pure_and
.
by
intros
->
->.
Qed
.
Global
Instance
into_pure_pure_disj
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
IntoPure
φ
1
P
1
->
IntoPure
φ
2
P
2
->
IntoPure
(
φ
1
∨
φ
2
)
(
P
1
∨
P
2
).
Global
Instance
into_pure_pure_disj
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
IntoPure
P
1
φ
1
->
IntoPure
P
2
φ
2
->
IntoPure
(
P
1
∨
P
2
)
(
φ
1
∨
φ
2
).
Proof
.
rewrite
/
IntoPure
pure_or
.
by
intros
->
->.
Qed
.
Global
Instance
into_pure_pure_impl
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
FromPure
φ
1
P
1
->
IntoPure
φ
2
P
2
->
IntoPure
(
φ
1
→
φ
2
)
(
P
1
→
P
2
).
Global
Instance
into_pure_pure_impl
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
FromPure
P
1
φ
1
->
IntoPure
P
2
φ
2
->
IntoPure
(
P
1
→
P
2
)
(
φ
1
→
φ
2
).
Proof
.
rewrite
/
FromPure
/
IntoPure
pure_impl
.
by
intros
->
->.
Qed
.
Global
Instance
into_pure_pure_wand
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
FromPure
φ
1
P
1
->
IntoPure
φ
2
P
2
->
IntoPure
(
φ
1
-
∗
φ
2
)
(
P
1
→
P
2
).
Global
Instance
into_pure_pure_wand
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
FromPure
P
1
φ
1
->
IntoPure
P
2
φ
2
->
IntoPure
(
P
1
-
∗
P
2
)
(
φ
1
→
φ
2
).
Proof
.
rewrite
/
FromPure
/
IntoPure
pure_impl
always_impl_wand
.
by
intros
->
->.
Qed
.
Global
Instance
into_pure_exist
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
φ
:
Global
Instance
into_pure_exist
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
(
φ
:
X
→
Prop
)
:
(
∀
x
,
@
IntoPure
M
(
Φ
x
)
(
φ
x
))
→
@
IntoPure
M
(
∃
x
,
Φ
x
)
(
∃
x
,
φ
x
).
Proof
.
rewrite
/
IntoPure
=>
Hx
.
apply
exist_elim
=>
x
.
rewrite
Hx
.
apply
pure_elim'
=>
H
φ
.
apply
pure_intro
.
eauto
.
Qed
.
Global
Instance
into_pure_forall
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
φ
:
Global
Instance
into_pure_forall
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
(
φ
:
X
→
Prop
)
:
(
∀
x
,
@
IntoPure
M
(
Φ
x
)
(
φ
x
))
→
@
IntoPure
M
(
∀
x
,
Φ
x
)
(
∀
x
,
φ
x
).
Proof
.
rewrite
/
IntoPure
=>
Hx
.
rewrite
-
pure_forall_2
.
by
setoid_rewrite
Hx
.
...
...
@@ -91,32 +91,31 @@ Qed.
Global
Instance
from_pure_bupd
P
φ
:
FromPure
P
φ
→
FromPure
(|==>
P
)
φ
.
Proof
.
rewrite
/
FromPure
=>
->.
apply
bupd_intro
.
Qed
.
Global
Instance
from_pure_pure_conj
(
φ
1
φ
2
:
uPred
M
)
P1
P2
:
FromPure
φ
1
P1
->
FromPure
φ
2
P2
->
FromPure
(
φ
1
∧
φ
2
)
(
P1
∧
P2
).
Global
Instance
from_pure_pure_conj
(
φ
1
φ
2
:
Prop
)
P1
P2
:
FromPure
P1
φ
1
->
FromPure
P2
φ
2
->
FromPure
(
P1
∧
P2
)
(
φ
1
∧
φ
2
).
Proof
.
rewrite
/
FromPure
pure_and
.
by
intros
->
->.
Qed
.
Global
Instance
from_pure_pure_sep
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
FromPure
φ
1
P
1
->
FromPure
φ
2
P
2
->
FromPure
(
φ
1
∗
φ
2
)
(
P
1
∧
P
2
).
Global
Instance
from_pure_pure_sep
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
FromPure
P
1
φ
1
->
FromPure
P
2
φ
2
->
FromPure
(
P
1
∗
P
2
)
(
φ
1
∧
φ
2
).
Proof
.
rewrite
/
FromPure
pure_and
always_and_sep_l
.
by
intros
->
->.
Qed
.
Global
Instance
from_pure_pure_disj
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
FromPure
φ
1
P
1
->
FromPure
φ
2
P
2
->
FromPure
(
φ
1
∨
φ
2
)
(
P
1
∨
P
2
).
Global
Instance
from_pure_pure_disj
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
FromPure
P
1
φ
1
->
FromPure
P
2
φ
2
->
FromPure
(
P
1
∨
P
2
)
(
φ
1
∨
φ
2
).
Proof
.
rewrite
/
FromPure
pure_or
.
by
intros
->
->.
Qed
.
Global
Instance
from_pure_pure_impl
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
IntoPure
φ
1
P
1
->
FromPure
φ
2
P
2
->
FromPure
(
φ
1
→
φ
2
)
(
P
1
→
P
2
).
Global
Instance
from_pure_pure_impl
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
IntoPure
P
1
φ
1
->
FromPure
P
2
φ
2
->
FromPure
(
P
1
→
P
2
)
(
φ
1
→
φ
2
).
Proof
.
rewrite
/
FromPure
/
IntoPure
pure_impl
.
by
intros
->
->.
Qed
.
Global
Instance
from_pure_pure_wand
(
φ
1
φ
2
:
u
Pr
ed
M
)
P1
P2
:
IntoPure
φ
1
P
1
->
FromPure
φ
2
P
2
->
FromPure
(
φ
1
-
∗
φ
2
)
(
P
1
→
P
2
).
Global
Instance
from_pure_pure_wand
(
φ
1
φ
2
:
Pr
op
)
P1
P2
:
IntoPure
P
1
φ
1
->
FromPure
P
2
φ
2
->
FromPure
(
P
1
-
∗
P
2
)
(
φ
1
→
φ
2
).
Proof
.
rewrite
/
FromPure
/
IntoPure
pure_impl
always_impl_wand
.
by
intros
->
->.
Qed
.
Global
Instance
from_pure_exist
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
φ
:
Global
Instance
from_pure_exist
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
(
φ
:
X
→
Prop
)
:
(
∀
x
,
@
FromPure
M
(
Φ
x
)
(
φ
x
))
→
@
FromPure
M
(
∃
x
,
Φ
x
)
(
∃
x
,
φ
x
).
Proof
.
rewrite
/
FromPure
=>
Hx
.
apply
pure_elim'
=>-[
x
?].
rewrite
-(
exist_intro
x
).
rewrite
-
Hx
.
apply
pure_intro
.
done
.
Qed
.
Global
Instance
from_pure_forall
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
φ
:
Global
Instance
from_pure_forall
{
X
:
Type
}
(
Φ
:
X
→
uPred
M
)
(
φ
:
X
→
Prop
)
:
(
∀
x
,
@
FromPure
M
(
Φ
x
)
(
φ
x
))
→
@
FromPure
M
(
∀
x
,
Φ
x
)
(
∀
x
,
φ
x
).
Proof
.
rewrite
/
FromPure
=>
Hx
.
apply
forall_intro
=>
x
.
apply
pure_elim'
=>
H
φ
.
...
...
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