From e038bd97c96eef24418d63dd236116073205ad56 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 18 Mar 2015 13:05:33 +0100 Subject: Put w6 in format --- week6/camil/9.4.1 | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 week6/camil/9.4.1 (limited to 'week6/camil/9.4.1') diff --git a/week6/camil/9.4.1 b/week6/camil/9.4.1 deleted file mode 100644 index d9b2608..0000000 --- a/week6/camil/9.4.1 +++ /dev/null @@ -1,23 +0,0 @@ -9.4.1 - proof by induction over as - -Induction base: - Suppose as = []. Then we have: - - map f (as ++ bs) // assumption as = [] - = map f ([] ++ bs) // definition of ++, rule 1 - = map f bs // definition of ++, rule 1 - = [] ++ (map f bs) // definition of map, rule 3 - = (map f []) ++ (map f bs) // assumption as = [] - = (map f as) ++ (map f bs). - -Induction step: - Suppose map f (as ++ bs) = (map f as) ++ (map f bs) for certain as and any bs (induction hypothesis). Then we have: - - map f ([a:as] ++ bs) // definition of ++, rule 2 - = map f [a:as ++ bs] // definition of map, rule 4 - = [f a : map f (as ++ bs)] // induction hypothesis: assumption map f (as ++ bs) = (map f as) ++ (map f bs) - = [f a : (map f as) ++ (map f bs)] // rewriting list - = [f a : map f as] ++ (map f bs) // definition of map, rule 4 - = (map f [a:as]) ++ (map f bs). - -By the principle of induction we have now proven that map f (as ++ bs) = (map f as) ++ (map f bs) for any finite lists as, bs. \ No newline at end of file -- cgit v1.2.3