I'm pretty new to Idris and I'm trying to catch the basic concepts and syntax.
Even if it may sound pointless, I'm trying to define a half
function which is halving a natural.
I wish to come up with something like:
half : (n : Nat) -> (k : Nat) -> (n = k + k) -> (k : Nat)
but of course it's not working. Specifically I get:
error: expected: dependent type signature
half : (n : Nat) -> (k : Nat) -> (n = k + k) -> (k : Nat)
Is it possible?
Thanks.