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
Tej Chajed
stdpp
Commits
a7f54bc4
Commit
a7f54bc4
authored
Jan 16, 2018
by
Robbert Krebbers
Browse files
Add `fmap_Some_1` and `fmap_Some_2`.
parent
6117c3e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/option.v
View file @
a7f54bc4
...
...
@@ -183,6 +183,11 @@ Proof. unfold is_Some; destruct mx; naive_solver. Qed.
Lemma
fmap_Some
{
A
B
}
(
f
:
A
→
B
)
mx
y
:
f
<$>
mx
=
Some
y
↔
∃
x
,
mx
=
Some
x
∧
y
=
f
x
.
Proof
.
destruct
mx
;
naive_solver
.
Qed
.
Lemma
fmap_Some_1
{
A
B
}
(
f
:
A
→
B
)
mx
y
:
f
<$>
mx
=
Some
y
→
∃
x
,
mx
=
Some
x
∧
y
=
f
x
.
Proof
.
apply
fmap_Some
.
Qed
.
Lemma
fmap_Some_2
{
A
B
}
(
f
:
A
→
B
)
mx
x
:
mx
=
Some
x
→
f
<$>
mx
=
Some
(
f
x
).
Proof
.
intros
.
apply
fmap_Some
;
eauto
.
Qed
.
Lemma
fmap_Some_equiv
{
A
B
}
`
{
Equiv
B
}
`
{!
Equivalence
((
≡
)
:
relation
B
)}
(
f
:
A
→
B
)
mx
y
:
f
<$>
mx
≡
Some
y
↔
∃
x
,
mx
=
Some
x
∧
y
≡
f
x
.
...
...
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