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
FP
Stacked Borrows Coq
Commits
bcb97508
Commit
bcb97508
authored
Jul 07, 2019
by
Ralf Jung
Browse files
Merge branch 'master' of gitlab.mpi-sws.org:FP/stacked-borrows
parents
8f14a12f
aec339fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/sim/instance.v
View file @
bcb97508
...
...
@@ -39,21 +39,58 @@ Proof.
rewrite
lookup_insert_ne
//.
Qed
.
Lemma
sim_local_body_insert
fs
ft
fns
fnt
x
r
n
es
et
σ
s
σ
t
Φ
(
FRESH
:
fs
!!
x
=
None
)
(
HOLD
:
sim_local_funs_lookup
fs
ft
)
:
⊨ᶠ
{
fs
,
ft
}
fns
≥
fnt
→
r
⊨
{
n
,
fs
,
ft
}
(
es
,
σ
s
)
≥
(
et
,
σ
t
)
:
Φ
→
r
⊨
{
n
,
<
[
x
:=
fns
]
>
fs
,
<
[
x
:=
fnt
]
>
ft
}
(
es
,
σ
s
)
≥
(
et
,
σ
t
)
:
Φ
.
Proof
.
intros
FUN
.
revert
r
n
es
et
σ
s
σ
t
Φ
.
pcofix
CIH
.
intros
r1
n
es
et
σ
s
σ
t
Φ
SIM
.
punfold
SIM
.
pfold
.
intros
NT
r_f
WSAT
.
have
NT2
:
never_stuck
fs
es
σ
s
.
{
admit
.
}
specialize
(
SIM
NT2
r_f
WSAT
)
as
[
NS
TE
ST
].
split
.
-
destruct
NS
as
[
|
RED
];
[
by
left
|
].
right
.
admit
.
-
intros
vt
Eqvt
.
specialize
(
TE
_
Eqvt
)
as
(
vs
'
&
σ
s
'
&
r
'
&
n
'
&
STEPS
'
&
WSAT
'
&
H
Φ
).
exists
vs
'
,
σ
s
'
,
r
'
,
n
'
.
split
;
last
split
;
[
|
done
..].
{
destruct
STEPS
'
as
[
STEPS
'
|
];
[
|
by
right
].
left
.
admit
.
}
-
inversion
ST
.
+
constructor
1.
intros
et
'
σ
t
'
STEPT
.
have
STEPT2
:
(
et
,
σ
t
)
~{
ft
}~>
(
et
'
,
σ
t
'
).
{
admit
.
}
specialize
(
STEP
_
_
STEPT2
)
as
(
vs
'
&
σ
s
'
&
r
'
&
n
'
&
STEPS
'
&
WSAT
'
&
CONT
).
exists
vs
'
,
σ
s
'
,
r
'
,
n
'
.
split
;
last
split
;
[
|
done
|
].
{
admit
.
}
pclearbot
.
right
.
by
apply
CIH
.
+
econstructor
2
;
eauto
.
{
instantiate
(
1
:=
Ks
).
admit
.
}
intros
r
'
vs
vt
σ
s
'
σ
t
'
VREL
'
WSAT
'
STACK
'
.
specialize
(
CONT
r
'
vs
vt
σ
s
'
σ
t
'
VREL
'
WSAT
'
STACK
'
)
as
[
n
'
CONT
].
exists
n
'
.
pclearbot
.
right
.
by
apply
CIH
.
Admitted
.
Lemma
sim_local_funs_insert
fns
fnt
x
fs
ft
:
length
fns
.(
fun_b
)
=
length
fnt
.(
fun_b
)
→
fs
!!
x
=
None
→
(
*
FIXME
:
add
notation
for
this
.
Probably
replacing
⊨ᶠ
.
*
)
(
∀
fs
ft
,
sim_local_funs_lookup
fs
ft
→
⊨ᶠ
{
fs
,
ft
}
fns
≥
fnt
)
→
sim_local_funs
wsat
vrel
fs
ft
end_call_sat
→
sim_local_funs
wsat
vrel
(
<
[
x
:=
fns
]
>
fs
)
(
<
[
x
:=
fnt
]
>
ft
)
end_call_sat
.
Proof
.
intros
?
Hnew
Hold
.
intros
f
fn_src
.
intros
?
?
Hnew
Hold
.
intros
f
fn_src
.
destruct
(
decide
(
x
=
f
))
as
[
->|
Hne
].
-
rewrite
lookup_insert
=>
[
=?
].
subst
.
exists
fnt
.
rewrite
lookup_insert
.
split
;
first
done
.
split
;
first
done
.
apply
Hnew
.
apply
sim_local_funs_lookup_insert
;
first
done
.
exact:
sim_local_funs_to_lookup
.
-
rewrite
lookup_insert_ne
// =>Hlk.
destruct
(
Hold
_
_
Hlk
)
as
(
f_tgt
&
?
&
?
&
?
).
exists
f_tgt
.
destruct
(
Hold
_
_
Hlk
)
as
(
f_tgt
&
?
&
?
&
Hf
).
exists
f_tgt
.
rewrite
lookup_insert_ne
//. split; first done.
split
;
first
done
.
Admitted
.
have
?
:
sim_local_funs_lookup
fs
ft
by
eapply
sim_local_funs_to_lookup
.
intros
r
es
et
vs
vt
σ
s
σ
t
VREL
SUBS
SUBT
.
specialize
(
Hf
r
es
et
vs
vt
σ
s
σ
t
VREL
SUBS
SUBT
)
as
[
n
Hf
].
exists
n
.
apply
sim_local_body_insert
;
[
done
..
|
by
apply
Hnew
|
done
].
Qed
.
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