AFTD Auto-Formalizing Theoretical Domains

exists_matroid_of_indep_table

theoremverified

A Boolean table o on the subsets of Fin n that is true on the empty set, closed under taking subsets and satisfies the augmentation axiom is the independence oracle of a matroid with ground set Fin n.

Statement

theorem exists_matroid_of_indep_table {n : ℕ} (o : Finset (Fin n) → Bool) (h0 : o ∅ = true)
    (hsub : ∀ I J : Finset (Fin n), o J = true → I ⊆ J → o I = true)
    (haug : ∀ I J : Finset (Fin n), o I = true → o J = true → I.card < J.card →
      ∃ e ∈ J, e ∉ I ∧ o (insert e I) = true) :
    ∃ M : Matroid (Fin n), M.E = Set.univ ∧ ∀ S : Finset (Fin n), M.Indep (S : Set (Fin n)) ↔ o S = true
Source
Sanity lemma / helper for the statements of OP-1998 (arXiv:2611.23624 (Matroid Connectedness and Component Decomposition: Breaking the Quadratic Barrier))
Verified
19 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 3

The proof, explained

The theorem is proved by directly constructing the matroid using `IndepMatroid.ofFinset` on ground set `Set.univ` with independence predicate `fun S => o S = true`. The hypotheses `h0`, `hsub`, and `haug` supply the independence axioms, while `Set.subset_univ` ensures the ground set containment. The ground set equality holds by reflexivity, and `simp` verifies that independence in the resulting matroid coincides with `o S = true`.

  1. The matroid constructed from the table `o` via `IndepMatroid.ofFinset` satisfies all required conditions: ground set equal to `Set.univ` and independent sets given by `o S = true`. automation

    We supply the existential witness using `IndepMatroid.ofFinset` on ground set `Set.univ` with independence predicate `fun S => o S = true`. The four required conditions are supplied by: `h0` (the empty set is independent), `hsub` (subsets of independent sets are independent), `haug` (augmentation property for independent sets of unequal sizes), and `Set.subset_univ` (all finsets are subsets of `Set.univ`). Converting this to a `Matroid` with `IndepMatroid.matroid`, the ground set equality `M.E = Set.univ` holds definitionally by `rfl`, and the equivalence `M.Indep ↑S ↔ o S = true` is closed by `simp`.

    lines 6–8

    uses IndepMatroid.ofFinset, Set.subset_univ, IndepMatroid.matroid

      exact ⟨(IndepMatroid.ofFinset (Set.univ : Set (Fin n)) (fun S => o S = true) h0
          (fun I J hJ hIJ => hsub I J hJ hIJ) (fun I J hI hJ hIJ => haug I J hI hJ hIJ)
          (fun _ _ => Set.subset_univ _)).matroid, rfl, fun S => by simp⟩
IndepMatroid.ofFinset
Constructs an `IndepMatroid` on ground set `E` from an independence predicate on finite sets that contains the empty set, is closed under subsets, satisfies the augmentation axiom, and whose independent sets are subsets of `E`.
Set.subset_univ
Every set is a subset of the universal set.
IndepMatroid.matroid
Forgets the finite independence data to produce a `Matroid`.

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

theorem exists_matroid_of_indep_table {n : ℕ} (o : Finset (Fin n) → Bool) (h0 : o ∅ = true)    (hsub : ∀ I J : Finset (Fin n), o J = true → I ⊆ J → o I = true)    (haug : ∀ I J : Finset (Fin n), o I = true → o J = true → I.card < J.card →      ∃ e ∈ J, e ∉ I ∧ o (insert e I) = true) :    ∃ M : Matroid (Fin n), M.E = Set.univ ∧ ∀ S : Finset (Fin n), M.Indep (S : Set (Fin n)) ↔ o S = true := by  exact ⟨(IndepMatroid.ofFinset (Set.univ : Set (Fin n)) (fun S => o S = true) h0      (fun I J hJ hIJ => hsub I J hJ hIJ) (fun I J hI hJ hIJ => haug I J hI hJ hIJ)      (fun _ _ => Set.subset_univ _)).matroid, rfl, fun S => by simp⟩
See it in the graphDiscuss this resultChallenge it