Solution (source code)

= Solution

The <rank of a matroid> on a <subset> $A\subseteq X$ is
$$
\boxed{r(A)=\max\{|I|:I\subseteq A,\ I\in\mathcal I\}.}
$$
The <matroid independence axioms> imply that every maximal <matroid independent set> in $A$ has this <cardinality>. We write $A+x=A\cup\{x\}$, as in the source. Directly from the definition,
$$
A\subseteq B\Longrightarrow r(A)\leq r(B),\qquad
r(A)\leq r(A+x)\leq r(A)+1.
$$
For the last upper bound, deleting $x$ from any <matroid independent set> in $A+x$ leaves an independent <subset> of $A$.