ProofShift.ns.sub_le: def of bend-osdev-word64@0.1.1.0 Import: import bend-osdev-word64@0.1.1.0/proof_shift.bend as ProofShift Lines 74-82 of bend-osdev-word64@0.1.1.0/proof_shift.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&start_line=74&end_line=82 import Base import bend-osdev-u32@0.1.0.0/LAWS.bend as UL import bend-osdev-u32@0.1.0.0/LAWS_order.bend as UO # n - k <= n def ns.sub_le(n: Nat, k: Nat) -> {Nat.is_le(Nat.sub(n, k), n) == True{} : Bool}: match n k: case 0n _: {==} case 1n+ +p 0n: UL.nat_le_refl(1n+p) case 1n+ +p 1n+ +q: UO.nat_le_trans(Nat.sub(p, q), p, 1n+p, ns.sub_le(p, q), ns.le_succ_self(p)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=nat_le_refl https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS_order.bend&name=nat_le_trans https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&name=ns.le_succ_self