{-# OPTIONS --safe #-}

module Data.Nat where

open import Agda.Builtin.Nat using (suc; zero) renaming (Nat to ) public

open import Literals.Number
open import Data.Unit

instance
  numberNat : Number 
  numberNat = record
    { Constraint = λ _  
    ; fromNat    = λ n  n
    }

open import Data.Bool

open import Agda.Builtin.Nat using (mod-helper; div-helper; _==_)

--           n mod (suc m) = mod-helper 0 m n m
-- n mod 2 = n mod (suc 1) = mod-helper 0 1 n 1


even :   Bool
even n = mod-helper 0 1 n 1 == 0

odd :   Bool
odd n = ! (even n)

div2 :   
div2 n = div-helper 0 1 n 1