Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
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
Tej Chajed
iris
Commits
e2e7baaa
Commit
e2e7baaa
authored
1 year ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
clarify gmap_view_rel explanation
parent
48a75b16
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/algebra/lib/gmap_view.v
+16
-9
16 additions, 9 deletions
iris/algebra/lib/gmap_view.v
with
16 additions
and
9 deletions
iris/algebra/lib/gmap_view.v
+
16
−
9
View file @
e2e7baaa
...
...
@@ -29,20 +29,27 @@ Section rel.
Implicit
Types
(
m
:
gmap
K
V
)
(
k
:
K
)
(
v
:
V
)
(
n
:
nat
)
.
Implicit
Types
(
f
:
gmap
K
(
dfrac
*
V
))
.
(* This is very similar to [auth] except that we do not require a unit,
and the authoritative fraction is "erased": instead of [dv ≼ (DfracOwn 1, v)],
we just say that [dv ≼ (_, v)] for *some* valid value in place of the
underscore, and we move to the reflexive closure via [Some dv ≼ Some (_, v)].
This ensures that if [dv.1] is the full fraction, we get the right behavior:
there is no frame, and hence [dv.2 ≡ v]. At the same time it allows
[dv.1 = DfracDiscarded], which would be ruled out by hard-coding [DfracOwn 1].
(* If we exactly followed [auth], we'd write something like [f ≼{n} m ∧ ✓{n} m],
which is equivalent to:
[map_Forall (λ k fv, ∃ v, m !! k = Some v ∧ Some fv ≼{n} Some v ∧ ✓{n} v) f].
(Note the use of [Some] in the inclusion; the elementwise RA might not have a
unit and we want a reflexive relation!) However, [f] and [m] do not have the
same type, so this definition does not type-check: the fractions have been
erased from the authoritative [m]. So we additionally quantify over the erased
fraction [dq] and [(dq, v)] becomes the authoritative value.
An alternative definition one might consider is to replace the erased fraction
by a hard-coded [DfracOwn 1], the biggest possible fraction. That would not
work: we would end up with [Some dv ≼{n} Some (DfracOwn 1, v)] but that cannot
be satisfied if [dv.1 = DfracDiscarded], a case that we definitely want to
allow!
It is possible that [∀ k, ∃ dq, let auth := (pair dq) <$> m !! k in ✓{n} auth
∧ f !! k ≼{n} auth] would also work, but now the proofs are all done already. ;)
The two are probably equivalent, with a proof similar to [lookup_includedN]? *)
Local
Definition
gmap_view_rel_raw
n
m
f
:=
map_Forall
(
λ
k
d
v
,
∃
v
dq
,
m
!!
k
=
Some
v
∧
✓
{
n
}
(
dq
,
v
)
∧
(
Some
d
v
≼
{
n
}
Some
(
dq
,
v
)))
f
.
map_Forall
(
λ
k
f
v
,
∃
v
dq
,
m
!!
k
=
Some
v
∧
✓
{
n
}
(
dq
,
v
)
∧
(
Some
f
v
≼
{
n
}
Some
(
dq
,
v
)))
f
.
Local
Lemma
gmap_view_rel_raw_mono
n1
n2
m1
m2
f1
f2
:
gmap_view_rel_raw
n1
m1
f1
→
...
...
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