Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iris-coq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua Yanovski
iris-coq
Commits
b962b90e
Commit
b962b90e
authored
Mar 15, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type class for persistent CMRA elements.
parent
9459fc48
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
113 additions
and
108 deletions
+113
-108
algebra/agree.v
algebra/agree.v
+3
-0
algebra/cmra.v
algebra/cmra.v
+16
-2
algebra/dec_agree.v
algebra/dec_agree.v
+1
-1
algebra/fin_maps.v
algebra/fin_maps.v
+6
-0
algebra/iprod.v
algebra/iprod.v
+7
-3
algebra/one_shot.v
algebra/one_shot.v
+7
-9
algebra/option.v
algebra/option.v
+6
-0
algebra/upred.v
algebra/upred.v
+33
-33
algebra/upred_big_op.v
algebra/upred_big_op.v
+5
-5
barrier/proof.v
barrier/proof.v
+1
-1
heap_lang/heap.v
heap_lang/heap.v
+1
-1
heap_lang/one_shot.v
heap_lang/one_shot.v
+1
-3
program_logic/auth.v
program_logic/auth.v
+1
-1
program_logic/ghost_ownership.v
program_logic/ghost_ownership.v
+3
-7
program_logic/global_functor.v
program_logic/global_functor.v
+4
-6
program_logic/invariants.v
program_logic/invariants.v
+1
-2
program_logic/ownership.v
program_logic/ownership.v
+5
-21
program_logic/pviewshifts.v
program_logic/pviewshifts.v
+2
-2
program_logic/resources.v
program_logic/resources.v
+2
-0
program_logic/saved_one_shot.v
program_logic/saved_one_shot.v
+3
-5
program_logic/saved_prop.v
program_logic/saved_prop.v
+2
-3
program_logic/sts.v
program_logic/sts.v
+1
-1
program_logic/weakestpre.v
program_logic/weakestpre.v
+2
-2
No files found.
algebra/agree.v
View file @
b962b90e
...
@@ -118,6 +118,9 @@ Proof.
...
@@ -118,6 +118,9 @@ Proof.
Qed
.
Qed
.
Canonical
Structure
agreeR
:
cmraT
:=
CMRAT
agree_cofe_mixin
agree_cmra_mixin
.
Canonical
Structure
agreeR
:
cmraT
:=
CMRAT
agree_cofe_mixin
agree_cmra_mixin
.
Global
Instance
agree_persistent
(
x
:
agree
A
)
:
Persistent
x
.
Proof
.
done
.
Qed
.
Program
Definition
to_agree
(
x
:
A
)
:
agree
A
:=
Program
Definition
to_agree
(
x
:
A
)
:
agree
A
:=
{|
agree_car
n
:=
x
;
agree_is_valid
n
:=
True
|}
.
{|
agree_car
n
:=
x
;
agree_is_valid
n
:=
True
|}
.
Solve
Obligations
with
done
.
Solve
Obligations
with
done
.
...
...
algebra/cmra.v
View file @
b962b90e
...
@@ -120,6 +120,10 @@ Class CMRAUnit (A : cmraT) `{Empty A} := {
...
@@ -120,6 +120,10 @@ Class CMRAUnit (A : cmraT) `{Empty A} := {
}
.
}
.
Instance
cmra_unit_inhabited
`
{
CMRAUnit
A
}
:
Inhabited
A
:=
populate
∅
.
Instance
cmra_unit_inhabited
`
{
CMRAUnit
A
}
:
Inhabited
A
:=
populate
∅
.
(
**
*
Persistent
elements
*
)
Class
Persistent
{
A
:
cmraT
}
(
x
:
A
)
:=
persistent
:
core
x
≡
x
.
Arguments
persistent
{
_
}
_
{
_
}
.
(
**
*
Discrete
CMRAs
*
)
(
**
*
Discrete
CMRAs
*
)
Class
CMRADiscrete
(
A
:
cmraT
)
:=
{
Class
CMRADiscrete
(
A
:
cmraT
)
:=
{
cmra_discrete
:>
Discrete
A
;
cmra_discrete
:>
Discrete
A
;
...
@@ -229,6 +233,8 @@ Lemma cmra_core_validN n x : ✓{n} x → ✓{n} core x.
...
@@ -229,6 +233,8 @@ Lemma cmra_core_validN n x : ✓{n} x → ✓{n} core x.
Proof
.
rewrite
-{
1
}
(
cmra_core_l
x
);
apply
cmra_validN_op_l
.
Qed
.
Proof
.
rewrite
-{
1
}
(
cmra_core_l
x
);
apply
cmra_validN_op_l
.
Qed
.
Lemma
cmra_core_valid
x
:
✓
x
→
✓
core
x
.
Lemma
cmra_core_valid
x
:
✓
x
→
✓
core
x
.
Proof
.
rewrite
-{
1
}
(
cmra_core_l
x
);
apply
cmra_valid_op_l
.
Qed
.
Proof
.
rewrite
-{
1
}
(
cmra_core_l
x
);
apply
cmra_valid_op_l
.
Qed
.
Global
Instance
cmra_core_persistent
x
:
Persistent
(
core
x
).
Proof
.
apply
cmra_core_idemp
.
Qed
.
(
**
**
Order
*
)
(
**
**
Order
*
)
Lemma
cmra_included_includedN
n
x
y
:
x
≼
y
→
x
≼
{
n
}
y
.
Lemma
cmra_included_includedN
n
x
y
:
x
≼
y
→
x
≼
{
n
}
y
.
...
@@ -336,8 +342,8 @@ Section unit.
...
@@ -336,8 +342,8 @@ Section unit.
Proof
.
by
exists
x
;
rewrite
left_id
.
Qed
.
Proof
.
by
exists
x
;
rewrite
left_id
.
Qed
.
Global
Instance
cmra_unit_right_id
:
RightId
(
≡
)
∅
(
⋅
).
Global
Instance
cmra_unit_right_id
:
RightId
(
≡
)
∅
(
⋅
).
Proof
.
by
intros
x
;
rewrite
(
comm
op
)
left_id
.
Qed
.
Proof
.
by
intros
x
;
rewrite
(
comm
op
)
left_id
.
Qed
.
Lemma
cmra_core_unit
:
core
∅
≡
∅
.
Global
Instance
cmra_unit_persistent
:
Persistent
∅
.
Proof
.
by
rewrite
-{
2
}
(
cmra_core_l
∅
)
right_id
.
Qed
.
Proof
.
by
rewrite
/
Persistent
-{
2
}
(
cmra_core_l
∅
)
right_id
.
Qed
.
End
unit
.
End
unit
.
(
**
**
Local
updates
*
)
(
**
**
Local
updates
*
)
...
@@ -454,6 +460,8 @@ Section cmra_transport.
...
@@ -454,6 +460,8 @@ Section cmra_transport.
Proof
.
by
destruct
H
.
Qed
.
Proof
.
by
destruct
H
.
Qed
.
Global
Instance
cmra_transport_timeless
x
:
Timeless
x
→
Timeless
(
T
x
).
Global
Instance
cmra_transport_timeless
x
:
Timeless
x
→
Timeless
(
T
x
).
Proof
.
by
destruct
H
.
Qed
.
Proof
.
by
destruct
H
.
Qed
.
Global
Instance
cmra_transport_persistent
x
:
Persistent
x
→
Persistent
(
T
x
).
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_updateP
(
P
:
A
→
Prop
)
(
Q
:
B
→
Prop
)
x
:
Lemma
cmra_transport_updateP
(
P
:
A
→
Prop
)
(
Q
:
B
→
Prop
)
x
:
x
~~>:
P
→
(
∀
y
,
P
y
→
Q
(
T
y
))
→
T
x
~~>:
Q
.
x
~~>:
P
→
(
∀
y
,
P
y
→
Q
(
T
y
))
→
T
x
~~>:
Q
.
Proof
.
destruct
H
;
eauto
using
cmra_updateP_weaken
.
Qed
.
Proof
.
destruct
H
;
eauto
using
cmra_updateP_weaken
.
Qed
.
...
@@ -509,6 +517,8 @@ Section unit.
...
@@ -509,6 +517,8 @@ Section unit.
Global
Instance
unit_cmra_unit
:
CMRAUnit
unitR
.
Global
Instance
unit_cmra_unit
:
CMRAUnit
unitR
.
Global
Instance
unit_cmra_discrete
:
CMRADiscrete
unitR
.
Global
Instance
unit_cmra_discrete
:
CMRADiscrete
unitR
.
Proof
.
by
apply
discrete_cmra_discrete
.
Qed
.
Proof
.
by
apply
discrete_cmra_discrete
.
Qed
.
Global
Instance
unit_persistent
(
x
:
())
:
Persistent
x
.
Proof
.
done
.
Qed
.
End
unit
.
End
unit
.
(
**
**
Product
*
)
(
**
**
Product
*
)
...
@@ -564,6 +574,10 @@ Section prod.
...
@@ -564,6 +574,10 @@ Section prod.
CMRADiscrete
A
→
CMRADiscrete
B
→
CMRADiscrete
prodR
.
CMRADiscrete
A
→
CMRADiscrete
B
→
CMRADiscrete
prodR
.
Proof
.
split
.
apply
_.
by
intros
?
[];
split
;
apply
cmra_discrete_valid
.
Qed
.
Proof
.
split
.
apply
_.
by
intros
?
[];
split
;
apply
cmra_discrete_valid
.
Qed
.
Global
Instance
pair_persistent
x
y
:
Persistent
x
→
Persistent
y
→
Persistent
(
x
,
y
).
Proof
.
by
split
.
Qed
.
Lemma
prod_update
x
y
:
x
.1
~~>
y
.1
→
x
.2
~~>
y
.2
→
x
~~>
y
.
Lemma
prod_update
x
y
:
x
.1
~~>
y
.1
→
x
.2
~~>
y
.2
→
x
~~>
y
.
Proof
.
intros
??
n
z
[
??
];
split
;
simpl
in
*
;
auto
.
Qed
.
Proof
.
intros
??
n
z
[
??
];
split
;
simpl
in
*
;
auto
.
Qed
.
Lemma
prod_updateP
P1
P2
(
Q
:
A
*
B
→
Prop
)
x
:
Lemma
prod_updateP
P1
P2
(
Q
:
A
*
B
→
Prop
)
x
:
...
...
algebra/dec_agree.v
View file @
b962b90e
...
@@ -45,7 +45,7 @@ Qed.
...
@@ -45,7 +45,7 @@ Qed.
Canonical
Structure
dec_agreeR
:
cmraT
:=
discreteR
dec_agree_ra
.
Canonical
Structure
dec_agreeR
:
cmraT
:=
discreteR
dec_agree_ra
.
(
*
Some
properties
of
this
CMRA
*
)
(
*
Some
properties
of
this
CMRA
*
)
Lemma
dec_agree_core_id
(
x
:
dec_agree
A
)
:
core
x
=
x
.
Global
Instance
dec_agree_persistent
(
x
:
dec_agreeR
)
:
Persistent
x
.
Proof
.
done
.
Qed
.
Proof
.
done
.
Qed
.
Lemma
dec_agree_ne
a
b
:
a
≠
b
→
DecAgree
a
⋅
DecAgree
b
=
DecAgreeBot
.
Lemma
dec_agree_ne
a
b
:
a
≠
b
→
DecAgree
a
⋅
DecAgree
b
=
DecAgreeBot
.
...
...
algebra/fin_maps.v
View file @
b962b90e
...
@@ -215,6 +215,12 @@ Lemma map_op_singleton (i : K) (x y : A) :
...
@@ -215,6 +215,12 @@ Lemma map_op_singleton (i : K) (x y : A) :
{
[
i
:=
x
]
}
⋅
{
[
i
:=
y
]
}
=
(
{
[
i
:=
x
⋅
y
]
}
:
gmap
K
A
).
{
[
i
:=
x
]
}
⋅
{
[
i
:=
y
]
}
=
(
{
[
i
:=
x
⋅
y
]
}
:
gmap
K
A
).
Proof
.
by
apply
(
merge_singleton
_
_
_
x
y
).
Qed
.
Proof
.
by
apply
(
merge_singleton
_
_
_
x
y
).
Qed
.
Global
Instance
map_persistent
m
:
(
∀
x
:
A
,
Persistent
x
)
→
Persistent
m
.
Proof
.
intros
?
i
.
by
rewrite
lookup_core
persistent
.
Qed
.
Global
Instance
map_singleton_persistent
i
(
x
:
A
)
:
Persistent
x
→
Persistent
{
[
i
:=
x
]
}
.
Proof
.
intros
.
by
rewrite
/
Persistent
map_core_singleton
persistent
.
Qed
.
Lemma
singleton_includedN
n
m
i
x
:
Lemma
singleton_includedN
n
m
i
x
:
{
[
i
:=
x
]
}
≼
{
n
}
m
↔
∃
y
,
m
!!
i
≡
{
n
}
≡
Some
y
∧
x
≼
{
n
}
y
.
{
[
i
:=
x
]
}
≼
{
n
}
m
↔
∃
y
,
m
!!
i
≡
{
n
}
≡
Some
y
∧
x
≼
{
n
}
y
.
Proof
.
Proof
.
...
...
algebra/iprod.v
View file @
b962b90e
...
@@ -208,11 +208,15 @@ Section iprod_cmra.
...
@@ -208,11 +208,15 @@ Section iprod_cmra.
Lemma
iprod_core_singleton
x
(
y
:
B
x
)
:
Lemma
iprod_core_singleton
x
(
y
:
B
x
)
:
core
(
iprod_singleton
x
y
)
≡
iprod_singleton
x
(
core
y
).
core
(
iprod_singleton
x
y
)
≡
iprod_singleton
x
(
core
y
).
Proof
.
Proof
.
by
move
=>
x
'
;
destruct
(
decide
(
x
=
x
'
))
as
[
->|
];
move
=>
x
'
;
destruct
(
decide
(
x
=
x
'
))
as
[
->|
];
rewrite
iprod_lookup_core
?
iprod_lookup_singleton
by
rewrite
iprod_lookup_core
?
iprod_lookup_singleton
?
iprod_lookup_singleton_ne
//
cmra_core_unit
.
?
iprod_lookup_singleton_ne
//
(persistent ∅)
.
Qed
.
Qed
.
Global
Instance
iprod_singleton_persistent
x
(
y
:
B
x
)
:
Persistent
y
→
Persistent
(
iprod_singleton
x
y
).
Proof
.
intros
.
rewrite
/
Persistent
iprod_core_singleton
.
by
f_equiv
.
Qed
.
Lemma
iprod_op_singleton
(
x
:
A
)
(
y1
y2
:
B
x
)
:
Lemma
iprod_op_singleton
(
x
:
A
)
(
y1
y2
:
B
x
)
:
iprod_singleton
x
y1
⋅
iprod_singleton
x
y2
≡
iprod_singleton
x
(
y1
⋅
y2
).
iprod_singleton
x
y1
⋅
iprod_singleton
x
y2
≡
iprod_singleton
x
(
y1
⋅
y2
).
Proof
.
Proof
.
...
...
algebra/one_shot.v
View file @
b962b90e
...
@@ -210,16 +210,15 @@ Proof.
...
@@ -210,16 +210,15 @@ Proof.
intros
[
|
a
|
|
];
simpl
;
auto
using
cmra_discrete_valid
.
intros
[
|
a
|
|
];
simpl
;
auto
using
cmra_discrete_valid
.
Qed
.
Qed
.
Global
Instance
Shot_persistent
a
:
Persistent
a
→
Persistent
(
Shot
a
).
Proof
.
by
constructor
.
Qed
.
Lemma
one_shot_validN_inv_l
n
y
:
✓
{
n
}
(
OneShotPending
⋅
y
)
→
y
=
∅
.
Lemma
one_shot_validN_inv_l
n
y
:
✓
{
n
}
(
OneShotPending
⋅
y
)
→
y
=
∅
.
Proof
.
Proof
.
by
destruct
y
;
inversion_clear
1.
Qed
.
destruct
y
as
[
|
b
|
|
];
[
done
|
|
done
|
done
].
destruct
1.
Qed
.
Lemma
one_shot_valid_inv_l
y
:
✓
(
OneShotPending
⋅
y
)
→
y
=
∅
.
Lemma
one_shot_valid_inv_l
y
:
✓
(
OneShotPending
⋅
y
)
→
y
=
∅
.
Proof
.
intros
.
by
apply
one_shot_validN_inv_l
with
0
,
cmra_valid_validN
.
Qed
.
Proof
.
intros
.
by
apply
one_shot_validN_inv_l
with
0
,
cmra_valid_validN
.
Qed
.
Lemma
one_shot_bot_largest
y
:
y
≼
OneShotBot
.
Lemma
one_shot_bot_largest
y
:
y
≼
OneShotBot
.
Proof
.
Proof
.
destruct
y
;
exists
OneShotBot
;
constructor
.
Qed
.
destruct
y
;
exists
OneShotBot
;
constructor
.
Qed
.
(
**
Internalized
properties
*
)
(
**
Internalized
properties
*
)
Lemma
one_shot_equivI
{
M
}
(
x
y
:
one_shot
A
)
:
Lemma
one_shot_equivI
{
M
}
(
x
y
:
one_shot
A
)
:
...
@@ -259,9 +258,8 @@ Proof.
...
@@ -259,9 +258,8 @@ Proof.
-
destruct
(
Hx
n
b
)
as
(
c
&?&?
);
try
done
.
-
destruct
(
Hx
n
b
)
as
(
c
&?&?
);
try
done
.
exists
(
Shot
c
).
auto
.
exists
(
Shot
c
).
auto
.
-
destruct
(
Hx
n
(
core
a
))
as
(
c
&?&?
);
try
done
.
-
destruct
(
Hx
n
(
core
a
))
as
(
c
&?&?
);
try
done
.
{
rewrite
cmra_core_r
.
done
.
}
{
by
rewrite
cmra_core_r
.
}
exists
(
Shot
c
).
split
;
first
by
auto
.
exists
(
Shot
c
).
split
;
simpl
;
eauto
using
cmra_validN_op_l
.
simpl
.
by
eapply
cmra_validN_op_l
.
Qed
.
Qed
.
Lemma
one_shot_updateP
'
(
P
:
A
→
Prop
)
a
:
Lemma
one_shot_updateP
'
(
P
:
A
→
Prop
)
a
:
a
~~>:
P
→
Shot
a
~~>:
λ
m
'
,
∃
b
,
m
'
=
Shot
b
∧
P
b
.
a
~~>:
P
→
Shot
a
~~>:
λ
m
'
,
∃
b
,
m
'
=
Shot
b
∧
P
b
.
...
...
algebra/option.v
View file @
b962b90e
...
@@ -130,6 +130,12 @@ Proof. by destruct mx, my; inversion_clear 1. Qed.
...
@@ -130,6 +130,12 @@ Proof. by destruct mx, my; inversion_clear 1. Qed.
Lemma
option_op_positive_dist_r
n
mx
my
:
mx
⋅
my
≡
{
n
}
≡
None
→
my
≡
{
n
}
≡
None
.
Lemma
option_op_positive_dist_r
n
mx
my
:
mx
⋅
my
≡
{
n
}
≡
None
→
my
≡
{
n
}
≡
None
.
Proof
.
by
destruct
mx
,
my
;
inversion_clear
1.
Qed
.
Proof
.
by
destruct
mx
,
my
;
inversion_clear
1.
Qed
.
Global
Instance
Some_persistent
(
x
:
A
)
:
Persistent
x
→
Persistent
(
Some
x
).
Proof
.
by
constructor
.
Qed
.
Global
Instance
option_persistent
(
mx
:
option
A
)
:
(
∀
x
:
A
,
Persistent
x
)
→
Persistent
mx
.
Proof
.
intros
.
destruct
mx
.
apply
_.
apply
cmra_unit_persistent
.
Qed
.
(
**
Internalized
properties
*
)
(
**
Internalized
properties
*
)
Lemma
option_equivI
{
M
}
(
x
y
:
option
A
)
:
Lemma
option_equivI
{
M
}
(
x
y
:
option
A
)
:
(
x
≡
y
)
⊣⊢
(
match
x
,
y
with
(
x
≡
y
)
⊣⊢
(
match
x
,
y
with
...
...
algebra/upred.v
View file @
b962b90e
...
@@ -304,8 +304,8 @@ Infix "↔" := uPred_iff : uPred_scope.
...
@@ -304,8 +304,8 @@ Infix "↔" := uPred_iff : uPred_scope.
Class
TimelessP
{
M
}
(
P
:
uPred
M
)
:=
timelessP
:
▷
P
⊢
(
P
∨
▷
False
).
Class
TimelessP
{
M
}
(
P
:
uPred
M
)
:=
timelessP
:
▷
P
⊢
(
P
∨
▷
False
).
Arguments
timelessP
{
_
}
_
{
_
}
.
Arguments
timelessP
{
_
}
_
{
_
}
.
Class
Persistent
{
M
}
(
P
:
uPred
M
)
:=
persistent
:
P
⊢
□
P
.
Class
Persistent
P
{
M
}
(
P
:
uPred
M
)
:=
persistentP
:
P
⊢
□
P
.
Arguments
persistent
{
_
}
_
{
_
}
.
Arguments
persistent
P
{
_
}
_
{
_
}
.
Module
uPred
.
Module
uPred
.
Definition
unseal
:=
Definition
unseal
:=
...
@@ -1002,8 +1002,8 @@ Proof.
...
@@ -1002,8 +1002,8 @@ Proof.
rewrite
-
(
cmra_core_idemp
a
)
Hx
.
rewrite
-
(
cmra_core_idemp
a
)
Hx
.
apply
cmra_core_preservingN
,
cmra_includedN_l
.
apply
cmra_core_preservingN
,
cmra_includedN_l
.
Qed
.
Qed
.
Lemma
always_ownM
(
a
:
M
)
:
core
a
≡
a
→
(
□
uPred_ownM
a
)
⊣⊢
uPred_ownM
a
.
Lemma
always_ownM
(
a
:
M
)
:
Persistent
a
→
(
□
uPred_ownM
a
)
⊣⊢
uPred_ownM
a
.
Proof
.
by
intros
<-
;
rewrite
always_ownM_core
.
Qed
.
Proof
.
intros
.
by
rewrite
-
(
persistent
a
)
always_ownM_core
.
Qed
.
Lemma
ownM_something
:
True
⊢
∃
a
,
uPred_ownM
a
.
Lemma
ownM_something
:
True
⊢
∃
a
,
uPred_ownM
a
.
Proof
.
unseal
;
split
=>
n
x
??
.
by
exists
x
;
simpl
.
Qed
.
Proof
.
unseal
;
split
=>
n
x
??
.
by
exists
x
;
simpl
.
Qed
.
Lemma
ownM_empty
`
{
Empty
M
,
!
CMRAUnit
M
}
:
True
⊢
uPred_ownM
∅
.
Lemma
ownM_empty
`
{
Empty
M
,
!
CMRAUnit
M
}
:
True
⊢
uPred_ownM
∅
.
...
@@ -1120,53 +1120,53 @@ Proof.
...
@@ -1120,53 +1120,53 @@ Proof.
Qed
.
Qed
.
(
*
Always
stable
*
)
(
*
Always
stable
*
)
Global
Instance
const_persistent
φ
:
Persistent
(
■
φ
:
uPred
M
)
%
I
.
Global
Instance
const_persistent
φ
:
Persistent
P
(
■
φ
:
uPred
M
)
%
I
.
Proof
.
by
rewrite
/
Persistent
always_const
.
Qed
.
Proof
.
by
rewrite
/
Persistent
P
always_const
.
Qed
.
Global
Instance
always_persistent
P
:
Persistent
(
□
P
).
Global
Instance
always_persistent
P
:
Persistent
P
(
□
P
).
Proof
.
by
intros
;
apply
always_intro
'
.
Qed
.
Proof
.
by
intros
;
apply
always_intro
'
.
Qed
.
Global
Instance
and_persistent
P
Q
:
Global
Instance
and_persistent
P
Q
:
Persistent
P
→
Persistent
Q
→
Persistent
(
P
∧
Q
).
Persistent
P
P
→
PersistentP
Q
→
PersistentP
(
P
∧
Q
).
Proof
.
by
intros
;
rewrite
/
Persistent
always_and
;
apply
and_mono
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_and
;
apply
and_mono
.
Qed
.
Global
Instance
or_persistent
P
Q
:
Global
Instance
or_persistent
P
Q
:
Persistent
P
→
Persistent
Q
→
Persistent
(
P
∨
Q
).
Persistent
P
P
→
PersistentP
Q
→
PersistentP
(
P
∨
Q
).
Proof
.
by
intros
;
rewrite
/
Persistent
always_or
;
apply
or_mono
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_or
;
apply
or_mono
.
Qed
.
Global
Instance
sep_persistent
P
Q
:
Global
Instance
sep_persistent
P
Q
:
Persistent
P
→
Persistent
Q
→
Persistent
(
P
★
Q
).
Persistent
P
P
→
PersistentP
Q
→
PersistentP
(
P
★
Q
).
Proof
.
by
intros
;
rewrite
/
Persistent
always_sep
;
apply
sep_mono
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_sep
;
apply
sep_mono
.
Qed
.
Global
Instance
forall_persistent
{
A
}
(
Ψ
:
A
→
uPred
M
)
:
Global
Instance
forall_persistent
{
A
}
(
Ψ
:
A
→
uPred
M
)
:
(
∀
x
,
Persistent
(
Ψ
x
))
→
Persistent
(
∀
x
,
Ψ
x
).
(
∀
x
,
Persistent
P
(
Ψ
x
))
→
PersistentP
(
∀
x
,
Ψ
x
).
Proof
.
by
intros
;
rewrite
/
Persistent
always_forall
;
apply
forall_mono
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_forall
;
apply
forall_mono
.
Qed
.
Global
Instance
exist_persistent
{
A
}
(
Ψ
:
A
→
uPred
M
)
:
Global
Instance
exist_persistent
{
A
}
(
Ψ
:
A
→
uPred
M
)
:
(
∀
x
,
Persistent
(
Ψ
x
))
→
Persistent
(
∃
x
,
Ψ
x
).
(
∀
x
,
Persistent
P
(
Ψ
x
))
→
PersistentP
(
∃
x
,
Ψ
x
).
Proof
.
by
intros
;
rewrite
/
Persistent
always_exist
;
apply
exist_mono
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_exist
;
apply
exist_mono
.
Qed
.
Global
Instance
eq_persistent
{
A
:
cofeT
}
(
a
b
:
A
)
:
Global
Instance
eq_persistent
{
A
:
cofeT
}
(
a
b
:
A
)
:
Persistent
(
a
≡
b
:
uPred
M
)
%
I
.
Persistent
P
(
a
≡
b
:
uPred
M
)
%
I
.
Proof
.
by
intros
;
rewrite
/
Persistent
always_eq
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_eq
.
Qed
.
Global
Instance
valid_persistent
{
A
:
cmraT
}
(
a
:
A
)
:
Global
Instance
valid_persistent
{
A
:
cmraT
}
(
a
:
A
)
:
Persistent
(
✓
a
:
uPred
M
)
%
I
.
Persistent
P
(
✓
a
:
uPred
M
)
%
I
.
Proof
.
by
intros
;
rewrite
/
Persistent
always_valid
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_valid
.
Qed
.
Global
Instance
later_persistent
P
:
Persistent
P
→
Persistent
(
▷
P
).
Global
Instance
later_persistent
P
:
Persistent
P
P
→
PersistentP
(
▷
P
).
Proof
.
by
intros
;
rewrite
/
Persistent
always_later
;
apply
later_mono
.
Qed
.
Proof
.
by
intros
;
rewrite
/
Persistent
P
always_later
;
apply
later_mono
.
Qed
.
Global
Instance
ownM_
core_persistent
(
a
:
M
)
:
Persistent
(
uPred_ownM
(
core
a
)
).
Global
Instance
ownM_
persistent
:
Persistent
a
→
PersistentP
(
@
uPred_ownM
M
a
).
Proof
.
by
rewrite
/
Persistent
always_ownM_core
.
Qed
.
Proof
.
intros
.
by
rewrite
/
PersistentP
always_ownM
.
Qed
.
Global
Instance
default_persistent
{
A
}
P
(
Ψ
:
A
→
uPred
M
)
(
mx
:
option
A
)
:
Global
Instance
default_persistent
{
A
}
P
(
Ψ
:
A
→
uPred
M
)
(
mx
:
option
A
)
:
Persistent
P
→
(
∀
x
,
Persistent
(
Ψ
x
))
→
Persistent
(
default
P
mx
Ψ
).
Persistent
P
P
→
(
∀
x
,
PersistentP
(
Ψ
x
))
→
PersistentP
(
default
P
mx
Ψ
).
Proof
.
destruct
mx
;
apply
_.
Qed
.
Proof
.
destruct
mx
;
apply
_.
Qed
.
(
*
Derived
lemmas
for
always
stable
*
)
(
*
Derived
lemmas
for
always
stable
*
)
Lemma
always_always
P
`
{!
Persistent
P
}
:
(
□
P
)
⊣⊢
P
.
Lemma
always_always
P
`
{!
Persistent
P
P
}
:
(
□
P
)
⊣⊢
P
.
Proof
.
apply
(
anti_symm
(
⊢
));
auto
using
always_elim
.
Qed
.
Proof
.
apply
(
anti_symm
(
⊢
));
auto
using
always_elim
.
Qed
.
Lemma
always_intro
P
Q
`
{!
Persistent
P
}
:
P
⊢
Q
→
P
⊢
□
Q
.
Lemma
always_intro
P
Q
`
{!
Persistent
P
P
}
:
P
⊢
Q
→
P
⊢
□
Q
.
Proof
.
rewrite
-
(
always_always
P
);
apply
always_intro
'
.
Qed
.
Proof
.
rewrite
-
(
always_always
P
);
apply
always_intro
'
.
Qed
.
Lemma
always_and_sep_l
P
Q
`
{!
Persistent
P
}
:
(
P
∧
Q
)
⊣⊢
(
P
★
Q
).
Lemma
always_and_sep_l
P
Q
`
{!
Persistent
P
P
}
:
(
P
∧
Q
)
⊣⊢
(
P
★
Q
).
Proof
.
by
rewrite
-
(
always_always
P
)
always_and_sep_l
'
.
Qed
.
Proof
.
by
rewrite
-
(
always_always
P
)
always_and_sep_l
'
.
Qed
.
Lemma
always_and_sep_r
P
Q
`
{!
Persistent
Q
}
:
(
P
∧
Q
)
⊣⊢
(
P
★
Q
).
Lemma
always_and_sep_r
P
Q
`
{!
Persistent
P
Q
}
:
(
P
∧
Q
)
⊣⊢
(
P
★
Q
).
Proof
.
by
rewrite
-
(
always_always
Q
)
always_and_sep_r
'
.
Qed
.
Proof
.
by
rewrite
-
(
always_always
Q
)
always_and_sep_r
'
.
Qed
.
Lemma
always_sep_dup
P
`
{!
Persistent
P
}
:
P
⊣⊢
(
P
★
P
).
Lemma
always_sep_dup
P
`
{!
Persistent
P
P
}
:
P
⊣⊢
(
P
★
P
).
Proof
.
by
rewrite
-
(
always_always
P
)
-
always_sep_dup
'
.
Qed
.
Proof
.
by
rewrite
-
(
always_always
P
)
-
always_sep_dup
'
.
Qed
.
Lemma
always_entails_l
P
Q
`
{!
Persistent
Q
}
:
(
P
⊢
Q
)
→
P
⊢
(
Q
★
P
).
Lemma
always_entails_l
P
Q
`
{!
Persistent
P
Q
}
:
(
P
⊢
Q
)
→
P
⊢
(
Q
★
P
).
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_l
'
.
Qed
.
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_l
'
.
Qed
.
Lemma
always_entails_r
P
Q
`
{!
Persistent
Q
}
:
(
P
⊢
Q
)
→
P
⊢
(
P
★
Q
).
Lemma
always_entails_r
P
Q
`
{!
Persistent
P
Q
}
:
(
P
⊢
Q
)
→
P
⊢
(
P
★
Q
).
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_r
'
.
Qed
.
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_r
'
.
Qed
.
End
uPred_logic
.
End
uPred_logic
.
...
...
algebra/upred_big_op.v
View file @
b962b90e
...
@@ -30,7 +30,7 @@ Notation "'Π★{set' X } Φ" := (uPred_big_sepS X Φ)
...
@@ -30,7 +30,7 @@ Notation "'Π★{set' X } Φ" := (uPred_big_sepS X Φ)
(
**
*
Always
stability
for
lists
*
)
(
**
*
Always
stability
for
lists
*
)
Class
PersistentL
{
M
}
(
Ps
:
list
(
uPred
M
))
:=
Class
PersistentL
{
M
}
(
Ps
:
list
(
uPred
M
))
:=
persistentL
:
Forall
Persistent
Ps
.
persistentL
:
Forall
Persistent
P
Ps
.
Arguments
persistentL
{
_
}
_
{
_
}
.
Arguments
persistentL
{
_
}
_
{
_
}
.
Section
big_op
.
Section
big_op
.
...
@@ -216,21 +216,21 @@ Section gset.
...
@@ -216,21 +216,21 @@ Section gset.
End
gset
.
End
gset
.
(
*
Always
stable
*
)
(
*
Always
stable
*
)
Global
Instance
big_and_persistent
Ps
:
PersistentL
Ps
→
Persistent
(
Π∧
Ps
).
Global
Instance
big_and_persistent
Ps
:
PersistentL
Ps
→
Persistent
P
(
Π∧
Ps
).
Proof
.
induction
1
;
apply
_.
Qed
.
Proof
.
induction
1
;
apply
_.
Qed
.
Global
Instance
big_sep_persistent
Ps
:
PersistentL
Ps
→
Persistent
(
Π★
Ps
).
Global
Instance
big_sep_persistent
Ps
:
PersistentL
Ps
→
Persistent
P
(
Π★
Ps
).
Proof
.
induction
1
;
apply
_.
Qed
.
Proof
.
induction
1
;
apply
_.
Qed
.
Global
Instance
nil_persistent
:
PersistentL
(
@
nil
(
uPred
M
)).
Global
Instance
nil_persistent
:
PersistentL
(
@
nil
(
uPred
M
)).
Proof
.
constructor
.
Qed
.
Proof
.
constructor
.
Qed
.
Global
Instance
cons_persistent
P
Ps
:
Global
Instance
cons_persistent
P
Ps
:
Persistent
P
→
PersistentL
Ps
→
PersistentL
(
P
::
Ps
).
Persistent
P
P
→
PersistentL
Ps
→
PersistentL
(
P
::
Ps
).
Proof
.
by
constructor
.
Qed
.
Proof
.
by
constructor
.
Qed
.
Global
Instance
app_persistent
Ps
Ps
'
:
Global
Instance
app_persistent
Ps
Ps
'
:
PersistentL
Ps
→
PersistentL
Ps
'
→
PersistentL
(
Ps
++
Ps
'
).
PersistentL
Ps
→
PersistentL
Ps
'
→
PersistentL
(
Ps
++
Ps
'
).
Proof
.
apply
Forall_app_2
.
Qed
.
Proof
.
apply
Forall_app_2
.
Qed
.
Global
Instance
zip_with_persistent
{
A
B
}
(
f
:
A
→
B
→
uPred
M
)
xs
ys
:
Global
Instance
zip_with_persistent
{
A
B
}
(
f
:
A
→
B
→
uPred
M
)
xs
ys
:
(
∀
x
y
,
Persistent
(
f
x
y
))
→
PersistentL
(
zip_with
f
xs
ys
).
(
∀
x
y
,
Persistent
P
(
f
x
y
))
→
PersistentL
(
zip_with
f
xs
ys
).
Proof
.
Proof
.
unfold
PersistentL
=>
?
;
revert
ys
;
induction
xs
=>
-
[
|??
];
constructor
;
auto
.
unfold
PersistentL
=>
?
;
revert
ys
;
induction
xs
=>
-
[
|??
];
constructor
;
auto
.
Qed
.
Qed
.
...
...
barrier/proof.v
View file @
b962b90e
...
@@ -51,7 +51,7 @@ Definition recv (l : loc) (R : iProp) : iProp :=
...
@@ -51,7 +51,7 @@ Definition recv (l : loc) (R : iProp) : iProp :=
saved_prop_own
i
Q
★
▷
(
Q
-
★
R
))
%
I
.
saved_prop_own
i
Q
★
▷
(
Q
-
★
R
))
%
I
.
Global
Instance
barrier_ctx_persistent
(
γ
:
gname
)
(
l
:
loc
)
(
P
:
iProp
)
:
Global
Instance
barrier_ctx_persistent
(
γ
:
gname
)
(
l
:
loc
)
(
P
:
iProp
)
:
Persistent
(
barrier_ctx
γ
l
P
).
Persistent
P
(
barrier_ctx
γ
l
P
).
Proof
.
apply
_.
Qed
.
Proof
.
apply
_.
Qed
.
(
*
TODO
:
Figure
out
if
this
has
a
"Global"
or
"Local"
effect
.
(
*
TODO
:
Figure
out
if
this
has
a
"Global"
or
"Local"
effect
.
...
...
heap_lang/heap.v
View file @
b962b90e
...
@@ -33,7 +33,7 @@ Section definitions.
...
@@ -33,7 +33,7 @@ Section definitions.
Global
Instance
heap_inv_proper
:
Proper
((
≡
)
==>
(
⊣⊢
))
heap_inv
.
Global
Instance
heap_inv_proper
:
Proper
((
≡
)
==>
(
⊣⊢
))
heap_inv
.
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
heap_ctx_persistent
N
:
Persistent
(
heap_ctx
N
).
Global
Instance
heap_ctx_persistent
N
:
Persistent
P
(
heap_ctx
N
).
Proof
.
apply
_.
Qed
.
Proof
.
apply
_.
Qed
.
End
definitions
.
End
definitions
.
Typeclasses
Opaque
heap_ctx
heap_mapsto
.
Typeclasses
Opaque
heap_ctx
heap_mapsto
.
...
...
heap_lang/one_shot.v
View file @
b962b90e
...
@@ -103,9 +103,7 @@ Proof.
...
@@ -103,9 +103,7 @@ Proof.
rewrite
-
(
exist_intro
n
).
ecancel
[
inv
_
_
]
%
I
.
rewrite
-
(
exist_intro
n
).
ecancel
[
inv
_
_
]
%
I
.
rewrite
[(
_
★
_
)
%
I
]
comm
-
assoc
.
apply
const_elim_sep_l
=>->
.
rewrite
[(
_
★
_
)
%
I
]
comm
-
assoc
.
apply
const_elim_sep_l
=>->
.
rewrite
const_equiv
// left_id /one_shot_inv -or_intro_r.
rewrite
const_equiv
// left_id /one_shot_inv -or_intro_r.
rewrite
-
(
exist_intro
n
).
rewrite
-
(
exist_intro
n
)
{
1
}
(
always_sep_dup
(
own
_
_
)).
rewrite
-
(
dec_agree_core_id
(
DecAgree
n
))
-
(
Shot_core
(
DecAgree
n
:
dec_agreeR
_
))
{
1
}
(
always_sep_dup
(
own
_
_
)).
solve_sep_entails
.
}
solve_sep_entails
.
}
cancel
[
one_shot_inv
γ
l
].
cancel
[
one_shot_inv
γ
l
].
(
*
FIXME
:
why
aren
'
t
laters
stripped
?
*
)
(
*
FIXME
:
why
aren
'
t
laters
stripped
?
*
)
...
...
program_logic/auth.v
View file @
b962b90e
...
@@ -30,7 +30,7 @@ Section definitions.
...
@@ -30,7 +30,7 @@ Section definitions.
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
auth_own_timeless
a
:
TimelessP
(
auth_own
a
).
Global
Instance
auth_own_timeless
a
:
TimelessP
(
auth_own
a
).
Proof
.
apply
_.
Qed
.
Proof
.
apply
_.
Qed
.
Global
Instance
auth_ctx_persistent
N
φ
:
Persistent
(
auth_ctx
N
φ
).
Global
Instance
auth_ctx_persistent
N
φ
:
Persistent
P
(
auth_ctx
N
φ
).
Proof
.
apply
_.
Qed
.
Proof
.
apply
_.
Qed
.
End
definitions
.
End
definitions
.
...
...
program_logic/ghost_ownership.v
View file @
b962b90e
...
@@ -36,10 +36,6 @@ Lemma own_op γ a1 a2 : own γ (a1 ⋅ a2) ⊣⊢ (own γ a1 ★ own γ a2).
...
@@ -36,10 +36,6 @@ Lemma own_op γ a1 a2 : own γ (a1 ⋅ a2) ⊣⊢ (own γ a1 ★ own γ a2).
Proof
.
by
rewrite
/
own
-
ownG_op
to_globalF_op
.
Qed
.
Proof
.
by
rewrite
/
own
-
ownG_op
to_globalF_op
.
Qed
.
Global
Instance
own_mono
γ
:
Proper
(
flip
(
≼
)
==>
(
⊢
))
(
own
γ
).
Global
Instance
own_mono
γ
:
Proper
(
flip
(
≼
)
==>
(
⊢
))
(
own
γ
).
Proof
.
move
=>
a
b
[
c
H
].
rewrite
H
own_op
.
eauto
with
I
.
Qed
.
Proof
.
move
=>
a
b
[
c
H
].
rewrite
H
own_op
.
eauto
with
I
.
Qed
.
Lemma
always_own_core
γ
a
:
(
□
own
γ
(
core
a
))
⊣⊢
own
γ
(
core
a
).
Proof
.
by
rewrite
/
own
-
to_globalF_core
always_ownG_core
.
Qed
.
Lemma
always_own
γ
a
:
core
a
≡
a
→
(
□
own
γ
a
)
⊣⊢
own
γ
a
.
Proof
.
by
intros
<-
;
rewrite
always_own_core
.
Qed
.
Lemma
own_valid
γ
a
:
own
γ
a
⊢
✓
a
.
Lemma
own_valid
γ
a
:
own
γ
a
⊢
✓
a
.
Proof
.
Proof
.
rewrite
/
own
ownG_valid
/
to_globalF
.
rewrite
/
own
ownG_valid
/
to_globalF
.
...
@@ -53,9 +49,9 @@ Proof. apply: uPred.always_entails_r. apply own_valid. Qed.
...
@@ -53,9 +49,9 @@ Proof. apply: uPred.always_entails_r. apply own_valid. Qed.
Lemma
own_valid_l
γ
a
:
own
γ
a
⊢
(
✓
a
★
own
γ
a
).
Lemma
own_valid_l
γ
a
:
own
γ
a
⊢
(
✓
a
★
own
γ
a
).
Proof
.
by
rewrite
comm
-
own_valid_r
.
Qed
.
Proof
.
by
rewrite
comm
-
own_valid_r
.
Qed
.
Global
Instance
own_timeless
γ
a
:
Timeless
a
→
TimelessP
(
own
γ
a
).
Global
Instance
own_timeless
γ
a
:
Timeless
a
→
TimelessP
(
own
γ
a
).
Proof
.
unfold
own
;
apply
_.
Qed
.
Proof
.
rewrite
/
own
;
apply
_.
Qed
.
Global
Instance
own_core_persistent
γ
a
:
Persistent
(
own
γ
(
core
a
)
).
Global
Instance
own_core_persistent
γ
a
:
Persistent
a
→
PersistentP
(
own
γ
a
).
Proof
.
by
rewrite
/
Persistent
always_own_core
.
Qed
.
Proof
.
rewrite
/
own
;
apply
_
.
Qed
.
(
*
TODO
:
This
also
holds
if
we
just
have
✓
a
at
the
current
step
-
idx
,
as
Iris
(
*
TODO
:
This
also
holds
if
we
just
have
✓
a
at
the
current
step
-
idx
,
as
Iris
assertion
.
However
,
the
map_updateP_alloc
does
not
suffice
to
show
this
.
*
)
assertion
.
However
,
the
map_updateP_alloc
does
not
suffice
to
show
this
.
*
)
...
...
program_logic/global_functor.v
View file @
b962b90e
...
@@ -41,12 +41,10 @@ Lemma to_globalF_op γ a1 a2 :
...
@@ -41,12 +41,10 @@ Lemma to_globalF_op γ a1 a2 :
Proof
.
Proof
.
by
rewrite
/
to_globalF
iprod_op_singleton
map_op_singleton
cmra_transport_op
.
by
rewrite
/
to_globalF
iprod_op_singleton
map_op_singleton
cmra_transport_op
.
Qed
.
Qed
.
Lemma
to_globalF_core
γ
a
:
core
(
to_globalF
γ
a
)
≡
to_globalF
γ
(
core
a
).
Global
Instance
to_globalF_timeless
γ
m
:
Timeless
m
→
Timeless
(
to_globalF
γ
m
).
Proof
.
Proof
.
rewrite
/
to_globalF
;
apply
_.
Qed
.
by
rewrite
/
to_globalF
Global
Instance
to_globalF_persistent
γ
m
:
iprod_core_singleton
map_core_singleton
cmra_transport_core
.
Persistent
m
→
Persistent
(
to_globalF
γ
m
).
Qed
.
Global
Instance
to_globalF_timeless
γ
m
:
Timeless
m
→
Timeless
(
to_globalF
γ
m
).
Proof
.
rewrite
/
to_globalF
;
apply
_.
Qed
.
Proof
.
rewrite
/
to_globalF
;
apply
_.
Qed
.
End
to_globalF
.
End
to_globalF
.
...
...
program_logic/invariants.v
View file @
b962b90e
...
@@ -23,7 +23,7 @@ Implicit Types Φ : val Λ → iProp Λ Σ.
...
@@ -23,7 +23,7 @@ Implicit Types Φ : val Λ → iProp Λ Σ.
Global
Instance
inv_contractive
N
:
Contractive
(
@
inv
Λ
Σ
N
).
Global
Instance
inv_contractive
N
:
Contractive
(
@
inv
Λ
Σ
N
).
Proof
.
intros
n
???
.
apply
exist_ne
=>
i
.
by
apply
and_ne
,
ownI_contractive
.
Qed
.
Proof
.
intros
n
???
.
apply
exist_ne
=>
i
.
by
apply
and_ne
,
ownI_contractive
.
Qed
.
Global
Instance
inv_persistent
N
P
:
Persistent
(
inv
N
P
).
Global
Instance
inv_persistent
N
P
:
Persistent
P
(
inv
N
P
).
Proof
.
rewrite
/
inv
;
apply
_.
Qed
.
Proof
.
rewrite
/
inv
;
apply
_.
Qed
.
Lemma
always_inv
N
P
:
(
□
inv
N
P
)
⊣⊢
inv
N
P
.
Lemma
always_inv
N
P
:
(
□
inv
N
P
)
⊣⊢
inv
N
P
.
...
@@ -96,5 +96,4 @@ Proof.
...
@@ -96,5 +96,4 @@ Proof.
intros
.
rewrite
-
(
pvs_mask_weaken
N
)
//.
intros
.
rewrite
-
(
pvs_mask_weaken
N
)
//.
by
rewrite
/
inv
(
pvs_allocI
N
);
last
apply
coPset_suffixes_infinite
.
by
rewrite
/
inv
(
pvs_allocI
N
);
last
apply
coPset_suffixes_infinite
.
Qed
.
Qed
.
End
inv
.
End
inv
.
program_logic/ownership.v
View file @
b962b90e
...
@@ -25,15 +25,8 @@ Proof.
...
@@ -25,15 +25,8 @@ Proof.
apply
uPred
.
ownM_ne
,
Res_ne
;
auto
;
apply
singleton_ne
,
to_agree_ne
.
apply
uPred
.
ownM_ne
,
Res_ne
;
auto
;
apply
singleton_ne
,
to_agree_ne
.
by
apply
Next_contractive
=>
j
?
;
rewrite
(
HPQ
j
).
by
apply
Next_contractive
=>
j
?
;
rewrite
(
HPQ
j
).
Qed
.
Qed
.
Lemma
always_ownI
i
P
:
(
□
ownI
i
P
)
⊣⊢
ownI
i
P
.
Global
Instance
ownI_persistent
i
P
:
PersistentP
(
ownI
i
P
).
Proof
.
Proof
.
rewrite
/
ownI
.
apply
_.
Qed
.
apply
uPred
.
always_ownM
.
by
rewrite
Res_core
!
cmra_core_unit
map_core_singleton
.
Qed
.
Global
Instance
ownI_persistent
i
P
:
Persistent
(
ownI
i
P
).
Proof
.
by
rewrite
/
Persistent
always_ownI
.
Qed
.
Lemma
ownI_sep_dup
i
P
:
ownI
i
P
⊣⊢
(
ownI
i
P
★
ownI
i
P
).
Proof
.
apply
(
uPred
.
always_sep_dup
_
).
Qed
.
(
*
physical
state
*
)
(
*
physical
state
*
)
Lemma
ownP_twice
σ
1
σ
2
:
(
ownP
σ
1
★
ownP
σ
2
:
iProp
Λ
Σ
)
⊢
False
.
Lemma
ownP_twice
σ
1
σ
2
:
(
ownP
σ
1
★
ownP
σ
2
:
iProp
Λ
Σ
)
⊢
False
.
...
@@ -52,25 +45,16 @@ Lemma ownG_op m1 m2 : ownG (m1 ⋅ m2) ⊣⊢ (ownG m1 ★ ownG m2).
...
@@ -52,25 +45,16 @@ Lemma ownG_op m1 m2 : ownG (m1 ⋅ m2) ⊣⊢ (ownG m1 ★ ownG m2).
Proof
.
by
rewrite
/
ownG
-
uPred
.
ownM_op
Res_op
!
left_id
.
Qed
.
Proof
.
by
rewrite
/
ownG
-
uPred
.
ownM_op
Res_op
!
left_id
.
Qed
.
Global
Instance
ownG_mono
:
Proper
(
flip
(
≼
)
==>
(
⊢
))
(
@
ownG
Λ
Σ
).
Global
Instance
ownG_mono
:
Proper
(
flip
(
≼
)
==>
(
⊢
))
(
@
ownG
Λ
Σ
).