def succ_le_lt

bend-collections-laws-crypto@1.0.0.0 · proofs/lib/nat.bend:125

import bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend as Nat
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/logic.bend as L

125def succ_le_lt(+a: Nat, +b: Nat, e: {Nat.is_le(1n+a, b) == True{} : Bool}) -> {Nat.is_lt(a, b) == True{} : Bool}:
126  match a b:
127    case _ 0n:
128      Empty.absurd({Nat.is_lt(a, 0n) == True{} : Bool}, L.false_true(e))
129    case 0n 1n+q:
130      {==}
131    case 1n+p 1n+q:
132      succ_le_lt(p, q, e)

Uses (6)

Used by (16)