def lt_succ_right

bendtorch-core@0.1.0.0 · src/tensor/contracts/build_facts.bend:37

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

37def lt_succ_right(+b: Nat, +k: Nat, h: {Nat.is_lt(b, k) == True{} : Bool}) -> {Nat.is_lt(b, 1n+k) == True{} : Bool}:
38  match b k:
39    case 0n _:
40      {==}
41    case 1n+p 0n:
42      Empty.absurd({Nat.is_lt(1n+p, 1n) == True{} : Bool}, Arith.clash(h))
43    case 1n+p 1n+q:
44      lt_succ_right(p, q, h)

Uses (5)

Used by (2)