Everyone knows the elegant way to express natural numbers on dependently typed functional languages:
data Nat = Zero | Succ Nat
Integer, Fraction, Real, Complex and Quaternion are, too, very important for practical programming application. One could implement them as:
data Integer = Integer (sign : Bool) (modulus : Nat)
data Fraction = Fraction (dividend : Nat) (divisor : Nat)
data Real = Real (exponent : Integer) (fraction : Nat)
data Complex = Complex Real Real
data Quaternion = Quaternion Real Real Real Real
But none of those really reflect the actual structure/nature of their types as meaningfully as Nats do. Integer isn't isomorphic to actual integers, for example (as Zero occurs twice). Reals needs more than a million of cells to store (3.141592), yet not even 100 to store (4096), which looks unbalanced. Complex is just a tuple of Reals, which doesn't really reflect what a Complex is. I wonder what is the natural, elegant way to express the numeric tower on functional programming languages?