add natural exponentiation
This commit is contained in:
parent
f0b2422711
commit
0994ae2940
@ -55,6 +55,11 @@ singletons [d|
|
|||||||
Z × m = Z
|
Z × m = Z
|
||||||
(S n) × m = (n × m) + m
|
(S n) × m = (n × m) + m
|
||||||
|
|
||||||
|
-- | Exponentiation
|
||||||
|
(^) ∷ ℕ → ℕ → ℕ
|
||||||
|
n ^ Z = (S Z)
|
||||||
|
n ^ (S m) = n × (n ^ m)
|
||||||
|
|
||||||
-- | Ordering relation <
|
-- | Ordering relation <
|
||||||
(<) ∷ ℕ → ℕ → 𝔹
|
(<) ∷ ℕ → ℕ → 𝔹
|
||||||
Z < Z = F
|
Z < Z = F
|
||||||
|
Loading…
Reference in New Issue
Block a user