I'm trying to prove the following statement about some matroid $(X,\mathcal{I})$:
For every subset $Y\subseteq X$, all maximal independent sets contained in $\mathcal{I}$ have equal size.
Proof: Assume for contradiction that there exist two maximal independent sets $X_1, X_2$ such that $\left|X_1\right|< \left|X_2\right|$. Then, $\exists x\in X_2-X_1$ where $X_1\cup\left\{x\right\}\in I$. Then, $X_1\subseteq X_1\cup\left\{x\right\}$. Since $X_1\cup\left\{x\right\}$ is independent, $X_1$ cannot be a maximal independent set, which contradicts our assumption. The same contradiction follows if $\left|X_2\right|<\left|X_1\right|$. Thus, by the well-ordering of cardinality, $\left|X_2\right|=\left|X_1\right|$
Is this proof valid? If not, where is my mistake? In the future, how could I be more careful to avoid such mistakes?