Binary Matrix VC Dimension and Sauer-Shelah #
Pure combinatorics: VC dimension on binary matrices, bridged to Mathlib's
Finset.Shatters infrastructure. No learning theory types.
A binary matrix M shatters a column set S if for every subset t ⊆ S,
there is a row i whose true columns within S are exactly t.
Instances For
Transpose of a binary matrix.
Instances For
Convert a binary matrix to a Finset family: each row becomes the set of
columns where that row is true.
Equations
- M.toFinsetFamily = Finset.image (fun (i : Fin m) => {j : Fin n | M i j = true}) Finset.univ
Instances For
The VC dimension of a binary matrix, defined via the Mathlib Finset family.
Equations
- M.vcDim = M.toFinsetFamily.vcDim
Instances For
Our shatters coincides with Mathlib's Finset.Shatters on the associated family.
Sauer-Shelah lemma for binary matrices: the number of distinct rows in the Finset family is bounded by the sum of binomial coefficients up to the VC dimension.
Assouad's Dual VC Bound for Matrices #
If M has VC dimension ≤ d, then M.transpose has VC dimension ≤ 2^(d+1) - 1.
The proof uses the bitstring coding argument: index 2^(d+1) shattered rows by
Fin (d+1) → Bool, extract d+1 columns via coordinate projections, and show
these columns are shattered by M.
Assouad's dual VC bound (matrix form): if M has VC dimension ≤ d,
then M.transpose has VC dimension ≤ 2^(d+1) - 1.
This is the fundamental bridge between primal and dual shattering. Proved via the bitstring coding argument (Assouad 1983).