NatOrder.by_contra: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/nat_order.bend as NatOrder Lines 233-241 of bend-kit-collections@0.1.4.1/nat_order.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&start_line=233&end_line=241 import Base import bend-mathlib@0.7.4.0/nat.bend as MNat # Proves x <= y from a refutation of y < x. def by_contra(x: Nat, y: Nat, k: LE(1n+y, x) -> Empty) -> LE(x, y): match x y: case 0n y: MNat.zero_le(y) case 1n+xp 0n: Empty.absurd(LE(1n+xp, 0n), k(MNat.zero_le(xp))) case 1n+xp 1n+yp: by_contra(xp, yp, k) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&name=LE https://jend.leeeet.dev/definition.txt?path=bend-mathlib@0.8.1.0/nat.bend&name=zero_le