def above_false

bendtorch-core@0.1.0.0 · src/tensor/contracts/matmul_parallel_proof.bend:143

import bendtorch-core@0.1.0.0/src/tensor/contracts/matmul_parallel_proof.bend as MatmulParallelProof
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

143# k < b gives b < 1 + k false.
144def above_false(+k: Nat, +b: Nat, h: {Nat.is_lt(k, b) == True{} : Bool}) -> {Nat.is_lt(b, 1n+k) == False{} : Bool}:
145  match k b:
146    case 0n 0n:
147      Empty.absurd({Nat.is_lt(0n, 1n) == False{} : Bool}, Arith.clash(h))
148    case 0n 1n+q:
149      lt_zero_false(q)
150    case 1n+p 0n:
151      Empty.absurd({Nat.is_lt(0n, 1n+(1n+p)) == False{} : Bool}, Arith.clash(h))
152    case 1n+p 1n+q:
153      above_false(p, q, h)

Uses (6)

Used by (1)