def sub_lt

stelliferous@0.0.2.0 · proofs/nat_order.bend:213

import stelliferous@0.0.2.0/proofs/nat_order.bend as NatOrder
import Base
import stelliferous@0.0.2.0/proofs/word_encoding.bend as WordEncoding

213def sub_lt(+a: Nat,+b: Nat,+c: Nat,order: {Nat.is_le(b,a) == True{} : Bool},bound: {Nat.is_lt(a,Nat.add(b,
214        c)) == True{} : Bool}) -> {Nat.is_lt(Nat.sub(a,b),c) == True{} : Bool}:
215  match a b:
216    case 0n 0n:
217      bound
218    case 0n 1n+b:
219      Empty.absurd({Nat.is_lt(0n,c) == True{} : Bool},WordEncoding.false_true(order))
220    case 1n+a 0n:
221      bound
222    case 1n+a 1n+b:
223      sub_lt(a,b,c,order,bound)

Uses (8)

Used by (2)