Created
September 17, 2018 13:46
-
-
Save robstewart57/fab94a8c69320f99017bd67ddccf65c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ones : List Nat -> List Nat | |
ones = map (const 1) | |
f : (input:List Nat) -> (sum (ones input) = length input) | |
f input = case input of | |
[] => Refl | |
(x::xs) => ?hole |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, so
List
is recursive, and you usually prove stuff about such types also in a recursive manner. You've done the corner case of[]
, now you prove by induction (basically a dependent version of recursion) - assumef xs
and use it to provef (x :: xs)
somehow. Try writinglet fx = f xs in ?hole
.