mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-30 22:05:32 +03:00
Merge pull request #159 from ska80/integral-nat
Add an implementation of Integral for Nat
This commit is contained in:
commit
0c4301d1c2
@ -214,6 +214,11 @@ export
|
|||||||
divCeil : Nat -> Nat -> Nat
|
divCeil : Nat -> Nat -> Nat
|
||||||
divCeil x (S y) = divCeilNZ x (S y) SIsNotZ
|
divCeil x (S y) = divCeilNZ x (S y) SIsNotZ
|
||||||
|
|
||||||
|
public export
|
||||||
|
Integral Nat where
|
||||||
|
div = divNat
|
||||||
|
mod = modNat
|
||||||
|
|
||||||
export
|
export
|
||||||
gcd : (a: Nat) -> (b: Nat) -> {auto ok: NotBothZero a b} -> Nat
|
gcd : (a: Nat) -> (b: Nat) -> {auto ok: NotBothZero a b} -> Nat
|
||||||
gcd a Z = a
|
gcd a Z = a
|
||||||
@ -410,5 +415,3 @@ multOneRightNeutral (S left) =
|
|||||||
let inductiveHypothesis = multOneRightNeutral left in
|
let inductiveHypothesis = multOneRightNeutral left in
|
||||||
rewrite inductiveHypothesis in
|
rewrite inductiveHypothesis in
|
||||||
Refl
|
Refl
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user