Let $A = $ { $f:\mathbb Z$ $\to \mathbb Z$| the cardinality of set {$x \in \mathbb Z$ | $f(x) = x$} is finite}.
I have to prove or disprove that the set $A$ forms a semigroup/monoid under function composition.
I can easily see that $A$ does not form monoid because the identity function does not exist in $A$. I am trying to look for an example to disprove that $A$ forms a semigroup. Does the following work?
Let $f(x) = x +1 $ and $h(x) = x-1 \in A\ \forall x \in \mathbb Z$. Then, we can see that {$x$ $\in$ $\mathbb Z$ | $f(x) = x$} is finite because no element gets mapped to itself, hence it is an empty set, and similar for {$x$ $\in$ $\mathbb Z$ | $h(x) = x$}, which is also an empty set. But, $f(g(x)) = x$ $\forall$ $x \in \mathbb Z$. Hence, the set {$x$ $\in$ $\mathbb Z$ | $h(f(x)) = x$} is infinite and hence, closure is not satisfied. Can anyone check my work, please?