Documentation

MeanFourier.Mathlib.Combinatorics.SetFamily.VCDim

VC dimension #

This file defines the VC dimension of set families.

def Shatters {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] (๐’œ : Set ฮฑ) (A : ฮฑ) :

A set family ๐’œ shatters a set A if all subsets of A can be obtained as the intersection of A with some element of the set family. We also say that A is traced by ๐’œ.

Equations
  • Shatters ๐’œ A = โˆ€ โฆƒB : ฮฑโฆ„, B โ‰ค A โ†’ โˆƒ C โˆˆ ๐’œ, A โŠ“ C = B
Instances For
    theorem Shatters.mono {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ โ„ฌ : Set ฮฑ} {A : ฮฑ} (h : ๐’œ โІ โ„ฌ) (h๐’œ : Shatters ๐’œ A) :
    Shatters โ„ฌ A
    theorem Shatters.anti {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A B : ฮฑ} (h : A โ‰ค B) (hB : Shatters ๐’œ B) :
    Shatters ๐’œ A
    theorem Shatters.exists_ge {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} (h : Shatters ๐’œ A) :
    โˆƒ B โˆˆ ๐’œ, A โ‰ค B
    theorem Shatters.of_forall_le {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} (h : โˆ€ B โ‰ค A, B โˆˆ ๐’œ) :
    Shatters ๐’œ A
    theorem Shatters.nonempty {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} (h : Shatters ๐’œ A) :
    ๐’œ.Nonempty
    theorem Shatters.le_iff {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A B : ฮฑ} (h : Shatters ๐’œ A) :
    B โ‰ค A โ†” โˆƒ C โˆˆ ๐’œ, A โŠ“ C = B
    theorem shatters_iff_image_inf_eq_Iic {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} :
    Shatters ๐’œ A โ†” (fun (x : ฮฑ) => A โŠ“ x) '' ๐’œ = Set.Iic A
    theorem Shatters.univ {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {A : ฮฑ} :
    @[simp]
    theorem shatters_bot {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} [OrderBot ฮฑ] :
    Shatters ๐’œ โŠฅ โ†” ๐’œ.Nonempty
    @[simp]
    theorem shatters_top {ฮฑ : Type u_1} [SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} [OrderTop ฮฑ] :
    Shatters ๐’œ โŠค โ†” ๐’œ = Set.univ
    theorem Shatters.preimage_compl {ฮฑ : Type u_1} [BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} (hA : Shatters ๐’œ A) :
    Shatters ((fun (x : ฮฑ) => xแถœ) โปยน' ๐’œ) A
    @[simp]
    theorem shatters_preimage_compl {ฮฑ : Type u_1} [BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} :
    Shatters ((fun (x : ฮฑ) => xแถœ) โปยน' ๐’œ) A โ†” Shatters ๐’œ A
    @[simp]
    theorem shatters_image_compl {ฮฑ : Type u_1} [BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} :
    Shatters ((fun (x : ฮฑ) => xแถœ) '' ๐’œ) A โ†” Shatters ๐’œ A
    theorem Shatters.image_compl {ฮฑ : Type u_1} [BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ} :
    Shatters ๐’œ A โ†’ Shatters ((fun (x : ฮฑ) => xแถœ) '' ๐’œ) A

    Alias of the reverse direction of shatters_image_compl.

    @[instance_reducible]
    instance instDecidablePredFinsetShattersCoe {ฮฑ : Type u_1} [DecidableEq ฮฑ] {๐’œ : Finset (Finset ฮฑ)} :
    DecidablePred (Shatters โ†‘๐’œ)
    Equations
    theorem Shatters.subset {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A B : Set ฮฑ} (h : A โІ B) (hB : Shatters ๐’œ B) :
    Shatters ๐’œ A
    theorem shatters_iff_le_ncard_image_inter {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} :
    Shatters ๐’œ A โ†” 2 ^ A.ncard โ‰ค ((fun (x : Set ฮฑ) => A โˆฉ x) '' ๐’œ).ncard
    noncomputable def vcGrowth {ฮฑ : Type u_1} (n : โ„•) (๐’œ : Set (Set ฮฑ)) :

    The growth of a set family is the maximum number of sets it cuts out from any set of size at most n.

    Equations
    Instances For
      theorem vcGrowth_le_iff {ฮฑ : Type u_1} {n : โ„•} {๐’œ : Set (Set ฮฑ)} {d : โ„•} :
      vcGrowth n ๐’œ โ‰ค d โ†” โˆ€ โฆƒA : Set ฮฑโฆ„, A.Finite โ†’ A.ncard โ‰ค n โ†’ ((fun (x : Set ฮฑ) => A โˆฉ x) '' ๐’œ).ncard โ‰ค d
      theorem vcGrowth_lt_iff {ฮฑ : Type u_1} {n : โ„•} {๐’œ : Set (Set ฮฑ)} {d : โ„•} :
      vcGrowth n ๐’œ < d โ†” โˆ€ โฆƒA : Set ฮฑโฆ„, A.Finite โ†’ A.ncard โ‰ค n โ†’ ((fun (x : Set ฮฑ) => A โˆฉ x) '' ๐’œ).ncard < d
      theorem ncard_image_inter_le_vcGrowth {ฮฑ : Type u_1} {n : โ„•} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} (hA : A.Finite) (hAn : A.ncard โ‰ค n) :
      ((fun (x : Set ฮฑ) => A โˆฉ x) '' ๐’œ).ncard โ‰ค vcGrowth n ๐’œ
      theorem vcGrowth_mono {ฮฑ : Type u_1} {m n : โ„•} {๐’œ โ„ฌ : Set (Set ฮฑ)} (h๐’œโ„ฌ : ๐’œ โІ โ„ฌ) (hmn : m โ‰ค n) :
      vcGrowth m ๐’œ โ‰ค vcGrowth n โ„ฌ
      theorem vcGrowth_union_le {ฮฑ : Type u_1} {n : โ„•} {๐’œ โ„ฌ : Set (Set ฮฑ)} :
      vcGrowth n (๐’œ โˆช โ„ฌ) โ‰ค vcGrowth n ๐’œ + vcGrowth n โ„ฌ
      theorem vcGrowth_image2_inter_le {ฮฑ : Type u_1} {n : โ„•} {๐’œ โ„ฌ : Set (Set ฮฑ)} :
      vcGrowth n (Set.image2 (fun (x1 x2 : Set ฮฑ) => x1 โˆฉ x2) ๐’œ โ„ฌ) โ‰ค vcGrowth n ๐’œ * vcGrowth n โ„ฌ
      def HasVCDimLE {ฮฑ : Type u_1} (d : โ„•) (๐’œ : Set (Set ฮฑ)) :

      A set family ๐’œ has VC dimension at most d if all the sets it shatters have size at most d.

      Equations
      Instances For
        theorem HasVCDimLE.anti {ฮฑ : Type u_1} {d : โ„•} {๐’œ โ„ฌ : Set (Set ฮฑ)} (hโ„ฌ๐’œ : โ„ฌ โІ ๐’œ) (hd : HasVCDimLE d ๐’œ) :
        HasVCDimLE d โ„ฌ
        theorem HasVCDimLE.mono {ฮฑ : Type u_1} {dโ‚ dโ‚‚ : โ„•} {๐’œ : Set (Set ฮฑ)} (hd : dโ‚ โ‰ค dโ‚‚) :
        HasVCDimLE dโ‚ ๐’œ โ†’ HasVCDimLE dโ‚‚ ๐’œ
        theorem vcGrowth_le_iff' {ฮฑ : Type u_1} {n : โ„•} {๐’œ : Set (Set ฮฑ)} [Infinite ฮฑ] {d : โ„•} :
        vcGrowth n ๐’œ โ‰ค d โ†” โˆ€ โฆƒA : Set ฮฑโฆ„, A.Finite โ†’ A.ncard = n โ†’ ((fun (x : Set ฮฑ) => A โˆฉ x) '' ๐’œ).ncard โ‰ค d
        theorem vcGrowth_lt_iff' {ฮฑ : Type u_1} {n : โ„•} {๐’œ : Set (Set ฮฑ)} [Infinite ฮฑ] {d : โ„•} :
        vcGrowth n ๐’œ < d โ†” โˆ€ โฆƒA : Set ฮฑโฆ„, A.Finite โ†’ A.ncard = n โ†’ ((fun (x : Set ฮฑ) => A โˆฉ x) '' ๐’œ).ncard < d
        theorem hasVCDimLE_iff_vcGrowth {ฮฑ : Type u_1} {d : โ„•} {๐’œ : Set (Set ฮฑ)} [Infinite ฮฑ] :
        HasVCDimLE d ๐’œ โ†” vcGrowth (d + 1) ๐’œ < 2 ^ (d + 1)