Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Janno
iris-coq
Commits
f519685e
Commit
f519685e
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Plain Diff
Merge branch 'v2.0' of gitlab.mpi-sws.org:FP/iris-coq into v2.0
parents
114b46c7
de82a00c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
iris/wsat.v
+1
-1
1 addition, 1 deletion
iris/wsat.v
modures/cmra.v
+6
-9
6 additions, 9 deletions
modures/cmra.v
modures/excl.v
+2
-0
2 additions, 0 deletions
modures/excl.v
modures/option.v
+20
-7
20 additions, 7 deletions
modures/option.v
with
29 additions
and
17 deletions
iris/wsat.v
+
1
−
1
View file @
f519685e
...
@@ -129,7 +129,7 @@ Lemma wsat_update_gst n E σ r rf m1 (P : iGst Λ Σ → Prop) :
...
@@ -129,7 +129,7 @@ Lemma wsat_update_gst n E σ r rf m1 (P : iGst Λ Σ → Prop) :
wsat
(
S
n
)
E
σ
(
r
⋅
rf
)
→
∃
m2
,
wsat
(
S
n
)
E
σ
(
update_gst
m2
r
⋅
rf
)
∧
P
m2
.
wsat
(
S
n
)
E
σ
(
r
⋅
rf
)
→
∃
m2
,
wsat
(
S
n
)
E
σ
(
update_gst
m2
r
⋅
rf
)
∧
P
m2
.
Proof
.
Proof
.
intros
[
mf
Hr
]
Hup
[
rs
[(?
&
?
&
?)
Hσ
HE
Hwld
]]
.
intros
[
mf
Hr
]
Hup
[
rs
[(?
&
?
&
?)
Hσ
HE
Hwld
]]
.
destruct
(
Hup
(
mf
⋅
gst
(
rf
⋅
big_opM
rs
))
(
S
n
)
)
as
(
m2
&
?
&
Hval'
)
.
destruct
(
Hup
(
mf
⋅
gst
(
rf
⋅
big_opM
rs
))
n
)
as
(
m2
&
?
&
Hval'
)
.
{
by
rewrite
/=
(
associative
_
m1
)
-
Hr
(
associative
_)
.
}
{
by
rewrite
/=
(
associative
_
m1
)
-
Hr
(
associative
_)
.
}
exists
m2
;
split
;
[
exists
rs
;
split
;
split_ands'
;
auto
|
done
]
.
exists
m2
;
split
;
[
exists
rs
;
split
;
split_ands'
;
auto
|
done
]
.
Qed
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
modures/cmra.v
+
6
−
9
View file @
f519685e
...
@@ -142,11 +142,11 @@ Class CMRAMonotone {A B : cmraT} (f : A → B) := {
...
@@ -142,11 +142,11 @@ Class CMRAMonotone {A B : cmraT} (f : A → B) := {
(** * Frame preserving updates *)
(** * Frame preserving updates *)
Definition
cmra_updateP
{
A
:
cmraT
}
(
x
:
A
)
(
P
:
A
→
Prop
)
:=
∀
z
n
,
Definition
cmra_updateP
{
A
:
cmraT
}
(
x
:
A
)
(
P
:
A
→
Prop
)
:=
∀
z
n
,
✓
{
n
}
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
{
n
}
(
y
⋅
z
)
.
✓
{
S
n
}
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
{
S
n
}
(
y
⋅
z
)
.
Instance
:
Params
(
@
cmra_updateP
)
3
.
Instance
:
Params
(
@
cmra_updateP
)
3
.
Infix
"⇝:"
:=
cmra_updateP
(
at
level
70
)
.
Infix
"⇝:"
:=
cmra_updateP
(
at
level
70
)
.
Definition
cmra_update
{
A
:
cmraT
}
(
x
y
:
A
)
:=
∀
z
n
,
Definition
cmra_update
{
A
:
cmraT
}
(
x
y
:
A
)
:=
∀
z
n
,
✓
{
n
}
(
x
⋅
z
)
→
✓
{
n
}
(
y
⋅
z
)
.
✓
{
S
n
}
(
x
⋅
z
)
→
✓
{
S
n
}
(
y
⋅
z
)
.
Infix
"⇝"
:=
cmra_update
(
at
level
70
)
.
Infix
"⇝"
:=
cmra_update
(
at
level
70
)
.
Instance
:
Params
(
@
cmra_update
)
3
.
Instance
:
Params
(
@
cmra_update
)
3
.
...
@@ -393,15 +393,12 @@ Section discrete.
...
@@ -393,15 +393,12 @@ Section discrete.
Qed
.
Qed
.
Definition
discreteRA
:
cmraT
:=
Definition
discreteRA
:
cmraT
:=
CMRAT
(
cofe_mixin
A
)
discrete_cmra_mixin
discrete_extend_mixin
.
CMRAT
(
cofe_mixin
A
)
discrete_cmra_mixin
discrete_extend_mixin
.
Lemma
discrete_updateP
(
x
:
discreteRA
)
(
P
:
A
→
Prop
)
`{
!
Inhabited
(
sig
P
)}
:
Lemma
discrete_updateP
(
x
:
discreteRA
)
(
P
:
A
→
Prop
)
:
(
∀
z
,
✓
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
(
y
⋅
z
))
→
x
⇝:
P
.
(
∀
z
,
✓
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
(
y
⋅
z
))
→
x
⇝:
P
.
Proof
.
Proof
.
intros
Hvalid
z
n
;
apply
Hvalid
.
Qed
.
intros
Hvalid
z
[|
n
];
[|
apply
Hvalid
]
.
by
destruct
(_
:
Inhabited
(
sig
P
))
as
[[
y
?]];
exists
y
.
Qed
.
Lemma
discrete_update
(
x
y
:
discreteRA
)
:
Lemma
discrete_update
(
x
y
:
discreteRA
)
:
(
∀
z
,
✓
(
x
⋅
z
)
→
✓
(
y
⋅
z
))
→
x
⇝
y
.
(
∀
z
,
✓
(
x
⋅
z
)
→
✓
(
y
⋅
z
))
→
x
⇝
y
.
Proof
.
intros
Hvalid
z
[|
n
];
[
done
|
apply
Hvalid
]
.
Qed
.
Proof
.
intros
Hvalid
z
n
;
apply
Hvalid
.
Qed
.
End
discrete
.
End
discrete
.
(** ** CMRA for the unit type *)
(** ** CMRA for the unit type *)
...
@@ -477,7 +474,7 @@ Section prod.
...
@@ -477,7 +474,7 @@ Section prod.
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
??
z
n
[??];
split
;
simpl
in
*
;
auto
.
Qed
.
Proof
.
intros
??
z
n
[??];
split
;
simpl
in
*
;
auto
.
Qed
.
Lemma
prod_updateP
(
P
:
A
*
B
→
Prop
)
P1
P2
x
:
Lemma
prod_updateP
(
P
:
A
*
B
→
Prop
)
P1
P2
x
:
x
.
1
⇝:
P1
→
x
.
2
⇝:
P2
→
(
∀
y
,
P1
(
y
.
1
)
→
P2
(
y
.
2
)
→
P
y
)
→
x
⇝:
P
.
x
.
1
⇝:
P1
→
x
.
2
⇝:
P2
→
(
∀
a
b
,
P1
a
→
P2
b
→
P
(
a
,
b
)
)
→
x
⇝:
P
.
Proof
.
Proof
.
intros
Hx1
Hx2
HP
z
n
[??];
simpl
in
*.
intros
Hx1
Hx2
HP
z
n
[??];
simpl
in
*.
destruct
(
Hx1
(
z
.
1
)
n
)
as
(
a
&
?
&
?),
(
Hx2
(
z
.
2
)
n
)
as
(
b
&
?
&
?);
auto
.
destruct
(
Hx1
(
z
.
1
)
n
)
as
(
a
&
?
&
?),
(
Hx2
(
z
.
2
)
n
)
as
(
b
&
?
&
?);
auto
.
...
...
This diff is collapsed.
Click to expand it.
modures/excl.v
+
2
−
0
View file @
f519685e
...
@@ -142,6 +142,8 @@ Qed.
...
@@ -142,6 +142,8 @@ Qed.
(* Updates *)
(* Updates *)
Lemma
excl_update
(
x
:
A
)
y
:
✓
y
→
Excl
x
⇝
y
.
Lemma
excl_update
(
x
:
A
)
y
:
✓
y
→
Excl
x
⇝
y
.
Proof
.
by
destruct
y
;
intros
?
[?|
|]
.
Qed
.
Proof
.
by
destruct
y
;
intros
?
[?|
|]
.
Qed
.
Lemma
excl_updateP
(
P
:
excl
A
→
Prop
)
x
y
:
✓
y
→
P
y
→
Excl
x
⇝:
P
.
Proof
.
intros
??
z
n
?;
exists
y
.
by
destruct
y
,
z
as
[?|
|]
.
Qed
.
End
excl
.
End
excl
.
Arguments
exclC
:
clear
implicits
.
Arguments
exclC
:
clear
implicits
.
...
...
This diff is collapsed.
Click to expand it.
modures/option.v
+
20
−
7
View file @
f519685e
...
@@ -61,7 +61,6 @@ Instance option_fmap_ne {A B : cofeT} (f : A → B) n:
...
@@ -61,7 +61,6 @@ Instance option_fmap_ne {A B : cofeT} (f : A → B) n:
Proper
(
dist
n
==>
dist
n
)
f
→
Proper
(
dist
n
==>
dist
n
)
(
fmap
(
M
:=
option
)
f
)
.
Proper
(
dist
n
==>
dist
n
)
f
→
Proper
(
dist
n
==>
dist
n
)
(
fmap
(
M
:=
option
)
f
)
.
Proof
.
by
intros
Hf
;
destruct
1
;
constructor
;
apply
Hf
.
Qed
.
Proof
.
by
intros
Hf
;
destruct
1
;
constructor
;
apply
Hf
.
Qed
.
(* CMRA *)
(* CMRA *)
Section
cmra
.
Section
cmra
.
Context
{
A
:
cmraT
}
.
Context
{
A
:
cmraT
}
.
...
@@ -131,14 +130,28 @@ Qed.
...
@@ -131,14 +130,28 @@ Qed.
Canonical
Structure
optionRA
:=
Canonical
Structure
optionRA
:=
CMRAT
option_cofe_mixin
option_cmra_mixin
option_cmra_extend_mixin
.
CMRAT
option_cofe_mixin
option_cmra_mixin
option_cmra_extend_mixin
.
Lemma
op_is_Some
x
y
:
is_Some
(
x
⋅
y
)
↔
is_Some
x
∨
is_Some
y
.
Lemma
op_is_Some
mx
my
:
is_Some
(
mx
⋅
my
)
↔
is_Some
mx
∨
is_Some
my
.
Proof
.
destruct
mx
,
my
;
rewrite
/
op
/
option_op
/=
-!
not_eq_None_Some
;
naive_solver
.
Qed
.
Lemma
option_op_positive_dist_l
n
mx
my
:
mx
⋅
my
=
{
n
}
=
None
→
mx
=
{
n
}
=
None
.
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
.
Proof
.
by
destruct
mx
,
my
;
inversion_clear
1
.
Qed
.
Lemma
option_updateP
(
P
:
A
→
Prop
)
(
Q
:
option
A
→
Prop
)
x
:
x
⇝:
P
→
(
∀
y
,
P
y
→
Q
(
Some
y
))
→
Some
x
⇝:
Q
.
Proof
.
intros
Hx
Hy
[
y
|]
n
?
.
{
destruct
(
Hx
y
n
)
as
(
y'
&
?
&
?);
auto
.
exists
(
Some
y'
);
auto
.
}
destruct
(
Hx
(
unit
x
)
n
)
as
(
y'
&
?
&
?);
rewrite
?cmra_unit_r
;
auto
.
by
exists
(
Some
y'
);
split
;
[
auto
|
apply
cmra_validN_op_l
with
(
unit
x
)]
.
Qed
.
Lemma
option_update
x
y
:
x
⇝
y
→
Some
x
⇝
Some
y
.
Proof
.
Proof
.
destruct
x
,
y
;
rewrite
/
op
/
option_op
/=
-!
not_eq_None_Some
;
naive_solver
.
intros
;
apply
cmra_update_updateP
,
(
option_updateP
(
y
=
));
[|
naive_solver
]
.
by
apply
cmra_update_updateP
.
Qed
.
Qed
.
Lemma
option_op_positive_dist_l
n
x
y
:
x
⋅
y
=
{
n
}
=
None
→
x
=
{
n
}
=
None
.
Proof
.
by
destruct
x
,
y
;
inversion_clear
1
.
Qed
.
Lemma
option_op_positive_dist_r
n
x
y
:
x
⋅
y
=
{
n
}
=
None
→
y
=
{
n
}
=
None
.
Proof
.
by
destruct
x
,
y
;
inversion_clear
1
.
Qed
.
End
cmra
.
End
cmra
.
Arguments
optionRA
:
clear
implicits
.
Arguments
optionRA
:
clear
implicits
.
...
...
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