Poly1305.canon: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/poly1305.bend as Poly1305 Lines 42-46 of bend-collections@1.0.0.0/spec/crypto/poly1305.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/poly1305.bend&start_line=42&end_line=46 import Base import bend-collections@1.0.0.0/spec/lib/common.bend as C # y < 2^130: y itself when y < p, else y - p = (y + 5) - 2^130. def canon(+y: Nat) -> Nat: match y: case 0n: 0n case 1n+z: pick(C.fits(130n, Nat.add(1n+z, 5n)), 1n+z, C.low(130n, Nat.add(1n+z, 5n))) 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.add https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/poly1305.bend&name=pick https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/lib/common.bend&name=fits https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/lib/common.bend&name=low