Nat.agda 316 B

1234567891011121314151617181920212223
  1. module Nat where
  2. data Nat : Set where
  3. zero : Nat
  4. suc : Nat -> Nat
  5. infixl 60 _+_
  6. infixl 70 _*_
  7. _+_ : Nat -> Nat -> Nat
  8. n + zero = n
  9. n + suc m = suc (n + m)
  10. _*_ : Nat -> Nat -> Nat
  11. n * zero = zero
  12. n * suc m = n * m + n
  13. {-# BUILTIN NATURAL Nat #-}
  14. {-# BUILTIN NATPLUS _+_ #-}
  15. {-# BUILTIN NATTIMES _*_ #-}