Let $A=\lbrace0,1\rbrace$. There are 16 distinct functions $f\_i:A^2\to A$.

Choose a permutation $P=\left(a\_1,\ldots,a\_4\right)$ of the elements of $A^2$, and for each $i$ consider the ordered quadruple $\left(\sum\_{j=1}^nf\_i(a\_j)\pmod2\right)\_{n=1}^4\in A^4$. Clearly this quadruple is $f\_k(P)$ for some $k$. I claim that as $i$ ranges over $\left(1,\ldots,16\right)$ we obtain all sixteen $f\_k$ this way.

(My proof is by inspecting a single choice of $P$ — which I did manually — and handwavingly claiming that the choice of $P$ doesn't matter because everything's symmetric.)

Question: *Why* is this true? (Something (a proof not by inspection or an explanation) that generalizes would be most welcome.)