def nt.le_trans

bend-osdev-u32@0.1.0.0 · PROOF_order.bend:395

import bend-osdev-u32@0.1.0.0/PROOF_order.bend as PROOFOrder
import Base

395def nt.le_trans(x: Nat, y: Nat, z: Nat, h1: {Nat.is_le(x, y) == True{} : Bool}, h2: {Nat.is_le(y, z) == True{} : Bool}) -> {Nat.is_le(x, z) == True{} : Bool}:
396  match x y z:
397    case 0n _ _:
398      match z:
399        case 0n:
400          {==}
401        case 1n+zp:
402          {==}
403    case 1n+xp 0n _:
404      Empty.absurd({Nat.is_le(1n+xp, z) == True{} : Bool}, ab.ft(h1))
405    case 1n+xp 1n+yp 0n:
406      Empty.absurd({Nat.is_le(1n+xp, 0n) == True{} : Bool}, ab.ft(h2))
407    case 1n+xp 1n+yp 1n+zp:
408      nt.le_trans(xp, yp, zp, h1, h2)

Uses (5)

Used by (1)