def inv_fin
import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as Naturalimport Base
314def inv_fin(+m: Nat, bz: Bezout) -> Result<&2, &2, MathError, Nat>:
315 match bz:
316 case BZ{1n, s}:
317 Done{Nat.mod(s, m)}
318 case BZ{0n, s}:
319 Fail{NotInvertible{}}
320 case BZ{2n+g, s}:
321 Fail{NotInvertible{}}
Uses (5)
Used by (7)
- bend-collections-laws-math@1.0.0.0/src/math/natural:mod_inverse
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/inverse:done_bz
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/inverse:fail_bz
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:fin2
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:finsim
- …