Element of Matroid Base and Circuit has Substitute

Theorem
Let $M = \struct {S, \mathscr I}$ be a matroid.

Let $B \subseteq S$ be a base of $M$.

Let $C \subseteq S$ be a circuit of $M$.

Let $x \in B \cap C$.

Then:
 * $\exists y \in C \setminus B : \paren{B \setminus \set x} \cup \set y$ is a base of $M$

Proof
By definition of circuit:
 * $C$ is a minimal dependent subset

From Singleton of Element is Subset:
 * $\set x \subseteq C$ and $\set x \subseteq B$

From matroid axiom $(\text I 2)$:
 * $\set x \in \mathscr I$

Because $C \notin \mathscr I$:
 * $\set x \ne C$

Hence:
 * $\set x \subsetneq C$

From Leigh.Samphier/Sandbox/Set Difference with Proper Subset is Proper Subset:
 * $C \setminus \set x$ is a proper subset of $C$

Hence:
 * $C \setminus \set x \in \mathscr I$

From Leigh.Samphier/Sandbox/Cardinality of Independent Set of Matroid is Smaller or Equal to Base:
 * $\card{C \setminus \set x} \le \card B$

From Independent Set can be Augmented by Larger Independent Set:
 * $\exists X \subseteq B \setminus \paren{C \setminus \set x} : \paren{C \setminus \set x} \cup X \in \mathscr I : \card {\paren{ C \setminus \set x} \cup X} = \card B$

From Leigh.Samphier/Sandbox/Independent Subset is Base if Cardinality Equals Cardinality of Base:
 * $\paren{ C \setminus \set x} \cup X$ is a base of $M$


 * $x \in \paren{ C \setminus \set x} \cup X$
 * $x \in \paren{ C \setminus \set x} \cup X$

Then:
 * $\set x, C \setminus \set x \subseteq \paren{ C \setminus \set x} \cup X$

From Union of Subsets is Subset:
 * $C \subseteq \paren{ C \setminus \set x} \cup X$

From matroid axiom $(\text I 2)$:
 * $C \in \mathscr I$

This contradicts:
 * $C \notin \mathscr I$

It follows that:
 * $x \notin \paren{ C \setminus \set x} \cup X$

From Set Difference is Subset:
 * $B \setminus \set x \subseteq B$

From matroid axiom $(\text I 2)$:
 * $B \setminus \set x \in \mathscr I$

We have

From matroid axiom $(\text I 3')$:
 * $\exists y \in \paren{\paren{C \setminus \set x} \cup X} \setminus \paren{B \setminus x} : \paren{B \setminus \set x} \cup \set y \in \mathscr I : \card{\paren{B \setminus \set x} \cup \set y} = \card {\paren{ C \setminus \set x} \cup X}$

From Leigh.Samphier/Sandbox/Independent Subset is Base if Cardinality Equals Cardinality of Base:
 * $\paren{B \setminus \set x} \cup \set y$ is a base of $M$

Because $x \notin \paren{ C \setminus \set x} \cup X$:
 * $y \ne x$

By definition of set difference:
 * $y \notin B \setminus \set x$:

By definition of set union:
 * $y \notin B$

By the definition of a subset:
 * $y \notin X$

Hence:
 * $y \in C \setminus \set x$