def below_true
bendtorch-core@0.1.0.0 · src/tensor/contracts/build_facts.bend:72
import bendtorch-core@0.1.0.0/src/tensor/contracts/build_facts.bend as BuildFacts
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
72def below_true(+b: Nat, +k: Nat, h: {Nat.is_le(1n+b, k) == True{} : Bool}) -> {Nat.is_lt(b, k) == True{} : Bool}:
73 match b k:
74 case 0n 0n:
75 Empty.absurd({Nat.is_lt(0n, 0n) == True{} : Bool}, Arith.clash(h))
76 case 0n 1n+q:
77 {==}
78 case 1n+p 0n:
79 Empty.absurd({Nat.is_lt(1n+p, 0n) == True{} : Bool}, Arith.clash(h))
80 case 1n+p 1n+q:
81 below_true(p, q, h)