ConstructProofs.scale_fits: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/shape/construct_proofs.bend as ConstructProofs Lines 27-32 of bendtorch-core@0.1.0.0/src/shape/construct_proofs.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/shape/construct_proofs.bend&start_line=27&end_line=32 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend as Nats def scale_fits(+p: Nat, +size: Nat, bound: Shape.LE(Nat.mul(1n+p, size), 1048576n)) -> {True{} == Bool.or(Nat.is_eq(size, 0n), Nat.is_le(1n+p, 1048576n)) : Bool}: match size: case 0n: {==} case 1n+q: Nats.le_true(1n+p, 1048576n, Nats.le_add_left(1n+p, Nat.mul(1n+p, q), 1048576n, Nats.le_rewrite(Nat.add(1n+p, Nat.mul(1n+p, q)), Nat.mul(1n+p, 1n+q), 1048576n, Nats.mul_succ_right(1n+p, q), bound))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or 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.mul https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=LE https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend&name=le_add_left https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend&name=le_rewrite https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend&name=le_true https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend&name=mul_succ_right