summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2017-02-14 16:13:54 -0500
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2017-02-14 16:13:54 -0500
commitc878697de62f713803d42e404918e57b6db92343 (patch)
tree502fa07294e8e99927a5266e0a9460b8fa83d127
parentf18fdcb2e0d1ef4ce1cf5892dec99909126af129 (diff)
Add list proof.
-rw-r--r--Ch10.idr6
1 files changed, 6 insertions, 0 deletions
diff --git a/Ch10.idr b/Ch10.idr
index 9ab70ce..075aba4 100644
--- a/Ch10.idr
+++ b/Ch10.idr
@@ -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