There is a property of binary operations (functions from $\mathbb{S}^2$ to $\mathbb{S}$ for an arbirtary set $\mathbb{S}$) that I'm trying to figure out whether or not it is preserved. The cleanest way I know to describe it is:
A function $f:\mathbb{S}^2\to\mathbb{S}$ has property $\varphi$ if it is either injective or constant in both the initial and final directions. By this I mean that $f$ has a property in the initial direction if the function $f_{init}(s) = f(s, t)$ has this property for any fixed choice of $t\in\mathbb{S}$, and has a property in the final direction if $f_{final}(t) = f(s, t)$ for fixed $s\in\mathbb{S}$ has the property.
To be clear, a function can be $\varphi$ if it is constant in one direction but injective in the other. What I want to prove is that if $f, g, h:\mathbb{S}^2\to\mathbb{S}$ are all $\varphi$, then the composition $f(g(s, t), h(s, t))$ will also be $\varphi$. This holds trivially for $\mathbb{S}$ of sizes 0 and 1, and I've proven it with a little effort for $\mathbb{S}$ of sizes 2 and 3, but the proofs that I've found rely on doing a little Sodoku with an nxn grid and then reasoning about jumping around on it. I'd like to know if there's a better way to reason about this property, to prove which sizes of set it holds over.
Also, I haven't been able to look up much of anything about this property, because I have no idea what it's called and there seems to be a dearth of information about composing binary operations online (at least on the parts of "online" my Google-fu can reach). So you get bonus points for giving me search terms or references to related topics, because I have no idea what part of mathematics I've wandered into at this point.
EDIT: So this was originally inspired by the Wikipedia article on Functional Completeness, which lists five properties of n-ary operations on sets of size 2 that are preserved under composition, one of which is "The affine connectives, such that each connected variable either always or never affects the truth value these connectives return". I'm working on specifically 2-ary operations on a set of size 3 for something right now, and I was trying to generalize this property to larger arities. Unfortunately, this is either the only place the word "affine" is used this way, or I'm too dumb to see what this has to do with the normal definition.
With some help from a friend, I've found a triplet of operations on $\mathbb{S}=\{0, 1, 2, 3\}$ that are all $\varphi$ such that $f(g, h)$ is not $\varphi$. Specifically, let $g(a, b)=h(a, b)=a$. Then g and h are injective in the initial direction and constant in the final direction. Let f be the function represented by the grid:
Then $f(g(a, b), h(a, b))$ is 0 if a is 0 or 1, and 1 if a is 2 or 3, which is neither injective nor constant in the initial direction. You can generalize this to any set of size larger than 4 by just looking at the behavior of 4 points that work like this case. Therefore, $\varphi$ is only preserved for sets of size 3 and below.
I still don't know what the actual names are for any of this stuff, I'd love to see comments if anyone does!