aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Lists
diff options
context:
space:
mode:
authorGravatar bertot <bertot@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-08-19 09:28:36 +0000
committerGravatar bertot <bertot@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-08-19 09:28:36 +0000
commit05ba7289d4fc9b3b816ecbfabc76656107ee1015 (patch)
tree4d6924574f34d1c9154075027b0563daa8ba6e02 /theories/Lists
parent4e8967788669ad3f06497b46640c687e9525c0e3 (diff)
adds a property on map
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12285 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Lists')
-rw-r--r--theories/Lists/List.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/theories/Lists/List.v b/theories/Lists/List.v
index dca217d50..9add5f48d 100644
--- a/theories/Lists/List.v
+++ b/theories/Lists/List.v
@@ -1128,6 +1128,12 @@ Section Map.
End Map.
+Lemma map_id : forall (A :Type) (l : list A),
+ map (fun x => x) l = l.
+Proof.
+ induction l; simpl; auto; rewrite IHl; auto.
+Qed.
+
Lemma map_map : forall (A B C:Type)(f:A->B)(g:B->C) l,
map g (map f l) = map (fun x => g (f x)) l.
Proof.