Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definition B.1 — the law of a random feasible sequence

Definition
ParallelMatroidBasis_Main_Supplement_FeasibleSequence

by mikedeng1 · Nov 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

matroidsp2o-batch-stoc27sp2o-gran-per-chapterp2o-plan-paperp2o-v1probability

Let M=(E,I)M=(E,\mathcal I)M=(E,I) be a matroid on E=[n]E=[n]E=[n]. For a sequence (a1,…,ai−1)(a_1,\dots,a_{i-1})(a1​,…,ai−1​) of elements let

F(a1,…,ai−1)={a∈E∖{a1,…,ai−1}:{a1,…,ai−1,a}∈I}.F(a_1,\dots,a_{i-1})=\{a\in E\setminus\{a_1,\dots,a_{i-1}\} : \{a_1,\dots,a_{i-1},a\}\in\mathcal I\}.F(a1​,…,ai−1​)={a∈E∖{a1​,…,ai−1​}:{a1​,…,ai−1​,a}∈I}.

A random feasible sequence (Definition B.1, from [BRS19b]) is (a1,…,arank⁡(M))(a_1,\dots,a_{\operatorname{rank}(M)})(a1​,…,arank(M)​) where each aia_iai​ is chosen uniformly at random from F(a1,…,ai−1)F(a_1,\dots,a_{i-1})F(a1​,…,ai−1​). Its law μM\mu_MμM​ on finite sequences is

μM(a1,…,am)=∏i=1m1[ai∈F(a1,…,ai−1)]∣F(a1,…,ai−1)∣⋅1[F(a1,…,am)=∅].\mu_M(a_1,\dots,a_m)=\prod_{i=1}^m\frac{\mathbf 1[a_i\in F(a_1,\dots,a_{i-1})]}{|F(a_1,\dots,a_{i-1})|}\cdot\mathbf 1\big[F(a_1,\dots,a_m)=\emptyset\big].μM​(a1​,…,am​)=i=1∏m​∣F(a1​,…,ai−1​)∣1[ai​∈F(a1​,…,ai−1​)]​⋅1[F(a1​,…,am​)=∅].

Along a feasible sequence the chosen set stays independent, and FFF is nonempty exactly while fewer than rank⁡(M)\operatorname{rank}(M)rank(M) elements have been chosen; so the sequences of positive mass are exactly those of length rank⁡(M)\operatorname{rank}(M)rank(M) in which every step is feasible, each with the product of the uniform step probabilities. This is the object generated by Lemma B.2 and consumed by the reduction of [BRS19b] behind Theorem 1.5.

Formalization Note Sequences are List (Fin n) and the mass is a real number; the stopping rule "F=∅F=\emptysetF=∅" replaces the length rank⁡(M)\operatorname{rank}(M)rank(M), which it characterizes.

Definition code
import Mathlib

noncomputable section
open Classical

namespace ParallelMatroidBasis.Main.Supplement

/-! # Random feasible sequences
(Putterman–Khanna–Song, STOC 2027 submission #589, Definition B.1 ([BRS19b]), PDF p.37
(printed p.35)) -/

/-- The feasible next elements after the prefix `l = (a₁, …, a_{i−1})`:
`{a ∈ E ∖ {a₁, …, a_{i−1}} : {a₁, …, a_{i−1}, a} ∈ I}`. -/
def feasibleNext {n : ℕ} (M : Matroid (Fin n)) (l : List (Fin n)) : Finset (Fin n) :=
  Finset.univ.filter (fun a => a ∉ l ∧ M.Indep (↑(insert a l.toFinset) : Set (Fin n)))

/-- Definition B.1, as a law on lists. A random feasible sequence `(a₁, …, a_{rank M})` picks each
`aᵢ` uniformly from `feasibleNext M (a₁, …, a_{i−1})`. The feasible set is nonempty exactly while
fewer than `rank M` elements have been chosen, so the sequence stops when it becomes empty. The
mass of a list is the product over its steps of `1 / |feasibleNext|` if every step is feasible and
the list is complete (no feasible element remains), and `0` otherwise. -/
def feasibleSeqLaw {n : ℕ} (M : Matroid (Fin n)) (l : List (Fin n)) : ℝ :=
  (∏ i : Fin l.length,
      if l.get i ∈ feasibleNext M (l.take i) then
        ((feasibleNext M (l.take i)).card : ℝ)⁻¹ else 0) *
    (if feasibleNext M l = ∅ then 1 else 0)

end ParallelMatroidBasis.Main.Supplement
Source
Aaron Putterman, Sanjeev Khanna, Junkai Song, STOC 2027 submission #589 (October 2026), A Near-Optimal Parallel Algorithm for Finding Matroid Bases, PDF sha256 71ee2ac010ac681077fc3191139efe918fa4a9b8c6dad648fac2ec33016764d6, Definition B.1 ([BRS19b]), p.35 (PDF p.37)

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me