Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Iris
Actris
Commits
1888d5fe
Commit
1888d5fe
authored
1 month ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Cleaned things up
parent
66e40d47
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
multris/channel/proto_model.v
+17
-34
17 additions, 34 deletions
multris/channel/proto_model.v
with
17 additions
and
34 deletions
multris/channel/proto_model.v
+
17
−
34
View file @
1888d5fe
...
@@ -114,30 +114,22 @@ Section internal_eq_derived.
...
@@ -114,30 +114,22 @@ Section internal_eq_derived.
{[
k1
:=
a1
]}
≡
{[
k2
:=
a2
]}
⊣⊢
⌜
k1
=
k2
⌝
∧
a1
≡
a2
.
{[
k1
:=
a1
]}
≡
{[
k2
:=
a2
]}
⊣⊢
⌜
k1
=
k2
⌝
∧
a1
≡
a2
.
Proof
.
Admitted
.
Proof
.
Admitted
.
Global
Instance
gmap_union
:
Union
(
gmap
K
A
)
:=
_
.
Global
Instance
gmap_union_proper
:
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
))
(
gmap_union
)
.
Proof
.
intros
m11
m12
Heq1
m21
m22
Heq2
.
Admitted
.
Global
Instance
gmap_sub
:
SubsetEq
(
gmap
K
A
)
:=
_
.
Global
Instance
gmap_different
:
Difference
(
gmap
K
A
)
:=
_
.
Global
Instance
gmap_union_partial_order
:
PartialOrder
(
gmap_sub
)
:=
_
.
Global
Instance
gmap_subset_proper
:
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
))
(
⊂@
{
gmap
K
A
})
.
Proof
.
intros
m11
m12
Heq1
m21
m22
Heq2
.
Admitted
.
End
internal_eq_derived
.
End
internal_eq_derived
.
Global
Instance
subseteq_proper
`{
Countable
K
}
{
A
:
Type
}
`{
Equiv
A
}
:
Proper
((
≡@
{
gmap
K
A
})
==>
(
≡@
{
gmap
K
A
})
==>
iff
)
(
⊆
)
.
Proof
.
Admitted
.
Global
Instance
subset_proper
`{
Countable
K
}
{
A
:
Type
}
`{
Equiv
A
}
:
Proper
((
≡@
{
gmap
K
A
})
==>
(
≡@
{
gmap
K
A
})
==>
iff
)
(
⊂
)
.
Proof
.
solve_proper
.
Qed
.
Definition
proto_end
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
:
proto
V
PROPn
PROP
:=
Definition
proto_end
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
:
proto
V
PROPn
PROP
:=
proto_fold
∅
.
proto_fold
∅
.
Definition
proto_message
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
(
a
:
action
)
Definition
proto_message
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
(
a
:
action
)
(
m
:
V
→
laterO
(
proto
V
PROP
PROPn
)
-
n
>
PROP
)
:
proto
V
PROPn
PROP
:=
(
m
:
V
→
laterO
(
proto
V
PROP
PROPn
)
-
n
>
PROP
)
:
proto
V
PROPn
PROP
:=
proto_fold
{[
a
:=
m
]}
.
proto_fold
{[
a
:=
m
]}
.
Definition
proto_union
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
(
p1
p2
:
proto
V
PROPn
PROP
)
:
proto
V
PROPn
PROP
:=
Definition
proto_union
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
(
p1
p2
:
proto
V
PROPn
PROP
)
:
proto
V
PROPn
PROP
:=
(* proto_fold (map_union (proto_unfold p1) (proto_unfold p2)). *)
proto_fold
(((
proto_unfold
p1
):
gmap
_
_)
∪
(
proto_unfold
p2
))
.
proto_fold
((
proto_unfold
p1
)
∪
(
proto_unfold
p2
))
.
Global
Instance
proto_message_ne
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
a
n
:
Global
Instance
proto_message_ne
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
a
n
:
Proper
(
pointwise_relation
V
(
dist
n
)
==>
dist
n
)
Proper
(
pointwise_relation
V
(
dist
n
)
==>
dist
n
)
...
@@ -177,30 +169,20 @@ Proof.
...
@@ -177,30 +169,20 @@ Proof.
intros
m'
Hm
.
intros
m'
Hm
.
destruct
(
map_choose_or_empty
m
)
as
[(
i
&
x
&
?)|
H'
]
.
destruct
(
map_choose_or_empty
m
)
as
[(
i
&
x
&
?)|
H'
]
.
{
{
assert
(
m'
≡
proto_union
(
proto_message
i
x
)
(
proto_fold
(
delete
i
(
proto_unfold
m'
))))
.
assert
(
m'
≡
proto_union
(
proto_message
i
x
)
(
proto_fold
(
delete
i
(
proto_unfold
m'
))))
as
Heq
.
{
{
rewrite
-
Hm
.
rewrite
-
Hm
/
proto_union
/
proto_message
!
proto_unfold_fold
-
(
proto_fold_unfold
m'
)
.
rewrite
/
proto_union
/
proto_message
.
f_equiv
.
rewrite
-
Hm
-
insert_union_singleton_l
.
by
rewrite
insert_delete
.
rewrite
!
proto_unfold_fold
.
rewrite
-
(
proto_fold_unfold
m'
)
.
f_equiv
.
rewrite
-
Hm
.
rewrite
-
insert_union_singleton_l
.
by
rewrite
insert_delete
.
}
}
rewrite
H
1
.
rewrite
H
eq
.
apply
Hins
.
apply
Hins
.
{
rewrite
-
Hm
.
{
rewrite
-
Hm
lookup_proper
;
[|
apply
proto_unfold_fold
]
.
by
rewrite
lookup_delete
.
}
rewrite
lookup_proper
;
[|
apply
proto_unfold_fold
]
.
eapply
IH
;
[|
done
]
.
rewrite
-
Hm
(
proto_unfold_fold
(
delete
i
m
))
.
by
rewrite
lookup_delete
.
}
eapply
IH
;
[|
done
]
.
rewrite
-
Hm
.
rewrite
proto_unfold_fold
.
by
apply
:
delete_subset
.
by
apply
:
delete_subset
.
}
}
rewrite
/
proto_end
in
H
.
rewrite
/
proto_end
in
H
.
subst
.
rewrite
Hm
in
H'
.
rewrite
-
H'
in
H
.
by
rewrite
-
(
proto_fold_unfold
m'
)
.
rewrite
-
H'
in
H
.
rewrite
-
(
proto_fold_unfold
m'
)
.
done
.
Qed
.
Qed
.
Global
Instance
proto_inhabited
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
:
Global
Instance
proto_inhabited
{
V
}
`{
!
Cofe
PROPn
,
!
Cofe
PROP
}
:
...
@@ -216,6 +198,7 @@ Proof.
...
@@ -216,6 +198,7 @@ Proof.
-
iIntros
"Heq"
.
rewrite
-
{
2
}(
proto_fold_unfold
(
proto_message
_
_))
.
-
iIntros
"Heq"
.
rewrite
-
{
2
}(
proto_fold_unfold
(
proto_message
_
_))
.
iRewrite
"Heq"
.
by
rewrite
proto_fold_unfold
.
}
iRewrite
"Heq"
.
by
rewrite
proto_fold_unfold
.
}
rewrite
/
proto_message
!
proto_unfold_fold
.
rewrite
/
proto_message
!
proto_unfold_fold
.
rewrite
gmap_singleton_equivI
/=.
rewrite
gmap_singleton_equivI
/=.
rewrite
discrete_fun_equivI
.
rewrite
discrete_fun_equivI
.
by
setoid_rewrite
ofe_morO_equivI
.
by
setoid_rewrite
ofe_morO_equivI
.
...
...
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