I am attempting to learn set theory, but a specific lemma in my book is confusing me. It states
Let $p: \mathcal{P} X \rightarrow \mathcal{P} X$ be a monotonic function on a set $X$ such that, $A \subseteq B \subseteq X$ implies $p(A) \subseteq p(B)$. Then there is a set $Z \subseteq X$ such that $p(Z) = Z$.
My book states the proof
$Z = \bigcup\{A \subseteq X: A \subseteq p(A)\}$ Take $z \in Z$. There is a set $A \subseteq X$ such that $z \in A$ and $A \subseteq p(A)$. So $z \in p(A)$. Moreover, $A \subseteq Z$, so $p(A) \subseteq p(Z)$. Thus $z \in p(Z)$.
I understand this so far, The union of all the subsets $A$ of $X$, which fufill $A \subseteq p(A)$ compose $Z$. Using the proof above, we prove that $Z$ is a subset of $p(Z)$ but this next part throws me for a loop.
By hypothesis, $p(Z) \subseteq p(p(Z))$. Therefore $p(Z)$ is one of the sets in the family whose union is $Z$. So that means $p(Z) \subseteq Z$. So we have $Z = p(Z)$.
Shouldn't $Z$ be one of the sets making up the union $Z$? As it fulfills the requirements. Additionally, how can we prove that $p(Z)$ is one of the sets, as we didn't prove, (and I don't know how to prove) that $p(Z) $ is a subset of $X$.
Apologies in my formatting/title is not correct, this is my first post to StackExchange.