Natural.inv_fin: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/natural.bend as Natural Lines 314-321 of bend-collections@1.0.0.0/src/math/natural.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/natural.bend&start_line=314&end_line=321 import Base def inv_fin(+m: Nat, bz: Bezout) -> Result<&2, &2, MathError, Nat>: match bz: case BZ{1n, s}: Done{Nat.mod(s, m)} case BZ{0n, s}: Fail{NotInvertible{}} case BZ{2n+g, s}: Fail{NotInvertible{}} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/natural.bend&name=Bezout https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/natural.bend&name=MathError