Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rice Wine
Iris
Commits
6acc1682
Commit
6acc1682
authored
Aug 08, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensionality property for fmap on lists in terms of dist.
parent
b5e8ab4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
algebra/list.v
algebra/list.v
+5
-2
No files found.
algebra/list.v
View file @
6acc1682
...
...
@@ -81,13 +81,16 @@ End cofe.
Arguments
listC
:
clear
implicits
.
(** Functor *)
Lemma
list_fmap_ext_ne
{
A
}
{
B
:
cofeT
}
(
f
g
:
A
→
B
)
(
l
:
list
A
)
n
:
(
∀
x
,
f
x
≡
{
n
}
≡
g
x
)
→
f
<$>
l
≡
{
n
}
≡
g
<$>
l
.
Proof
.
intros
Hf
.
by
apply
Forall2_fmap
,
Forall_Forall2
,
Forall_true
.
Qed
.
Instance
list_fmap_ne
{
A
B
:
cofeT
}
(
f
:
A
→
B
)
n
:
Proper
(
dist
n
==>
dist
n
)
f
→
Proper
(
dist
n
==>
dist
n
)
(
fmap
(
M
:
=
list
)
f
).
Proof
.
intros
Hf
l
k
?
;
by
eapply
Forall2_fmap
,
Forall2_impl
;
eauto
.
Qed
.
Proof
.
intros
Hf
l
k
?
;
by
eapply
Forall2_fmap
,
Forall2_impl
;
eauto
.
Qed
.
Definition
listC_map
{
A
B
}
(
f
:
A
-
n
>
B
)
:
listC
A
-
n
>
listC
B
:
=
CofeMor
(
fmap
f
:
listC
A
→
listC
B
).
Instance
listC_map_ne
A
B
n
:
Proper
(
dist
n
==>
dist
n
)
(@
listC_map
A
B
).
Proof
.
intros
f
f'
?
l
;
by
apply
Forall2_fmap
,
Forall_Forall2
,
Forall_tru
e
.
Qed
.
Proof
.
intros
f
g
?
l
.
by
apply
list_fmap_ext_n
e
.
Qed
.
Program
Definition
listCF
(
F
:
cFunctor
)
:
cFunctor
:
=
{|
cFunctor_car
A
B
:
=
listC
(
cFunctor_car
F
A
B
)
;
...
...
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