Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
b368c861
Commit
b368c861
authored
Jun 04, 2019
by
Robbert Krebbers
Browse files
Avoid nonstdpp lemma `exists_last`.
parent
ccd42ca7
Pipeline
#17147
passed with stage
in 13 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Sidebyside
theories/heap_lang/lifting.v
View file @
b368c861
From
Coq
.
Lists
Require
Import
List
.
(* used for lemma "exists_last" *)
From
iris
.
algebra
Require
Import
auth
gmap
.
From
iris
.
base_logic
Require
Export
gen_heap
.
From
iris
.
base_logic
.
lib
Require
Export
proph_map
.
...
...
@@ 467,18 +466,18 @@ Proof.
(* TODO we should try to use a generic lifting lemma (and avoid [wp_unfold])
here, since this breaks the WP abstraction. *)
iIntros
(
A
He
)
"Hp WPe"
.
rewrite
!
wp_unfold
/
wp_pre
/=
He
.
simpl
in
*.
iIntros
(
σ
1
κ
κ
s
n
)
"[Hσ Hκ]"
.
destruct
(
decide
(
κ
=
[]))
as
[>
HNeq
]
.
iIntros
(
σ
1
κ
κ
s
n
)
"[Hσ Hκ]"
.
destruct
κ
as
[[
p'
[
w'
v'
]]
κ
'
_
]
using
rev_ind
.

iMod
(
"WPe"
$!
σ
1
[]
κ
s
n
with
"[$Hσ $Hκ]"
)
as
"[Hs WPe]"
.
iModIntro
.
iSplit
.
{
iDestruct
"Hs"
as
"%"
.
iPureIntro
.
destruct
s
;
[
by
apply
resolve_reducible

done
].
}
iIntros
(
e2
σ
2
efs
step
).
exfalso
.
apply
step_resolve
in
step
;
last
done
.
inversion
step
.
match
goal
with
H
:
?
κ
s
++
[
_
]
=
[]

_
=>
by
destruct
κ
s
end
.

apply
exists_last
in
HNeq
as
[
κ
'
[[
p'
[
w'
v'
]]
>]].
rewrite

app_assoc
.

rewrite

app_assoc
.
iMod
(
"WPe"
$!
σ
1
_
_
n
with
"[$Hσ $Hκ]"
)
as
"[Hs WPe]"
.
iModIntro
.
iSplit
.
{
iDestruct
"Hs"
as
"%"
.
iPureIntro
.
destruct
s
;
[
by
apply
resolve_reducible

done
].
}
{
iDestruct
"Hs"
as
%?
.
iPureIntro
.
destruct
s
;
[
by
apply
resolve_reducible

done
].
}
iIntros
(
e2
σ
2
efs
step
).
apply
step_resolve
in
step
;
last
done
.
inversion
step
;
simplify_list_eq
.
iMod
(
"WPe"
$!
(
Val
w'
)
σ
2
efs
with
"[%]"
)
as
"WPe"
.
{
eexists
[]
_
_
;
try
done
.
}
{
by
eexists
[]
_
_
.
}
iModIntro
.
iNext
.
iMod
"WPe"
as
"[[$ Hκ] WPe]"
.
iMod
(
proph_map_resolve_proph
p'
(
w'
,
v'
)
κ
s
with
"[$Hκ $Hp]"
)
as
(
vs'
>)
"[$ HPost]"
.
iModIntro
.
rewrite
!
wp_unfold
/
wp_pre
/=.
iDestruct
"WPe"
as
"[HΦ $]"
.
...
...
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