Source/Packages

Std.Natural

packages/foundation/standard/src/Std/Natural.alpha

335 lines48 declarations13.5 KiBSHA-256 0a0af2339e6a

def · lines 141–155

naturalModulo

Full file
141def naturalModulo =
142  (lambda unrestricted value : Nat . unrestricted divisor : Nat .
143    nat-eliminate
144      (lambda unrestricted current : Nat . family NaturalModuloResult)
145      (constructor
146        NaturalModuloResult
147        NaturalModuloFailed
148        (constructor NaturalArithmeticErrorCode NaturalArithmeticModuloByZero))
149      (lambda unrestricted predecessor : Nat .
150        unrestricted induction : (family NaturalModuloResult) .
151        constructor
152          NaturalModuloResult
153          NaturalModuloSucceeded
154          (naturalModuloUnchecked value divisor))
155      divisor)

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.