Let $M$ denote a monoid and suppose we're given a function $[-] : M \rightarrow M$ satisfying $[a[b]c] = [abc].$ Then:
Proposition 0. $[-]$ is idempotent.
Proof. Take $a=c=1$).
Proposition 1. The set of fixed points of $[-]$ becomes a monoid with identity $[1]$ and multiplication $a,b \mapsto [ab]$.
Proof.
Associativity: $[[ab]c] = [abc] = [a[bc]]$
Left-identity: $[[1]a] = [1a] = [a] = a$
Right-identity: $[a[1]] = [a1] = [a] = a$
Question. What are functions satisfying this condition called?
I'm also interested in higher-categorical generalizations.