def gt.lt_sum

bend-osdev-gf@0.1.1.0 · proof_tab.bend:156

import bend-osdev-gf@0.1.1.0/proof_tab.bend as ProofTab
import Base

156# a < m and b < n, so a + b < m + n
157def gt.lt_sum(+a: Nat, +m: Nat, +b: Nat, +n: Nat, ha: {Nat.is_lt(a, m) == True{} : Bool}, +hb: {Nat.is_lt(b, n) == True{} : Bool}) -> {Nat.is_lt(Nat.add(a, b), Nat.add(m, n)) == True{} : Bool}:
158  match a m:
159    case 0n _:
160      gt.lt_add_left(m, b, n, hb)
161    case 1n+p 0n:
162      Empty.absurd({Nat.is_lt(Nat.add(1n+p, b), n) == True{} : Bool}, gt.ft(ha))
163    case 1n+p 1n+q:
164      gt.lt_sum(p, q, b, n, ha, hb)

Uses (7)

Used by (2)