AFTD Auto-Formalizing Theoretical Domains

matroid_diam

def

For a matroid M on a type α, the diameter matroid_diam M is defined as the supremum in ℕ of the set of cardinalities (A \ B).ncard over all pairs of subsets A, B : Set α such that both A and B are bases of M (M.IsBase A and M.IsBase B).

Statement

noncomputable def matroid_diam {α : Type*} (M : Matroid α) : ℕ
Defined in
arXiv:2611.27934, Section 2
Verified
23 Nov 2026
Axioms
none listed
Used by 1

Read back from the Lean

For a type α and a matroid M on α, matroid_diam M is defined as the supremum in ℕ (sSup) of the set of natural numbers (A \ B).ncard across all pairs of subsets A, B : Set α such that A is a base of M (M.IsBase A) and B is a base of M (M.IsBase B).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The diameter of a matroid M: the supremum in ℕ of (A \ B).ncard over all pairs of bases A, B of M. -/
noncomputable def matroid_diam {α : Type*} (M : Matroid α) : ℕ := sSup { (A \ B).ncard | (A : Set α) (B : Set α) (_ : M.IsBase A) (_ : M.IsBase B) }
See it in the graphDiscuss this resultChallenge it