This is a follow-up question to this MO question, which was asked by Richard Stanley in a comment to my answer there.

Let $S$ be a commutative monoid and $f(x_1, \dots, x_n)$ be a function from $S^n$ to $S$. Given a partition $\alpha$ of $[n]$, we say that $f$ *factors with respect to $\alpha$*, if for each $A \in \alpha$ there exists a function $f_A$ (which only depends on the variables $x_i$ for $i \in A$) such that $f=\prod_{A \in \alpha} f_A$. Given two partitions $\alpha$ and $\beta$ of $[n]$, $a \wedge b$ is the partition of $[n]$ whose sets are the non-empty sets of the form $A \cap B$ for $A \in \alpha$ and $B \in \beta$.

Question.Is it true that if $f$ factors with respect to both $\alpha$ and $\beta$, then $f$ also factors with respect to $\alpha \wedge \beta$?

My answer to the linked question shows that the answer is **yes** if $S$ is a group, but the proof uses the fact that inverses exist. My proof also works for non-abelian groups (as long as you are careful what factoring means), but for this question I am happy to assume that $S$ is commutative.