def lt_pos

bend-collections-laws-math@1.0.0.0 · proofs/math/random/wrappers.bend:256

import bend-collections-laws-math@1.0.0.0/proofs/math/random/wrappers.bend as Wrappers
import Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as N

256def lt_pos(+a: Nat, +b: Nat, +h: {Nat.is_lt(a, b) == True{} : Bool}) -> {Nat.is_lt(0n, Nat.sub(b, a)) == True{} : Bool}:
257  match a b:
258    case _ 0n:
259      Empty.absurd({Nat.is_lt(0n, Nat.sub(0n, a)) == True{} : Bool}, N.lt_zero_absurd(a, h))
260    case 0n 1n+q:
261      {==}
262    case 1n+p 1n+q:
263      lt_pos(p, q, h)

Uses (6)

Used by (1)