# Documentation

Mathlib.Combinatorics.SetFamily.Shatter

# Shattering families #

This file defines the shattering property and VC-dimension of set families.

## Main declarations #

• Finset.Shatters: The shattering property.
• Finset.shatterer: The set family of sets shattered by a set family.
• Finset.vcDim: The Vapnik-Chervonenkis dimension.

## TODO #

• Order-shattering
• Strong shattering
def Finset.Shatters {α : Type u_1} [] (𝒜 : Finset ()) (s : ) :

A set family 𝒜 shatters a set s if all subsets of s can be obtained as the intersection of s and some element of the set family, and we denote this 𝒜.Shatters s. We also say that s is traced by 𝒜.

Equations
• = ∀ ⦃t : ⦄, t s∃ u ∈ 𝒜, s u = t
Instances For
instance Finset.instDecidablePredFinsetShatters {α : Type u_1} [] {𝒜 : Finset ()} :
Equations
• = Finset.decidableForallOfDecidableSubsets
theorem Finset.Shatters.exists_inter_eq_singleton {α : Type u_1} [] {𝒜 : Finset ()} {s : } {a : α} (hs : ) (ha : a s) :
∃ t ∈ 𝒜, s t = {a}
theorem Finset.Shatters.mono_left {α : Type u_1} [] {𝒜 : Finset ()} {ℬ : Finset ()} {s : } (h : 𝒜 ) (h𝒜 : ) :
theorem Finset.Shatters.mono_right {α : Type u_1} [] {𝒜 : Finset ()} {s : } {t : } (h : t s) (hs : ) :
theorem Finset.Shatters.exists_superset {α : Type u_1} [] {𝒜 : Finset ()} {s : } (h : ) :
∃ t ∈ 𝒜, s t
theorem Finset.shatters_of_forall_subset {α : Type u_1} [] {𝒜 : Finset ()} {s : } (h : ts, t 𝒜) :
theorem Finset.Shatters.nonempty {α : Type u_1} [] {𝒜 : Finset ()} {s : } (h : ) :
@[simp]
theorem Finset.shatters_empty {α : Type u_1} [] {𝒜 : Finset ()} :
theorem Finset.Shatters.subset_iff {α : Type u_1} [] {𝒜 : Finset ()} {s : } {t : } (h : ) :
t s ∃ u ∈ 𝒜, s u = t
theorem Finset.shatters_iff {α : Type u_1} [] {𝒜 : Finset ()} {s : } :
Finset.image (fun (t : ) => s t) 𝒜 =
theorem Finset.univ_shatters {α : Type u_1} [] {s : } [] :
Finset.Shatters Finset.univ s
@[simp]
theorem Finset.shatters_univ {α : Type u_1} [] {𝒜 : Finset ()} [] :
Finset.Shatters 𝒜 Finset.univ 𝒜 = Finset.univ
def Finset.shatterer {α : Type u_1} [] (𝒜 : Finset ()) :

The set family of sets that are shattered by 𝒜.

Equations
Instances For
@[simp]
theorem Finset.mem_shatterer {α : Type u_1} [] {𝒜 : Finset ()} {s : } :
theorem Finset.shatterer_mono {α : Type u_1} [] {𝒜 : Finset ()} {ℬ : Finset ()} (h : 𝒜 ) :
theorem Finset.subset_shatterer {α : Type u_1} [] {𝒜 : Finset ()} (h : ) :
@[simp]
theorem Finset.isLowerSet_shatterer {α : Type u_1} [] (𝒜 : Finset ()) :
@[simp]
theorem Finset.shatterer_eq {α : Type u_1} [] {𝒜 : Finset ()} :
@[simp]
theorem Finset.shatterer_idem {α : Type u_1} [] {𝒜 : Finset ()} :
@[simp]
theorem Finset.shatters_shatterer {α : Type u_1} [] {𝒜 : Finset ()} {s : } :
theorem Finset.Shatters.shatterer {α : Type u_1} [] {𝒜 : Finset ()} {s : } :

Alias of the reverse direction of Finset.shatters_shatterer.

theorem Finset.card_le_card_shatterer {α : Type u_1} [] (𝒜 : Finset ()) :

Pajor's variant of the Sauer-Shelah lemma.

theorem Finset.Shatters.of_compression {α : Type u_1} [] {𝒜 : Finset ()} {s : } {a : α} (hs : ) :
theorem Finset.shatterer_compress_subset_shatterer {α : Type u_1} [] (a : α) (𝒜 : Finset ()) :

### Vapnik-Chervonenkis dimension #

def Finset.vcDim {α : Type u_1} [] (𝒜 : Finset ()) :

The Vapnik-Chervonenkis dimension of a set family is the maximal size of a set it shatters.

Equations
Instances For
theorem Finset.Shatters.card_le_vcDim {α : Type u_1} [] {𝒜 : Finset ()} {s : } (hs : ) :
theorem Finset.vcDim_compress_le {α : Type u_1} [] (a : α) (𝒜 : Finset ()) :

Down-compressing decreases the VC-dimension.

theorem Finset.card_shatterer_le_sum_vcDim {α : Type u_1} [] {𝒜 : Finset ()} [] :
Finset.sum () fun (k : ) =>

The Sauer-Shelah lemma.