Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Actris
Commits
3b2fe797
Commit
3b2fe797
authored
Jun 28, 2019
by
Robbert Krebbers
Browse files
iLob supports 14 args now!
parent
d51bf170
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/examples/list_sort_elem.v
View file @
3b2fe797
...
...
@@ -179,10 +179,8 @@ Section list_sort_elem.
list_sort_service_merge
c
#
y1
c1
c2
{{{
RET
#()
;
c
↣
END
@
N
∗
c1
↣
END
@
N
∗
c2
↣
END
@
N
}}}.
Proof
.
iIntros
(
Hxs
Hys
Hsort
Htl
Htl_le
Ψ
).
iRevert
(
Htl_le
).
(* This is stupid, iLob need to support > 12 arguments *)
iL
ö
b
as
"IH"
forall
(
c1
c2
xs1
xs2
ys
y1
ys1
ys2
Hxs
Hys
Hsort
Htl
).
iIntros
(
Htl_le
)
"(Hc & Hc1 & Hc2) HΨ"
.
iIntros
(
Hxs
Hys
Hsort
Htl
Htl_le
Ψ
)
"(Hc & Hc1 & Hc2) HΨ"
.
iL
ö
b
as
"IH"
forall
(
c1
c2
xs1
xs2
ys
y1
ys1
ys2
Hxs
Hys
Hsort
Htl
Htl_le
).
wp_rec
.
wp_pures
.
rewrite
(
tail_protocol_unfold
xs
).
...
...
@@ -201,7 +199,7 @@ Section list_sort_elem.
wp_apply
(
send_proto_spec
N
with
"Hc"
)=>
//=.
iExists
y1
.
iSplit
;
first
done
.
iSplit
;
first
done
.
iIntros
"!> Hc"
.
wp_apply
(
"IH"
with
"[%] [%] [%] [%] [%]
[$
Hc
$
Hc2
$
Hc1
]
"
).
wp_apply
(
"IH"
with
"[%] [%] [%] [%] [%] Hc Hc2 Hc1"
).
{
by
rewrite
comm
.
}
{
by
rewrite
assoc
(
comm
_
ys2
)
Hys
.
}
{
by
apply
Sorted_snoc
.
}
...
...
@@ -215,7 +213,7 @@ Section list_sort_elem.
iExists
x
.
iSplit
;
first
done
.
iSplit
.
{
iPureIntro
.
auto
with
lia
.
}
iIntros
"!> Hc"
.
wp_apply
(
"IH"
with
"[% //] [%] [%] [%] [%]
[$
Hc
$
Hc1
$
Hc2
]
[$]"
).
wp_apply
(
"IH"
with
"[% //] [%] [%] [%] [%] Hc Hc1 Hc2 [$]"
).
{
by
rewrite
Hys
assoc
.
}
{
apply
Sorted_snoc
;
auto
with
lia
.
}
{
constructor
.
lia
.
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment