Lists.gw_nth: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists.bend as Lists Lines 72-80 of bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists.bend&start_line=72&end_line=80 import Base import bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend as M import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/gcd.bend as G # the quotient (xs[i]) / gcd_all_go(xs, acc) def gw_nth(+xs: List<&2, Nat>, +acc: Nat, +i: Nat) -> Nat: match xs i: case Nil{} i0: 0n case Con{+x, +t} 0n: Nat.mul(G.wr(G.ws(x, acc, x)), gw_acc(t, M.gcd(acc, x))) case Con{+x, +t} 1n+ +j: gw_nth(t, M.gcd(acc, x), j) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/gcd.bend&name=wr https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/gcd.bend&name=ws https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists.bend&name=gw_acc https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend&name=gcd