Idempotent, commutative and invertible

345 Views Asked by At

Is there a mathematical class and structure in which there exist many objects that are distinct, invertible, commutative and idempotent? Like a set of toggle switches with no hysteresis, so the state does not depend on the order in which the switches were flipped (and pressing down on a toggle that is already down, or vice versa, does not alter it further).

My motivation is that this relates to the "module" environment system in Unix, where infinitely many modules are possible, and each can be individually loaded or unloaded. Unfortunately this module system is prone to bugs where it does unexpectedly depend on the order in which different modules are loaded (and unloading or reloading modules is also unreliable), since the modules are each implemented by shell scripts, i.e. sequences of instructions which in general are not commutative, idempotent nor invertible. (I think a module is even permitted to load another module, so the toggle switch analogy is not perfect..)

Edit:

Or is inverse too strong a concept? Maybe instead I need there to be two operations, like raise and lower (or add and subtract, or load and unload), since flipping down switch A is not performed by flipping up some other switch A-1?

I suppose I would want properties like:

$x+y=y+x$

$x+x=x$

$x-x=0$

$0-x=0$

4

There are 4 best solutions below

4
On

Suppose that $a$ is idempotent and invertible. Then $a^2=a$ by definiton, so that if $b$ is an inverse of $a$ then we can apply $b$ on both sides to obtain that $$ a=a(ab)=a^2b=ab, $$ so that $a$ must be the identity.

(I have not used commutativity, but I have used associativity to re-arrange the parenthesis. I'm not sure if my argument works without assuming associativity.)

Thus, any such operation must be the identity operation (i.e., the one that leaves everything unchanged).

That's the mathematical explanation, but it can also be phrased without using math. If you have an operation that doesn't change anything the second time you apply it, then if you have a way to undo that operation it means it can't have done anything the first time either.

0
On

If I understand your question correctly, no. At least not trivially: a one-point set with the only possible operation would do this.

If every element were both invertible and idempotent, given any $x$ from $x^2=x$ we operate by $x^{-1}$, obtaining $x=1$, the identity element. Hence your entire set is just $\{1\}$.

EDIT: As some have pointed out, I instinctually assumed associativity, which you did not require. If you do not require associativity, this answer won't work for you. If you do, it does.

0
On

This is an interesting modelling problem. Suppose first that there is only one switch. A possible model could be the following automaton:

$\hskip 20pt$

where the letter $x$ represents the raise action and $\bar x$ represents the lower action. Note that, in terms of semigroups, this leads to the relations $x\bar x = \bar x \bar x = \bar x$ and $\bar xx =xx = x$, which define an idempotent, but non-commutative semigroup. Furthermore $\bar x$ is not an inverse of $x$.

If you want a model with $n$ switches, just take the direct product of $n$ copies of this automaton.

0
On

It is possible to have an idempotent and commutative groupoid with identity, and every element being invertible.

An example would be the three-element one $\{1,a,b\}$, where $1$ is the identity, $aa=a$, $bb=b$, and $ab=ba=1$. It is not associative since $$a(ab)=a1=a \neq 1=ab=(aa)b.$$ It is not possible (in the non-trivial case, that is, with more than one element) if you also want associativity, as the answers of Randall and pre-kidney show.

If you want to have that fourth axiom of yours ($0-x=0$, which with multiplicative notation becomes $1x^{-1}=1$), then again, you get a trivial groupoid, since it follows that $x^{-1}=1$ for all $x$, yielding $x=x1=1$.