ProofNum.FITSU: law of lawful-fields@0.1.1.0 Import: import lawful-fields@0.1.1.0/proof_num.bend as ProofNum Lines 224-235 of lawful-fields@0.1.1.0/proof_num.bend: https://jend.leeeet.dev/read.txt?path=lawful-fields@0.1.1.0/proof_num.bend&start_line=224&end_line=235 import Base # num's test on words is the test on numbers (c the constant, q its value). law FITSU: for +acc: U32 for +x: U32 for +c: U32 for +q: Nat for +M: Nat for +hcq: {U32.to_nat(c) == q : Nat} for +hq: {Nat.add(Nat.mul(q, 10n), 6n) == M : Nat} for +hge: {U32.is_ge(x, 48) == True{} : Bool} for +hle: {U32.is_le(x, 57) == True{} : Bool} {Bool.or(U32.is_lt(acc, c), Bool.and(U32.is_eq(acc, c), U32.is_le(U32.sub(x, 48), 5))) == Nat.is_lt(Nat.add(Nat.mul(U32.to_nat(acc), 10n), Nat.sub(U32.to_nat(x), 48n)), M) : Bool} Uses (24): 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.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/proof_num.bend&name=FITS0 https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/proof_num.bend&name=ed48 https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/proof_num.bend&name=k9 https://jend.leeeet.dev/definition.txt?path=lawful-words@0.1.0.0/proof_u32.bend&name=is_eq_to_nat https://jend.leeeet.dev/definition.txt?path=lawful-words@0.1.0.0/proof_u32.bend&name=is_le_to_nat https://jend.leeeet.dev/definition.txt?path=lawful-words@0.1.0.0/proof_u32.bend&name=is_lt_to_nat