Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Representability over GF(pm)\mathrm{GF}(p^m)GF(pm), excluded minors, matroid isomorphism

Definition
TenChallenges_MatroidRepresentability

by utkuokur · Nov 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsexcluded-minorsmatroidsrepresentability

The definitions behind Challenge 2 of the Ten Challenges benchmark, on top of Mathlib's matroids (Matroid α, ground set E⊆αE\subseteq\alphaE⊆α, independence predicate) and finite fields.

  1. Representability. For a prime ppp and m≥1m\ge 1m≥1, a matroid MMM is GF(pm)\mathrm{GF}(p^m)GF(pm)-representable if there are a vector space WWW over GF(pm)\mathrm{GF}(p^m)GF(pm) and a map v ⁣:α→Wv\colon\alpha\to Wv:α→W such that for every set I⊆αI\subseteq\alphaI⊆α,
I is independent in M  ⟺  (v(x))x∈I is linearly independent over GF(pm).I \text{ is independent in } M \iff (v(x))_{x\in I} \text{ is linearly independent over } \mathrm{GF}(p^m).I is independent in M⟺(v(x))x∈I​ is linearly independent over GF(pm).

Since sets meeting the complement of the ground set are never independent, such a vvv vanishes outside EEE. 2. Excluded minors. For a property PPP of matroids on α\alphaα, MMM is an excluded minor for PPP if MMM fails PPP while every strict minor of MMM (in Mathlib's minor order N<mMN <_m MN<m​M) satisfies PPP. 3. Isomorphism. Matroids MMM on α\alphaα and NNN on β\betaβ are isomorphic if some bijection e ⁣:E(M)→E(N)e\colon E(M)\to E(N)e:E(M)→E(N) carries a subset I⊆E(M)I\subseteq E(M)I⊆E(M) to an independent set of NNN exactly when III is independent in MMM. 4. Bounded excluded-minor count. ExcludedMinorsAtMost(p,m,B)\mathrm{ExcludedMinorsAtMost}(p,m,B)ExcludedMinorsAtMost(p,m,B) holds if there is a finite set SSS of at most BBB matroids on the ground type N\mathbb NN such that every finite matroid MMM (on any ground type in the lowest universe) which is an excluded minor for GF(pm)\mathrm{GF}(p^m)GF(pm)-representability is isomorphic to a member of SSS. Equivalently, the class of GF(pm)\mathrm{GF}(p^m)GF(pm)-representable matroids has at most BBB excluded minors up to isomorphism.

These definitions are reusable for any excluded-minor statement about representable matroids.

Formalization Note. The field is Mathlib's GaloisField p m, which requires the instance Fact p.Prime. Linear independence is LinearIndepOn. The representatives in SSS live on the fixed ground type N\mathbb NN so that SSS can be a Finset.

Definition code
import Mathlib.Combinatorics.Matroid.Minor.Order
import Mathlib.FieldTheory.Finite.GaloisField
import Mathlib.LinearAlgebra.LinearIndependent.Defs

open Matroid

variable {α β : Type*}

/-- `M` is representable over the Galois field `GF(pᵐ)`: some assignment of
vectors to the elements of `M` makes a set independent exactly when its vectors
are linearly independent. -/
def IsGFRepresentable (p m : ℕ) [Fact p.Prime] (M : Matroid α) : Prop :=
  ∃ (W : Type) (_ : AddCommGroup W) (_ : Module (GaloisField p m) W) (v : α → W),
    ∀ I, M.Indep I ↔ LinearIndepOn (GaloisField p m) v I

/-- `M` fails `P`, but every proper minor satisfies `P`. -/
def IsExcludedMinorFor (P : Matroid α → Prop) (M : Matroid α) : Prop :=
  ¬ P M ∧ ∀ N : Matroid α, N <m M → P N

/-- `M` and `N` are isomorphic: a bijection between their ground sets carries
independent sets exactly to independent sets. -/
def Matroid.IsIso (M : Matroid α) (N : Matroid β) : Prop :=
  ∃ e : M.E ≃ N.E, ∀ I : Set M.E,
    M.Indep (Subtype.val '' I) ↔ N.Indep (Subtype.val '' (e '' I))

/-- Given a prime power `pᵐ` and a number `B`, the following says that the
class of `GF(pᵐ)`-representable matroids has at most `B` excluded minors, up
to isomorphism. Equivalently, there is a set `S` of at most `B` matroids that
contains, up to isomorphism, every excluded minor for `GF(pᵐ)`-representability. -/
def ExcludedMinorsAtMost (p m : ℕ) [Fact p.Prime] (B : ℕ) : Prop :=
  ∃ S : Finset (Matroid ℕ), S.card ≤ B ∧
    ∀ {β : Type} (M : Matroid β), M.Finite →
      IsExcludedMinorFor (IsGFRepresentable p m) M →
      ∃ N ∈ S, N.IsIso M
Source
Ten Challenges repository, file Defs_and_Lems/MatroidRepresentability.lean (commit ff14a56), https://github.com/TenChallenges/ten-challenges/blob/main/Defs_and_Lems/MatroidRepresentability.lean; definitions following J. Oxley, Matroid Theory, 2nd ed., Chapters 1, 3 and 6.
Read-back

What the Lean code literally says, in plain math · claude-fable-5-1

Read-back of the four definitions in Def_TenChallenges_MatroidRepresentability (namespace-free, with α, β arbitrary types).

Background used by all four definitions. A matroid MMM on a type α\alphaα is Mathlib's Matroid α: a ground set E(M)⊆αE(M) \subseteq \alphaE(M)⊆α (an arbitrary subset of α\alphaα: it may be infinite, and it may be empty), together with a predicate "BBB is a base" and a predicate "III is independent" on subsets of α\alphaα, subject to the axioms: a set is independent if and only if it is contained in some base; at least one base exists; bases satisfy the exchange property (for bases B,B′B, B'B,B′ and a∈B∖B′a \in B \setminus B'a∈B∖B′ there is b∈B′∖Bb \in B' \setminus Bb∈B′∖B with (B∖{a})∪{b}(B \setminus \{a\}) \cup \{b\}(B∖{a})∪{b} a base); for every X⊆E(M)X \subseteq E(M)X⊆E(M), every independent subset of XXX is contained in a maximal independent subset of XXX; every base is contained in E(M)E(M)E(M). Consequently every independent set is a subset of E(M)E(M)E(M), and ∅\emptyset∅ is always independent. Infinite matroids are included.


1. IsGFRepresentable(p,m,M)\mathrm{IsGFRepresentable}(p, m, M)IsGFRepresentable(p,m,M). Data: natural numbers p,mp, mp,m, a typeclass hypothesis that ppp is prime, and a matroid MMM on α\alphaα. Write GF(pm)\mathrm{GF}(p^m)GF(pm) for Mathlib's GaloisField p m, the splitting field of Xpm−XX^{p^m} - XXpm−X over Z/pZ\mathbb{Z}/p\mathbb{Z}Z/pZ: for m≥1m \ge 1m≥1 this is the field with pmp^mpm elements; for m=0m = 0m=0 the polynomial is X1−X=0X^1 - X = 0X1−X=0, so GF(p0)\mathrm{GF}(p^0)GF(p0) is the splitting field of the zero polynomial, i.e. (up to isomorphism) Z/pZ\mathbb{Z}/p\mathbb{Z}Z/pZ itself with ppp elements, not a one-element field. The definition asserts:

there exist a type WWW (in the lowest universe), an additive commutative group structure on WWW, a GF(pm)\mathrm{GF}(p^m)GF(pm)-vector-space structure on WWW, and a function v:α→Wv : \alpha \to Wv:α→W (defined on every element of α\alphaα, not only on E(M)E(M)E(M)), such that for every subset I⊆αI \subseteq \alphaI⊆α (not only subsets of E(M)E(M)E(M))

I is independent in M⟺(v(x))x∈I is linearly independent over GF(pm).I \text{ is independent in } M \quad\Longleftrightarrow\quad (v(x))_{x \in I} \text{ is linearly independent over } \mathrm{GF}(p^m).I is independent in M⟺(v(x))x∈I​ is linearly independent over GF(pm).

"Linearly independent" is Mathlib's LinearIndepOn: the family of vectors indexed by the elements of III is linearly independent, meaning the linear map sending a finitely supported coefficient function c:I→GF(pm)c : I \to \mathrm{GF}(p^m)c:I→GF(pm) to ∑x∈Icx v(x)\sum_{x \in I} c_x\, v(x)∑x∈I​cx​v(x) is injective (no non-trivial finite linear combination vanishes). Because the family is indexed by III and not by the set of vectors, two distinct x≠yx \neq yx=y in III with v(x)=v(y)v(x) = v(y)v(x)=v(y) make the family dependent, v(x)=0v(x) = 0v(x)=0 makes {x}\{x\}{x} dependent, and the empty family is independent.

Edge cases: no bound is placed on the dimension of WWW (it may be infinite-dimensional, or the zero space); no finiteness of MMM is assumed. Since independent sets of MMM lie inside E(M)E(M)E(M), taking I={x}I = \{x\}I={x} with x∉E(M)x \notin E(M)x∈/E(M) shows that the condition forces v(x)=0v(x) = 0v(x)=0 for every x∉E(M)x \notin E(M)x∈/E(M). If WWW is the zero space, the condition holds only when ∅\emptyset∅ is the sole independent set of MMM.


2. IsExcludedMinorFor(P,M)\mathrm{IsExcludedMinorFor}(P, M)IsExcludedMinorFor(P,M). Data: a property PPP of matroids on α\alphaα and a matroid MMM on α\alphaα. The definition asserts the conjunction

¬P(M)and∀N a matroid on α:  N<mM  ⟹  P(N).\neg P(M) \quad\text{and}\quad \forall N \text{ a matroid on } \alpha:\; N <_m M \implies P(N).¬P(M)and∀N a matroid on α:N<m​M⟹P(N).

Here N<mMN <_m MN<m​M is Mathlib's strict minor relation IsStrictMinor: N≤mMN \le_m MN≤m​M and not M≤mNM \le_m NM≤m​N, where N≤mMN \le_m MN≤m​M (Mathlib's IsMinor) means there exist sets C,D⊆αC, D \subseteq \alphaC,D⊆α (not required to be disjoint, nor to be contained in E(M)E(M)E(M)) with

N=(M/C)∖D,N = (M / C) \setminus D,N=(M/C)∖D,

i.e. NNN is obtained by contracting CCC and then deleting DDD. Deletion M∖DM \setminus DM∖D is the restriction of MMM to E(M)∖DE(M) \setminus DE(M)∖D (its independent sets are the MMM-independent subsets of E(M)∖DE(M) \setminus DE(M)∖D); contraction M/CM / CM/C is defined as (M∗∖C)∗(M^{*} \setminus C)^{*}(M∗∖C)∗, the dual of the deletion of CCC from the dual matroid M∗M^{*}M∗, and has ground set E(M)∖CE(M) \setminus CE(M)∖C. Mathlib's documentation states that N<mMN <_m MN<m​M is equivalent to "NNN is a minor of MMM and N≠MN \neq MN=M".

Edge cases: only matroids on the same type α\alphaα are considered as minors. If MMM has no strict minors at all (for instance when E(M)=∅E(M) = \emptysetE(M)=∅, since any minor has ground set inside E(M)E(M)E(M)), the second clause holds vacuously and MMM is an excluded minor for PPP exactly when ¬P(M)\neg P(M)¬P(M). The definition does not require E(M)E(M)E(M) to be finite.


3. IsIso(M,N)\mathrm{IsIso}(M, N)IsIso(M,N) (declared here under the name Matroid.IsIso; this is a definition of this bundle, not a Mathlib notion). Data: a matroid MMM on α\alphaα and a matroid NNN on β\betaβ (possibly different types). The definition asserts:

there exists a bijection e:E(M)→E(N)e : E(M) \to E(N)e:E(M)→E(N) between the ground sets such that for every subset I⊆E(M)I \subseteq E(M)I⊆E(M),

I is independent in M⟺e(I)={ e(x):x∈I } is independent in N.I \text{ is independent in } M \quad\Longleftrightarrow\quad e(I) = \{\, e(x) : x \in I \,\} \text{ is independent in } N.I is independent in M⟺e(I)={e(x):x∈I} is independent in N.

Only subsets of the ground set E(M)E(M)E(M) are compared. The existence of the bijection forces E(M)E(M)E(M) and E(N)E(N)E(N) to have the same cardinality (both may be empty, or both infinite). Nothing else (e.g. equality of the underlying types) is required.


4. ExcludedMinorsAtMost(p,m,B)\mathrm{ExcludedMinorsAtMost}(p, m, B)ExcludedMinorsAtMost(p,m,B). Data: natural numbers p,mp, mp,m, a typeclass hypothesis that ppp is prime, and a natural number BBB. The definition asserts:

there exists a finite set SSS of matroids on the type N\mathbb{N}N (each member has ground set some subset of N\mathbb{N}N, with no restriction: possibly infinite, possibly empty) with

∣S∣≤B,|S| \le B,∣S∣≤B,

such that for every type β\betaβ (in the lowest universe) and every matroid MMM on β\betaβ: if E(M)E(M)E(M) is finite, and MMM is an excluded minor for the property "IsGFRepresentable(p,m,⋅)\mathrm{IsGFRepresentable}(p, m, \cdot)IsGFRepresentable(p,m,⋅)" in the sense of Definition 2 (that is: MMM is not GF(pm)\mathrm{GF}(p^m)GF(pm)-representable in the sense of Definition 1, and every strict minor N<mMN <_m MN<m​M among matroids on β\betaβ is GF(pm)\mathrm{GF}(p^m)GF(pm)-representable), then

∃ N∈S such that IsIso(N,M),\exists\, N \in S \text{ such that } \mathrm{IsIso}(N, M),∃N∈S such that IsIso(N,M),

i.e. some N∈SN \in SN∈S admits a bijection E(N)→E(M)E(N) \to E(M)E(N)→E(M) carrying NNN-independent sets exactly to MMM-independent sets (Definition 3).

Edge cases: if B=0B = 0B=0 then S=∅S = \emptysetS=∅ and the statement says that no finite excluded minor exists for any type β\betaβ. The members of SSS are not required to be excluded minors themselves, to be finite, to be GF(pm)\mathrm{GF}(p^m)GF(pm)-representable or not, or to be pairwise non-isomorphic; SSS may have fewer than BBB elements. Excluded minors with infinite ground set are not constrained at all. The value m=0m = 0m=0 is permitted, in which case GF(p0)\mathrm{GF}(p^0)GF(p0) is Z/pZ\mathbb{Z}/p\mathbb{Z}Z/pZ as explained in Definition 1.

Human review
  • Endorsed by Shuze Chen · Nov 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by utkuokur · Nov 4, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me