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
FP
Stacked Borrows Coq
Commits
8f14a12f
Commit
8f14a12f
authored
Jul 07, 2019
by
Ralf Jung
Browse files
show that vrel etc are persistent
parent
41993800
Changes
2
Hide whitespace changes
Inline
Side-by-side
theories/opt/ex1.v
View file @
8f14a12f
...
...
@@ -59,6 +59,8 @@ Proof.
Admitted
.
(
**
Top
-
level
theorem
:
Two
programs
that
only
differ
in
the
"ex1"
function
are
related
.
*
)
Lemma
ex1
(
prog
:
fn_env
)
:
stuck_decidable
→
has_main
prog
→
...
...
@@ -73,3 +75,5 @@ Proof.
-
exact
:
ex1_sim_body
.
-
(
*
FIXME
:
Needs
reflexivity
.
*
)
Admitted
.
Print
Assumptions
ex1
.
theories/sim/invariant.v
View file @
8f14a12f
...
...
@@ -13,7 +13,6 @@ Qed.
(
*
TODO
:
define
viewshift
*
)
(
**
Public
scalar
relation
*
)
(
*
No
case
for
poison
*
)
Definition
arel
(
r
:
resUR
)
(
s1
s2
:
scalar
)
:
Prop
:=
match
s1
,
s2
with
|
ScPoison
,
ScPoison
=>
True
...
...
@@ -257,3 +256,32 @@ Qed.
Lemma
wsat_heap_dom
r
σ
s
σ
t
:
wsat
r
σ
s
σ
t
→
dom
(
gset
loc
)
σ
t
.(
shp
)
≡
dom
(
gset
loc
)
σ
s
.(
shp
).
Proof
.
intros
(
?&?&?&?&?&?&?
).
by
eapply
srel_heap_dom
.
Qed
.
Lemma
arel_persistent
r
a1
a2
:
arel
r
a1
a2
→
arel
(
core
r
)
a1
a2
.
Proof
.
destruct
a1
,
a2
;
try
done
.
simpl
.
destruct
tg
;
last
done
.
intros
(
<-
&
<-
&
[
h
Hlk
]).
split
;
first
done
.
split
;
first
done
.
exists
(
core
h
).
move
:
Hlk
.
destruct
r
as
[[
tmap
cmap
]
lmap
].
change
(
core
(
tmap
,
cmap
,
lmap
))
with
(
core
tmap
,
core
cmap
,
core
lmap
).
rewrite
/
rtm
/=
.
rewrite
lookup_core
=>->
.
rewrite
/
core
/
core
'
/=
.
rewrite
{
1
}/
pcore
/
cmra_pcore
/=
.
rewrite
/
prod_pcore
//.
Qed
.
Lemma
vrel_persistent
r
v1
v2
:
vrel
r
v1
v2
→
vrel
(
core
r
)
v1
v2
.
Proof
.
rewrite
/
vrel
=>
Hrel
.
eapply
Forall2_impl
;
first
done
.
eauto
using
arel_persistent
.
Qed
.
Lemma
vrel_list_persistent
r
vl1
vl2
:
Forall2
(
vrel
r
)
vl1
vl2
→
Forall2
(
vrel
(
core
r
))
vl1
vl2
.
Proof
.
intros
Hrel
.
eapply
Forall2_impl
;
first
done
.
eauto
using
vrel_persistent
.
Qed
.
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