def lt_le_succ

bendtorch-core@0.1.0.0 · src/tensor/slice_PROOF.bend:150

import bendtorch-core@0.1.0.0/src/tensor/slice_PROOF.bend as SlicePROOF
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

150def lt_le_succ(+r: Nat, +s: Nat, h: {Nat.is_lt(r, s) == True{} : Bool}) -> {Nat.is_le(1n+r, s) == True{} : Bool}:
151  match r s:
152    case 0n 0n:
153      Empty.absurd({Nat.is_le(1n, 0n) == True{} : Bool}, Arith.clash(h))
154    case 0n 1n+q:
155      Arith.le_zero(q)
156    case 1n+p 0n:
157      Empty.absurd({Nat.is_le(2n+p, 0n) == True{} : Bool}, Arith.clash(h))
158    case 1n+p 1n+q:
159      lt_le_succ(p, q, h)

Uses (7)

Used by (1)