Pure ternary operator is a function $T:A\times A\times A \to A$ such that for every pair of binary operators $f,g:A\times A \to A$ and for each of the following inequalities
- $f(g(x,y),z) \ne T(x,y,z)$
- $f(x,g(y,z)) \ne T(x,y,z)$
there is a triplet $x,y,z\in A$ for which the inequality holds
Basically I cannot replace T with two binary operators in a simple composition. Such ternary functions exist (for the set of size two): $$T(1,0,0)=1 \quad T(0,0,0)=0 \quad T(0,1,0)=1 \quad T(1,0,1)=1 \quad T(0,1,1)=0 \\ T(1,1,1)=0\;or\; 1 \quad T(1,1,0) = 0 \quad T(0,0,1)=1 \quad $$
Lets rule out the possibility the inner binary function is applied on the left two elements. Then the outer function has for the zero as its right argument two possible outcomes, so the inner function has to map the left(1,0) and (0,1) to the same element. But if that is true, than (1,0,1) and (0,1,1) needs to be mapped on the same element, but they are not.
The possibility of the inner function being applied on the right two elements can't happen neither. (0,1,0) and (0,1,1) have different images, but (0,1,0) and (0,0,1) have the same image, so the right (1,0) and (0,1) has to be mapped identically. That would imply (1,1,0) and (1,0,1) have the same image, but they do not. So no matter what operators I choose, I cannot use them in "simple" composition to obtain this ternary operator. Hope my proof is correct.
And such a way of constructing the "pure ternary" function could be (I think) applied for larger sets as well. I tried to google more information about it, but I was unsuccessful. Mostly I ended it up on topic related to Are all n-ary operators simply compositions of binary operators? . But I am interested only in this kind of composition.
So my question: Is there a way to calculate (without going through all possibilities) the number of "pure ternary" operators on a set of size $n$?
I really do not know how to approach this.
EDIT: Example of such a operator is incorrect, it works for a different definition. Please I will try to make correction, but I need some time, I was playing with for too long and lost it.
EDIT2: Based on Bram28 comment I changed the definition. I have been actually working with this definition anyway. This more strict version should be feasible at least on constructing the examples.