Solution (source code)

= Solution

For finite <lists>, <Cartesian lifting of a binary operation to lists> preserves <associativity>. Both associations enumerate triples in the same order: the entry from `xs` changes slowest, then the entry from `ys`, then the entry from `zs` changes fastest. The results are respectively
$$
[(x\oplus y)\oplus z\mid x\leftarrow xs;\ y\leftarrow ys;\ z\leftarrow zs]
$$
and
$$
[x\oplus(y\oplus z)\mid x\leftarrow xs;\ y\leftarrow ys;\ z\leftarrow zs].
$$
<Associativity> makes corresponding entries equal; their order and multiplicity already agree. Empty <lists> make both sides empty. Therefore
$$
\boxed{(xs\,X_\oplus\,ys)\,X_\oplus\,zs=xs\,X_\oplus\,(ys\,X_\oplus\,zs).}
$$