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
Terraform modules
Monitor
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
Gaëtan Gilbert
Iris
Commits
21f1f9e3
Commit
21f1f9e3
authored
1 year ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Tweak proofs.
parent
941beab9
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
iris_heap_lang/lib/rw_lock.v
+11
-16
11 additions, 16 deletions
iris_heap_lang/lib/rw_lock.v
with
11 additions
and
16 deletions
iris_heap_lang/lib/rw_lock.v
+
11
−
16
View file @
21f1f9e3
...
...
@@ -64,26 +64,21 @@ Class rwlock `{!heapGS_gen hlc Σ} := RwLock {
}
.
Global
Hint
Mode
rwlock
+
+
+
:
typeclass_instances
.
Global
Instance
is_rw_lock_contractive
`{
!
heapGS_gen
hlc
Σ
,
!
rwlock
}
γ
lk
:
∀
n
,
Proper
(
pointwise_relation
_
(
dist_later
n
)
==>
dist
n
)
(
is_rw_lock
γ
lk
)
.
Global
Instance
is_rw_lock_contractive
`{
!
heapGS_gen
hlc
Σ
,
!
rwlock
}
γ
lk
n
:
Proper
(
pointwise_relation
_
(
dist_later
n
)
==>
dist
n
)
(
is_rw_lock
γ
lk
)
.
Proof
.
intros
n
Φ1
Φ2
HΦ
.
set
(
Φ1'
:=
λ
ne
(
q
:
leibnizO
Qp
),
Φ1
q
)
.
set
(
Φ2'
:=
λ
ne
(
q
:
leibnizO
Qp
),
Φ2
q
)
.
assert
(
Next
Φ1'
≡
{
n
}
≡
Next
Φ2'
)
as
HΦ'
.
{
constructor
=>
m
?
q
/=.
specialize
(
HΦ
q
)
.
by
eapply
dist_later_dist_lt
.
}
clear
HΦ
.
revert
n
HΦ'
.
eapply
(
uPred
.
internal_eq_entails
(
M
:=
iResUR
Σ
))
.
rewrite
later_equivI
.
iIntros
"#HΦ"
.
iApply
prop_ext
.
iModIntro
.
iSplit
;
iIntros
"H"
;
iApply
(
is_rw_lock_iff
with
"H"
);
iIntros
"!> !> %q"
.
all
:
rewrite
ofe_morO_equivI
;
iSpecialize
(
"HΦ"
$!
q
)
.
all
:
change
(
Φ1
q
)
with
(
Φ1'
q
);
change
(
Φ2
q
)
with
(
Φ2'
q
)
.
all
:
iRewrite
"HΦ"
;
auto
.
assert
(
Contractive
(
is_rw_lock
γ
lk
:
(
Qp
-
d
>
iPropO
Σ
)
→
_))
as
Hcontr
.
{
apply
(
uPred
.
contractive_internal_eq
(
M
:=
iResUR
Σ
));
iIntros
(
Φ1
Φ2
)
"#HΦ"
.
rewrite
discrete_fun_equivI
.
iApply
plainly
.
prop_ext_2
;
iIntros
"!>"
;
iSplit
;
iIntros
"H"
;
iApply
(
is_rw_lock_iff
with
"H"
);
iIntros
"!> !>"
(
q
);
iRewrite
(
"HΦ"
$!
q
);
auto
.
}
intros
Φ1
Φ2
HΦ
.
apply
Hcontr
.
dist_later_intro
.
apply
HΦ
.
Qed
.
Global
Instance
is_rw_lock_proper
`{
!
heapGS_gen
hlc
Σ
,
!
rwlock
}
γ
lk
:
Proper
(
pointwise_relation
_
(
≡
)
==>
(
≡
))
(
is_rw_lock
γ
lk
)
.
Proof
.
intros
Φ1
Φ2
HΦ
.
apply
equiv_dist
=>
n
.
apply
is_rw_lock_contractive
=>
q
.
constructor
=>
m
_
.
move
:
(
HΦ
q
)
=>
/
equiv_dist
.
auto
.
intros
Φ1
Φ2
HΦ
.
apply
equiv_dist
=>
n
.
apply
is_rw_lock_contractive
=>
q
.
dist_later_intro
.
apply
equiv_dist
,
HΦ
.
Qed
.
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