diff options
author | Enrico Tassi <gareuselesinge@debian.org> | 2015-07-15 10:36:12 +0200 |
---|---|---|
committer | Enrico Tassi <gareuselesinge@debian.org> | 2015-07-15 10:36:12 +0200 |
commit | 0aa2544d04dbd4b6ee665b551ed165e4fb02d2fa (patch) | |
tree | 12e8931a4a56da1a1bdfb89d670f4ba38fe08e1f /theories/Lists/List.v | |
parent | cec4741afacd2e80894232850eaf9f9c0e45d6d7 (diff) |
Imported Upstream version 8.5~beta2+dfsgupstream/8.5_beta2+dfsg
Diffstat (limited to 'theories/Lists/List.v')
-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 3cba090f..ea07a849 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. |