Suppose $f$ is a function defined for all tuples on a set $S$, with the result also in $S$.
(Something like $f: \bigcup \{S, S\times S, S \times S \times S, \cdots \} \rightarrow S$.)
I will use $f(a, b, c, \cdots )$ to denote $f((a, b, c, \cdots))$, where $(a, b, c, \cdots )$ is a tuple, and $a, b, c, \cdots \in S$.
For example, we can choose $f = \gcd$ defined on tuples of integers (so $S = \mathbb{Z}$). In this case, $f(m, n, ...) = \gcd{(m, n, \cdots)}$.
Is there a name for such functions that also satisfy the following identity?
$$f(a, b) = f(f(a), f(b))$$
(Or, how can I find out more about functions with this property?)
If $f(x) = x$ the situation is boring. Examples include the GCD, LCM, sum, product, min and max on tuples of integers; $\max(a, b) = \max(\max(a), \max(b))$.
However, if $f(x) \neq x$ in general, it is more interesting. Here are some less trivial examples:
- $f$ defined is on a tuple of rectangles, and gives the smallest rectangle (a square) that can contain each rectangle and a 90-degree rotated copy.
- $f$ defined is on a tuple of rectangles, and gives the biggest rectangle (a square) that can fit in each rectangle and a 90-degree rotated copy.
I'm interested in this because of two other candidates for $f$ is "smallest square tileable by each argument (rectangle)", and "biggest square that can tile each argument (rectangle)".
If these are indeed functions with this property, then we can find the smallest square tileable by two rectangles. $R(m, n)$ is a rectangle with width $m$ and height $n$.
$$\begin{align} f(R(m, n), R(k, \ell)) &= f(f(R(m, n)), f(R(k, \ell))\\ &=f(R(mn/d, mn/d), R(k\ell/e, k\ell/e))\\ &=R(mnk\ell/cde, mnk\ell/cde) \end{align}, $$ where $d = \gcd{(m, n)}$, $e = \gcd{(k, \ell)}$, and $c = \gcd{\left(\frac{mn}{d}, \frac{k\ell}{e}\right)}$.
(Note that all four examples that involve rectangles are 2D versions of the 1D examples I gave first.)
Regardless of whether this is actually true, I would like to know if there is some algebraic property like this that has been studied.