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
Yixuan Chen
Iris
Commits
8e0fae21
Commit
8e0fae21
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add proofmode instances
parent
2b6c9e45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/proofmode/class_instances.v
+60
-0
60 additions, 0 deletions
iris/proofmode/class_instances.v
with
60 additions
and
0 deletions
iris/proofmode/class_instances.v
+
60
−
0
View file @
8e0fae21
...
@@ -198,6 +198,14 @@ Global Instance into_pure_persistently P φ :
...
@@ -198,6 +198,14 @@ Global Instance into_pure_persistently P φ :
IntoPure
P
φ
→
IntoPure
(
<
pers
>
P
)
φ
.
IntoPure
P
φ
→
IntoPure
(
<
pers
>
P
)
φ
.
Proof
.
rewrite
/
IntoPure
=>
->
.
apply
:
persistently_elim
.
Qed
.
Proof
.
rewrite
/
IntoPure
=>
->
.
apply
:
persistently_elim
.
Qed
.
Global
Instance
into_pure_big_sepL
{
A
}
(
Φ
:
nat
→
A
→
PROP
)
(
φ
:
nat
→
A
→
Prop
)
(
l
:
list
A
)
:
(
∀
k
x
,
IntoPure
(
Φ
k
x
)
(
φ
k
x
))
→
IntoPure
([
∗
list
]
k
↦
x
∈
l
,
Φ
k
x
)
(
∀
k
x
,
l
!!
k
=
Some
x
→
φ
k
x
)
.
Proof
.
rewrite
/
IntoPure
.
intros
HΦ
.
setoid_rewrite
HΦ
.
rewrite
big_sepL_pure_1
.
done
.
Qed
.
Global
Instance
into_pure_big_sepM
`{
Countable
K
}
{
A
}
Global
Instance
into_pure_big_sepM
`{
Countable
K
}
{
A
}
(
Φ
:
K
→
A
→
PROP
)
(
φ
:
K
→
A
→
Prop
)
(
m
:
gmap
K
A
)
:
(
Φ
:
K
→
A
→
PROP
)
(
φ
:
K
→
A
→
Prop
)
(
m
:
gmap
K
A
)
:
(
∀
k
x
,
IntoPure
(
Φ
k
x
)
(
φ
k
x
))
→
(
∀
k
x
,
IntoPure
(
Φ
k
x
)
(
φ
k
x
))
→
...
@@ -206,6 +214,22 @@ Proof.
...
@@ -206,6 +214,22 @@ Proof.
rewrite
/
IntoPure
.
intros
HΦ
.
rewrite
/
IntoPure
.
intros
HΦ
.
setoid_rewrite
HΦ
.
rewrite
big_sepM_pure_1
.
done
.
setoid_rewrite
HΦ
.
rewrite
big_sepM_pure_1
.
done
.
Qed
.
Qed
.
Global
Instance
into_pure_big_sepS
`{
Countable
A
}
(
Φ
:
A
→
PROP
)
(
φ
:
A
→
Prop
)
(
X
:
gset
A
)
:
(
∀
x
,
IntoPure
(
Φ
x
)
(
φ
x
))
→
IntoPure
([
∗
set
]
x
∈
X
,
Φ
x
)
(
set_Forall
φ
X
)
.
Proof
.
rewrite
/
IntoPure
.
intros
HΦ
.
setoid_rewrite
HΦ
.
rewrite
big_sepS_pure_1
.
done
.
Qed
.
Global
Instance
into_pure_big_sepMS
`{
Countable
A
}
(
Φ
:
A
→
PROP
)
(
φ
:
A
→
Prop
)
(
X
:
gmultiset
A
)
:
(
∀
x
,
IntoPure
(
Φ
x
)
(
φ
x
))
→
IntoPure
([
∗
mset
]
x
∈
X
,
Φ
x
)
(
∀
y
:
A
,
y
∈
X
→
φ
y
)
.
Proof
.
rewrite
/
IntoPure
.
intros
HΦ
.
setoid_rewrite
HΦ
.
rewrite
big_sepMS_pure_1
.
done
.
Qed
.
(** FromPure *)
(** FromPure *)
Global
Instance
from_pure_emp
:
@
FromPure
PROP
true
emp
True
.
Global
Instance
from_pure_emp
:
@
FromPure
PROP
true
emp
True
.
...
@@ -298,6 +322,18 @@ Proof.
...
@@ -298,6 +322,18 @@ Proof.
by
rewrite
-
persistent_absorbingly_affinely_2
.
by
rewrite
-
persistent_absorbingly_affinely_2
.
Qed
.
Qed
.
Global
Instance
from_pure_big_sepL
{
A
}
a
(
Φ
:
nat
→
A
→
PROP
)
(
φ
:
nat
→
A
→
Prop
)
(
l
:
list
A
)
:
(
∀
k
x
,
FromPure
a
(
Φ
k
x
)
(
φ
k
x
))
→
TCOr
(
TCEq
a
true
)
(
BiAffine
PROP
)
→
FromPure
a
([
∗
list
]
k
↦
x
∈
l
,
Φ
k
x
)
(
∀
k
x
,
l
!!
k
=
Some
x
→
φ
k
x
)
.
Proof
.
rewrite
/
FromPure
.
destruct
a
;
simpl
;
intros
HΦ
Haffine
.
-
rewrite
big_sepL_affinely_pure_2
.
setoid_rewrite
HΦ
.
done
.
-
destruct
Haffine
as
[[
=
]
%
TCEq_eq
|?]
.
rewrite
-
big_sepL_pure
.
setoid_rewrite
HΦ
.
done
.
Qed
.
Global
Instance
from_pure_big_sepM
`{
Countable
K
}
{
A
}
Global
Instance
from_pure_big_sepM
`{
Countable
K
}
{
A
}
a
(
Φ
:
K
→
A
→
PROP
)
(
φ
:
K
→
A
→
Prop
)
(
m
:
gmap
K
A
)
:
a
(
Φ
:
K
→
A
→
PROP
)
(
φ
:
K
→
A
→
Prop
)
(
m
:
gmap
K
A
)
:
(
∀
k
x
,
FromPure
a
(
Φ
k
x
)
(
φ
k
x
))
→
(
∀
k
x
,
FromPure
a
(
Φ
k
x
)
(
φ
k
x
))
→
...
@@ -310,6 +346,30 @@ Proof.
...
@@ -310,6 +346,30 @@ Proof.
-
destruct
Haffine
as
[[
=
]
%
TCEq_eq
|?]
.
-
destruct
Haffine
as
[[
=
]
%
TCEq_eq
|?]
.
rewrite
-
big_sepM_pure
.
setoid_rewrite
HΦ
.
done
.
rewrite
-
big_sepM_pure
.
setoid_rewrite
HΦ
.
done
.
Qed
.
Qed
.
Global
Instance
from_pure_big_sepS
`{
Countable
A
}
a
(
Φ
:
A
→
PROP
)
(
φ
:
A
→
Prop
)
(
X
:
gset
A
)
:
(
∀
x
,
FromPure
a
(
Φ
x
)
(
φ
x
))
→
TCOr
(
TCEq
a
true
)
(
BiAffine
PROP
)
→
FromPure
a
([
∗
set
]
x
∈
X
,
Φ
x
)
(
set_Forall
φ
X
)
.
Proof
.
rewrite
/
FromPure
.
destruct
a
;
simpl
;
intros
HΦ
Haffine
.
-
rewrite
big_sepS_affinely_pure_2
.
setoid_rewrite
HΦ
.
done
.
-
destruct
Haffine
as
[[
=
]
%
TCEq_eq
|?]
.
rewrite
-
big_sepS_pure
.
setoid_rewrite
HΦ
.
done
.
Qed
.
Global
Instance
from_pure_big_sepMS
`{
Countable
A
}
a
(
Φ
:
A
→
PROP
)
(
φ
:
A
→
Prop
)
(
X
:
gmultiset
A
)
:
(
∀
x
,
FromPure
a
(
Φ
x
)
(
φ
x
))
→
TCOr
(
TCEq
a
true
)
(
BiAffine
PROP
)
→
FromPure
a
([
∗
mset
]
x
∈
X
,
Φ
x
)
(
∀
y
:
A
,
y
∈
X
→
φ
y
)
.
Proof
.
rewrite
/
FromPure
.
destruct
a
;
simpl
;
intros
HΦ
Haffine
.
-
rewrite
big_sepMS_affinely_pure_2
.
setoid_rewrite
HΦ
.
done
.
-
destruct
Haffine
as
[[
=
]
%
TCEq_eq
|?]
.
rewrite
-
big_sepMS_pure
.
setoid_rewrite
HΦ
.
done
.
Qed
.
(** IntoPersistent *)
(** IntoPersistent *)
Global
Instance
into_persistent_persistently
p
P
Q
:
Global
Instance
into_persistent_persistently
p
P
Q
:
...
...
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