def lt_not_le

bendtorch-core@0.1.0.0 · src/tensor/signed_PROOF.bend:287

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

287# b < a gives a <= b false.
288def lt_not_le(+b: Nat, +a: Nat, h: {Nat.is_lt(b, a) == True{} : Bool}) -> {Nat.is_le(a, b) == False{} : Bool}:
289  match b:
290    case 0n:
291      match a:
292        case 0n:
293          Empty.absurd({Nat.is_le(0n, 0n) == False{} : Bool}, Arith.clash(h))
294        case 1n+q:
295          {==}
296    case 1n+p:
297      match a:
298        case 0n:
299          Empty.absurd({Nat.is_le(0n, 1n+p) == False{} : Bool}, Arith.clash(h))
300        case 1n+q:
301          lt_not_le(p, q, h)

Uses (6)

Used by (1)