ProofU32.uq.inc_w: def of bend-osdev-algo@0.1.0.0 Import: import bend-osdev-algo@0.1.0.0/proof_u32.bend as ProofU32 Lines 498-508 of bend-osdev-algo@0.1.0.0/proof_u32.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&start_line=498&end_line=508 import Base def uq.inc_w(n: Nat, w: Word(n), h: {Nat.is_lt(1n+Word.to_nat(n, w), uq.pw(n)) == True{} : Bool}) -> {Word.to_nat(n, Word.inc(n, w)) == 1n+Word.to_nat(n, w) : Nat}: match n: case 0n: Empty.absurd({Word.to_nat(0n, Word.inc(0n, w)) == 1n+Word.to_nat(0n, w) : Nat}, uq.ft(h)) case 1n+ +p: match w: case WCon{False{}, t}: {==} case WCon{True{}, +t}: +x = Word.to_nat(p, t) uq.double_cong(Word.to_nat(p, Word.inc(p, t)), 1n+x, uq.inc_w(p, t, Equal.trans(Bool, Nat.is_lt(1n+x, uq.pw(p)), Nat.is_lt(Nat.double(1n+x), Nat.double(uq.pw(p))), True{}, Equal.sym(Bool, Nat.is_lt(Nat.double(1n+x), Nat.double(uq.pw(p))), Nat.is_lt(1n+x, uq.pw(p)), uq.lt_dbl(1n+x, uq.pw(p))), h))) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.double https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.inc https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.to_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.double_cong https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.ft https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.lt_dbl https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.pw