def successor

stelliferous@0.0.2.0 · proofs/nat_order.bend:158

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

158def successor(+a: Nat,+b: Nat,h: {Nat.is_le(a,b) == True{} : Bool}) -> {Nat.is_le(a,1n+b) == True{} : Bool}:
159  match a:
160    case 0n:
161      {==}
162    case 1n+ +p:
163      match b:
164        case 0n:
165          Empty.absurd({Nat.is_le(1n+p,1n) == True{} : Bool},WordEncoding.false_true(h))
166        case 1n+q:
167          successor(p,q,h)

Uses (5)

Used by (11)