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
semantics-course
Commits
73e86fad
Commit
73e86fad
authored
Dec 14, 2021
by
Lennard Gäher
Browse files
move rule
parent
99126c39
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/axiomatic/hoare.v
View file @
73e86fad
...
...
@@ -101,15 +101,6 @@ Proof.
-
eauto
.
Qed
.
Lemma
hoare_value'
P
v
:
{{
P
}}
v
{{
w
,
P
∗
⌜
w
=
v
⌝
}}.
Proof
.
eapply
hoare_con
;
last
apply
hoare_value
with
(
Φ
:
=
(
λ
v'
,
P
∗
⌜
v'
=
v
⌝
)%
I
).
-
etrans
;
first
apply
ent_sep_true
.
rewrite
ent_sep_comm
.
apply
ent_sep_split
;
first
done
.
by
apply
ent_prove_pure
.
-
done
.
Qed
.
Lemma
hoare_rec
P
Φ
f
x
e
v
:
({{
P
}}
subst'
x
v
(
subst'
f
(
rec
:
f
x
:
=
e
)
e
)
{{
Φ
}})
→
{{
P
}}
(
rec
:
f
x
:
=
e
)%
V
v
{{
Φ
}}.
...
...
@@ -419,6 +410,15 @@ Check ent_sep_assoc.
Check
ent_pointsto_sep
.
Check
ent_exists_sep
.
Lemma
hoare_value'
P
v
:
{{
P
}}
v
{{
w
,
P
∗
⌜
w
=
v
⌝
}}.
Proof
.
eapply
hoare_con
;
last
apply
hoare_value
with
(
Φ
:
=
(
λ
v'
,
P
∗
⌜
v'
=
v
⌝
)%
I
).
-
etrans
;
first
apply
ent_sep_true
.
rewrite
ent_sep_comm
.
apply
ent_sep_split
;
first
done
.
by
apply
ent_prove_pure
.
-
done
.
Qed
.
(** Note: the separating conjunction can be typed with `\sep` *)
...
...
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