All the others are just the many ways x^n can equal x (for all n>0) for various associative operators. Reusing 'f' for both the binary functions and the unary ones is needlessly misleading by the way, the unary f behaves more like x in the other examples.
And yes if you want R^2 = R then the condition only needs to hold for some y. It's related to transitivity.
I would only say that these are "isomorphic to" others; in the real world people do think of them differently, so it is important to enumerate them. And in particular people do think "the function", even though different the functions act differently.
(the real question is, did I ever see "left-idempotent" and "right-idempotent" somewhere?)
(x ⋅ x) ⋅ x
(x) ⋅ x
x ⋅ (x)
x ⋅ (x ⋅ x)
(y0 * x) * x ?= y0 * (x * x)
y1 * x ?= y0 * x
y2 ?= y1
y2 is not in general constrained to be the same as y1 otherwise.In CS we normally mean #4 though ... which can technically be thought of as a variation of #3 passing/returning "the whole universe" as an argument (and including the actual arguments in the implicit lambda capture), but thinking like that only makes sense for functional programmers.
That's not to say #3 and #1 are unrelated, though.
And for #1, what if "f" is a function that selects the first of the two arguments? Then the relation in #1 holds true for all values of 'x', but that doesn't feel like idempotency to me. And we definitely can't say that 'x' is idempotent. As 'x' defined to be "add1" wouldn't be idempotent according to the definition, but would pass the relation if "f" is fst().
I think #1 only holds under compose or 'f's that are similar to compose when 'x' is a function. And at that point you've added so many restrictions you've made definition 3. So I think I disagree with definition #1 as being a def of idempotency.
v = h (no longer f)
f = ∘
But when we're trying to bring clarity to the masses, remember that most people don't think in higher-order functions, so it is certainly necessary to state them separately.
1. a value `v` such that, for some pure binary function `f` (specified by context), `v === f(v, v)`
2. a pure binary function `g` such that, for all values `x`, `x === g(x, x)`
3. a pure unary function `h` such that, for all values `x`, `h(x) === h(h(x))`. Often this is formed as a partial evaluation of a binary function, as a relaxation of the previous kind.
4. a (non-pure) procedure that, when called with "the same" arguments (FSVO same), has no side-effects after the first time.
5. a binary relation `R` such that, for all values `x, z`, `R(x, z) <-> there exists some y such that R(x, y) AND R(y, z)`
(Edit: note before I clarified my variable names `v` used to be another `x`, and `g` and `h` both used to be another `f`)