Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Sammler
iris-coq
Commits
6acc1682
Commit
6acc1682
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Extensionality property for fmap on lists in terms of dist.
parent
b5e8ab4e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algebra/list.v
+5
-2
5 additions, 2 deletions
algebra/list.v
with
5 additions
and
2 deletions
algebra/list.v
+
5
−
2
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment