# Idempotence

Idempotence is a term used in mathematics and computer science . In mathematics, an object that has the property with a link is called idempotent with respect to this link. An important special case are idempotent functions with regard to the sequential execution . Similarly, in computer science, a piece of program code that is executed several times in a row delivers the same result as with a single execution, is called idempotent. ${\ displaystyle a}$${\ displaystyle \ circ}$${\ displaystyle a \ circ a = a}$

## Definitions

### Idempotent elements

An element of a set is called idempotent with respect to a -digit link and if: ${\ displaystyle a}$${\ displaystyle X}$${\ displaystyle n}$ ${\ displaystyle v \ colon X ^ {n} \ rightarrow X, \, n \ in \ mathbb {N}}$${\ displaystyle n> 1,}$

${\ displaystyle v (a, \ dotsc, a) = a.}$

If is and the connection (as is common with multiplication in rings) is noted in power notation, the condition is written as ${\ displaystyle n = 2}$

${\ displaystyle a ^ {2} = a,}$

from which immediately

${\ displaystyle a ^ {n} = a}$ for all ${\ displaystyle n \ in \ mathbb {N}}$

follows, which explains the term idempotence (Latin for equal potency).

On the other hand , satisfies the equation for a one- digit link${\ displaystyle a}$ ${\ displaystyle f \ colon X \ rightarrow X}$

${\ displaystyle f (a) = a,}$

then is a fixed point of${\ displaystyle a}$${\ displaystyle f.}$

### Idempotent functions

A one- digit link or function is called idempotent if it is idempotent in terms of composition : ${\ displaystyle f \ colon \, X \ rightarrow X}$

${\ displaystyle f \ circ f = f,}$

d. H. for all results in a double application of the same value as the unique: . ${\ displaystyle x \ in X}$${\ displaystyle f}$${\ displaystyle f (f (x)) = f (x)}$

### Idempotent algebraic structures

Are all elements of a semigroup (or more generally a magma ) idempotent respect , it is also self- idempotent called. Alternatively, an idempotent semigroup is often referred to as a band . Every commutative band is called a half lattice . A semigroup is called globally idempotent if: ${\ displaystyle (S, *)}$${\ displaystyle *}$${\ displaystyle (S, *)}$${\ displaystyle (S, *)}$

${\ displaystyle S * S = S}$with .${\ displaystyle S * S: = \ {a * b \ mid a, b \ in S \}}$

A half ring, a fast ring and a ring are called idempotent if resp . Is idempotent. In contrast, a dioid is a hemiring with one element and idempotent addition. ${\ displaystyle (H, +, \ cdot),}$ ${\ displaystyle (F, +, \ cdot)}$ ${\ displaystyle (R, +, \ cdot)}$${\ displaystyle (H, \ cdot), (F, \ cdot)}$${\ displaystyle (R, \ cdot)}$ ${\ displaystyle (D, +, 0, \ cdot, 1)}$

## Examples

• Regarding multiplication , the solutions and the equation are the only idempotent real numbers .${\ displaystyle 0}$${\ displaystyle 1}$${\ displaystyle x ^ {2} = x}$
• With regard to a two-digit link , a (left or right) neutral element is always idempotent: In a group , the neutral element is the only idempotent element.${\ displaystyle *}$ ${\ displaystyle e}$${\ displaystyle e * e = e.}$
• In a ring with one , and are always idempotent elements with regard to multiplication. If the ring does not have zero divisors , other idempotent elements can also exist. For example, in the remainder class ring${\ displaystyle 0}$${\ displaystyle 1}$ ${\ displaystyle \ mathbb {Z} / (6)}$
${\ displaystyle {\ bar {3}} \ cdot {\ bar {3}} = {\ bar {3}}}$and .${\ displaystyle {\ bar {4}} \ cdot {\ bar {4}} = {\ bar {4}}}$
• In an association , all elements are idempotent with respect to the links and . That means it is always and . The same applies to the half-associations and .${\ displaystyle (V, \ vee, \ wedge)}$${\ displaystyle \ vee}$${\ displaystyle \ wedge}$${\ displaystyle u = u \ vee u}$${\ displaystyle u = u \ wedge u}$${\ displaystyle (V, \ vee)}$${\ displaystyle (V, \ wedge)}$
• Absorbent elements are always idempotent.

Idempotent images:

• Constant functions: ${\ displaystyle f \ colon x \ mapsto c.}$
• Identical figure : ${\ displaystyle \ operatorname {id} \ colon x \ mapsto x.}$
• ${\ displaystyle g \ circ f}$, if ${\ displaystyle f \ circ g = \ operatorname {id}.}$
• Projections , e.g. B.${\ displaystyle p \ colon (x, y) \ mapsto (x, 0).}$
• Amount functions :${\ displaystyle | \ cdot | \ colon x \ mapsto | x |.}$
• Hull operators .
• Core operators .

## properties

${\ displaystyle f_ {A} \ colon \, K ^ {n} \ to K ^ {n}, \; x \ mapsto Ax,}$
is idempotent. In particular, the eigenvalues of all are or . Geometrically, idempotent linear mappings can be interpreted as a projection of the vector space onto a sub-vector space .${\ displaystyle A}$${\ displaystyle 0}$${\ displaystyle 1}$
• Every idempotent ring is commutative because it applies to all${\ displaystyle (R, +, \ cdot)}$${\ displaystyle a, b \ in R \ colon}$
${\ displaystyle a + 0 + b = a + b = (a + b) \ cdot (a + b) = a \ cdot (a + b) + b \ cdot (a + b) = a \ cdot a + a \ cdot b + b \ cdot a + b \ cdot b = a + a \ cdot b + b \ cdot a + b,}$
(second and fifth equation because of idempotency, third and fourth equation because of distributivity), so
${\ displaystyle 0 = a \ cdot b + b \ cdot a. \ quad (1)}$
This also applies by and sets and, again, uses idempotency, ${\ displaystyle a \ leftarrow (a \ cdot b)}$${\ displaystyle b \ leftarrow (a \ cdot b)}$
${\ displaystyle 0 = (a \ cdot b) \ cdot (a \ cdot b) + (a \ cdot b) \ cdot (a \ cdot b) = a \ cdot b + a \ cdot b.}$
Hence is
${\ displaystyle a \ cdot b = a \ cdot b + 0 = a \ cdot b + a \ cdot b + b \ cdot a = 0 + b \ cdot a = b \ cdot a.}$
In particular, the following also applies (because of idempotence and because of (1) with ) ${\ displaystyle b = a}$
${\ displaystyle a + a = a \ times a + a \ times a = 0}$ or. ${\ displaystyle \, - a = a.}$
• An idempotent fast ring is commutative if and only if it is distributive , because:${\ displaystyle (F, +, \ cdot)}$
If is commutative, then applies to all${\ displaystyle (F, +, \ cdot)}$${\ displaystyle a, b, c \ in F \ colon}$
${\ displaystyle c \ cdot (a + b) = (a + b) \ cdot c = (a \ cdot c) + (b \ cdot c) = (c \ cdot a) + (c \ cdot b).}$
If, on the other hand, is distributive, then commutativity follows from this, just as with an idempotent ring.${\ displaystyle (F, +, \ cdot)}$

## Computer science

In IT, the idempotency of recovery measures for databases and services is required in order to ensure fault tolerance in the event of a crash during a restart phase. Undo and redo operations must have the same result even if they are executed several times in a row.

Read-only services are inherently idempotent since the state of the data is not changed. Every non-idempotent writing service can be made an idempotent service from a technical point of view.

### example

In the case of a service for booking amounts of money, the call deposit (100) is not idempotent, since the amount 100 is paid in several times if the service is called up several times. On the other hand, if you were to call up a new account balance (600) , the account balance would remain the same if the service was called up several times. This call would be idempotent.