Fixed.saturated: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as Fixed Lines 76-82 of bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend&start_line=76&end_line=82 import Base import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C # r is n when n fits w bits, and the largest w-bit value otherwise def saturated(+w: Nat, +n: Nat, +r: Nat, ok: Bool) -> Bool: match ok: case True{}: Nat.is_eq(r, n) case False{}: Bool.and(C.fits(w, r), Bool.not(C.fits(w, 1n+r))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/spec/lib/common.bend&name=fits