def lt_succ

stelliferous@0.0.2.0 · proofs/nat_order.bend:305

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

305# Order structure shared by padding, allocation and mixed-radix indexing.
306def lt_succ(+a: Nat,+b: Nat,h: {Nat.is_le(a,b) == True{} : Bool}) -> {Nat.is_lt(a,1n+b) == True{} : Bool}:
307  match a b:
308    case 0n 0n:
309      {==}
310    case 0n 1n+b:
311      {==}
312    case 1n+a 0n:
313      Empty.absurd({Nat.is_lt(1n+a,1n) == True{} : Bool},WordEncoding.false_true(h))
314    case 1n+a 1n+b:
315      lt_succ(a,b,h)

Uses (6)

Used by (4)