diff options
author | Pierre Letouzey <pierre.letouzey@inria.fr> | 2015-04-09 14:46:37 +0200 |
---|---|---|
committer | Pierre Letouzey <pierre.letouzey@inria.fr> | 2015-04-09 14:46:37 +0200 |
commit | 429f493997e34bfaac930c68bf6b267a5b9640ee (patch) | |
tree | 28f15d0aeff2ce899a312f31e10fe2030b2dd813 /theories/Lists | |
parent | aeec29a177e8f1c89996c0449e4cd81ca3ca4377 (diff) | |
parent | eaa3f9719d6190ba92ce55816f11c70b30434309 (diff) |
Merge branch 'v8.5' into trunk
Diffstat (limited to 'theories/Lists')
-rw-r--r-- | theories/Lists/List.v | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/theories/Lists/List.v b/theories/Lists/List.v index 85e364c01..1783085fc 100644 --- a/theories/Lists/List.v +++ b/theories/Lists/List.v @@ -1014,11 +1014,17 @@ Proof. rewrite IHl; auto. Qed. +Lemma map_ext_in : + forall (A B : Type)(f g:A->B) l, (forall a, In a l -> f a = g a) -> map f l = map g l. +Proof. + induction l; simpl; auto. + intros; rewrite H by intuition; rewrite IHl; auto. +Qed. + Lemma map_ext : forall (A B : Type)(f g:A->B), (forall a, f a = g a) -> forall l, map f l = map g l. Proof. - induction l; simpl; auto. - rewrite H; rewrite IHl; auto. + intros; apply map_ext_in; auto. Qed. |