diff options
author | Camil Staps | 2015-03-18 13:05:33 +0100 |
---|---|---|
committer | Camil Staps | 2015-03-18 13:05:33 +0100 |
commit | e038bd97c96eef24418d63dd236116073205ad56 (patch) | |
tree | beed4a030685bd52c227e2b67193a728763990d4 /week6/camil/9.4.1 | |
parent | Added comments (diff) |
Put w6 in format
Diffstat (limited to 'week6/camil/9.4.1')
-rw-r--r-- | week6/camil/9.4.1 | 23 |
1 files changed, 0 insertions, 23 deletions
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 |