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
Rodolphe Lepigre
Iris
Commits
6b5909ef
Commit
6b5909ef
authored
May 30, 2016
by
Robbert Krebbers
Browse files
Local updates for option.
parent
aead381e
Changes
1
Hide whitespace changes
Inline
Side-by-side
algebra/cmra.v
View file @
6b5909ef
...
...
@@ -1143,6 +1143,21 @@ Section option.
Proof
.
intros
.
destruct
mx
;
apply
_
.
Qed
.
(** Updates *)
Global
Instance
option_local_fmap_update
L
Lv
:
LocalUpdate
Lv
L
→
LocalUpdate
(
λ
mx
,
if
mx
is
Some
x
then
Lv
x
else
False
)
(
fmap
L
).
Proof
.
split
;
first
apply
_
.
intros
n
[
x
|]
[
z
|]
;
constructor
;
by
eauto
using
(
local_updateN
L
).
Qed
.
Global
Instance
option_local_const_update
Lv
y
:
LocalUpdate
Lv
(
λ
_
,
y
)
→
LocalUpdate
(
λ
mx
,
if
mx
is
Some
x
then
Lv
x
else
False
)
(
λ
_
,
Some
y
).
Proof
.
split
;
first
apply
_
.
intros
n
[
x
|]
[
z
|]
;
constructor
;
by
eauto
using
(
local_updateN
(
λ
_
,
y
)).
Qed
.
Lemma
option_updateP
(
P
:
A
→
Prop
)
(
Q
:
option
A
→
Prop
)
x
:
x
~~>
:
P
→
(
∀
y
,
P
y
→
Q
(
Some
y
))
→
Some
x
~~>
:
Q
.
Proof
.
...
...
Write
Preview
Supports
Markdown
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