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
Environments
Terraform modules
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
Ike Mulder
Iris
Commits
b7d31005
Commit
b7d31005
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
algebra: prove some frame-preserving updates from empty
parent
23c54a27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algebra/cmra.v
+11
-0
11 additions, 0 deletions
algebra/cmra.v
algebra/fin_maps.v
+21
-1
21 additions, 1 deletion
algebra/fin_maps.v
algebra/iprod.v
+6
-3
6 additions, 3 deletions
algebra/iprod.v
with
38 additions
and
4 deletions
algebra/cmra.v
+
11
−
0
View file @
b7d31005
...
...
@@ -396,16 +396,27 @@ End cmra_monotone.
(** * Transporting a CMRA equality *)
Definition
cmra_transport
{
A
B
:
cmraT
}
(
H
:
A
=
B
)
(
x
:
A
)
:
B
:=
eq_rect
A
id
x
_
H
.
Definition
cmra_transport_back
{
A
B
:
cmraT
}
(
H
:
A
=
B
)
(
x
:
B
)
:
A
:=
eq_rect
B
id
x
_
(
eq_sym
H
)
.
Section
cmra_transport
.
Context
{
A
B
:
cmraT
}
(
H
:
A
=
B
)
.
Notation
T
:=
(
cmra_transport
H
)
.
Notation
T'
:=
(
cmra_transport_back
H
)
.
Global
Instance
cmra_transport_ne
n
:
Proper
(
dist
n
==>
dist
n
)
T
.
Proof
.
by
intros
???;
destruct
H
.
Qed
.
Global
Instance
cmra_transport_proper
:
Proper
((
≡
)
==>
(
≡
))
T
.
Proof
.
by
intros
???;
destruct
H
.
Qed
.
Lemma
cmra_transport_and_back
x
:
T'
(
T
x
)
=
x
.
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_back_and
x
:
T
(
T'
x
)
=
x
.
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_op
x
y
:
T
(
x
⋅
y
)
=
T
x
⋅
T
y
.
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_back_op_r
y
x
:
T
(
x
⋅
T'
y
)
=
T
x
⋅
y
.
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_back_op_l
y
x
:
T
(
T'
x
⋅
y
)
=
x
⋅
T
y
.
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_unit
x
:
T
(
unit
x
)
=
unit
(
T
x
)
.
Proof
.
by
destruct
H
.
Qed
.
Lemma
cmra_transport_validN
n
x
:
✓
{
n
}
(
T
x
)
↔
✓
{
n
}
x
.
...
...
This diff is collapsed.
Click to expand it.
algebra/fin_maps.v
+
21
−
1
View file @
b7d31005
...
...
@@ -228,11 +228,31 @@ Lemma map_singleton_updateP (P : A → Prop) (Q : gmap K A → Prop) i x :
x
~~>:
P
→
(
∀
y
,
P
y
→
Q
{[
i
↦
y
]})
→
{[
i
↦
x
]}
~~>:
Q
.
Proof
.
apply
map_insert_updateP
.
Qed
.
Lemma
map_singleton_updateP'
(
P
:
A
→
Prop
)
i
x
:
x
~~>:
P
→
{[
i
↦
x
]}
~~>:
λ
m
'
,
∃
y
,
m
'
=
{[
i
↦
y
]}
∧
P
y
.
x
~~>:
P
→
{[
i
↦
x
]}
~~>:
λ
m
,
∃
y
,
m
=
{[
i
↦
y
]}
∧
P
y
.
Proof
.
apply
map_insert_updateP'
.
Qed
.
Lemma
map_singleton_update
i
(
x
y
:
A
)
:
x
~~>
y
→
{[
i
↦
x
]}
~~>
{[
i
↦
y
]}
.
Proof
.
apply
map_insert_update
.
Qed
.
Lemma
map_singleton_updateP_empty
`{
Empty
A
,
!
CMRAIdentity
A
}
(
P
:
A
→
Prop
)
(
Q
:
gmap
K
A
→
Prop
)
i
:
∅
~~>:
P
→
(
∀
y
,
P
y
→
Q
{[
i
↦
y
]})
→
∅
~~>:
Q
.
Proof
.
intros
Hx
HQ
gf
n
Hg
.
destruct
(
Hx
(
default
∅
(
gf
!!
i
)
id
)
n
)
as
(
y
&
?
&
Hy
)
.
{
move
:(
Hg
i
)
.
rewrite
!
left_id
.
case
_:
(
gf
!!
i
);
first
done
.
intros
.
apply
cmra_empty_valid
.
}
exists
{[
i
↦
y
]}
.
split
;
first
by
apply
HQ
.
intros
i'
.
rewrite
lookup_op
.
destruct
(
decide
(
i'
=
i
))
.
-
subst
i'
.
rewrite
lookup_singleton
.
move
:
Hy
.
case
_:
(
gf
!!
i
);
first
done
.
by
rewrite
right_id
.
-
move
:(
Hg
i'
)
.
rewrite
lookup_singleton_ne
//
!
left_id
.
done
.
Qed
.
Lemma
map_singleton_updateP_empty'
`{
Empty
A
,
!
CMRAIdentity
A
}
(
P
:
A
→
Prop
)
i
:
∅
~~>:
P
→
∅
~~>:
λ
m
,
∃
y
,
m
=
{[
i
↦
y
]}
∧
P
y
.
Proof
.
eauto
using
map_singleton_updateP_empty
.
Qed
.
Context
`{
Fresh
K
(
gset
K
),
!
FreshSpec
K
(
gset
K
)}
.
Lemma
map_updateP_alloc
(
Q
:
gmap
K
A
→
Prop
)
m
x
:
✓
x
→
(
∀
i
,
m
!!
i
=
None
→
Q
(
<
[
i
:=
x
]
>
m
))
→
m
~~>:
Q
.
...
...
This diff is collapsed.
Click to expand it.
algebra/iprod.v
+
6
−
3
View file @
b7d31005
...
...
@@ -48,7 +48,7 @@ Section iprod_cofe.
Section
empty
.
Context
`{
∀
x
,
Empty
(
B
x
)}
.
Definition
iprod_lookup_empty
x
:
∅
x
=
∅
:=
eq_refl
.
Instance
iprod_empty_timeless
:
Global
Instance
iprod_empty_timeless
:
(
∀
x
:
A
,
Timeless
(
∅
:
B
x
))
→
Timeless
(
∅
:
iprod
B
)
.
Proof
.
intros
?
f
Hf
x
.
by
apply
(
timeless
_)
.
Qed
.
End
empty
.
...
...
@@ -168,7 +168,7 @@ Section iprod_cmra.
intros
?;
split
.
*
intros
n
x
;
apply
cmra_empty_valid
.
*
by
intros
f
x
;
rewrite
iprod_lookup_op
left_id
.
*
by
intros
f
Hf
x
;
apply
(
timeless
_)
.
*
by
apply
_
.
Qed
.
(** Properties of iprod_insert. *)
...
...
@@ -230,7 +230,7 @@ Section iprod_cmra.
Proof
.
rewrite
/
iprod_singleton
;
eauto
using
iprod_insert_updateP
.
Qed
.
Lemma
iprod_singleton_updateP'
x
(
P
:
B
x
→
Prop
)
y1
:
y1
~~>:
P
→
iprod_singleton
x
y1
~~>:
λ
g
'
,
∃
y2
,
g
'
=
iprod_singleton
x
y2
∧
P
y2
.
iprod_singleton
x
y1
~~>:
λ
g
,
∃
y2
,
g
=
iprod_singleton
x
y2
∧
P
y2
.
Proof
.
eauto
using
iprod_singleton_updateP
.
Qed
.
Lemma
iprod_singleton_update
x
y1
y2
:
y1
~~>
y2
→
iprod_singleton
x
y1
~~>
iprod_singleton
x
y2
.
...
...
@@ -245,6 +245,9 @@ Section iprod_cmra.
*
by
rewrite
iprod_lookup_op
iprod_lookup_singleton
.
*
rewrite
iprod_lookup_op
iprod_lookup_singleton_ne
//.
apply
Hg
.
Qed
.
Lemma
iprod_singleton_updateP_empty'
x
(
P
:
B
x
→
Prop
)
:
∅
~~>:
P
→
∅
~~>:
λ
g
,
∃
y2
,
g
=
iprod_singleton
x
y2
∧
P
y2
.
Proof
.
eauto
using
iprod_singleton_updateP_empty
.
Qed
.
End
iprod_cmra
.
Arguments
iprodRA
{_}
_
.
...
...
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