def le_lt_succ

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

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

107def le_lt_succ(+a: Nat, +b: Nat, e: {Nat.is_le(a, b) == True{} : Bool}) -> {Nat.is_lt(a, 1n+b) == True{} : Bool}:
108  match a b:
109    case 0n _:
110      {==}
111    case 1n+p 0n:
112      Empty.absurd({Nat.is_lt(1n+p, 1n) == True{} : Bool}, L.false_true(e))
113    case 1n+p 1n+q:
114      le_lt_succ(p, q, e)

Uses (6)

Used by (14)