BendTensors.VecT.depth.go: def of bend-tensors@0.0.0.2 Import: import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors Lines 1191-1200 of bend-tensors@0.0.0.2/bend_tensors.bend: https://jend.leeeet.dev/read.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&start_line=1191&end_line=1200 import Base # the smallest n with 4 * 2^n >= m; the fuel is m itself, log2(m) steps def VecT.depth.go(fuel: Nat, +n: Nat, +cap: Nat, +m: Nat, lt: Bool) -> Nat: match fuel lt: case _ False{}: n case 0n _: n case 1n+f True{}: +cap2 = Nat.add(cap, cap) VecT.depth.go(f, 1n+n, cap2, m, Nat.is_lt(cap2, m)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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_lt