Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dan Frumin
ReLoC-v1
Commits
16fd1249
Commit
16fd1249
authored
Dec 07, 2017
by
Dan Frumin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
An alternative proof of the closure refinement
parent
2620cc4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
theories/examples/various.v
theories/examples/various.v
+29
-3
No files found.
theories/examples/various.v
View file @
16fd1249
...
...
@@ -10,6 +10,32 @@ Section refinement.
Context
`
{
logrelG
Σ
}
.
Notation
D
:=
(
prodC
valC
valC
-
n
>
iProp
Σ
).
Lemma
refinement1
'
Γ
:
Γ
⊨
let:
"x"
:=
ref
#
1
in
(
λ
:
"f"
,
"f"
#();;
!
"x"
)
≤
log
≤
(
λ
:
"f"
,
"f"
#();;
#
1
)
:
((
Unit
→
Unit
)
→
TNat
)
%
F
.
Proof
.
iIntros
(
Δ
).
rel_alloc_l
as
x
"Hx"
.
rel_let_l
.
iMod
(
inv_alloc
(
nroot
.
@
"xinv"
)
_
(
x
↦ᵢ
#
1
)
%
I
with
"Hx"
)
as
"#Hinv"
.
iApply
bin_log_related_rec
;
auto
.
iAlways
.
cbn
.
iApply
(
bin_log_related_seq
);
auto
.
-
iApply
bin_log_related_app
;
last
by
iApply
bin_log_related_unit
.
iApply
bin_log_related_var
.
apply
lookup_insert
.
-
rel_load_l_atomic
.
iInv
(
nroot
.
@
"xinv"
)
as
"Hx"
"Hcl"
.
iModIntro
.
iExists
_
;
iFrame
"Hx"
;
simpl
.
iNext
.
iIntros
"Hx"
.
iMod
(
"Hcl"
with
"Hx"
)
as
"_"
.
iApply
bin_log_related_nat
.
Qed
.
Lemma
refinement1
Γ
:
Γ
⊨
let:
"x"
:=
ref
#
1
in
...
...
@@ -92,12 +118,12 @@ Section refinement.
+
rel_load_l_atomic
.
iInv
shootN
as
"[[[Hx >Hp] | [Hx Hs']] Hy]"
"Hcl"
.
{
iExFalso
.
iApply
(
shot_not_pending
with
"Hs Hp"
).
}
iModIntro
.
iExists
_
;
iFrame
.
iNext
.
iModIntro
.
iExists
_
;
iFrame
.
iNext
.
simpl
.
iIntros
"Hx"
.
rel_load_r
.
iMod
(
"Hcl"
with
"[-]"
).
iMod
(
"Hcl"
with
"[-]"
)
as
"_"
.
{
iNext
.
iFrame
.
iRight
;
by
iFrame
.
}
rel_vals
;
eauto
.
iApply
bin_log_related_nat
.
-
iMod
(
"Hcl"
with
"[$Hy Hx]"
)
as
"_"
.
{
iNext
.
iRight
.
by
iFrame
.
}
iApply
(
bin_log_related_seq
with
"[Hf]"
);
auto
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment