Words32.inc_val: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/proofs/lib/words32.bend as Words32 Lines 30-34 of bend-collections-laws-math@1.0.0.0/proofs/lib/words32.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/words32.bend&start_line=30&end_line=34 import Base import bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend as L import bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend as WD import bend-collections-laws-math@1.0.0.0/proofs/lib/u32div.bend as UD def inc_val(+one: Nat, +h1: {one == 1n : Nat}, +i: U32, +h: {Nat.is_lt(1n+UD.v(i), WD.sc(32n, one)) == True{} : Bool}) -> {UD.v(U32.inc(i)) == 1n+UD.v(i) : Nat}: match i: case U32{+w}: +hw = L.subst(Nat, z => {Nat.is_lt(1n+z, WD.sc(32n, one)) == True{} : Bool}, UD.v(U32{w}), WD.uw(32n, w), UD.vw(w), h) Equal.trans(Nat, UD.v(U32{Word.inc(32n, w)}), WD.uw(32n, Word.inc(32n, w)), 1n+UD.v(U32{w}), UD.vw(Word.inc(32n, w)), Equal.trans(Nat, WD.uw(32n, Word.inc(32n, w)), 1n+WD.uw(32n, w), 1n+UD.v(U32{w}), WD.inc_exact(32n, one, h1, w, hw), Equal.cong(Nat, Nat, z => 1n+z, WD.uw(32n, w), UD.v(U32{w}), Equal.sym(Nat, UD.v(U32{w}), WD.uw(32n, w), UD.vw(w))))) 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=Equal.cong 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.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.inc https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.inc https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend&name=subst https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/u32div.bend&name=v https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/u32div.bend&name=vw https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend&name=inc_exact https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend&name=sc https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend&name=uw