How it is called function application in such way that $g(f(x))=f(x)$ ? Some kind of function invariance ? And are there any rules how to find such $g_n(x)$ functions in function space preferably the whole set applicable to $f(x)$ ?
For example, in Hilbert space it can be found, that (Dirac notation): $$ \{|A\rangle \langle A|\}~^n = |A\rangle \langle A| ,\tag 1 $$
assuming that ket $|A \rangle$ and bra $\langle A|$ are normalized vectors. So in this example $g(x)=x^n,$ where $x$ is linear operator $|A\rangle \langle A|$. Are there any more forms of such invariant functions $g(x)$ here in this sample ?
P.S. For illustration purposes of (1) you can take $n=2$ case, as an example to see what happens : $$ \{|A\rangle \langle A|\}~^2 = |A\rangle \langle A|A\rangle \langle A|\ = |A\rangle \langle A| \tag 2,$$
because inner product $\langle A|A\rangle = 1$ for unit vectors.
Thanks