mem_matroid_base_ball_self
For any matroid M, any basis B of M, and any natural number r, B is contained in Ball_M(B, r).
Statement
theorem mem_matroid_base_ball_self {α : Type*} (M : Matroid α) {B : Set α} (hB : M.IsBase B) (r : ℕ) : B ∈ matroid_base_ball M B r
- Source
- folklore
- Verified
- 24 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- matroid_base_ballFor a matroid M, a basis B, and a radius r, the ball Ball_M(B, r) is the set of bases A of M such that |B \ A| ≤ r.
- OrderAn order of dimension d is a permutation of the attribute set {0, ..., d-1}, represented as a list without duplicates containing all…
Read back from the Lean
For any type α, any matroid M on α, any subset B of α satisfying the hypothesis that B is a base of M (hB : M.IsBase B), and any natural number r, B belongs to matroid_base_ball M B r.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
By definition, the ball of radius $r$ around a basis $B$ in a matroid $M$ consists of all bases $A$ of $M$ whose set difference $B \setminus A$ has cardinality at most $r$. Setting $A = B$, the assumption $hB$ ensures that $B$ is a base, and the set difference $B \setminus B$ is empty with cardinality $0 \le r$, so $B$ trivially belongs to the ball.
$B \in \mathrm{matroid\_base\_ball}(M, B, r)$ automation
By definition, $\mathrm{matroid\_base\_ball}(M, B, r)$ is the set of bases $A$ of $M$ such that the set difference $B \setminus A$ has cardinality at most $r$. For $A = B$, the first condition that $B$ is a base holds by hypothesis $hB$. The second condition $|B \setminus B| \le r$ holds because $B \setminus B = \emptyset$, whose cardinality is $0$, and $0 \le r$ for any $r \in \mathbb{N}$. The simplifier unfolds the definition of $\mathrm{matroid\_base\_ball}$, applies $hB$, and simplifies the trivial arithmetic.
simp [matroid_base_ball, hB]
- The `simp` tactic automatically handles the set difference $B \setminus B = \emptyset$, its cardinality being $0$, and the inequality $0 \le r$ for $r \in \mathbb{N}$.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- Every basis of a matroid belongs to the ball of radius r centered at itself. -/theorem mem_matroid_base_ball_self {α : Type*} (M : Matroid α) {B : Set α} (hB : M.IsBase B) (r : ℕ) : B ∈ matroid_base_ball M B r := by simp [matroid_base_ball, hB]