diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-02-14 16:13:54 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-02-14 16:13:54 -0500 |
commit | c878697de62f713803d42e404918e57b6db92343 (patch) | |
tree | 502fa07294e8e99927a5266e0a9460b8fa83d127 | |
parent | f18fdcb2e0d1ef4ce1cf5892dec99909126af129 (diff) |
Add list proof.
-rw-r--r-- | Ch10.idr | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -21,5 +21,11 @@ mySplitIsTakeDrop (S k) [] = Refl mySplitIsTakeDrop (S k) (x::xs) = let rec = mySplitIsTakeDrop k xs in rewrite rec in Refl + +takeDropIsIdentity : (n : Nat) -> (input : List a) -> take n input ++ drop n input = input +takeDropIsIdentity Z input = Refl +takeDropIsIdentity (S k) [] = Refl +takeDropIsIdentity (S k) (x :: xs) = + rewrite takeDropIsIdentity k xs in Refl takeN : (n : Nat) -> (input : List a) -> TakeN input |