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
Rice Wine
Iris
Commits
49e3e00f
Commit
49e3e00f
authored
Nov 22, 2016
by
Ralf Jung
Browse files
prove fmap_Some_setoid
parent
a7e91677
Changes
1
Hide whitespace changes
Inline
Side-by-side
prelude/option.v
View file @
49e3e00f
...
...
@@ -180,6 +180,16 @@ 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_setoid
{
A
B
}
`
{
Equiv
B
}
`
{!
Equivalence
((
≡
)
:
relation
B
)}
(
f
:
A
→
B
)
mx
y
:
f
<$>
mx
≡
Some
y
↔
∃
x
,
mx
=
Some
x
∧
y
≡
f
x
.
Proof
.
destruct
mx
;
simpl
;
split
.
-
intros
?%
Some_equiv_inj
.
eauto
.
-
intros
(?
&
->%
Some_inj
&
?).
constructor
.
done
.
-
intros
?%
symmetry
%
equiv_None
.
done
.
-
intros
(?
&
?
&
?).
done
.
Qed
.
Lemma
fmap_None
{
A
B
}
(
f
:
A
→
B
)
mx
:
f
<$>
mx
=
None
↔
mx
=
None
.
Proof
.
by
destruct
mx
.
Qed
.
Lemma
option_fmap_id
{
A
}
(
mx
:
option
A
)
:
id
<$>
mx
=
mx
.
...
...
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