Lists.gw_dvd: 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 95-105 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=95&end_line=105 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 gcd_all_go(xs, acc) / d for a common divisor d def gw_dvd(+xs: List<&2, Nat>, +ks: List<&2, Nat>, +acc: Nat, +ka: Nat) -> Nat: match xs ks: case Nil{} Nil{}: ka case Nil{} Con{k, kt}: ka case Con{x, t} Nil{}: 0n case Con{+x, +t} Con{+k, +kt}: gw_dvd(t, kt, M.gcd(acc, x), G.dw(x, acc, x, ka, k)) Uses (4): 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=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/gcd.bend&name=dw https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend&name=gcd