Definition B.1 — the law of a random feasible sequence
DefinitionParallelMatroidBasis_Main_Supplement_FeasibleSequencematroidsp2o-batch-stoc27sp2o-gran-per-chapterp2o-plan-paperp2o-v1probability
Let be a matroid on . For a sequence of elements let
A random feasible sequence (Definition B.1, from [BRS19b]) is where each is chosen uniformly at random from . Its law on finite sequences is
Along a feasible sequence the chosen set stays independent, and is nonempty exactly while fewer than elements have been chosen; so the sequences of positive mass are exactly those of length 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 "" replaces the length , 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)