Merge pull request #159 from ska80/integral-nat

Add an implementation of Integral for Nat
This commit is contained in:
Edwin Brady 2019-12-07 15:26:50 +00:00 committed by GitHub
commit 0c4301d1c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,11 @@ export
divCeil : Nat -> Nat -> Nat
divCeil x (S y) = divCeilNZ x (S y) SIsNotZ
public export
Integral Nat where
div = divNat
mod = modNat
export
gcd : (a: Nat) -> (b: Nat) -> {auto ok: NotBothZero a b} -> Nat
gcd a Z = a
@ -410,5 +415,3 @@ multOneRightNeutral (S left) =
let inductiveHypothesis = multOneRightNeutral left in
rewrite inductiveHypothesis in
Refl