def lw_mul
bend-collections-laws-math@1.0.0.0 · proofs/math/natural/lists.bend:161
import bend-collections-laws-math@1.0.0.0/proofs/math/natural/lists.bend as Lists
import Base
import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as M
import bend-collections-laws-math@1.0.0.0/proofs/math/natural/lcm.bend as LC
161def lw_mul(+m: Nat, +xs: List<&2, Nat>, +ks: List<&2, Nat>, +acc: Nat, +ka: Nat) -> Nat:
162 match xs ks:
163 case Nil{} Nil{}:
164 ka
165 case Nil{} Con{k, kt}:
166 ka
167 case Con{x, t} Nil{}:
168 0n
169 case Con{+x, +t} Con{+k, +kt}:
170 lw_mul(m, t, kt, M.lcm(acc, x), LC.lcm_dw(acc, x, m, ka, k))