def g_acc
bend-collections-laws-crypto@1.0.0.0 · proofs/math/natural/lists.bend:65
import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists.bend as Lists
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
import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lcm.bend as LC
65def g_acc(+xs: List<&2, Nat>, +acc: Nat) -> {acc == Nat.mul(gw_acc(xs, acc), M.gcd_all_go(xs, acc)) : Nat}:
66 match xs:
67 case Nil{}:
68 Equal.sym(Nat, Nat.mul(1n, acc), acc, LC.one_mul(acc))
69 case Con{+x, +t}:
70 dvd_trans(acc, M.gcd(acc, x), M.gcd_all_go(t, M.gcd(acc, x)), G.wl(G.ws(x, acc, x)), gw_acc(t, M.gcd(acc, x)), G.gcd_dvd_left(acc, x), g_acc(t, M.gcd(acc, x)))