Maximal (inclusion) ideal proof Let $X$ be a set and $I$ its ideal. $I\neq \emptyset$ is ideal if $I\subseteq \mathcal{P}(X)$, so that for all $A,B\in \mathcal{P}(X)$ following holds
$$(A\subseteq B \text{ and } B\in I)\Rightarrow A\in I$$
and
$$A,B\in I \Rightarrow A\cup B\in I.$$
I want to prove that for $X\not\in I$ and $\cup I=X$, $I$ is a greatest ideal (considering inclusion), which doesn't contain $X$, if and only if 
$$\forall A\subset X \colon A\in I \Leftrightarrow X\setminus A\not\in I.$$
Any ideas on how to prove this both ways?
For $\Leftarrow$ part, I showed that if $A\not\in I$ and $X\setminus A\not\in I$, then $I$ can't be maximal. Does this make the rigorously make the argument for me?
 A: Let $I$ be the greatest ideal which does not contain $X.$ We shall show that $\forall A\subset X, A\in I \iff X\setminus A\not\in I.$
So suppose $A\in I.$ If $X\setminus A\in I,$ then $X=I\cup (X\setminus A)\in I,$ a contradiction. Thus $X\setminus A\not\in I.$
Conversely, if $A\not\in I,$ then adding $X\setminus A$ to $I$ generates an ideal containing $I.$ If $X\setminus A\not\in I,$ then the generated ideal, by the hypothesis on $I,$ must be an ideal containing $X.$ This shows that $I$ contains an element, whose union with $X\setminus A$ is $X.$ This implies that $I$ contains an element which contains $A,$ and hence $A\in I,$ a contradiction. So $X\setminus A\in I.$
In the other direction, suppose that $\forall A\subset X, A\in I \iff X\setminus A\not\in I.$ Then we shall show that any ideal $J\supsetneq I$ must contain $X.$ For $I\subsetneq J,$ there exists $A\in J\setminus I.$ Thus by our hypothesis, $X\setminus A\in I\subset J.$ Then $X=A\cup(X\setminus A)\in J,$ which was what was wanted.  

I don't see how the assumption that $\bigcup I=X$ is used, so if I missed something, please point it out, thanks.
Hope this helps.
