Mathesis
Declsecond_probe
(n : Nat) โ†’ @Eq Nat (@HAdd.hAdd Nat Nat Nat (@instHAdd Nat instAddNat) n 0) n
Layout
Thesis
second_probetheorem
  1. Declsecond_probeDeclaration kindtheorem
    (n : Nat) โ†’ @Eq Nat (@HAdd.hAdd Nat Nat Nat (@instHAdd Nat instAddNat) n 0) n

Pajor's inequality, with no finiteness assumptions: the traces of ๐’œ on A are at most as many as the subsets of A shattered by ๐’œ. For a finite trace family this is a descent on the number of traces that never consumes the ground set; an infinite trace family forces infinitely many shattered singletons, and both sides are โŠค.

Dvir, Filmus and Moran, A Sauer-Shelah-Perles Lemma for Lattices, credit the Boolean lattice case to Pajor (Sous-espaces โ„“โ‚โฟ des espaces de Banach, Travaux en Cours 16, Hermann, Paris, 1985) and to Aharoni and Holzman, unpublished. Their Theorem 1.2 is the lattice form, for finite lattices with nonvanishing Mรถbius function: a family shatters at least as many elements as it has members. Reading that for a family of traces on a ground set is the standard translation into the language of set families, and the statement here carries no finiteness hypothesis, which theirs does.

Declencard_image_inter_le_encard_shatters
โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard

Relations

Layout
ThesisStepDefinitionCited result
encard_image_inter_le_encโ€ฆtheorempajor_encard_auxtheoremtrace_sep_uniontheoremtrace_sep_disjointtheoremnotMem_of_shatters_sep_riโ€ฆtheoremnotMem_of_shatters_sep_leโ€ฆtheoremnotMem_of_forall_notMemtheoreminsert_injOn_notMemtheoremexists_splittertheoremexists_splitter_of_not_suโ€ฆtheoremdisjoint_image_inserttheoreminserttheoreminfinite_setOf_shatterstheoremsingleton_image_splitPoinโ€ฆtheoremshatters_singletontheoremof_forall_subsettheoremexists_inter_eqtheoremfinite_image_inter_of_finโ€ฆtheoreminjOn_inter_splitPointstheoremShattersdefexists_getheoremmonotheorempreimage_compltheoremshatters_bottheoremsplitPointsdef
  1. Declencard_image_inter_le_encard_shattersDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
  2. Declpajor_encard_auxDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {A : Set ฮฑ} (N : โ„•) (๐’œ : Set (Set ฮฑ)),
      ((fun x => A โˆฉ x) '' ๐’œ).Finite โ†’
        ((fun x => A โˆฉ x) '' ๐’œ).ncard โ‰ค N โ†’ ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
    Used by
  3. Decltrace_sep_unionDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {x : ฮฑ},
      (fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} โˆช (fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆˆ C} = (fun x => A โˆฉ x) '' ๐’œ
    Used by
  4. Decltrace_sep_disjointDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {x : ฮฑ},
      x โˆˆ A โ†’ Disjoint ((fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆ‰ C}) ((fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆˆ C})
    Used by
  5. DeclnotMem_of_shatters_sep_rightDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, Shatters {C | C โˆˆ ๐’œ โˆง x โˆˆ C} B โ†’ x โˆ‰ B
    Uses
    Used by
  6. DeclnotMem_of_shatters_sep_leftDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, Shatters {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} B โ†’ x โˆ‰ B
    Uses
    Used by
  7. DeclnotMem_of_forall_notMemDeclaration kindtheorem

    A family whose members all avoid x shatters only sets avoiding x.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, (โˆ€ C โˆˆ ๐’œ, x โˆ‰ C) โ†’ Shatters ๐’œ B โ†’ x โˆ‰ B
    Used by
  8. Declinsert_injOn_notMemDeclaration kindtheorem

    Inserting a fixed element is injective on the sets avoiding it: the element can be removed again, recovering the argument.

    โˆ€ {ฮฑ : Type u_1} (x : ฮฑ), Set.InjOn (insert x) {B | x โˆ‰ B}
    Used by
  9. Declexists_splitterDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      ((fun x => A โˆฉ x) '' ๐’œ).Nontrivial โ†’ โˆƒ x โˆˆ A, (โˆƒ C โˆˆ ๐’œ, x โˆˆ C) โˆง โˆƒ C โˆˆ ๐’œ, x โˆ‰ C
    Uses
    Used by
  10. Declexists_splitter_of_not_subsetDeclaration kindtheorem

    A point of A witnessing that one trace fails to contain another is a point at which ๐’œ splits.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A C C' : Set ฮฑ},
      C โˆˆ ๐’œ โ†’ C' โˆˆ ๐’œ โ†’ ยฌA โˆฉ C โІ A โˆฉ C' โ†’ โˆƒ x โˆˆ A, (โˆƒ D โˆˆ ๐’œ, x โˆˆ D) โˆง โˆƒ D โˆˆ ๐’œ, x โˆ‰ D
    Used by
  11. Decldisjoint_image_insertDeclaration kindtheorem

    A family whose members all avoid x is disjoint from any family of sets containing x.

    โˆ€ {ฮฑ : Type u_1} {x : ฮฑ} {๐’ฎ ๐’ฏ : Set (Set ฮฑ)}, (โˆ€ B โˆˆ ๐’ฎ, x โˆ‰ B) โ†’ Disjoint ๐’ฎ (insert x '' ๐’ฏ)
    Used by
  12. DeclShatters.insertDeclaration kindtheorem

    If B is shattered both by the members of ๐’œ avoiding x and by the members of ๐’œ containing x, then ๐’œ shatters insert x B. This is the exchange step in the proof of Pajor's inequality.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ},
      Shatters {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} B โ†’ Shatters {C | C โˆˆ ๐’œ โˆง x โˆˆ C} B โ†’ Shatters ๐’œ (insert x B)
    Uses
    Used by
  13. Declinfinite_setOf_shattersDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).Infinite โ†’ {B | B โІ A โˆง Shatters ๐’œ B}.Infinite
    Uses
    Used by
  14. Declsingleton_image_splitPoints_subsetDeclaration kindtheorem

    The singleton of a point at which ๐’œ splits is shattered by ๐’œ.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (fun x => {x}) '' splitPointsโœ ๐’œ A โІ {B | B โІ A โˆง Shatters ๐’œ B}
    Uses
    Used by
  15. Declshatters_singletonDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {x : ฮฑ}, Shatters ๐’œ {x} โ†” (โˆƒ C โˆˆ ๐’œ, x โˆˆ C) โˆง โˆƒ C โˆˆ ๐’œ, x โˆ‰ C
    Uses
    Used by
  16. DeclShatters.of_forall_subsetDeclaration kindtheorem

    Shatters read at Set ฮฑ, as an introduction rule; the โˆฉ-shaped companion of Shatters.of_forall_le.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (โˆ€ โฆƒB : Set ฮฑโฆ„, B โІ A โ†’ โˆƒ C โˆˆ ๐’œ, A โˆฉ C = B) โ†’ Shatters ๐’œ A
    Used by
  17. DeclShatters.exists_inter_eqDeclaration kindtheorem

    Shatters read at Set ฮฑ, where โŠ“ is โˆฉ and โ‰ค is โІ: every subset of A is the intersection of A with a member of ๐’œ. Definitionally the same statement, stated in the shape every use site wants, so that consumers obtain an โˆฉ-typed equation directly.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A B : Set ฮฑ}, Shatters ๐’œ A โ†’ B โІ A โ†’ โˆƒ C โˆˆ ๐’œ, A โˆฉ C = B
    Used by
  18. Declfinite_image_inter_of_finite_splitPointsDeclaration kindtheorem

    A family splitting A at finitely many elements has finitely many traces on A.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (splitPointsโœ ๐’œ A).Finite โ†’ ((fun x => A โˆฉ x) '' ๐’œ).Finite
    Uses
    Used by
  19. DeclinjOn_inter_splitPointsDeclaration kindtheorem

    A trace of ๐’œ on A is determined by its restriction to the elements at which ๐’œ splits: elsewhere, membership in the trace is decided by A alone.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, Set.InjOn (fun x => x โˆฉ splitPointsโœ ๐’œ A) ((fun x => A โˆฉ x) '' ๐’œ)
    Used by
  20. DefinitionShattersdefYaรซl Dillies

    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 ๐’œ.

    {ฮฑ : Type u_1} โ†’ [SemilatticeInf ฮฑ] โ†’ Set ฮฑ โ†’ ฮฑ โ†’ Prop
  21. Cited resultShatters.exists_getheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ}, Shatters ๐’œ A โ†’ โˆƒ B โˆˆ ๐’œ, A โ‰ค B
  22. Cited resultShatters.monotheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ โ„ฌ : Set ฮฑ} {A : ฮฑ}, ๐’œ โІ โ„ฌ โ†’ Shatters ๐’œ A โ†’ Shatters โ„ฌ A
  23. Cited resultShatters.preimage_compltheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ}, Shatters ๐’œ A โ†’ Shatters ((fun x => xแถœ) โปยน' ๐’œ) A
  24. Cited resultshatters_bottheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} [inst_1 : OrderBot ฮฑ], Shatters ๐’œ โŠฅ โ†” ๐’œ.Nonempty
  25. DefinitionsplitPointsdef

    The elements of A at which ๐’œ splits: some member of ๐’œ contains them and some does not. These are exactly the elements whose singleton ๐’œ shatters.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Set ฮฑ โ†’ Set ฮฑ
DeclHasVCDimLE.vcGrowth_le_exp
โˆ€ {ฮฑ : Type u_1} {n d : โ„•} {๐’œ : Set (Set ฮฑ)}, HasVCDimLE d ๐’œ โ†’ d โ‰ค n โ†’ โ†‘(vcGrowth n ๐’œ) โ‰ค (Real.exp 1 / โ†‘d * โ†‘n) ^ d
Layout
ThesisStepHypothesisDefinitionCited result
vcGrowth_le_exptheoremHasVCDimLE d ๐’œh๐’œd โ‰ค nhdnsum_choose_le_exp_powtheoremsum_choose_mul_pow_le_addโ€ฆtheoremsum_choose_le_mul_sum_choโ€ฆtheoremone_add_div_pow_le_exp_powtheoremvcGrowth_le_sum_rangetheoremvcGrowth_letheoremncard_image_inter_letheoremncard_setOf_ncard_letheoremsetOf_subset_and_ncard_leโ€ฆtheoremsetOf_subset_and_ncard_leโ€ฆtheoremdisjoint_setOf_ncard_le_sโ€ฆtheoremncard_image_inter_le_ncarโ€ฆtheoremencard_image_inter_le_encโ€ฆtheorempajor_encard_auxtheoremtrace_sep_uniontheoremtrace_sep_disjointtheoremnotMem_of_shatters_sep_riโ€ฆtheoremnotMem_of_shatters_sep_leโ€ฆtheoremnotMem_of_forall_notMemtheoreminsert_injOn_notMemtheoremexists_splittertheoremexists_splitter_of_not_suโ€ฆtheoremdisjoint_image_inserttheoreminserttheoreminfinite_setOf_shatterstheoremsingleton_image_splitPoinโ€ฆtheoremshatters_singletontheoremof_forall_subsettheoremexists_inter_eqtheoremfinite_image_inter_of_finโ€ฆtheoreminjOn_inter_splitPointstheoremfinite_setOf_subset_andtheoremncard_le_of_shatterstheoremfinite_of_shatterstheoremHasVCDimLEdefShattersdefexists_getheoremmonotheorempreimage_compltheoremsubsettheoremshatters_bottheoremsplitPointsdefvcGrowthdefvcGrowth_le_ifftheorem
  1. DeclHasVCDimLE.vcGrowth_le_expDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {n d : โ„•} {๐’œ : Set (Set ฮฑ)}, HasVCDimLE d ๐’œ โ†’ d โ‰ค n โ†’ โ†‘(vcGrowth n ๐’œ) โ‰ค (Real.exp 1 / โ†‘d * โ†‘n) ^ d
    Uses
  2. Declsum_choose_le_exp_powDeclaration kindtheorem
    โˆ€ (d m : โ„•), 0 < d โ†’ d โ‰ค m โ†’ โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) โ‰ค (Real.exp 1 / โ†‘d * โ†‘m) ^ d
    Uses
    Used by
  3. Declsum_choose_mul_pow_le_add_one_powDeclaration kindtheorem

    Truncating a binomial expansion at degree d can only decrease it, for t โ‰ฅ 0.

    โˆ€ {m d : โ„•} {t : โ„}, 0 โ‰ค t โ†’ d โ‰ค m โ†’ โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) * t ^ i โ‰ค (1 + t) ^ m
    Used by
  4. Declsum_choose_le_mul_sum_choose_mul_powDeclaration kindtheorem

    Undoing the weighting t ^ i costs a single factor (m / d) ^ d, since t = d / m and each i in range is at most d.

    โˆ€ {m d : โ„•},
      0 < โ†‘d โ†’
        0 < โ†‘m โ†’
          โ†‘d โ‰ค โ†‘m โ†’
            โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) โ‰ค
              (โ†‘m / โ†‘d) ^ d * โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) * (โ†‘d / โ†‘m) ^ i
    Used by
  5. Declone_add_div_pow_le_exp_powDeclaration kindtheorem

    At t = d / m, the binomial base is bounded by exp 1 raised to the degree.

    โˆ€ {m d : โ„•}, 0 < โ†‘m โ†’ (1 + โ†‘d / โ†‘m) ^ m โ‰ค Real.exp 1 ^ d
    Used by
  6. DeclHasVCDimLE.vcGrowth_le_sum_rangeDeclaration kindtheorem

    The Sauer-Shelah inequality, with the sum indexed by Finset.range (d + 1).

    โˆ€ {ฮฑ : Type u_1} {n d : โ„•} {๐’œ : Set (Set ฮฑ)}, HasVCDimLE d ๐’œ โ†’ vcGrowth n ๐’œ โ‰ค โˆ‘ k โˆˆ Finset.range (d + 1), n.choose k
    Uses
    Used by
  7. DeclHasVCDimLE.vcGrowth_leDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {n d : โ„•} {๐’œ : Set (Set ฮฑ)}, HasVCDimLE d ๐’œ โ†’ vcGrowth n ๐’œ โ‰ค โˆ‘ k โˆˆ Finset.Iic d, n.choose k
    Uses
    Used by
  8. DeclHasVCDimLE.ncard_image_inter_leDeclaration kindtheorem

    The Sauer-Shelah inequality: a family of VC dimension at most d traces at most โˆ‘ k โ‰ค d, n.choose k sets on any finite set of size at most n. The proof here derives it from Pajor's inequality.

    Simon, A Guide to NIP Theories, states the same bound as his Lemma 6.4, for the growth function of a class of VC dimension at most k, and records in the notes to that chapter that the lemma is implicit in Vapnik and Chervonenkis (1971) and was rediscovered independently by Shelah (1972) and by Sauer (1972). Dvir, Filmus and Moran state it in the introduction to A Sauer-Shelah-Perles Lemma for Lattices and cite the same three sources. Perles is carried in the name they give the lemma; a publication of his is cited by neither source.

    โˆ€ {ฮฑ : Type u_1} {n d : โ„•} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      HasVCDimLE d ๐’œ โ†’ A.Finite โ†’ A.ncard โ‰ค n โ†’ ((fun x => A โˆฉ x) '' ๐’œ).ncard โ‰ค โˆ‘ k โˆˆ Finset.Iic d, n.choose k
    Uses
    Used by
  9. Declncard_setOf_ncard_leDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {A : Set ฮฑ},
      A.Finite โ†’ โˆ€ (d : โ„•), {B | B โІ A โˆง B.ncard โ‰ค d}.ncard = โˆ‘ k โˆˆ Finset.Iic d, A.ncard.choose k
    Uses
    Used by
  10. DeclsetOf_subset_and_ncard_le_zeroDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {A : Set ฮฑ}, A.Finite โ†’ {B | B โІ A โˆง B.ncard โ‰ค 0} = {โˆ…}
    Used by
  11. DeclsetOf_subset_and_ncard_le_succDeclaration kindtheorem

    The subsets of A of size at most d + 1 split into those of size at most d and those of size exactly d + 1.

    โˆ€ {ฮฑ : Type u_1} (d : โ„•) (A : Set ฮฑ),
      {B | B โІ A โˆง B.ncard โ‰ค d + 1} = {B | B โІ A โˆง B.ncard โ‰ค d} โˆช {B | B โІ A โˆง B.ncard = d + 1}
    Used by
  12. Decldisjoint_setOf_ncard_le_setOf_ncard_eqDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} (d : โ„•) (A : Set ฮฑ), Disjoint {B | B โІ A โˆง B.ncard โ‰ค d} {B | B โІ A โˆง B.ncard = d + 1}
    Used by
  13. Declncard_image_inter_le_ncard_setOf_shattersDeclaration kindtheorem

    The ncard transfer of encard_image_inter_le_encard_shatters, for A finite. Internal: the general statement is the encard one, which needs no hypothesis.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      A.Finite โ†’ ((fun x => A โˆฉ x) '' ๐’œ).ncard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.ncard
    Uses
    Used by
  14. Declencard_image_inter_le_encard_shattersDeclaration kindtheorem

    Pajor's inequality, with no finiteness assumptions: the traces of ๐’œ on A are at most as many as the subsets of A shattered by ๐’œ. For a finite trace family this is a descent on the number of traces that never consumes the ground set; an infinite trace family forces infinitely many shattered singletons, and both sides are โŠค.

    Dvir, Filmus and Moran, A Sauer-Shelah-Perles Lemma for Lattices, credit the Boolean lattice case to Pajor (Sous-espaces โ„“โ‚โฟ des espaces de Banach, Travaux en Cours 16, Hermann, Paris, 1985) and to Aharoni and Holzman, unpublished. Their Theorem 1.2 is the lattice form, for finite lattices with nonvanishing Mรถbius function: a family shatters at least as many elements as it has members. Reading that for a family of traces on a ground set is the standard translation into the language of set families, and the statement here carries no finiteness hypothesis, which theirs does.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
    Used by
  15. Declpajor_encard_auxDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {A : Set ฮฑ} (N : โ„•) (๐’œ : Set (Set ฮฑ)),
      ((fun x => A โˆฉ x) '' ๐’œ).Finite โ†’
        ((fun x => A โˆฉ x) '' ๐’œ).ncard โ‰ค N โ†’ ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
    Used by
  16. Decltrace_sep_unionDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {x : ฮฑ},
      (fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} โˆช (fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆˆ C} = (fun x => A โˆฉ x) '' ๐’œ
    Used by
  17. Decltrace_sep_disjointDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {x : ฮฑ},
      x โˆˆ A โ†’ Disjoint ((fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆ‰ C}) ((fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆˆ C})
    Used by
  18. DeclnotMem_of_shatters_sep_rightDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, Shatters {C | C โˆˆ ๐’œ โˆง x โˆˆ C} B โ†’ x โˆ‰ B
    Uses
    Used by
  19. DeclnotMem_of_shatters_sep_leftDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, Shatters {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} B โ†’ x โˆ‰ B
    Uses
    Used by
  20. DeclnotMem_of_forall_notMemDeclaration kindtheorem

    A family whose members all avoid x shatters only sets avoiding x.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, (โˆ€ C โˆˆ ๐’œ, x โˆ‰ C) โ†’ Shatters ๐’œ B โ†’ x โˆ‰ B
    Used by
  21. Declinsert_injOn_notMemDeclaration kindtheorem

    Inserting a fixed element is injective on the sets avoiding it: the element can be removed again, recovering the argument.

    โˆ€ {ฮฑ : Type u_1} (x : ฮฑ), Set.InjOn (insert x) {B | x โˆ‰ B}
    Used by
  22. Declexists_splitterDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      ((fun x => A โˆฉ x) '' ๐’œ).Nontrivial โ†’ โˆƒ x โˆˆ A, (โˆƒ C โˆˆ ๐’œ, x โˆˆ C) โˆง โˆƒ C โˆˆ ๐’œ, x โˆ‰ C
    Uses
    Used by
  23. Declexists_splitter_of_not_subsetDeclaration kindtheorem

    A point of A witnessing that one trace fails to contain another is a point at which ๐’œ splits.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A C C' : Set ฮฑ},
      C โˆˆ ๐’œ โ†’ C' โˆˆ ๐’œ โ†’ ยฌA โˆฉ C โІ A โˆฉ C' โ†’ โˆƒ x โˆˆ A, (โˆƒ D โˆˆ ๐’œ, x โˆˆ D) โˆง โˆƒ D โˆˆ ๐’œ, x โˆ‰ D
    Used by
  24. Decldisjoint_image_insertDeclaration kindtheorem

    A family whose members all avoid x is disjoint from any family of sets containing x.

    โˆ€ {ฮฑ : Type u_1} {x : ฮฑ} {๐’ฎ ๐’ฏ : Set (Set ฮฑ)}, (โˆ€ B โˆˆ ๐’ฎ, x โˆ‰ B) โ†’ Disjoint ๐’ฎ (insert x '' ๐’ฏ)
    Used by
  25. DeclShatters.insertDeclaration kindtheorem

    If B is shattered both by the members of ๐’œ avoiding x and by the members of ๐’œ containing x, then ๐’œ shatters insert x B. This is the exchange step in the proof of Pajor's inequality.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ},
      Shatters {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} B โ†’ Shatters {C | C โˆˆ ๐’œ โˆง x โˆˆ C} B โ†’ Shatters ๐’œ (insert x B)
    Uses
    Used by
  26. Declinfinite_setOf_shattersDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).Infinite โ†’ {B | B โІ A โˆง Shatters ๐’œ B}.Infinite
    Uses
    Used by
  27. Declsingleton_image_splitPoints_subsetDeclaration kindtheorem

    The singleton of a point at which ๐’œ splits is shattered by ๐’œ.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (fun x => {x}) '' splitPointsโœ ๐’œ A โІ {B | B โІ A โˆง Shatters ๐’œ B}
    Uses
    Used by
  28. Declshatters_singletonDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {x : ฮฑ}, Shatters ๐’œ {x} โ†” (โˆƒ C โˆˆ ๐’œ, x โˆˆ C) โˆง โˆƒ C โˆˆ ๐’œ, x โˆ‰ C
    Uses
    Used by
  29. DeclShatters.of_forall_subsetDeclaration kindtheorem

    Shatters read at Set ฮฑ, as an introduction rule; the โˆฉ-shaped companion of Shatters.of_forall_le.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (โˆ€ โฆƒB : Set ฮฑโฆ„, B โІ A โ†’ โˆƒ C โˆˆ ๐’œ, A โˆฉ C = B) โ†’ Shatters ๐’œ A
    Used by
  30. DeclShatters.exists_inter_eqDeclaration kindtheorem

    Shatters read at Set ฮฑ, where โŠ“ is โˆฉ and โ‰ค is โІ: every subset of A is the intersection of A with a member of ๐’œ. Definitionally the same statement, stated in the shape every use site wants, so that consumers obtain an โˆฉ-typed equation directly.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A B : Set ฮฑ}, Shatters ๐’œ A โ†’ B โІ A โ†’ โˆƒ C โˆˆ ๐’œ, A โˆฉ C = B
    Used by
  31. Declfinite_image_inter_of_finite_splitPointsDeclaration kindtheorem

    A family splitting A at finitely many elements has finitely many traces on A.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (splitPointsโœ ๐’œ A).Finite โ†’ ((fun x => A โˆฉ x) '' ๐’œ).Finite
    Uses
    Used by
  32. DeclinjOn_inter_splitPointsDeclaration kindtheorem

    A trace of ๐’œ on A is determined by its restriction to the elements at which ๐’œ splits: elsewhere, membership in the trace is decided by A alone.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, Set.InjOn (fun x => x โˆฉ splitPointsโœ ๐’œ A) ((fun x => A โˆฉ x) '' ๐’œ)
    Used by
  33. Declfinite_setOf_subset_andDeclaration kindtheorem

    Any collection of subsets of a finite set is finite.

    โˆ€ {ฮฑ : Type u_1} {A : Set ฮฑ}, A.Finite โ†’ โˆ€ (p : Set ฮฑ โ†’ Prop), {B | B โІ A โˆง p B}.Finite
    Used by
  34. DeclHasVCDimLE.ncard_le_of_shattersDeclaration kindtheorem

    A family of VC dimension at most d shatters only sets of size at most d.

    โˆ€ {ฮฑ : Type u_1} {d : โ„•} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ}, HasVCDimLE d ๐’œ โ†’ Shatters ๐’œ B โ†’ B.ncard โ‰ค d
    Uses
    Used by
  35. DeclHasVCDimLE.finite_of_shattersDeclaration kindtheorem

    A family of VC dimension at most d shatters only finite sets.

    โˆ€ {ฮฑ : Type u_1} {d : โ„•} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ}, HasVCDimLE d ๐’œ โ†’ Shatters ๐’œ B โ†’ B.Finite
    Used by
  36. Hypothesish๐’œ
    HasVCDimLE d ๐’œ
  37. Hypothesishdn
    d โ‰ค n
  38. DefinitionHasVCDimLEdefYaรซl Dillies

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

    {ฮฑ : Type u_1} โ†’ โ„• โ†’ Set (Set ฮฑ) โ†’ Prop
  39. DefinitionShattersdefYaรซl Dillies

    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 ๐’œ.

    {ฮฑ : Type u_1} โ†’ [SemilatticeInf ฮฑ] โ†’ Set ฮฑ โ†’ ฮฑ โ†’ Prop
  40. Cited resultShatters.exists_getheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ}, Shatters ๐’œ A โ†’ โˆƒ B โˆˆ ๐’œ, A โ‰ค B
  41. Cited resultShatters.monotheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ โ„ฌ : Set ฮฑ} {A : ฮฑ}, ๐’œ โІ โ„ฌ โ†’ Shatters ๐’œ A โ†’ Shatters โ„ฌ A
  42. Cited resultShatters.preimage_compltheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ}, Shatters ๐’œ A โ†’ Shatters ((fun x => xแถœ) โปยน' ๐’œ) A
  43. Cited resultShatters.subsettheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A B : Set ฮฑ}, A โІ B โ†’ Shatters ๐’œ B โ†’ Shatters ๐’œ A
  44. Cited resultshatters_bottheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} [inst_1 : OrderBot ฮฑ], Shatters ๐’œ โŠฅ โ†” ๐’œ.Nonempty
  45. DefinitionsplitPointsdef

    The elements of A at which ๐’œ splits: some member of ๐’œ contains them and some does not. These are exactly the elements whose singleton ๐’œ shatters.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Set ฮฑ โ†’ Set ฮฑ
  46. DefinitionvcGrowthdefYaรซl Dillies

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

    {ฮฑ : Type u_1} โ†’ โ„• โ†’ Set (Set ฮฑ) โ†’ โ„•
  47. Cited resultvcGrowth_le_ifftheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} {n : โ„•} {๐’œ : Set (Set ฮฑ)} {d : โ„•},
      vcGrowth n ๐’œ โ‰ค d โ†” โˆ€ โฆƒA : Set ฮฑโฆ„, A.Finite โ†’ A.ncard โ‰ค n โ†’ ((fun x => A โˆฉ x) '' ๐’œ).ncard โ‰ค d

The cardinal Pajor inequality for determined traces: the traces of ๐’œ on A that are determined by finitely many points inject into the shattered subsets, with no hypotheses. Unlike the โ„•โˆž-valued encard_determined_le_encard_shatters, this bounds genuine cardinalities; the full trace family cannot replace the determined traces (not_mk_image_inter_le_mk_shatters).

Declmk_determined_le_mk_shatters
โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
  Cardinal.mk โ†‘{t | t โˆˆ (fun x => A โˆฉ x) '' ๐’œ โˆง โˆƒ F, F.Finite โˆง โˆ€ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ, t' โˆฉ F = t โˆฉ F โ†’ t' = t} โ‰ค
    Cardinal.mk โ†‘{B | B โІ A โˆง Shatters ๐’œ B}

Relations

  • Limited byMTH.C-2026-6004

    The full trace family cannot replace the determined traces: the half-line cuts over the rationals trace continuum-many sets while shattering only countably many.

    Asserted by Dhruv GuptaDhruv Gupta
Layout
ThesisStepDefinitionCited result
mk_determined_le_mk_shattโ€ฆtheoremmk_diag_le_mk_shatterstheoremmk_determined_le_of_infinโ€ฆtheoremwitness_diagtheoremfinite_image_inter_of_finโ€ฆtheoremmem_iff_mem_of_notMem_diagtheoremencard_determined_le_encaโ€ฆtheoremencard_image_inter_le_encโ€ฆtheorempajor_encard_auxtheoremtrace_sep_uniontheoremtrace_sep_disjointtheoremnotMem_of_shatters_sep_riโ€ฆtheoremnotMem_of_shatters_sep_leโ€ฆtheoremnotMem_of_forall_notMemtheoreminsert_injOn_notMemtheoremexists_splittertheoremexists_splitter_of_not_suโ€ฆtheoremdisjoint_image_inserttheoreminserttheoreminfinite_setOf_shatterstheoremsingleton_image_splitPoinโ€ฆtheoremshatters_singletontheoremof_forall_subsettheoremexists_inter_eqtheoremfinite_image_inter_of_finโ€ฆtheoreminjOn_inter_splitPointstheoremShattersdefexists_getheoremmonotheorempreimage_compltheoremdiagdefshatters_bottheoremsplitPointsdef
  1. Declmk_determined_le_mk_shattersDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      Cardinal.mk โ†‘{t | t โˆˆ (fun x => A โˆฉ x) '' ๐’œ โˆง โˆƒ F, F.Finite โˆง โˆ€ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ, t' โˆฉ F = t โˆฉ F โ†’ t' = t} โ‰ค
        Cardinal.mk โ†‘{B | B โІ A โˆง Shatters ๐’œ B}
    Uses
  2. Declmk_diag_le_mk_shattersDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, Cardinal.mk โ†‘(diagโœ ๐’œ A) โ‰ค Cardinal.mk โ†‘{B | B โІ A โˆง Shatters ๐’œ B}
    Uses
    Used by
  3. Declmk_determined_le_of_infinite_diagDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      (diagโœ ๐’œ A).Infinite โ†’
        Cardinal.mk
            โ†‘{t | t โˆˆ (fun x => A โˆฉ x) '' ๐’œ โˆง โˆƒ F, F.Finite โˆง โˆ€ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ, t' โˆฉ F = t โˆฉ F โ†’ t' = t} โ‰ค
          Cardinal.mk โ†‘(diagโœ ๐’œ A)
    Uses
    Used by
  4. Declwitness_diagDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A t F : Set ฮฑ},
      (โˆ€ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ, t' โˆฉ F = t โˆฉ F โ†’ t' = t) โ†’
        t โˆˆ (fun x => A โˆฉ x) '' ๐’œ โ†’ โˆ€ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ, t' โˆฉ (F โˆฉ diagโœ ๐’œ A) = t โˆฉ (F โˆฉ diagโœ ๐’œ A) โ†’ t' = t
    Uses
    Used by
  5. Declfinite_image_inter_of_finite_diagDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (diagโœ ๐’œ A).Finite โ†’ ((fun x => A โˆฉ x) '' ๐’œ).Finite
    Uses
    Used by
  6. Declmem_iff_mem_of_notMem_diagDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A t t' : Set ฮฑ},
      t โˆˆ (fun x => A โˆฉ x) '' ๐’œ โ†’ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ โ†’ โˆ€ {y : ฮฑ}, y โˆ‰ diagโœ ๐’œ A โ†’ (y โˆˆ t โ†” y โˆˆ t')
    Used by
  7. Declencard_determined_le_encard_shattersDeclaration kindtheorem

    The traces of ๐’œ on A that are determined by finitely many points are at most as many as the shattered subsets: the restriction of encard_image_inter_le_encard_shatters to the determined traces. Its cardinal-valued sharpening, which is genuinely stronger than the โ„•โˆž statement, is mk_determined_le_mk_shatters.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      {t | t โˆˆ (fun x => A โˆฉ x) '' ๐’œ โˆง โˆƒ F, F.Finite โˆง โˆ€ t' โˆˆ (fun x => A โˆฉ x) '' ๐’œ, t' โˆฉ F = t โˆฉ F โ†’ t' = t}.encard โ‰ค
        {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
    Used by
  8. Declencard_image_inter_le_encard_shattersDeclaration kindtheorem

    Pajor's inequality, with no finiteness assumptions: the traces of ๐’œ on A are at most as many as the subsets of A shattered by ๐’œ. For a finite trace family this is a descent on the number of traces that never consumes the ground set; an infinite trace family forces infinitely many shattered singletons, and both sides are โŠค.

    Dvir, Filmus and Moran, A Sauer-Shelah-Perles Lemma for Lattices, credit the Boolean lattice case to Pajor (Sous-espaces โ„“โ‚โฟ des espaces de Banach, Travaux en Cours 16, Hermann, Paris, 1985) and to Aharoni and Holzman, unpublished. Their Theorem 1.2 is the lattice form, for finite lattices with nonvanishing Mรถbius function: a family shatters at least as many elements as it has members. Reading that for a family of traces on a ground set is the standard translation into the language of set families, and the statement here carries no finiteness hypothesis, which theirs does.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
    Used by
  9. Declpajor_encard_auxDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {A : Set ฮฑ} (N : โ„•) (๐’œ : Set (Set ฮฑ)),
      ((fun x => A โˆฉ x) '' ๐’œ).Finite โ†’
        ((fun x => A โˆฉ x) '' ๐’œ).ncard โ‰ค N โ†’ ((fun x => A โˆฉ x) '' ๐’œ).encard โ‰ค {B | B โІ A โˆง Shatters ๐’œ B}.encard
    Uses
    Used by
  10. Decltrace_sep_unionDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {x : ฮฑ},
      (fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} โˆช (fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆˆ C} = (fun x => A โˆฉ x) '' ๐’œ
    Used by
  11. Decltrace_sep_disjointDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {x : ฮฑ},
      x โˆˆ A โ†’ Disjoint ((fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆ‰ C}) ((fun x => A โˆฉ x) '' {C | C โˆˆ ๐’œ โˆง x โˆˆ C})
    Used by
  12. DeclnotMem_of_shatters_sep_rightDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, Shatters {C | C โˆˆ ๐’œ โˆง x โˆˆ C} B โ†’ x โˆ‰ B
    Uses
    Used by
  13. DeclnotMem_of_shatters_sep_leftDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, Shatters {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} B โ†’ x โˆ‰ B
    Uses
    Used by
  14. DeclnotMem_of_forall_notMemDeclaration kindtheorem

    A family whose members all avoid x shatters only sets avoiding x.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ}, (โˆ€ C โˆˆ ๐’œ, x โˆ‰ C) โ†’ Shatters ๐’œ B โ†’ x โˆ‰ B
    Used by
  15. Declinsert_injOn_notMemDeclaration kindtheorem

    Inserting a fixed element is injective on the sets avoiding it: the element can be removed again, recovering the argument.

    โˆ€ {ฮฑ : Type u_1} (x : ฮฑ), Set.InjOn (insert x) {B | x โˆ‰ B}
    Used by
  16. Declexists_splitterDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      ((fun x => A โˆฉ x) '' ๐’œ).Nontrivial โ†’ โˆƒ x โˆˆ A, (โˆƒ C โˆˆ ๐’œ, x โˆˆ C) โˆง โˆƒ C โˆˆ ๐’œ, x โˆ‰ C
    Uses
    Used by
  17. Declexists_splitter_of_not_subsetDeclaration kindtheorem

    A point of A witnessing that one trace fails to contain another is a point at which ๐’œ splits.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A C C' : Set ฮฑ},
      C โˆˆ ๐’œ โ†’ C' โˆˆ ๐’œ โ†’ ยฌA โˆฉ C โІ A โˆฉ C' โ†’ โˆƒ x โˆˆ A, (โˆƒ D โˆˆ ๐’œ, x โˆˆ D) โˆง โˆƒ D โˆˆ ๐’œ, x โˆ‰ D
    Used by
  18. Decldisjoint_image_insertDeclaration kindtheorem

    A family whose members all avoid x is disjoint from any family of sets containing x.

    โˆ€ {ฮฑ : Type u_1} {x : ฮฑ} {๐’ฎ ๐’ฏ : Set (Set ฮฑ)}, (โˆ€ B โˆˆ ๐’ฎ, x โˆ‰ B) โ†’ Disjoint ๐’ฎ (insert x '' ๐’ฏ)
    Used by
  19. DeclShatters.insertDeclaration kindtheorem

    If B is shattered both by the members of ๐’œ avoiding x and by the members of ๐’œ containing x, then ๐’œ shatters insert x B. This is the exchange step in the proof of Pajor's inequality.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {B : Set ฮฑ} {x : ฮฑ},
      Shatters {C | C โˆˆ ๐’œ โˆง x โˆ‰ C} B โ†’ Shatters {C | C โˆˆ ๐’œ โˆง x โˆˆ C} B โ†’ Shatters ๐’œ (insert x B)
    Uses
    Used by
  20. Declinfinite_setOf_shattersDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, ((fun x => A โˆฉ x) '' ๐’œ).Infinite โ†’ {B | B โІ A โˆง Shatters ๐’œ B}.Infinite
    Uses
    Used by
  21. Declsingleton_image_splitPoints_subsetDeclaration kindtheorem

    The singleton of a point at which ๐’œ splits is shattered by ๐’œ.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (fun x => {x}) '' splitPointsโœ ๐’œ A โІ {B | B โІ A โˆง Shatters ๐’œ B}
    Uses
    Used by
  22. Declshatters_singletonDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {x : ฮฑ}, Shatters ๐’œ {x} โ†” (โˆƒ C โˆˆ ๐’œ, x โˆˆ C) โˆง โˆƒ C โˆˆ ๐’œ, x โˆ‰ C
    Uses
    Used by
  23. DeclShatters.of_forall_subsetDeclaration kindtheorem

    Shatters read at Set ฮฑ, as an introduction rule; the โˆฉ-shaped companion of Shatters.of_forall_le.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (โˆ€ โฆƒB : Set ฮฑโฆ„, B โІ A โ†’ โˆƒ C โˆˆ ๐’œ, A โˆฉ C = B) โ†’ Shatters ๐’œ A
    Used by
  24. DeclShatters.exists_inter_eqDeclaration kindtheorem

    Shatters read at Set ฮฑ, where โŠ“ is โˆฉ and โ‰ค is โІ: every subset of A is the intersection of A with a member of ๐’œ. Definitionally the same statement, stated in the shape every use site wants, so that consumers obtain an โˆฉ-typed equation directly.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A B : Set ฮฑ}, Shatters ๐’œ A โ†’ B โІ A โ†’ โˆƒ C โˆˆ ๐’œ, A โˆฉ C = B
    Used by
  25. Declfinite_image_inter_of_finite_splitPointsDeclaration kindtheorem

    A family splitting A at finitely many elements has finitely many traces on A.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, (splitPointsโœ ๐’œ A).Finite โ†’ ((fun x => A โˆฉ x) '' ๐’œ).Finite
    Uses
    Used by
  26. DeclinjOn_inter_splitPointsDeclaration kindtheorem

    A trace of ๐’œ on A is determined by its restriction to the elements at which ๐’œ splits: elsewhere, membership in the trace is decided by A alone.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ}, Set.InjOn (fun x => x โˆฉ splitPointsโœ ๐’œ A) ((fun x => A โˆฉ x) '' ๐’œ)
    Used by
  27. DefinitionShattersdefYaรซl Dillies

    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 ๐’œ.

    {ฮฑ : Type u_1} โ†’ [SemilatticeInf ฮฑ] โ†’ Set ฮฑ โ†’ ฮฑ โ†’ Prop
  28. Cited resultShatters.exists_getheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ}, Shatters ๐’œ A โ†’ โˆƒ B โˆˆ ๐’œ, A โ‰ค B
  29. Cited resultShatters.monotheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ โ„ฌ : Set ฮฑ} {A : ฮฑ}, ๐’œ โІ โ„ฌ โ†’ Shatters ๐’œ A โ†’ Shatters โ„ฌ A
  30. Cited resultShatters.preimage_compltheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : BooleanAlgebra ฮฑ] {๐’œ : Set ฮฑ} {A : ฮฑ}, Shatters ๐’œ A โ†’ Shatters ((fun x => xแถœ) โปยน' ๐’œ) A
  31. Definitiondiagdef

    The points of A on which ๐’œ is not constant.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Set ฮฑ โ†’ Set ฮฑ
  32. Cited resultshatters_bottheoremYaรซl Dillies
    โˆ€ {ฮฑ : Type u_1} [inst : SemilatticeInf ฮฑ] {๐’œ : Set ฮฑ} [inst_1 : OrderBot ฮฑ], Shatters ๐’œ โŠฅ โ†” ๐’œ.Nonempty
  33. DefinitionsplitPointsdef

    The elements of A at which ๐’œ splits: some member of ๐’œ contains them and some does not. These are exactly the elements whose singleton ๐’œ shatters.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Set ฮฑ โ†’ Set ฮฑ

The full trace family cannot replace the determined traces in mk_determined_le_mk_shatters: the half-line cuts over โ„š trace continuum-many sets while shattering only countably many.

Declnot_mk_image_inter_le_mk_shatters
ยฌCardinal.mk โ†‘((fun x => Set.univ โˆฉ x) '' Set.range fun r => {q | โ†‘q < r}) โ‰ค
    Cardinal.mk โ†‘{B | B โІ Set.univ โˆง Shatters (Set.range fun r => {q | โ†‘q < r}) B}

Relations

  • LimitsMTH.C-2026-6003

    The full trace family cannot replace the determined traces: the half-line cuts over the rationals trace continuum-many sets while shattering only countably many.

    Asserted by Dhruv GuptaDhruv Gupta
Layout
ThesisStepDefinition
not_mk_image_inter_le_mk_โ€ฆtheoremcut_injectivetheoremcountable_setOf_shatters_โ€ฆtheoremsubsingleton_of_shatters_โ€ฆtheoremShattersdefcutdef
  1. Declnot_mk_image_inter_le_mk_shattersDeclaration kindtheorem
    ยฌCardinal.mk โ†‘((fun x => Set.univ โˆฉ x) '' Set.range fun r => {q | โ†‘q < r}) โ‰ค
        Cardinal.mk โ†‘{B | B โІ Set.univ โˆง Shatters (Set.range fun r => {q | โ†‘q < r}) B}
    Uses
  2. Declcut_injectiveDeclaration kindtheorem
    Function.Injective cutโœ
    Used by
  3. Declcountable_setOf_shatters_range_cutDeclaration kindtheorem
    {B | B โІ Set.univ โˆง Shatters (Set.range cutโœ) B}.Countable
    Uses
    Used by
  4. Declsubsingleton_of_shatters_range_cutDeclaration kindtheorem
    โˆ€ {B : Set โ„š}, Shatters (Set.range cutโœ) B โ†’ B.Subsingleton
    Used by
  5. DefinitionShattersdefYaรซl Dillies

    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 ๐’œ.

    {ฮฑ : Type u_1} โ†’ [SemilatticeInf ฮฑ] โ†’ Set ฮฑ โ†’ ฮฑ โ†’ Prop
  6. Definitioncutdef
    โ„ โ†’ Set โ„š

Pajor's inequality for multiclass concept classes, with no hypotheses on the domain, the label type or the family: the traces of ๐’ž on S are at most as many as the pair-cubes of ๐’ž supported inside S.

The count runs on a split of the family at a point where two traces differ, taking one branch per realised value with no residual bucket. A cube of a branch never constrains the split point, so a cube pair-shattered by ฮผ branches is counted ฮผ times on the left and supplies 1 + ฮผ.choose 2 cubes on the right, which closes the accounting because ฮผ โ‰ค 1 + ฮผ.choose 2 for ฮผ โ‰ฅ 1, with equality exactly at ฮผ โˆˆ {1, 2}. An infinite trace family forces infinitely many one-point cubes and both sides are โŠค.

At Y = Bool this specialises to encard_image_inter_le_encard_shatters, which is encard_image_inter_le_encard_shatters_of_multiclass below. The pair-cube is Natarajan's shattering witness for spaces of functions, from p. 81 of On learning sets and functions; see the module docstring.

Declencard_image_restrict_le_encard_pairCubes
โˆ€ {X : Type u_1} {Y : Type u_2} (๐’ž : Set (X โ†’ Y)) (S : Set X), (S.restrict '' ๐’ž).encard โ‰ค (pairCubes ๐’ž S).encard

Relations

Layout
ThesisStepDefinition
encard_image_restrict_le_โ€ฆtheoreminfinite_pairCubes_of_infโ€ฆtheoremsingCube_right_injectivetheoremsingCube_apply_selftheoremsingCube_mem_pairCubestheorempairSupport_singCubetheoremexists_injOn_pairCubestheorempairOf_right_injectivetheoremncard_image_restrict_sep_โ€ฆtheoremdisjoint_image_restrict_sโ€ฆtheoremmem_pairCubes_graft_pairOftheorempairSupport_graft_subsettheorempairShatters_grafttheorempairSupport_grafttheorempairOf_isPairPatterntheorempairOf_selftheorempairOf_of_netheoremisPairPattern_grafttheoremgraft_empty_selftheoremmonotheoremgraft_eq_grafttheoremgraft_selftheoremgraft_of_netheoremexists_sel_attheoremexists_seltheoremexists_injOn_of_subsingleโ€ฆtheoremconst_empty_mem_pairCubestheorempairSupport_const_emptytheoremIsPairPatterndefPairShattersdefgraftdefpairCubesdefpairOfdefpairSupportdefsingCubedef
  1. Declencard_image_restrict_le_encard_pairCubesDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} (๐’ž : Set (X โ†’ Y)) (S : Set X), (S.restrict '' ๐’ž).encard โ‰ค (pairCubes ๐’ž S).encard
    Uses
  2. Declinfinite_pairCubes_of_infinite_image_restrictDeclaration kindtheorem

    Infinitely many traces force infinitely many cubes. Either the family disagrees at infinitely many points of S, each of which carries a one-point cube, or it realises infinitely many labels at one point, which carries infinitely many one-point cubes. The proof runs the contrapositive: finitely many cubes bound both the disagreement set and, above each of its points, the set of realised labels, and a trace is determined by its values on the disagreement set, so the traces embed in a finite product. This is what makes the multiclass inequality hypothesis-free, as infinite_setOf_shatters does in the binary case.

    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {S : Set X}, (S.restrict '' ๐’ž).Infinite โ†’ (pairCubes ๐’ž S).Infinite
    Uses
    Used by
  3. DeclsingCube_right_injectiveDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} (z : X) (u : Y), Function.Injective (singCubeโœ z u)
    Uses
    Used by
  4. DeclsingCube_apply_selfDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} (z : X) (u v : Y), singCubeโœ z u v z = pairOfโœ u v
    Uses
    Used by
  5. DeclsingCube_mem_pairCubesDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {S : Set X} {u v : Y} {z : X},
      z โˆˆ S โ†’ (โˆƒ c โˆˆ ๐’ž, c z = u) โ†’ (โˆƒ c โˆˆ ๐’ž, c z = v) โ†’ singCubeโœ z u v โˆˆ pairCubes ๐’ž S
    Uses
    Used by
  6. DeclpairSupport_singCubeDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {u v : Y} (z : X), u โ‰  v โ†’ pairSupport (singCubeโœ z u v) = {z}
    Uses
    Used by
  7. Declexists_injOn_pairCubesDeclaration kindtheorem

    The whole accounting, as one injection from traces to cubes.

    At a point where two traces differ, every realised value gets its own branch, and a trace is routed by the value it takes there. The branch injections supplied by the induction hypothesis land in cubes that avoid that point, and a cube pair-shattered by ฮผ branches carries ฮผ traces into ฮผ of the 1 + ฮผ.choose 2 cubes available above it: the cube itself for the branch selected as the anchor, and one graft for each of the other ฮผ - 1. Injectivity is read off the graft, since pairOf u ยท is injective and the pattern below the new point is recovered by evaluating away from it.

    โˆ€ {X : Type u_1} {Y : Type u_2} (S : Set X) (N : โ„•) (๐’ž : Set (X โ†’ Y)),
      (S.restrict '' ๐’ž).Finite โ†’
        (S.restrict '' ๐’ž).ncard โ‰ค N โ†’ โˆƒ ฯ†, Set.MapsTo ฯ† (S.restrict '' ๐’ž) (pairCubes ๐’ž S) โˆง Set.InjOn ฯ† (S.restrict '' ๐’ž)
    Uses
    Used by
  8. DeclpairOf_right_injectiveDeclaration kindtheorem
    โˆ€ {Y : Type u_2} (u : Y), Function.Injective (pairOfโœ u)
    Uses
    Used by
  9. Declncard_image_restrict_sep_ltDeclaration kindtheorem

    Splitting off one realised value at a point of S where the family is not constant strictly lowers the number of traces, because a second value survives outside the branch.

    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {S : Set X} {x : X} {u : Y},
      x โˆˆ S โ†’
        โˆ€ {c : X โ†’ Y},
          c โˆˆ ๐’ž โ†’ c x โ‰  u โ†’ (S.restrict '' ๐’ž).Finite โ†’ (S.restrict '' {d | d โˆˆ ๐’ž โˆง d x = u}).ncard < (S.restrict '' ๐’ž).ncard
    Uses
    Used by
  10. Decldisjoint_image_restrict_sepDeclaration kindtheorem

    Two branches at one point of S cut disjoint families of traces.

    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {S : Set X} {x : X} {u v : Y},
      x โˆˆ S โ†’ u โ‰  v โ†’ Disjoint (S.restrict '' {d | d โˆˆ ๐’ž โˆง d x = u}) (S.restrict '' {d | d โˆˆ ๐’ž โˆง d x = v})
    Used by
  11. Declmem_pairCubes_graft_pairOfDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {S : Set X} {P : X โ†’ Set Y} {x : X} {u v : Y},
      x โˆˆ S โ†’
        P โˆˆ pairCubes {c | c โˆˆ ๐’ž โˆง c x = u} S โ†’
          P โˆˆ pairCubes {c | c โˆˆ ๐’ž โˆง c x = v} S โ†’ graft P x (pairOfโœ u v) โˆˆ pairCubes ๐’ž S
    Uses
    Used by
  12. DeclpairSupport_graft_subsetDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {S : Set X} {P : X โ†’ Set Y} {x : X},
      x โˆˆ S โ†’ pairSupport P โІ S โ†’ โˆ€ (s : Set Y), pairSupport (graft P x s) โІ S
    Uses
    Used by
  13. DeclpairShatters_graftDeclaration kindtheorem

    The graft. A pattern pair-shattered by the branch at a and by the branch at b extends by one unconstrained point carrying the pair {a, b} there to a pattern pair-shattered by the whole family. The selection at the new point names the branch that realises it. This is the multiclass exchange step, and it mirrors Shatters.insert.

    The two labels are not required to differ. Distinctness is what makes the result a pair pattern, and it enters at mem_pairCubes_graft_pairOf, not here.

    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {P : X โ†’ Set Y} {x : X} {a b : Y},
      P x = โˆ… โ†’
        PairShatters {c | c โˆˆ ๐’ž โˆง c x = a} P โ†’ PairShatters {c | c โˆˆ ๐’ž โˆง c x = b} P โ†’ PairShatters ๐’ž (graft P x {a, b})
    Uses
    Used by
  14. DeclpairSupport_graftDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} (P : X โ†’ Set Y) (x : X) {s : Set Y},
      s.Nonempty โ†’ pairSupport (graft P x s) = insert x (pairSupport P)
    Uses
    Used by
  15. DeclpairOf_isPairPatternDeclaration kindtheorem
    โˆ€ {Y : Type u_2} (u v : Y), pairOfโœ u v = โˆ… โˆจ (pairOfโœ u v).encard = 2
    Uses
    Used by
  16. DeclpairOf_selfDeclaration kindtheorem
    โˆ€ {Y : Type u_2} {u v : Y}, u = v โ†’ pairOfโœ u v = โˆ…
    Used by
  17. DeclpairOf_of_neDeclaration kindtheorem
    โˆ€ {Y : Type u_2} {u v : Y}, u โ‰  v โ†’ pairOfโœ u v = {u, v}
    Used by
  18. DeclisPairPattern_graftDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {P : X โ†’ Set Y},
      IsPairPattern P โ†’ โˆ€ (x : X) {s : Set Y}, s = โˆ… โˆจ s.encard = 2 โ†’ IsPairPattern (graft P x s)
    Uses
    Used by
  19. Declgraft_empty_selfDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {P : X โ†’ Set Y} {x : X}, P x = โˆ… โ†’ graft P x โˆ… = P
    Uses
    Used by
  20. DeclPairShatters.monoDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž ๐’Ÿ : Set (X โ†’ Y)} {P : X โ†’ Set Y}, ๐’ž โІ ๐’Ÿ โ†’ PairShatters ๐’ž P โ†’ PairShatters ๐’Ÿ P
    Used by
  21. Declgraft_eq_graftDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {P P' : X โ†’ Set Y} {x : X},
      P x = โˆ… โ†’ P' x = โˆ… โ†’ โˆ€ {s s' : Set Y}, graft P x s = graft P' x s' โ†’ P = P' โˆง s = s'
    Uses
    Used by
  22. Declgraft_selfDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} (P : X โ†’ Set Y) (x : X) (s : Set Y), graft P x s x = s
    Used by
  23. Declgraft_of_neDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {x z : X} (P : X โ†’ Set Y) (s : Set Y), z โ‰  x โ†’ graft P x s z = P z
    Used by
  24. Declexists_sel_atDeclaration kindtheorem

    The single-point case: an admissible label at x extends to a selection taking it there.

    โˆ€ {X : Type u_1} {Y : Type u_2} {P : X โ†’ Set Y} {x : X} {u : Y},
      u โˆˆ P x โ†’ โˆƒ ฯ„, ฯ„ x = u โˆง โˆ€ โฆƒz : Xโฆ„, z โˆˆ pairSupport P โ†’ ฯ„ z โˆˆ P z
    Uses
    Used by
  25. Declexists_selDeclaration kindtheorem

    A choice of admissible labels prescribed on part of the domain extends to a selection for the whole pattern. The prescribed values arrive as a total function, so off the support there is always a label to copy and no hypothesis on Y is needed.

    โˆ€ {X : Type u_1} {Y : Type u_2} {P : X โ†’ Set Y} {B : Set X} {ฯƒ : X โ†’ Y},
      (โˆ€ โฆƒz : Xโฆ„, z โˆˆ B โ†’ z โˆˆ pairSupport P โ†’ ฯƒ z โˆˆ P z) โ†’ โˆƒ ฯ„, (โˆ€ โฆƒz : Xโฆ„, z โˆˆ pairSupport P โ†’ ฯ„ z โˆˆ P z) โˆง Set.EqOn ฯ„ ฯƒ B
    Used by
  26. Declexists_injOn_of_subsingletonDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} {S : Set X},
      (S.restrict '' ๐’ž).Subsingleton โ†’ โˆƒ ฯ†, Set.MapsTo ฯ† (S.restrict '' ๐’ž) (pairCubes ๐’ž S) โˆง Set.InjOn ฯ† (S.restrict '' ๐’ž)
    Uses
    Used by
  27. Declconst_empty_mem_pairCubesDeclaration kindtheorem

    The unconstrained pattern is a cube of every nonempty family. It is the multiclass reading of shatters_bot.

    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)} (S : Set X), ๐’ž.Nonempty โ†’ (fun x => โˆ…) โˆˆ pairCubes ๐’ž S
    Uses
    Used by
  28. DeclpairSupport_const_emptyDeclaration kindtheorem
    โˆ€ {X : Type u_1} {Y : Type u_2}, (pairSupport fun x => โˆ…) = โˆ…
    Used by
  29. DefinitionIsPairPatterndef

    A pattern is a pair pattern when it offers either no constraint or exactly two labels at each point. The two labels are recorded as a set, so their order carries no information.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ (X โ†’ Set Y) โ†’ Prop
  30. DefinitionPairShattersdef

    A family pair-shatters a pattern when every choice of one admissible label per constrained point is realised by some member.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ Set (X โ†’ Y) โ†’ (X โ†’ Set Y) โ†’ Prop
  31. Definitiongraftdef

    Overwrite a pattern at one point. Stated without a decidable equality on X, since the two branches are separated by a hypothesis rather than by a test.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ (X โ†’ Set Y) โ†’ X โ†’ Set Y โ†’ X โ†’ Set Y
  32. DefinitionpairCubesdef

    The pair-cubes of ๐’ž over S: pair patterns supported inside S and pair-shattered by ๐’ž.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ Set (X โ†’ Y) โ†’ Set X โ†’ Set (X โ†’ Set Y)
  33. DefinitionpairOfdef

    The unordered pair {u, v}, degenerating to the empty set when u = v. Carrying the degenerate case inside the pair lets one formula cover both branches of the injection.

    {Y : Type u_2} โ†’ Y โ†’ Y โ†’ Set Y
  34. DefinitionpairSupportdef

    The points at which a pattern constrains a concept.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ (X โ†’ Set Y) โ†’ Set X
  35. DefinitionsingCubedef

    The cube supported at the single point z, offering the labels u and v there.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ X โ†’ Y โ†’ Y โ†’ X โ†’ Set Y

HasDSDimLE.hasNatarajanDimLE has no converse. The six-cycle on a two-point domain has Natarajan dimension 1, a Natarajan witness on both points being a four-cycle, while its whole trace family is a two-dimensional pseudo-cube, so its DS dimension is at least 2.

This is the hexagon Brukhim, Carmon, Dinur, Moran and Yehudayoff record after their Definition 6, and the four-cycle test the proof turns on is their Example 7. Their Theorem 2 pushes the separation to a class of Natarajan dimension 1 and infinite DS dimension; that construction rests on hyperbolic pseudo-manifolds and is cited in the module docstring rather than formalised here.

Declexists_hasNatarajanDimLE_not_hasDSDimLE
โˆƒ ๐’ž, HasNatarajanDimLE 1 ๐’ž โˆง ยฌHasDSDimLE 1 ๐’ž

Relations

  • Shares definitions withMTH.C-2026-6005

    Built on the same pair patterns and pair-shattering; neither implies the other.

    Asserted by Dhruv GuptaDhruv Gupta
Layout
ThesisStepDefinition
exists_hasNatarajanDimLE_โ€ฆtheoremsixCycle_hasNatarajanDimLโ€ฆtheoremsixCycle_realisestheoremsixCycle_no_squaretheoremsixCycle_dsShatterstheoremsixCycle_nonemptytheoremsixCycle_nbrtheoremdsShatters_univtheoremDSShattersdefHasDSDimLEdefHasNatarajanDimLEdefIsPairPatterndefIsPseudoCubedefPairShattersdefpairSupportdefsixCycledefsixCycleEdgedef
  1. Declexists_hasNatarajanDimLE_not_hasDSDimLEDeclaration kindtheorem
    โˆƒ ๐’ž, HasNatarajanDimLE 1 ๐’ž โˆง ยฌHasDSDimLE 1 ๐’ž
    Uses
  2. DeclsixCycle_hasNatarajanDimLE_oneDeclaration kindtheorem
    HasNatarajanDimLE 1 sixCycleโœ
    Uses
    Used by
  3. DeclsixCycle_realisesDeclaration kindtheorem
    โˆ€ {P : Fin 2 โ†’ Set (Fin 6)},
      PairShatters sixCycleโœ P โ†’
        pairSupport P = Set.univ โ†’ โˆ€ {yโ‚€ yโ‚ : Fin 6}, yโ‚€ โˆˆ P 0 โ†’ yโ‚ โˆˆ P 1 โ†’ sixCycleEdgeโœ yโ‚€ yโ‚ = true
    Used by
  4. DeclsixCycle_no_squareDeclaration kindtheorem
    โˆ€ (a b c d : Fin 6),
      sixCycleEdgeโœ a c = true โ†’
        sixCycleEdgeโœ a d = true โ†’ sixCycleEdgeโœ b c = true โ†’ sixCycleEdgeโœ b d = true โ†’ a = b โˆจ c = d
    Used by
  5. DeclsixCycle_dsShattersDeclaration kindtheorem
    DSShatters sixCycleโœ Set.univ
    Uses
    Used by
  6. DeclsixCycle_nonemptyDeclaration kindtheorem
    sixCycleโœ.Nonempty
    Used by
  7. DeclsixCycle_nbrDeclaration kindtheorem
    โˆ€ (c : Fin 2 โ†’ Fin 6),
      sixCycleEdgeโœ (c 0) (c 1) = true โ†’
        โˆ€ (i : Fin 2), โˆƒ c', sixCycleEdgeโœ (c' 0) (c' 1) = true โˆง c' i โ‰  c i โˆง โˆ€ (j : Fin 2), j โ‰  i โ†’ c' j = c j
    Used by
  8. DecldsShatters_univDeclaration kindtheorem

    A family whose members each have, in every direction, a neighbour in the family is DS-shattered on the whole domain.

    โˆ€ {X : Type u_1} {Y : Type u_2} {๐’ž : Set (X โ†’ Y)},
      ๐’ž.Nonempty โ†’
        (Set.univ.restrict '' ๐’ž).Finite โ†’
          (โˆ€ c โˆˆ ๐’ž, โˆ€ (i : X), โˆƒ c' โˆˆ ๐’ž, c' i โ‰  c i โˆง โˆ€ (j : X), j โ‰  i โ†’ c' j = c j) โ†’ DSShatters ๐’ž Set.univ
    Used by
  9. DefinitionDSShattersdef

    A family DS-shatters a set when its traces there contain a pseudo-cube.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ Set (X โ†’ Y) โ†’ Set X โ†’ Prop
  10. DefinitionHasDSDimLEdef

    A family has DS dimension at most d when every set it DS-shatters has size at most d.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ โ„• โ†’ Set (X โ†’ Y) โ†’ Prop
  11. DefinitionHasNatarajanDimLEdef

    A family has Natarajan dimension at most d when every pair pattern it pair-shatters has support of size at most d.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ โ„• โ†’ Set (X โ†’ Y) โ†’ Prop
  12. DefinitionIsPairPatterndef

    A pattern is a pair pattern when it offers either no constraint or exactly two labels at each point. The two labels are recorded as a set, so their order carries no information.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ (X โ†’ Set Y) โ†’ Prop
  13. DefinitionIsPseudoCubedef

    A family of labellings of S is a pseudo-cube when it is nonempty and finite and every member has, in every direction, a neighbour in the family differing there and agreeing everywhere else. Over two labels the pseudo-cubes are exactly the Boolean cubes; over more labels there are others.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ {S : Set X} โ†’ Set (โ†‘S โ†’ Y) โ†’ Prop
  14. DefinitionPairShattersdef

    A family pair-shatters a pattern when every choice of one admissible label per constrained point is realised by some member.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ Set (X โ†’ Y) โ†’ (X โ†’ Set Y) โ†’ Prop
  15. DefinitionpairSupportdef

    The points at which a pattern constrains a concept.

    {X : Type u_1} โ†’ {Y : Type u_2} โ†’ (X โ†’ Set Y) โ†’ Set X
  16. DefinitionsixCycledef

    The six-cycle read as a family of labellings of a two-point domain. Its traces form a two-dimensional pseudo-cube containing no two-dimensional Boolean cube, a six-cycle having no four-cycle.

    Set (Fin 2 โ†’ Fin 6)
  17. DefinitionsixCycleEdgedef

    The edges of a six-cycle on six labels.

    Fin 6 โ†’ Fin 6 โ†’ Bool

Shelah's ded bound on the traces of a family of finite VC dimension. On an infinite ground set a family of finite VC dimension traces at most ded #A sets, and by mk_image_inter_range_cut_eq_ded the bound is attained. The infiniteness of A is not decorative: see exists_finite_ground_hasVCDimLE_not_mk_image_inter_le_ded.

DeclHasVCDimLE.mk_image_inter_le_ded
โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {d : โ„•},
  HasVCDimLE d ๐’œ โ†’ A.Infinite โ†’ Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ) โ‰ค ded (Cardinal.mk โ†‘A)

Relations

  • Limited byMTH.C-2026-6008

    No cardinal function smaller than ded bounds the traces, which places ded at the exact strength of the bound.

    Asserted by Dhruv GuptaDhruv Gupta
Layout
ThesisStepHypothesisDefinition
mk_image_inter_le_dedtheoremHasVCDimLE d ๐’œh๐’œA.InfinitehAexists_shatters_of_ded_ltโ€ฆtheoremmk_Iio_lt_ordtheoremexists_shatter_tuple_of_eโ€ฆtheoremself_le_dedtheoremmk_truncate_image_enc_imaโ€ฆtheoremtruncate_enc_eq_ifftheoremmk_sdiff_core_lttheoremmk_image_inter_range_le_mโ€ฆtheoremmk_image_le_mk_imagetheoreminter_eq_inter_ifftheoremenc_eq_ifftheoremenc_apply_eq_ifftheoremexists_shatter_tupletheoremval_of_mem_image_truncatetheoremofLex_truncate_of_letheoremmk_setOf_finite_ncard_letheoremlt_of_mk_lttheoremlt_mk_big_fibertheoremtruncate_truncatetheoremmk_le_ded_of_truncate_memtheoremtruncate_letheoremmk_le_dedtheoremlt_truncatetheoremtruncate_applytheoremlex_lt_ifftheoremle_mk_core_fibertheoremexists_leveltheoremenc_apply_eq_valIn_ortheoremenc_apply_eq_valIn_ifftheoremvalIn_ne_valOuttheoremenc_applytheoremexists_minimal_subsettheoremded_le_dedtheoremself_mem_dedSettheoremisDenseIn_univtheorembddAbove_dedSettheoremdedSet_letheoremmk_le_two_pow_multheoremcutCode_injectivetheoremcutCode_netheoremHasVCDimLEdefIsDenseIndefShattersdefbigdefbigAtdefcoredefcutCodedefdeddefdedSetdefencdeftruncatedefvalIndefvalOutdef
  1. DeclHasVCDimLE.mk_image_inter_le_dedDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {d : โ„•},
      HasVCDimLE d ๐’œ โ†’ A.Infinite โ†’ Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ) โ‰ค ded (Cardinal.mk โ†‘A)
    Uses
  2. Declexists_shatters_of_ded_lt_mk_image_interDeclaration kindtheorem

    Shelah's theorem. A family that traces more than ded #A sets on an infinite ground set A shatters finite subsets of A of every size. The proof takes a subset B โІ A of least cardinality on which the family still traces more than ded #A sets, enumerates B by an initial ordinal so that every proper initial segment is smaller than B and therefore carries at most ded #A traces, prunes the tree of traces along that enumeration to the nodes at least (ded #A)โบ members pass through, and walks down the pruned tree collecting one point per step.

    The conclusion cannot be strengthened to an infinite shattered set: the finite subsets of โ„• shatter every finite set and no infinite one.

    The statement is due to Shelah. Both expositions used here, Adler, Introduction to theories without the independence property, Theorem 23, and Simon, A Guide to NIP Theories, Proposition 2.69, state it for the space of complete ฯ†-types over a parameter set rather than for a set family, and the reading under which a complete ฯ†-type over A is a trace on A and the independence property is the shattering of arbitrarily large finite sets is the standard translation of that statement, not a form either source asserts.

    โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ},
      A.Infinite โ†’
        ded (Cardinal.mk โ†‘A) < Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ) โ†’
          โˆ€ (n : โ„•), โˆƒ S โІ A, S.Finite โˆง S.ncard = n โˆง Shatters ๐’œ S
    Uses
    Used by
  3. Declmk_Iio_lt_ordDeclaration kindtheorem
    โˆ€ {ฮฝ : Cardinal.{u}} (w : ฮฝ.ord.ToType), Cardinal.mk โ†‘(Set.Iio w) < ฮฝ
    Used by
  4. Declexists_shatter_tuple_of_enumDeclaration kindtheorem

    Shelah's argument in the tree language: an enumeration of a ground set of size ฮผ all of whose initial segments carry at most ฮธ traces, with ded ฮผ โ‰ค ฮธ and more than ฮธ traces on the whole set, yields for each n a set of n indices on which ๐’œ cuts out every pattern. The ceiling ฮธโบ is regular, so the pruning of mk_sdiff_core_lt applies and the core keeps the whole width.

    โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {W : Type u} {e : W โ†’ ฮฑ} [inst : LinearOrder W] [WellFoundedLT W] {ฮผ ฮธ : Cardinal.{u}},
      Cardinal.aleph0 โ‰ค ฮผ โ†’
        Cardinal.mk W = ฮผ โ†’
          Cardinal.aleph0 โ‰ค ฮธ โ†’
            ded ฮผ โ‰ค ฮธ โ†’
              (โˆ€ (w : W), Cardinal.mk โ†‘((fun x => e '' Set.Iic w โˆฉ x) '' ๐’œ) โ‰ค ฮธ) โ†’
                ฮธ < Cardinal.mk โ†‘((fun x => Set.range e โˆฉ x) '' ๐’œ) โ†’
                  โˆ€ (n : โ„•), โˆƒ S, S.Finite โˆง S.ncard = n โˆง โˆ€ (ฯƒ : Set W), โˆƒ C โˆˆ ๐’œ, โˆ€ x โˆˆ S, e x โˆˆ C โ†” x โˆˆ ฯƒ
    Uses
    Used by
  5. Declself_le_dedDeclaration kindtheorem
    โˆ€ (ฮบ : Cardinal.{u}), ฮบ โ‰ค ded ฮบ
    Uses
    Used by
  6. Declmk_truncate_image_enc_imageDeclaration kindtheorem

    The level-w nodes of the tree of codes are the traces on the initial segment e '' Iic w.

    โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {W : Type u} {e : W โ†’ ฮฑ} [inst : LinearOrder W] (w : W),
      Cardinal.mk โ†‘(truncate w '' encโœ e '' ๐’œ) = Cardinal.mk โ†‘((fun x => e '' Set.Iic w โˆฉ x) '' ๐’œ)
    Uses
    Used by
  7. Decltruncate_enc_eq_iffDeclaration kindtheorem
    โˆ€ {ฮฑ W : Type u} {e : W โ†’ ฮฑ} {C C' : Set ฮฑ} [inst : LinearOrder W] {w : W},
      truncate w (encโœ e C) = truncate w (encโœ e C') โ†” โˆ€ v โ‰ค w, e v โˆˆ C โ†” e v โˆˆ C'
    Uses
    Used by
  8. Declmk_sdiff_core_ltDeclaration kindtheorem

    Pruning to the core costs fewer than lam members: a member outside the core has a narrow truncation, the narrow nodes at one level are fewer than lam and carry fewer than lam members each, and there are fewer than lam levels. Regularity of lam closes both sums.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ]
      {F : Set (Lex (W โ†’ ฮฒ))} {lam : Cardinal.{u}},
      lam.IsRegular โ†’
        Cardinal.mk W < lam โ†’ (โˆ€ (w : W), Cardinal.mk โ†‘(truncate w '' F) < lam) โ†’ Cardinal.mk โ†‘(F \ coreโœ lam F) < lam
    Used by
  9. Declmk_image_inter_range_le_mk_enc_imageDeclaration kindtheorem

    The traces on the range of e are at most as many as the codes along e, two members with the same code agreeing at every index.

    โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {W : Type u} {e : W โ†’ ฮฑ},
      Cardinal.mk โ†‘((fun x => Set.range e โˆฉ x) '' ๐’œ) โ‰ค Cardinal.mk โ†‘(encโœ e '' ๐’œ)
    Uses
    Used by
  10. Declmk_image_le_mk_imageDeclaration kindtheorem

    If g separates at most as much as f does on s, then f '' s is no larger than g '' s.

    โˆ€ {ฮฒ ฮณ ฮด : Type u} {s : Set ฮฒ} {f : ฮฒ โ†’ ฮณ} {g : ฮฒ โ†’ ฮด},
      (โˆ€ x โˆˆ s, โˆ€ y โˆˆ s, g x = g y โ†’ f x = f y) โ†’ Cardinal.mk โ†‘(f '' s) โ‰ค Cardinal.mk โ†‘(g '' s)
    Used by
  11. Declinter_eq_inter_iffDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u} {C C' D : Set ฮฑ}, D โˆฉ C = D โˆฉ C' โ†” โˆ€ a โˆˆ D, a โˆˆ C โ†” a โˆˆ C'
    Used by
  12. Declenc_eq_iffDeclaration kindtheorem
    โˆ€ {ฮฑ W : Type u} {e : W โ†’ ฮฑ} {C C' : Set ฮฑ}, encโœ e C = encโœ e C' โ†” โˆ€ (w : W), e w โˆˆ C โ†” e w โˆˆ C'
    Uses
    Used by
  13. Declenc_apply_eq_iffDeclaration kindtheorem
    โˆ€ {ฮฑ W : Type u} {e : W โ†’ ฮฑ} {C C' : Set ฮฑ} {w : W}, ofLex (encโœ e C) w = ofLex (encโœ e C') w โ†” (e w โˆˆ C โ†” e w โˆˆ C')
    Uses
    Used by
  14. Declexists_shatter_tupleDeclaration kindtheorem

    The induction that produces the shattered points. In a two-valued tree whose core is wide, every wide node carries, for each n, a set of n indices above its own level on which the members of F below it realise every pattern. The step spends the wide node: lt_mk_big_fiber gives more than ฮผ wide nodes below it, exists_level concentrates them on one level, the pigeonhole on finite index sets returns two of them with a common tuple, and the index where the two disagree is the new point. Its position, strictly above the old level and at or below the new one, is what keeps the points distinct. This is the combinatorial form of the claim proved by induction in Adler, Theorem 23, and in Simon, Proposition 2.69.

    โˆ€ {W : Type u} [inst : LinearOrder W] [WellFoundedLT W] {F : Set (Lex (W โ†’ WithBot (ULift.{u, 0} Bool)))}
      {ฮผ lam : Cardinal.{u}},
      Cardinal.aleph0 โ‰ค ฮผ โ†’
        Cardinal.mk W = ฮผ โ†’
          lam.IsRegular โ†’
            Cardinal.mk โ†‘(F \ coreโœ lam F) < lam โ†’
              ded ฮผ < lam โ†’
                (โˆ€ g โˆˆ F, โˆ€ (x : W), ofLex g x = valInโœ โˆจ ofLex g x = valOutโœ) โ†’
                  โˆ€ (n : โ„•) (w : W),
                    โˆ€ p โˆˆ bigAtโœ lam F w,
                      โˆƒ S,
                        S.Finite โˆง
                          S.ncard = n โˆง
                            (โˆ€ x โˆˆ S, w < x) โˆง
                              โˆ€ (ฯƒ : Set W), โˆƒ g โˆˆ F, truncate w g = p โˆง โˆ€ x โˆˆ S, ofLex g x = valInโœ โ†” x โˆˆ ฯƒ
    Uses
    Used by
  15. Declval_of_mem_image_truncateDeclaration kindtheorem

    A node inherits two-valuedness from the members it truncates.

    โˆ€ {W : Type u} [inst : LinearOrder W] {F : Set (Lex (W โ†’ WithBot (ULift.{u, 0} Bool)))}
      {q : Lex (W โ†’ WithBot (ULift.{u, 0} Bool))} {x v : W},
      (โˆ€ g โˆˆ F, โˆ€ (y : W), ofLex g y = valInโœ โˆจ ofLex g y = valOutโœ) โ†’
        q โˆˆ truncate v '' F โ†’ x โ‰ค v โ†’ ofLex q x = valInโœ โˆจ ofLex q x = valOutโœ
    Uses
    Used by
  16. DeclofLex_truncate_of_leDeclaration kindtheorem

    Below the level of truncation the sequence is unchanged.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ] {v : W}
      {g : Lex (W โ†’ ฮฒ)} {x : W}, x โ‰ค v โ†’ ofLex (truncate v g) x = ofLex g x
    Uses
    Used by
  17. Declmk_setOf_finite_ncard_leDeclaration kindtheorem

    The finite subsets of an infinite W of a prescribed size are at most #W many. This is the pigeonhole that forces two nodes at one level to carry the same tuple.

    โˆ€ {W : Type u}, Cardinal.aleph0 โ‰ค Cardinal.mk W โ†’ โˆ€ (n : โ„•), Cardinal.mk โ†‘{S | S.Finite โˆง S.ncard = n} โ‰ค Cardinal.mk W
    Used by
  18. Decllt_of_mk_ltDeclaration kindtheorem

    The level found by exists_level lies strictly above the node's own level: at or below it the fibre is a single node, hence too small.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ]
      {F : Set (Lex (W โ†’ ฮฒ))} {lam ฮผ : Cardinal.{u}} {v w : W} {p : Lex (W โ†’ ฮฒ)},
      Cardinal.aleph0 โ‰ค ฮผ โ†’ ฮผ < Cardinal.mk โ†‘{q | q โˆˆ bigAtโœ lam F v โˆง truncate w q = p} โ†’ w < v
    Uses
    Used by
  19. Decllt_mk_big_fiberDeclaration kindtheorem

    The step at which ded enters the argument. Below a wide node p, the core members extending p are at least lam many, and they form a set of branches whose nodes are the wide nodes extending p together with the truncations of p itself. The tree bound therefore caps them by ded of that node set, so if the wide nodes extending p were at most ฮผ the count would be at most ded (ฮผ + #W), which is below lam.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ]
      {F : Set (Lex (W โ†’ ฮฒ))} {lam ฮผ : Cardinal.{u}} {w : W} {p : Lex (W โ†’ ฮฒ)} [WellFoundedLT W],
      lam.IsRegular โ†’
        Cardinal.mk โ†‘(F \ coreโœ lam F) < lam โ†’
          p โˆˆ bigAtโœ lam F w โ†’ ded (ฮผ + Cardinal.mk W) < lam โ†’ ฮผ < Cardinal.mk โ†‘{q | q โˆˆ bigโœ lam F โˆง truncate w q = p}
    Uses
    Used by
  20. Decltruncate_truncateDeclaration kindtheorem
    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ] (w v : W)
      (b : Lex (W โ†’ ฮฒ)), truncate w (truncate v b) = truncate (min w v) b
    Used by
  21. Declmk_le_ded_of_truncate_memDeclaration kindtheorem

    The tree bound: a set ๐’ฎ of sequences all of whose truncations lie in ๐’Ÿ has at most ded #๐’Ÿ elements. Equivalently, a tree with at most ฮบ nodes has at most ded ฮบ branches. The order is taken on ๐’ฎ โˆช ๐’Ÿ with ๐’Ÿ as the dense subset: given f < g there, either g lies in ๐’Ÿ and brackets the pair by itself, or g lies in ๐’ฎ and the truncation of g at the first index where f and g differ lies between them.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ] [WellFoundedLT W]
      {๐’ฎ ๐’Ÿ : Set (Lex (W โ†’ ฮฒ))} {ฮบ : Cardinal.{u}},
      (โˆ€ f โˆˆ ๐’ฎ, โˆ€ (w : W), truncate w f โˆˆ ๐’Ÿ) โ†’ Cardinal.mk โ†‘๐’Ÿ โ‰ค ฮบ โ†’ Cardinal.mk โ†‘๐’ฎ โ‰ค ded ฮบ
    Uses
    Used by
  22. Decltruncate_leDeclaration kindtheorem
    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ] [WellFoundedLT W]
      (w : W) (b : Lex (W โ†’ ฮฒ)), truncate w b โ‰ค b
    Uses
    Used by
  23. Declmk_le_dedDeclaration kindtheorem

    The defining property of ded, in the form used downstream: a linear order with a dense subset of size at most ฮบ has at most ded ฮบ points.

    โˆ€ {ฮบ : Cardinal.{u}} {J : Type u} [inst : LinearOrder J] {E : Set J},
      Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ IsDenseIn E โ†’ Cardinal.mk J โ‰ค ded ฮบ
    Uses
    Used by
  24. Decllt_truncateDeclaration kindtheorem
    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ] {a b : Lex (W โ†’ ฮฒ)}
      {w : W}, (โˆ€ j < w, ofLex a j = ofLex b j) โ†’ ofLex a w < ofLex b w โ†’ a < truncate w b
    Uses
    Used by
  25. Decltruncate_applyDeclaration kindtheorem
    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ] (w : W)
      (b : Lex (W โ†’ ฮฒ)) (v : W), ofLex (truncate w b) v = if v โ‰ค w then ofLex b v else โŠฅ
    Used by
  26. Decllex_lt_iffDeclaration kindtheorem
    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] {a b : Lex (W โ†’ ฮฒ)},
      a < b โ†” โˆƒ i, (โˆ€ j < i, ofLex a j = ofLex b j) โˆง ofLex a i < ofLex b i
    Used by
  27. Declle_mk_core_fiberDeclaration kindtheorem

    A wide node stays wide inside the core, the pruning having removed fewer than lam members.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ]
      {F : Set (Lex (W โ†’ ฮฒ))} {lam : Cardinal.{u}} {w : W} {p : Lex (W โ†’ ฮฒ)},
      lam.IsRegular โ†’
        Cardinal.mk โ†‘(F \ coreโœ lam F) < lam โ†’
          p โˆˆ bigAtโœ lam F w โ†’ lam โ‰ค Cardinal.mk โ†‘{g | g โˆˆ coreโœ lam F โˆง truncate w g = p}
    Used by
  28. Declexists_levelDeclaration kindtheorem

    The wide nodes below a fixed node spread over the levels, so if they are more than ฮผ in total and the levels are at most ฮผ, one level already carries more than ฮผ of them.

    โˆ€ {W : Type u} [inst : LinearOrder W] {ฮฒ : Type u} [inst_1 : LinearOrder ฮฒ] [inst_2 : OrderBot ฮฒ]
      {F : Set (Lex (W โ†’ ฮฒ))} {lam ฮผ : Cardinal.{u}} {w : W} {p : Lex (W โ†’ ฮฒ)},
      Cardinal.aleph0 โ‰ค ฮผ โ†’
        Cardinal.mk W โ‰ค ฮผ โ†’
          ฮผ < Cardinal.mk โ†‘{q | q โˆˆ bigโœ lam F โˆง truncate w q = p} โ†’
            โˆƒ v, ฮผ < Cardinal.mk โ†‘{q | q โˆˆ bigAtโœ lam F v โˆง truncate w q = p}
    Used by
  29. Declenc_apply_eq_valIn_orDeclaration kindtheorem
    โˆ€ {ฮฑ W : Type u} {e : W โ†’ ฮฑ} (C : Set ฮฑ) (w : W), ofLex (encโœ e C) w = valInโœ โˆจ ofLex (encโœ e C) w = valOutโœ
    Uses
    Used by
  30. Declenc_apply_eq_valIn_iffDeclaration kindtheorem
    โˆ€ {ฮฑ W : Type u} {e : W โ†’ ฮฑ} (C : Set ฮฑ) (w : W), ofLex (encโœ e C) w = valInโœ โ†” e w โˆˆ C
    Uses
    Used by
  31. DeclvalIn_ne_valOutDeclaration kindtheorem
    valInโœ โ‰  valOutโœ
    Used by
  32. Declenc_applyDeclaration kindtheorem
    โˆ€ {ฮฑ W : Type u} {e : W โ†’ ฮฑ} {C : Set ฮฑ} (w : W), ofLex (encโœ e C) w = if e w โˆˆ C then valInโœ else valOutโœ
    Used by
  33. Declexists_minimal_subsetDeclaration kindtheorem

    The reduction that makes the tree small. Among the subsets of A whose trace family outruns ฮธ there is one of least cardinality, Cardinal being well-ordered. Along an enumeration of that subset every proper initial segment carries at most ฮธ traces, which is what the tree bound needs and what a well-order of A itself does not supply.

    โˆ€ {ฮฑ : Type u} {๐’œ : Set (Set ฮฑ)} {A : Set ฮฑ} {ฮธ : Cardinal.{u}},
      ฮธ < Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ) โ†’
        โˆƒ B โІ A,
          ฮธ < Cardinal.mk โ†‘((fun x => B โˆฉ x) '' ๐’œ) โˆง
            โˆ€ B' โІ A, Cardinal.mk โ†‘B' < Cardinal.mk โ†‘B โ†’ Cardinal.mk โ†‘((fun x => B' โˆฉ x) '' ๐’œ) โ‰ค ฮธ
    Used by
  34. Declded_le_dedDeclaration kindtheorem
    โˆ€ {ฮบโ‚ ฮบโ‚‚ : Cardinal.{u}}, ฮบโ‚ โ‰ค ฮบโ‚‚ โ†’ ded ฮบโ‚ โ‰ค ded ฮบโ‚‚
    Uses
    Used by
  35. Declself_mem_dedSetDeclaration kindtheorem
    โˆ€ (ฮบ : Cardinal.{u}), ฮบ โˆˆ dedSetโœ ฮบ
    Uses
    Used by
  36. DeclisDenseIn_univDeclaration kindtheorem
    โˆ€ {I : Type u_1} [inst : Preorder I], IsDenseIn Set.univ
    Used by
  37. DeclbddAbove_dedSetDeclaration kindtheorem
    โˆ€ (ฮบ : Cardinal.{u}), BddAbove (dedSetโœ ฮบ)
    Uses
    Used by
  38. DecldedSet_leDeclaration kindtheorem
    โˆ€ {ฮบ c : Cardinal.{u}}, c โˆˆ dedSetโœ ฮบ โ†’ c โ‰ค 2 ^ (ฮบ + ฮบ)
    Uses
    Used by
  39. DeclIsDenseIn.mk_le_two_pow_mulDeclaration kindtheorem

    A linear order with a dense subset D has at most 2 ^ #D * 2 ^ #D points, since a point is determined by the pair of cuts it induces on D.

    โˆ€ {J : Type u} [inst : LinearOrder J] {E : Set J}, IsDenseIn E โ†’ Cardinal.mk J โ‰ค 2 ^ Cardinal.mk โ†‘E * 2 ^ Cardinal.mk โ†‘E
    Uses
    Used by
  40. DeclcutCode_injectiveDeclaration kindtheorem
    โˆ€ {I : Type u_1} {D : Set I} [inst : LinearOrder I], IsDenseIn D โ†’ Function.Injective (cutCodeโœ D)
    Uses
    Used by
  41. DeclcutCode_neDeclaration kindtheorem
    โˆ€ {I : Type u_1} {D : Set I} [inst : LinearOrder I], IsDenseIn D โ†’ โˆ€ {x y : I}, x < y โ†’ cutCodeโœ D x โ‰  cutCodeโœ D y
    Used by
  42. Hypothesish๐’œ
    HasVCDimLE d ๐’œ
  43. HypothesishA
    A.Infinite
  44. DefinitionHasVCDimLEdefYaรซl Dillies

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

    {ฮฑ : Type u_1} โ†’ โ„• โ†’ Set (Set ฮฑ) โ†’ Prop
  45. DefinitionIsDenseIndef

    D is dense in a preorder I when every pair a < b brackets a point of D, that is, when there is d โˆˆ D with a โ‰ค d โ‰ค b. On a linear order without jumps this agrees with strict betweenness; on an order with jumps it is strictly weaker, and it is the form under which ded bounds the size of the order.

    {I : Type u_1} โ†’ [Preorder I] โ†’ Set I โ†’ Prop
  46. DefinitionShattersdefYaรซl Dillies

    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 ๐’œ.

    {ฮฑ : Type u_1} โ†’ [SemilatticeInf ฮฑ] โ†’ Set ฮฑ โ†’ ฮฑ โ†’ Prop
  47. Definitionbigdef

    The wide nodes of the tree of truncations of F, at all levels.

    {W : Type u} โ†’
      [LinearOrder W] โ†’
        {ฮฒ : Type u} โ†’ [inst : LinearOrder ฮฒ] โ†’ [OrderBot ฮฒ] โ†’ Cardinal.{u} โ†’ Set (Lex (W โ†’ ฮฒ)) โ†’ Set (Lex (W โ†’ ฮฒ))
  48. DefinitionbigAtdef

    The level-w truncations of F that at least lam members of F extend.

    {W : Type u} โ†’
      [LinearOrder W] โ†’
        {ฮฒ : Type u} โ†’ [inst : LinearOrder ฮฒ] โ†’ [OrderBot ฮฒ] โ†’ Cardinal.{u} โ†’ Set (Lex (W โ†’ ฮฒ)) โ†’ W โ†’ Set (Lex (W โ†’ ฮฒ))
  49. Definitioncoredef

    The members of F all of whose truncations are wide.

    {W : Type u} โ†’
      [LinearOrder W] โ†’
        {ฮฒ : Type u} โ†’ [inst : LinearOrder ฮฒ] โ†’ [OrderBot ฮฒ] โ†’ Cardinal.{u} โ†’ Set (Lex (W โ†’ ฮฒ)) โ†’ Set (Lex (W โ†’ ฮฒ))
  50. DefinitioncutCodedef

    The pair of cuts a point of I induces on D.

    {I : Type u_1} โ†’ [Preorder I] โ†’ (D : Set I) โ†’ I โ†’ Set โ†‘D ร— Set โ†‘D
  51. Definitiondeddef

    ded ฮบ is the supremum of the cardinalities of the linear orders that admit a dense subset of size at most ฮบ. The supremum is taken over a set of cardinals bounded above by 2 ^ (ฮบ + ฮบ), so it is not a junk value. Carriers are restricted to Type u, which does not move the supremum, every witness having size at most 2 ^ (ฮบ + ฮบ).

    Cardinal.{u} โ†’ Cardinal.{u}
  52. DefinitiondedSetdef

    The set of cardinalities of linear orders with a dense subset of size at most ฮบ.

    Cardinal.{u} โ†’ Set Cardinal.{u}
  53. Definitionencdef

    The code of C along an indexing e of the ground set.

    {ฮฑ W : Type u} โ†’ (W โ†’ ฮฑ) โ†’ Set ฮฑ โ†’ Lex (W โ†’ WithBot (ULift.{u, 0} Bool))
  54. Definitiontruncatedef

    The sequence agreeing with b up to w and equal to โŠฅ above it.

    {W : Type u} โ†’ [LinearOrder W] โ†’ {ฮฒ : Type u} โ†’ [inst : LinearOrder ฮฒ] โ†’ [OrderBot ฮฒ] โ†’ W โ†’ Lex (W โ†’ ฮฒ) โ†’ Lex (W โ†’ ฮฒ)
  55. DefinitionvalIndef

    The two defined values of the alphabet coding a partial trace; โŠฅ marks the positions where the trace is undefined.

    WithBot (ULift.{u, 0} Bool)
  56. DefinitionvalOutdef
    WithBot (ULift.{u, 0} Bool)

No cardinal function strictly smaller than ded bounds the traces of a family of finite VC dimension. For every infinite ฮบ and every lam < ded ฮบ there is a family of VC dimension 1 on a ground set of size exactly ฮบ tracing more than lam sets. Together with HasVCDimLE.mk_image_inter_le_ded, which caps those traces at ded #A, this places ded at the exact strength of the bound.

The conclusion cannot be strengthened to a family tracing exactly ded ฮบ sets. Chernikov and Shelah, On the number of Dedekind cuts and two-cardinal models of dependent theories, note after their definition of ded ฮบ that "in general the supremum need not be attained", so at such a ฮบ no family attains it and quantifying below the supremum is the available form. At ฮบ = โ„ตโ‚€ the supremum is attained, by mk_image_inter_range_cut_eq_ded.

Declno_smaller_bound
โˆ€ {ฮบ : Cardinal.{u}},
  Cardinal.aleph0 โ‰ค ฮบ โ†’
    โˆ€ {lam : Cardinal.{u}},
      lam < ded ฮบ โ†’ โˆƒ ฮฑ ๐’œ A, Cardinal.mk โ†‘A = ฮบ โˆง HasVCDimLE 1 ๐’œ โˆง lam < Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ)

Relations

  • LimitsMTH.C-2026-6007

    No cardinal function smaller than ded bounds the traces, which places ded at the exact strength of the bound.

    Asserted by Dhruv GuptaDhruv Gupta
Layout
ThesisStepHypothesisDefinition
no_smaller_boundtheoremCardinal.aleph0 โ‰ค ฮบhฮบlam < ded ฮบhone_mem_dedSet'theoremisStrictlyDenseIn_empty_pโ€ฆtheoremexists_family_of_isStrictโ€ฆtheoremmk_padGroundtheoremisChain_padCutstheoreminter_padCuts_netheoremhasVCDimLE_one_of_isChaintheoremded'_eq_dedtheoremded_le_ded'theoremmk_le_ded'_of_isDenseIntheoremmk_le_mk_fattentheoremfatten_bot_injectivetheoremmk_le_ded'theorembddAbove_dedSet'theoremdedSet'_letheoremmk_fattenDense_letheoremfattenDense_code_injectivetheoremisStrictlyDenseIn_fattenDโ€ฆtheoremexists_strictly_between_fโ€ฆtheoremmem_of_fatten_of_fst_eqtheoremded_letheoremded'_le_dedtheoremmk_le_dedtheorembddAbove_dedSettheoremdedSet_letheoremmk_le_two_pow_multheoremcutCode_injectivetheoremcutCode_netheoremded'_letheoremisDenseIntheoremHasVCDimLEdefIsDenseIndefIsStrictlyDenseIndefShattersdefcutCodedefdeddefded'defdedSetdefdedSet'deffattendeffattenDensedefpadCutsdefpadGrounddef
  1. Declno_smaller_boundDeclaration kindtheorem
    โˆ€ {ฮบ : Cardinal.{u}},
      Cardinal.aleph0 โ‰ค ฮบ โ†’
        โˆ€ {lam : Cardinal.{u}},
          lam < ded ฮบ โ†’ โˆƒ ฮฑ ๐’œ A, Cardinal.mk โ†‘A = ฮบ โˆง HasVCDimLE 1 ๐’œ โˆง lam < Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ)
    Uses
  2. Declone_mem_dedSet'Declaration kindtheorem
    โˆ€ (ฮบ : Cardinal.{u}), 1 โˆˆ dedSet'โœ ฮบ
    Uses
    Used by
  3. DeclisStrictlyDenseIn_empty_punitDeclaration kindtheorem
    IsStrictlyDenseIn โˆ…
    Used by
  4. Declexists_family_of_isStrictlyDenseInDeclaration kindtheorem

    The witness attached to a strictly dense subset: a family of VC dimension 1 on a ground set of size exactly ฮบ whose traces are at least as many as the points of J.

    โˆ€ {ฮบ : Cardinal.{u}} {J : Type u} [inst : LinearOrder J] {E : Set J},
      Cardinal.aleph0 โ‰ค ฮบ โ†’
        Cardinal.mk โ†‘E โ‰ค ฮบ โ†’
          IsStrictlyDenseIn E โ†’
            โˆƒ ฮฑ ๐’œ A, Cardinal.mk โ†‘A = ฮบ โˆง HasVCDimLE 1 ๐’œ โˆง Cardinal.mk J โ‰ค Cardinal.mk โ†‘((fun x => A โˆฉ x) '' ๐’œ)
    Uses
    Used by
  5. Declmk_padGroundDeclaration kindtheorem
    โˆ€ {ฮบ : Cardinal.{u}} {J P : Type u} {E : Set J},
      Cardinal.aleph0 โ‰ค ฮบ โ†’ Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ Cardinal.mk P = ฮบ โ†’ Cardinal.mk โ†‘(padGroundโœ E) = ฮบ
    Used by
  6. DeclisChain_padCutsDeclaration kindtheorem
    โˆ€ (J P : Type u) [inst : LinearOrder J], IsChain (fun x1 x2 => x1 โІ x2) (padCutsโœ J P)
    Used by
  7. Declinter_padCuts_neDeclaration kindtheorem

    A point of E strictly between j and j' separates the two traces: it lies in the trace at j' and, being above j, not in the trace at j.

    โˆ€ {J P : Type u} [inst : LinearOrder J] {E : Set J} {j j' e : J},
      e โˆˆ E โ†’ j < e โ†’ e < j' โ†’ padGroundโœ E โˆฉ Sum.inl '' {a | a < j} โ‰  padGroundโœ E โˆฉ Sum.inl '' {a | a < j'}
    Used by
  8. DeclhasVCDimLE_one_of_isChainDeclaration kindtheorem

    A family linearly ordered by inclusion has VC dimension at most 1. Shattering a two point set asks for a member meeting it in the first point alone and a member meeting it in the second point alone; whichever of the two members is contained in the other already contains its own point, so it meets the set in both. This is why the extremal families for ded are families of cuts: the number of cuts is exactly what a chain in a linear order can achieve.

    โˆ€ {ฮฑ : Type u_2} {๐’œ : Set (Set ฮฑ)}, IsChain (fun x1 x2 => x1 โІ x2) ๐’œ โ†’ HasVCDimLE 1 ๐’œ
    Used by
  9. Declded'_eq_dedDeclaration kindtheorem

    The convention question is empty at infinite cardinals: ded and ded' agree there. It is not empty in general, by ded'_one_lt_ded_one.

    โˆ€ {ฮบ : Cardinal.{u}}, Cardinal.aleph0 โ‰ค ฮบ โ†’ ded' ฮบ = ded ฮบ
    Uses
    Used by
  10. Declded_le_ded'Declaration kindtheorem

    The two readings of "dense subset" define the same cardinal function at every infinite cardinal. Every bracketing witness is turned into a strict witness of at least its size by mk_le_ded'_of_isDenseIn, at the cost of a countable factor in the dense subset, which an infinite ฮบ absorbs.

    โˆ€ {ฮบ : Cardinal.{u}}, Cardinal.aleph0 โ‰ค ฮบ โ†’ ded ฮบ โ‰ค ded' ฮบ
    Uses
    Used by
  11. Declmk_le_ded'_of_isDenseInDeclaration kindtheorem
    โˆ€ {ฮบ : Cardinal.{u}} {J : Type u} [inst : LinearOrder J] {E : Set J},
      Cardinal.aleph0 โ‰ค ฮบ โ†’ Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ IsDenseIn E โ†’ Cardinal.mk J โ‰ค ded' ฮบ
    Uses
    Used by
  12. Declmk_le_mk_fattenDeclaration kindtheorem
    โˆ€ {J : Type u} (E : Set J), Cardinal.mk J โ‰ค Cardinal.mk โ†‘(fattenโœ E)
    Uses
    Used by
  13. Declfatten_bot_injectiveDeclaration kindtheorem
    โˆ€ {J : Type u} (E : Set J), Function.Injective fun x => โŸจtoLex (x, 0), โ‹ฏโŸฉ
    Used by
  14. Declmk_le_ded'Declaration kindtheorem

    The defining property of ded': a linear order with a strictly dense subset of size at most ฮบ has at most ded' ฮบ points.

    โˆ€ {ฮบ : Cardinal.{u}} {J : Type u} [inst : LinearOrder J] {E : Set J},
      Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ IsStrictlyDenseIn E โ†’ Cardinal.mk J โ‰ค ded' ฮบ
    Uses
    Used by
  15. DeclbddAbove_dedSet'Declaration kindtheorem
    โˆ€ (ฮบ : Cardinal.{u}), BddAbove (dedSet'โœ ฮบ)
    Uses
    Used by
  16. DecldedSet'_leDeclaration kindtheorem
    โˆ€ {ฮบ c : Cardinal.{u}}, c โˆˆ dedSet'โœ ฮบ โ†’ c โ‰ค 2 ^ (ฮบ + ฮบ)
    Uses
    Used by
  17. Declmk_fattenDense_leDeclaration kindtheorem
    โˆ€ {J : Type u} (E : Set J), Cardinal.mk โ†‘(fattenDenseโœ E) โ‰ค Cardinal.mk โ†‘E * Cardinal.aleph0
    Uses
    Used by
  18. DeclfattenDense_code_injectiveDeclaration kindtheorem
    โˆ€ {J : Type u} (E : Set J), Function.Injective fun p => (โŸจ(ofLex โ†‘โ†‘p).1, โ‹ฏโŸฉ, (ofLex โ†‘โ†‘p).2)
    Used by
  19. DeclisStrictlyDenseIn_fattenDenseDeclaration kindtheorem
    โˆ€ {J : Type u} [inst : LinearOrder J] {E : Set J}, IsDenseIn E โ†’ IsStrictlyDenseIn (fattenDenseโœ E)
    Uses
    Used by
  20. Declexists_strictly_between_fattenDeclaration kindtheorem

    The heart of the comparison: in the blow-up, every pair is separated strictly by a point lying over E. The three cases of the bracketing witness d are a < d < b, where the fibre over d supplies the point; d = a, where the point is taken higher in the fibre over a; and d = b, where it is taken lower in the fibre over b.

    โˆ€ {J : Type u} [inst : LinearOrder J] {E : Set J},
      IsDenseIn E โ†’
        โˆ€ {u v : Lex (J ร— โ„š)}, u โˆˆ fattenโœ E โ†’ v โˆˆ fattenโœ E โ†’ u < v โ†’ โˆƒ z โˆˆ E, โˆƒ r, u < toLex (z, r) โˆง toLex (z, r) < v
    Uses
    Used by
  21. Declmem_of_fatten_of_fst_eqDeclaration kindtheorem
    โˆ€ {J : Type u} {E : Set J} {u v : Lex (J ร— โ„š)},
      u โˆˆ fattenโœ E โ†’ v โˆˆ fattenโœ E โ†’ (ofLex u).1 = (ofLex v).1 โ†’ (ofLex u).2 < (ofLex v).2 โ†’ (ofLex u).1 โˆˆ E
    Used by
  22. Declded_leDeclaration kindtheorem

    The elimination rule for ded.

    โˆ€ {ฮบ c : Cardinal.{u}},
      (โˆ€ (J : Type u) (x : LinearOrder J) (E : Set J), Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ IsDenseIn E โ†’ Cardinal.mk J โ‰ค c) โ†’ ded ฮบ โ‰ค c
    Used by
  23. Declded'_le_dedDeclaration kindtheorem

    Strict density is the stronger condition on the subset, so fewer orders are witnesses and the supremum is no larger. This holds at every cardinal.

    โˆ€ (ฮบ : Cardinal.{u}), ded' ฮบ โ‰ค ded ฮบ
    Uses
    Used by
  24. Declmk_le_dedDeclaration kindtheorem

    The defining property of ded, in the form used downstream: a linear order with a dense subset of size at most ฮบ has at most ded ฮบ points.

    โˆ€ {ฮบ : Cardinal.{u}} {J : Type u} [inst : LinearOrder J] {E : Set J},
      Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ IsDenseIn E โ†’ Cardinal.mk J โ‰ค ded ฮบ
    Uses
    Used by
  25. DeclbddAbove_dedSetDeclaration kindtheorem
    โˆ€ (ฮบ : Cardinal.{u}), BddAbove (dedSetโœ ฮบ)
    Uses
    Used by
  26. DecldedSet_leDeclaration kindtheorem
    โˆ€ {ฮบ c : Cardinal.{u}}, c โˆˆ dedSetโœ ฮบ โ†’ c โ‰ค 2 ^ (ฮบ + ฮบ)
    Uses
    Used by
  27. DeclIsDenseIn.mk_le_two_pow_mulDeclaration kindtheorem

    A linear order with a dense subset D has at most 2 ^ #D * 2 ^ #D points, since a point is determined by the pair of cuts it induces on D.

    โˆ€ {J : Type u} [inst : LinearOrder J] {E : Set J}, IsDenseIn E โ†’ Cardinal.mk J โ‰ค 2 ^ Cardinal.mk โ†‘E * 2 ^ Cardinal.mk โ†‘E
    Uses
    Used by
  28. DeclcutCode_injectiveDeclaration kindtheorem
    โˆ€ {I : Type u_1} {D : Set I} [inst : LinearOrder I], IsDenseIn D โ†’ Function.Injective (cutCodeโœ D)
    Uses
    Used by
  29. DeclcutCode_neDeclaration kindtheorem
    โˆ€ {I : Type u_1} {D : Set I} [inst : LinearOrder I], IsDenseIn D โ†’ โˆ€ {x y : I}, x < y โ†’ cutCodeโœ D x โ‰  cutCodeโœ D y
    Used by
  30. Declded'_leDeclaration kindtheorem

    The elimination rule for ded'.

    โˆ€ {ฮบ c : Cardinal.{u}},
      (โˆ€ (J : Type u) (x : LinearOrder J) (E : Set J), Cardinal.mk โ†‘E โ‰ค ฮบ โ†’ IsStrictlyDenseIn E โ†’ Cardinal.mk J โ‰ค c) โ†’
        ded' ฮบ โ‰ค c
    Used by
  31. DeclIsStrictlyDenseIn.isDenseInDeclaration kindtheorem
    โˆ€ {I : Type u_1} {D : Set I} [inst : Preorder I], IsStrictlyDenseIn D โ†’ IsDenseIn D
    Used by
  32. Hypothesishฮบ
    Cardinal.aleph0 โ‰ค ฮบ
  33. Hypothesish
    lam < ded ฮบ
  34. DefinitionHasVCDimLEdefYaรซl Dillies

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

    {ฮฑ : Type u_1} โ†’ โ„• โ†’ Set (Set ฮฑ) โ†’ Prop
  35. DefinitionIsDenseIndef

    D is dense in a preorder I when every pair a < b brackets a point of D, that is, when there is d โˆˆ D with a โ‰ค d โ‰ค b. On a linear order without jumps this agrees with strict betweenness; on an order with jumps it is strictly weaker, and it is the form under which ded bounds the size of the order.

    {I : Type u_1} โ†’ [Preorder I] โ†’ Set I โ†’ Prop
  36. DefinitionIsStrictlyDenseIndef

    D is strictly dense in a preorder I when every pair a < b has a point of D strictly between them. This is the second of the two readings of "dense subset" that the definition of ded in the literature leaves open; the first is IsDenseIn. Where the order has no jumps the two agree, and a linear order with a jump whose two endpoints lie in D satisfies IsDenseIn only. The literature on ded does not say which reading is meant; ded'_eq_ded shows the question does not affect the value of ded at an infinite cardinal.

    {I : Type u_1} โ†’ [Preorder I] โ†’ Set I โ†’ Prop
  37. DefinitionShattersdefYaรซl Dillies

    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 ๐’œ.

    {ฮฑ : Type u_1} โ†’ [SemilatticeInf ฮฑ] โ†’ Set ฮฑ โ†’ ฮฑ โ†’ Prop
  38. DefinitioncutCodedef

    The pair of cuts a point of I induces on D.

    {I : Type u_1} โ†’ [Preorder I] โ†’ (D : Set I) โ†’ I โ†’ Set โ†‘D ร— Set โ†‘D
  39. Definitiondeddef

    ded ฮบ is the supremum of the cardinalities of the linear orders that admit a dense subset of size at most ฮบ. The supremum is taken over a set of cardinals bounded above by 2 ^ (ฮบ + ฮบ), so it is not a junk value. Carriers are restricted to Type u, which does not move the supremum, every witness having size at most 2 ^ (ฮบ + ฮบ).

    Cardinal.{u} โ†’ Cardinal.{u}
  40. Definitionded'def

    ded' ฮบ is the supremum of the cardinalities of the linear orders that admit a strictly dense subset of size at most ฮบ. It is the same construction as ded, with strict betweenness in place of bracketing, and is bounded above by the same 2 ^ (ฮบ + ฮบ).

    Cardinal.{u} โ†’ Cardinal.{u}
  41. DefinitiondedSetdef

    The set of cardinalities of linear orders with a dense subset of size at most ฮบ.

    Cardinal.{u} โ†’ Set Cardinal.{u}
  42. DefinitiondedSet'def

    The set of cardinalities of linear orders with a strictly dense subset of size at most ฮบ.

    Cardinal.{u} โ†’ Set Cardinal.{u}
  43. Definitionfattendef

    The blow-up of J along E: the lexicographic product J ร—โ‚— โ„š with the fibre over each point outside E collapsed to the single rational 0.

    {J : Type u} โ†’ Set J โ†’ Set (Lex (J ร— โ„š))
  44. DefinitionfattenDensedef

    The part of the blow-up lying over E, that is, the union of the full โ„š fibres.

    {J : Type u} โ†’ (E : Set J) โ†’ Set โ†‘(fattenโœ E)
  45. DefinitionpadCutsdef

    The witness family: the down sets of J, carried into the padded ground type.

    (J P : Type u) โ†’ [LinearOrder J] โ†’ Set (Set (J โŠ• P))
  46. DefinitionpadGrounddef

    The ground set of the witness: a subset E of J together with a disjoint copy of P, whose points no member of the family below meets.

    {J P : Type u} โ†’ Set J โ†’ Set (J โŠ• P)
Declfundamental_vc_compression_with_info
โˆ€ (X : Type u) (C : ConceptClass X Bool), VCDim X C < โŠค โ†” โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
Layout
ThesisStepDefinition
fundamental_vc_compressioโ€ฆtheoremvcdim_finite_imp_compressโ€ฆtheoremvcdim_finite_imp_proper_fโ€ฆtheoremsupportError_eq_boolTestEโ€ฆtheoremdisagreementFamily_boolVCโ€ฆtheoremmoran_yehudayoff_forward_โ€ฆtheoremroundtrip_blockHyp_eq_reptheoremlabeledSampleOfFinset_eq_โ€ฆtheoremdecodeWitnessXCoords_encoโ€ฆtheoremdecodeWitnessLabel_eq_on_โ€ฆtheoremmwu_approx_minimaxtheoremweight_le_potentialtheoremmwu_weight_eq_pow_hitCounttheoremcongr_simptheoremmwu_potential_T_boundtheorempotential_one_step_boundtheorembest_response_payoff_weigโ€ฆtheorempotential_postheoremweights_postheoremcongr_simptheoremmwuInit_potentialtheoremminimax_value_le_onetheoremhitRate_from_potentialtheoremboolGamePayoff_nonnegtheoremboolGamePayoff_empirical_โ€ฆtheoremmwuHitCount_eq_sum_indicaโ€ฆtheoremboolGamePayoff_empirical_โ€ฆtheoremhypothesisEnvelope_subtheoremoutput_memtheoremgood_on_support_gives_rowโ€ฆtheoremsupportAgreement_eq_one_sโ€ฆtheoremgood_on_supporttheoremfinite_support_vc_approxtheoremtrueErrorReal_extend_falsetheoremsymmetrization_uc_boundtheoremsymmetrization_step_lowertheoremhoeffding_one_sided_uppertheoremsymmetrization_steptheoremhoeffding_one_sidedtheoremdouble_sample_pattern_bouโ€ฆtheoremexchangeability_chain_bouโ€ฆtheoremcongr_simptheoremrestriction_pattern_counttheoremrademacher_mgf_boundtheoremcosh_le_exp_sq_halftheoremfinite_exchangeability_boโ€ฆtheoremgrowth_exp_le_deltatheoremsum_choose_le_exp_powtheorempow_mul_exp_neg_le_factorโ€ฆtheoremgrowth_function_le_two_powtheoremboolTestExpectation_nonnegtheoremboolTestExpectation_le_onetheoremprob_nonnegtheoremprob_sum_onetheoremfinalizeIncidenceSchemetheoremcongr_simptheoremboolTestExpectation_empirโ€ฆtheoremboolGamePayoff_eq_boolTesโ€ฆtheoremagreeTests_boolVCDim_letheoremcompression_with_info_impโ€ฆtheoremshatters_subset_compressiโ€ฆtheoremexp_beats_poly_compressiontheoremsucc_le_two_pow_compressiโ€ฆtheoremcompress_with_info_injectโ€ฆtheoremcorrecttheoremcompress_subtheoremcompress_smalltheoremCompressionSchemeWithInfostructureInfodefcompressdefinfo_finitedefkernelSizedefreconstructdefsizedefCompressionSchemeWithInfo0defConceptClassdefEmpiricalErrordefConceptdefFinitePMFstructureprobdeftoPMFdefboolVCDimdefGrowthFunctiondefIncidenceInfodefMWUConfigstructurepotentialdeftoPMFdefweightsdefProperFiniteSupportLearnerstructurelearndefsampleBounddefShattersdefSignVectordefTrueErrordefTrueErrorRealdefVCDimdefagreeTestdefagreeTestsdefboolFamilyToFinsetFamilydefboolGamePayoffdefboolTestExpectationdefboolToSigndefboundedSubsamplesdefdecodeWitnessLabeldefdecodeWitnessXCoordsdefdisagreementFamilydefempiricalPMFdefencodeWitnessInfodefextendBooldefhypothesisEnvelopedeflabeledSampleOfFinsetdefliftClassdefmkIncidenceSchemeOfMajoriโ€ฆdefmwuConfigdefmwuHitCountdefmwuInitdefmwuRowsdefmwuRundefmwuUpdateWeightsdefpointSupportdefsupportErrordefuniformPMFdefzeroOneLossdef
  1. Declfundamental_vc_compression_with_infoDeclaration kindtheorem
    โˆ€ (X : Type u) (C : ConceptClass X Bool), VCDim X C < โŠค โ†” โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
  2. Declvcdim_finite_imp_compression_with_infoDeclaration kindtheorem

    The forward direction of the Moran-Yehudayoff theorem: finite VC dimension implies existence of a compression scheme with finite side information.

    The construction: 1. Build a proper finite-support learner L from VC + Sauer-Shelah 2. For sample S: extract c, Y = pointSupport S, HY = hypothesis envelope 3. Apply approximate minimax on the agreement game โ†’ distribution p on HY 4. Apply VC ฮต-approximation on agreement tests โ†’ T representative hypotheses 5. Kernel = union of witness subsets for T hypotheses 6. Side info = incidence: which hypothesis's witness contains each kernel point 7. Reconstruct by majority vote over T hypotheses

    โˆ€ (X : Type u) (C : ConceptClass X Bool), VCDim X C < โŠค โ†’ โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
    Used by
  3. Declvcdim_finite_imp_proper_finite_support_learnerDeclaration kindtheorem

    Finite VC dimension implies existence of a proper finite-support learner. The construction uses ERM + finite_support_vc_approx on the disagreement family.

    โˆ€ (X : Type u) (C : ConceptClass X Bool), Set.Nonempty C โ†’ VCDim X C < โŠค โ†’ โˆƒ _L, True
    Uses
    Used by
  4. DeclsupportError_eq_boolTestExpectationDeclaration kindtheorem

    supportError expressed in terms of boolTestExpectation of a disagreement test.

    โˆ€ {X : Type u} (Y : Finset X) (q : FinitePMF โ†ฅY) (h c : X โ†’ Bool),
      supportError Y q h c = boolTestExpectation q fun y => decide (h โ†‘y โ‰  c โ†‘y)
    Used by
  5. DecldisagreementFamily_boolVCDim_leDeclaration kindtheorem

    VC dimension of the disagreement family is bounded by VCDim(C). Restriction to Y and xor with c do not increase shattering dimension.

    โˆ€ {X : Type u} [inst : DecidableEq X] (C : ConceptClass X Bool) (c : X โ†’ Bool) (Y : Finset X) {d : โ„•},
      VCDim X C โ‰ค โ†‘d โ†’ (disagreementFamilyโœ C c Y).boolVCDim โ‰ค d
    Used by
  6. Declmoran_yehudayoff_forward_constructionDeclaration kindtheorem

    The Moran-Yehudayoff forward construction. Uses finalizeIncidenceScheme to package the majority-vote scheme with universe-correct Info type.

    The agent must provide: compressCore, blockHyp, rowHyp, hsmall, hsub, hagree, hmajor. These are the MY wiring.

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      Set.Nonempty C โ†’
        โˆ€ (L : ProperFiniteSupportLearner X C), VCDim X C < โŠค โ†’ โˆ€ (_K : โ„•), โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
    Used by
  7. Declroundtrip_blockHyp_eq_repDeclaration kindtheorem

    Generic roundtrip theorem for the hround sorry.

    If:

    • encodeWitnessInfo is used in compressCore,
    • decodeWitnessXCoords and decodeWitnessLabel are used in blockHyp, and
    • the kernel contains the witness pairs with the correct labels,

    then the decoded block hypothesis is exactly the representative hypothesis.

    โˆ€ {X : Type u} [inst : DecidableEq X] (learn : {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ X โ†’ Bool) (kernel : Finset (X ร— Bool))
      (c : X โ†’ Bool) (K : โ„•) (W : Finset X) (h : X โ†’ Bool),
      kernel.card โ‰ค K โ†’
        (โˆ€ x โˆˆ W, (x, c x) โˆˆ kernel) โ†’
          (โˆ€ p โˆˆ kernel, p.2 = c p.1) โ†’
            learn (labeledSampleOfFinset c W) = h โ†’
              โˆ€ (x : X),
                have info := encodeWitnessInfo kernel c K W;
                have blockXCoords := decodeWitnessXCoords kernel info;
                have blockLabel := decodeWitnessLabel kernel;
                learn (labeledSampleOfFinset blockLabel blockXCoords) x = h x
    Uses
    Used by
  8. DecllabeledSampleOfFinset_eq_of_eq_on_supportDeclaration kindtheorem

    If two label functions agree on all points of Z, then the labeled samples they induce on Z.equivFin are equal.

    โˆ€ {X : Type u} [DecidableEq X] {โ„“โ‚ โ„“โ‚‚ : X โ†’ Bool} {Z : Finset X},
      (โˆ€ x โˆˆ Z, โ„“โ‚ x = โ„“โ‚‚ x) โ†’ labeledSampleOfFinset โ„“โ‚ Z = labeledSampleOfFinset โ„“โ‚‚ Z
    Used by
  9. DecldecodeWitnessXCoords_encode_eqDeclaration kindtheorem

    If every (x, c x) with x โˆˆ W lies in kernel, and kernel.card โ‰ค K, then decoding the encoded witness positions gives back exactly W.

    โˆ€ {X : Type u} [inst : DecidableEq X] (kernel : Finset (X ร— Bool)) (c : X โ†’ Bool) {K : โ„•} (W : Finset X),
      kernel.card โ‰ค K โ†’ (โˆ€ x โˆˆ W, (x, c x) โˆˆ kernel) โ†’ decodeWitnessXCoords kernel (encodeWitnessInfo kernel c K W) = W
    Used by
  10. DecldecodeWitnessLabel_eq_on_encodedDeclaration kindtheorem

    On the encoded witness support, the decoded label function agrees with the true label function c, provided every pair in the kernel has the correct second coordinate.

    โˆ€ {X : Type u} [inst : DecidableEq X] (kernel : Finset (X ร— Bool)) (c : X โ†’ Bool) (W : Finset X),
      (โˆ€ x โˆˆ W, (x, c x) โˆˆ kernel) โ†’ (โˆ€ p โˆˆ kernel, p.2 = c p.1) โ†’ โˆ€ x โˆˆ W, decodeWitnessLabel kernel x = c x
    Used by
  11. Declmwu_approx_minimaxDeclaration kindtheorem

    Genuine approximate minimax via MWU regret extraction. If every column mixture admits a pure row with expected payoff โ‰ฅ v, then there is a row mixture with payoff โ‰ฅ v - ฮต against every column.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [Nonempty R] [Nonempty C] [DecidableEq R]
      [DecidableEq C] (M : R โ†’ C โ†’ Bool) (v ฮต : โ„),
      0 < ฮต โ†’
        (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’
          โˆƒ p, โˆ€ (c : C), v - ฮต โ‰ค boolGamePayoff M p c
    Uses
    Used by
  12. Declweight_le_potentialDeclaration kindtheorem

    A single weight is bounded by the potential.

    โˆ€ {C : Type u_1} [inst : Fintype C] (cfg : MWUConfig C) (c : C), cfg.weights c โ‰ค cfg.potential
    Uses
    Used by
  13. Declmwu_weight_eq_pow_hitCountDeclaration kindtheorem

    Exact individual-weight tracking: the weight of column c after T rounds is (1-ฮท) to the number of rounds in which c was hit.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] (M : R โ†’ C โ†’ Bool) (ฮท : โ„)
      (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) (T : โ„•)
      (c : C), (mwuConfig M ฮท hฮท1 v hrow T).weights c = (1 - ฮท) ^ mwuHitCountโœ M ฮท hฮท1 v hrow T c
    Uses
    Used by
  14. DeclMWUConfig.mk.congr_simpDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] (weights weights_1 : C โ†’ โ„) (e_weights : weights = weights_1)
      (weights_pos : โˆ€ (c : C), 0 < weights c),
      { weights := weights, weights_pos := weights_pos } = { weights := weights_1, weights_pos := โ‹ฏ }
    Used by
  15. Declmwu_potential_T_boundDeclaration kindtheorem

    Potential bound after T steps: ฮฆ_T โ‰ค |C| ยท (1 - ฮทv)^T.

    This is the core MWU guarantee. Combined with individual weight lower bounds (w_T(c) = (1-ฮท)^{losses(c)}), it yields the regret bound.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] (M : R โ†’ C โ†’ Bool)
      (ฮท : โ„),
      0 โ‰ค ฮท โ†’
        โˆ€ (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0)
          (T : โ„•), (mwuConfig M ฮท hฮท1 v hrow T).potential โ‰ค โ†‘(Fintype.card C) * (1 - ฮท * v) ^ T
    Uses
    Used by
  16. Declpotential_one_step_boundDeclaration kindtheorem

    Potential bound after one step: ฮฆ' โ‰ค ฮฆ ยท (1 - ฮทยทv).

    โˆ€ {R : Type u_1} {C : Type u_2} [Fintype R] [inst : Fintype C] [inst_1 : Nonempty C] (M : R โ†’ C โ†’ Bool) (ฮท : โ„),
      0 โ‰ค ฮท โ†’
        โˆ€ (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0)
          (cfg : MWUConfig C), (mwuUpdateWeights M ฮท hฮท1 cfg โ‹ฏ.choose).potential โ‰ค cfg.potential * (1 - ฮท * v)
    Uses
    Used by
  17. Declbest_response_payoff_weightsDeclaration kindtheorem

    Best response payoff โ‰ฅ v ยท ฮฆ in terms of weights.

    โˆ€ {R : Type u_1} {C : Type u_2} [Fintype R] [inst : Fintype C] [inst_1 : Nonempty C] (M : R โ†’ C โ†’ Bool) (v : โ„)
      (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) (cfg : MWUConfig C),
      v * cfg.potential โ‰ค โˆ‘ c, cfg.weights c * if M โ‹ฏ.choose c = true then 1 else 0
    Uses
    Used by
  18. DeclMWUConfig.potential_posDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] [Nonempty C] (cfg : MWUConfig C), 0 < cfg.potential
    Uses
    Used by
  19. DeclMWUConfig.weights_posDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] (self : MWUConfig C) (c : C), 0 < self.weights c
    Used by
  20. DeclmwuUpdateWeights.congr_simpDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] {R : Type u_2} (M M_1 : R โ†’ C โ†’ Bool),
      M = M_1 โ†’
        โˆ€ (ฮท ฮท_1 : โ„) (e_ฮท : ฮท = ฮท_1) (hฮท1 : ฮท < 1) (cfg cfg_1 : MWUConfig C),
          cfg = cfg_1 โ†’ โˆ€ (r r_1 : R), r = r_1 โ†’ mwuUpdateWeights M ฮท hฮท1 cfg r = mwuUpdateWeights M_1 ฮท_1 โ‹ฏ cfg_1 r_1
    Used by
  21. DeclmwuInit_potentialDeclaration kindtheorem
    โˆ€ (C : Type u_1) [inst : Fintype C], (mwuInit C).potential = โ†‘(Fintype.card C)
    Used by
  22. Declminimax_value_le_oneDeclaration kindtheorem

    The minimax value of a Boolean game is at most 1.

    โˆ€ {R : Type u_1} {C : Type u_2} [Fintype R] [inst : Fintype C] [Nonempty C] (M : R โ†’ C โ†’ Bool) (v : โ„),
      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ v โ‰ค 1
    Uses
    Used by
  23. DeclhitRate_from_potentialDeclaration kindtheorem

    Arithmetic core: from the potential bound and sufficiently small ฮท / large T, deduce a per-column hit-rate lower bound. Uses Real.log โ€” exactly 4 Mathlib lemmas.

    โˆ€ {N H T : โ„•} {ฮท v ฮต : โ„},
      0 < โ†‘N โ†’
        0 < ฮท โ†’
          ฮท < 1 โ†’
            v โ‰ค 1 โ†’
              0 < T โ†’ (1 - ฮท) ^ H โ‰ค โ†‘N * (1 - ฮท * v) ^ T โ†’ ฮท โ‰ค ฮต / 4 โ†’ Real.log โ†‘N / (ฮท * โ†‘T) โ‰ค ฮต / 4 โ†’ v - ฮต โ‰ค โ†‘H / โ†‘T
    Used by
  24. DeclboolGamePayoff_nonnegDeclaration kindtheorem
    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] (M : R โ†’ C โ†’ Bool) (p : FinitePMF R) (c : C),
      0 โ‰ค boolGamePayoff M p c
    Uses
    Used by
  25. DeclboolGamePayoff_empirical_eq_hitCountDeclaration kindtheorem

    Empirical payoff of the MWU row sequence equals the normalized hit count.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] [inst_3 : DecidableEq R]
      (M : R โ†’ C โ†’ Bool) (ฮท : โ„) (hฮท1 : ฮท < 1) (v : โ„)
      (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) {T : โ„•} (hT : 0 < T) (c : C),
      boolGamePayoff M (empiricalPMF hT (mwuRows M ฮท hฮท1 v hrow T)) c = โ†‘(mwuHitCountโœ M ฮท hฮท1 v hrow T c) / โ†‘T
    Uses
    Used by
  26. DeclmwuHitCount_eq_sum_indicatorDeclaration kindtheorem

    The recursive hit counter agrees with the sum of Boolean indicators over the emitted row sequence.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] (M : R โ†’ C โ†’ Bool) (ฮท : โ„)
      (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) (T : โ„•)
      (c : C), โ†‘(mwuHitCountโœ M ฮท hฮท1 v hrow T c) = โˆ‘ t, if M (mwuRows M ฮท hฮท1 v hrow T t) c = true then 1 else 0
    Used by
  27. DeclboolGamePayoff_empirical_eq_avgDeclaration kindtheorem

    Specialized empirical-payoff identity for ApproxMinimax (avoids cyclic import with FiniteVCApprox).

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : DecidableEq R] {T : โ„•} (hT : 0 < T) (rs : Fin T โ†’ R)
      (M : R โ†’ C โ†’ Bool) (c : C), boolGamePayoff M (empiricalPMF hT rs) c = (โˆ‘ t, if M (rs t) c = true then 1 else 0) / โ†‘T
    Used by
  28. DeclhypothesisEnvelope_subDeclaration kindtheorem

    Every hypothesis in the envelope is in C.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (L : ProperFiniteSupportLearner X C) (c : X โ†’ Bool) (Y : Finset X),
      โˆ€ h โˆˆ hypothesisEnvelope L c Y, h โˆˆ C
    Uses
    Used by
  29. DeclProperFiniteSupportLearner.output_memDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} (self : ProperFiniteSupportLearner X C) {m : โ„•} (S : Fin m โ†’ X ร— Bool),
      self.learn S โˆˆ C
    Used by
  30. Declgood_on_support_gives_row_responseDeclaration kindtheorem

    For each C-realizable sample, the proper learner provides a row-response for the minimax game on the hypothesis envelope.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (L : ProperFiniteSupportLearner X C),
      โˆ€ c โˆˆ C,
        โˆ€ (Y : Finset X) [Nonempty โ†ฅY] (HY : Finset (X โ†’ Bool)),
          HY = hypothesisEnvelope L c Y โ†’
            โˆ€ (q : FinitePMF โ†ฅY), โˆƒ h, 2 / 3 โ‰ค โˆ‘ y, q.prob y * if decide (โ†‘h โ†‘y = c โ†‘y) = true then 1 else 0
    Uses
    Used by
  31. DeclsupportAgreement_eq_one_sub_supportErrorDeclaration kindtheorem

    Weighted agreement = 1 - supportError.

    โˆ€ {X : Type u} (Y : Finset X) (q : FinitePMF โ†ฅY) (h c : X โ†’ Bool),
      (โˆ‘ y, q.prob y * if h โ†‘y = c โ†‘y then 1 else 0) = 1 - supportError Y q h c
    Uses
    Used by
  32. DeclProperFiniteSupportLearner.good_on_supportDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} (self : ProperFiniteSupportLearner X C),
      โˆ€ c โˆˆ C,
        โˆ€ (Y : Finset X) (q : FinitePMF โ†ฅY),
          โˆƒ Z โІ Y, Z.card โ‰ค self.sampleBound โˆง supportError Y q (self.learn (labeledSampleOfFinset c Z)) c โ‰ค 1 / 3
    Used by
  33. Declfinite_support_vc_approxDeclaration kindtheorem

    Finite-support distributions uniformly approximate any distribution on a VC class. For a class of VC dimension at most d and any ฮต > 0, there exists T = T(d, ฮต) such that every finitely supported distribution ฮผ is within ฮต (uniformly over the class) of some empirical distribution on T points. A density-style reduction that lets the approximate minimax / MWU machinery, which lives in finite support, apply to general distributions.

    โˆ€ (d : โ„•) (ฮต : โ„),
      0 < ฮต โ†’
        โˆƒ T,
          โˆƒ (hT : 0 < T),
            โˆ€ {H : Type u_1} [inst : Fintype H] [inst_1 : DecidableEq H] (A : Finset (H โ†’ Bool)),
              A.boolVCDim โ‰ค d โ†’
                โˆ€ (ฮผ : FinitePMF H),
                  โˆƒ hs, โˆ€ a โˆˆ A, |boolTestExpectation ฮผ a - boolTestExpectation (empiricalPMF hT hs) a| โ‰ค ฮต
    Uses
    Used by
  34. DecltrueErrorReal_extend_falseDeclaration kindtheorem
    โˆ€ {H : Type u_1} [inst : Fintype H] [DecidableEq H] [inst_2 : MeasurableSpace H] [MeasurableSingletonClass H]
      (ฮผ : FinitePMF H) (a : H โ†’ Bool),
      TrueErrorReal (H โŠ• โ„•) (extendBoolโœ a) (fun x => false) (PMF.map Sum.inl (FinitePMF.toPMFโœ ฮผ)).toMeasure =
        boolTestExpectation ฮผ a
    Uses
    Used by
  35. Declsymmetrization_uc_boundDeclaration kindtheorem

    The symmetrization uniform convergence bound: two-sided version. P[โˆƒhโˆˆC: |TrueErr-EmpErr| โ‰ฅ ฮต] โ‰ค 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8).

    Proof strategy (4 steps):

    1. Decompose absolute value: |TrueErr - EmpErr| โ‰ฅ ฮต โ†” (TrueErr - EmpErr โ‰ฅ ฮต) โˆจ (EmpErr - TrueErr โ‰ฅ ฮต)

    have abs_decomp : โˆ€ (a b : โ„), |a - b| โ‰ฅ ฮต โ†” a - b โ‰ฅ ฮต โˆจ b - a โ‰ฅ ฮต := by intro a b; constructor ยท intro h; by_cases h' : a - b โ‰ฅ ฮต ยท exact Or.inl h' ยท exact Or.inr (by linarith [abs_sub_comm a b, le_abs_self (a - b)]) ยท intro h; cases h with | inl h => exact le_trans (le_of_eq (abs_of_nonneg (by linarith))) (by linarith) | inr h => exact le_trans (le_of_eq (abs_of_nonpos (by linarith) โ–ธ ...)) ...

    2. Upper tail: P[โˆƒhโˆˆC: TrueErr-EmpErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Direct application of symmetrization_step + double_sample_pattern_bound.

    3. Lower tail: P[โˆƒhโˆˆC: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Apply the symmetric argument: swap roles of S and S' in the double sample.
    • Equivalently, apply symmetrization_step to the event EmpErr-TrueErr โ‰ฅ ฮต and bound the double-sample event {EmpErr_S - EmpErr_{S'} โ‰ฅ ฮต/2}.
    • The bound is symmetric because D^m โŠ— D^m is symmetric under swapping factors. have swap_symmetry : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S) - EmpErr(S') โ‰ฅ ฮต/2} = DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S') - EmpErr(S) โ‰ฅ ฮต/2} := Measure.prod_swap ...

    4. Union bound: P[|gap| โ‰ฅ ฮต] โ‰ค P[gap โ‰ฅ ฮต] + P[gap โ‰ค -ฮต] โ‰ค 2ยทGFยทexp(...) + 2ยทGFยทexp(...) = 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    -- Uses: MeasureTheory.measure_union_le for the union of two events -- CAST: 2 * X + 2 * X = 4 * X in ENNReal (need ENNReal.add_mul or similar)

    References: SSBD Theorem 6.7, Kakade-Tewari Lecture 19

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    MeasureTheory.NullMeasurableSet
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2}
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                      (MeasureTheory.Measure.pi fun x => D)
                          {xs |
                            โˆƒ h โˆˆ C,
                              |TrueErrorReal X h c D -
                                    EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                ฮต} โ‰ค
                        ENNReal.ofReal (4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  36. Declsymmetrization_step_lowerDeclaration kindtheorem

    Symmetrization step for the lower tail: P[โˆƒh: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทP_{double}[โˆƒh: EmpErr_S-EmpErr_{S'} โ‰ฅ ฮต/2].

    Mirror of symmetrization_step for the opposite direction. Uses hoeffding_one_sided_upper instead of hoeffding_one_sided.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) - TrueErrorReal X h c D โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  37. Declhoeffding_one_sided_upperDeclaration kindtheorem

    Upper-tail Hoeffding: for iid Bernoulli(p) draws, the empirical average overshoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    This is the mirror of hoeffding_one_sided (which bounds the lower tail). The proof uses the same sub-Gaussian machinery with Z_i = indicator(x_i) - p (instead of p - indicator(x_i)).

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ TrueErrorReal X h c D + t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  38. Declsymmetrization_stepDeclaration kindtheorem

    Symmetrization: the probability of a large gap TrueErr-EmpErr is at most twice the probability of a large gap EmpErr'-EmpErr on the double sample.

    Proof strategy (6 steps):

    1. Witness selection: For S in the bad event, โˆƒh* โˆˆ C with TrueErr(h) - EmpErr_S(h) โ‰ฅ ฮต.

    -- In the bad event set, extract h* by classical choice have h_witness : โˆ€ xs โˆˆ bad_event, โˆƒ h* โˆˆ C, TrueErrorReal X h* c D - EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โ‰ฅ ฮต

    2. Ghost sample mean: E_{S'}[EmpErr_{S'}(h)] = TrueErr(h) โ‰ฅ EmpErr_S(h*) + ฮต.

    • Uses: MeasureTheory.integral_pi to compute E[EmpErr] over product measure.
    • KEY LEMMA: For fixed h, E_{D^m}[EmpiricalError(h,S)] = TrueErrorReal(h,c,D). This is because EmpErr = (1/m)โˆ‘ indicator(x_i), and E[indicator(x_i)] = TrueErrorReal. have expected_emp_err : โˆ€ h* : Concept X Bool, โˆซ xs, EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โˆ‚(Measure.pi (fun _ : Fin m => D)) = TrueErrorReal X h* c D := by ...

    3. Hoeffding on ghost sample: P_{S'}[EmpErr_{S'}(h) < TrueErr(h) - ฮต/2] โ‰ค exp(-mฮตยฒ/2).

    • Apply hoeffding_one_sided with t = ฮต/2.
    • The hm_large hypothesis ensures exp(-mฮตยฒ/2) < 1/2: 2ยทln2 โ‰ค mฮตยฒ โŸน mฮตยฒ/2 โ‰ฅ ln2 โŸน exp(-mฮตยฒ/2) โ‰ค 1/2. have hoeffding_ghost : โˆ€ h* โˆˆ C, Measure.pi (fun _ : Fin m => D) {xs' | EmpiricalError X Bool h* (sample xs') (zeroOneLoss Bool) < TrueErrorReal X h* c D - ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-m * (ฮต/2)^2 * 2)) := by intro h* _; exact hoeffding_one_sided D h* c m hm (ฮต/2) (by linarith) (by ...) (by ...)

    4. Complementary probability: P_{S'}[EmpErr_{S'}(h) - EmpErr_S(h) โ‰ฅ ฮต/2] โ‰ฅ 1/2.

    • From step 2: TrueErr(h) โ‰ฅ EmpErr_S(h) + ฮต
    • From step 3: P[EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2] โ‰ฅ 1/2
    • Chain: EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2 โ‰ฅ EmpErr_S + ฮต - ฮต/2 = EmpErr_S + ฮต/2

    5. Conditional to unconditional: The witness h* from step 1 also witnesses the double-sample event โˆƒhโˆˆC: EmpErr'-EmpErr โ‰ฅ ฮต/2. So: P_{S'}[double event | S bad] โ‰ฅ 1/2.

    have conditional_bound : โˆ€ xs โˆˆ bad_event, Measure.pi (fun _ : Fin m => D) {xs' | โˆƒ h โˆˆ C, EmpiricalError ... xs' - EmpiricalError ... xs โ‰ฅ ฮต/2} โ‰ฅ ENNReal.ofReal (1/2) := by ...

    6. Fubini integration: By Measure.prod_apply and Fubini: P_{S,S'}[double event] = โˆซ_S P_{S'}[double event | S] โ‰ฅ (1/2) ยท P_S[bad event] โŸน P_S[bad event] โ‰ค 2 ยท P_{S,S'}[double event].

    -- Uses: MeasureTheory.Measure.prod_apply or lintegral_prod -- MEASURABILITY: the double-sample event is measurable as a finite union -- of sets of the form {(xs,xs') | EmpErr'(h) - EmpErr(h) โ‰ฅ ฮต/2} for h โˆˆ C. -- Since C may be infinite, measurability requires care: the sup over h -- must be shown to be measurable. For finite restriction patterns (โ‰ค 2^m -- on Fin m โ†’ Bool), this is a finite union.

    MEASURABILITY CONCERNS:

    • {xs | โˆƒ h โˆˆ C, ...} is NOT obviously measurable for infinite C. Strategy: decompose via restriction patterns. On any fixed xs, the set of labelings {(h(xs 0), ..., h(xs(m-1))) | h โˆˆ C} has at most GF(C,m) โ‰ค 2^m elements. So the โˆƒh event is a finite union of measurable sets.
    • EmpiricalError is a finite sum of measurable functions, hence measurable.
    • The product ฯƒ-algebra on (Fin m โ†’ X) ร— (Fin m โ†’ X) is generated by cylinder sets, and our events are in this ฯƒ-algebra.

    References: SSBD Lemma 4.5, Kakade-Tewari Lecture 19 Lemma 1

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            TrueErrorReal X h c D - EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  39. Declhoeffding_one_sidedDeclaration kindtheorem

    One-sided Hoeffding: for iid Bernoulli(p) draws, the empirical average undershoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    Proof strategy (3 steps):

    1. MGF bound (Hoeffding's lemma): For X โˆˆ [0,1] with E[X] = p, E[exp(s(X-p))] โ‰ค exp(sยฒ/8).

    • Adapt from cosh_le_exp_sq_half infrastructure in Rademacher.lean.
    • Key: convexity of exp on [0,1] gives E[exp(sX)] โ‰ค pยทexp(s) + (1-p)ยทexp(0), then the sยฒ/8 bound follows from ln(1 + x) โ‰ค x and Taylor expansion. have mgf_bound : โˆ€ (s : โ„), โˆซ x, Real.exp (s * (indicator x - p)) โˆ‚D โ‰ค Real.exp (s^2 / 8) := by ...

    2. Product independence: E[exp(sยทโˆ‘(X_i-p))] = โˆ E[exp(s(X_i-p))] โ‰ค exp(msยฒ/8).

    • Uses MeasureTheory.Measure.pi independence structure.
    • Needs: Measure.pi integral factorization for product of functions.
    • MEASURABILITY: fun xs => Real.exp (s * โˆ‘ i, f (xs i)) is measurable (composition of measurable functions). have product_bound : โˆ€ (s : โ„), โˆซ xs, Real.exp (s * โˆ‘ i, (indicator (xs i) - p)) โˆ‚Measure.pi (fun _ => D) โ‰ค Real.exp (m * s^2 / 8) := by ...

    3. Exponential Markov + optimize: P[โˆ‘(X_i-p) โ‰ค -mt] = P[exp(-sยทโˆ‘(X_i-p)) โ‰ฅ exp(smt)] โ‰ค exp(-smt + msยฒ/8). Optimize over s: set s = 4t to get โ‰ค exp(-2mtยฒ).

    • Uses Markov's inequality in ENNReal form.
    • CAST ISSUE: Markov gives ENNReal bound, need to convert exp(-2mtยฒ) between ENNReal.ofReal and the measure value. have markov_step : โˆ€ (s : โ„) (hs : 0 < s), Measure.pi (fun _ => D) {xs | โˆ‘ i, (indicator (xs i) - p) โ‰ค -(m : โ„) * t} โ‰ค ENNReal.ofReal (Real.exp (-(s * m * t) + m * s^2 / 8)) := by ... have optimize : Real.exp (-(4*t * m * t) + m * (4*t)^2 / 8) = Real.exp (-2 * m * t^2) := by ring_nf

    CAST ISSUES to watch:

    • m : โ„• needs cast to โ„ in the exponent: (m : โ„)
    • EmpiricalError returns โ„, TrueErrorReal returns โ„, good โ€” no ENNReal gap
    • The measure value is ENNReal, the bound exp(-2mtยฒ) is โ„โ‰ฅ0โˆž via ENNReal.ofReal

    References: SSBD Lemma B.3, Hoeffding (1963)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ค TrueErrorReal X h c D - t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  40. Decldouble_sample_pattern_boundDeclaration kindtheorem

    On the double sample, the probability that any hypothesis has EmpErr' - EmpErr โ‰ฅ ฮต/2 is bounded by GF(C,2m) ยท exp(-mฮตยฒ/8).

    Proof strategy (Approach A โ€” standard exchangeability, 5 steps):

    1. EXCHANGEABILITY: Under D^m โŠ— D^m, the 2m draws zโ‚,...,z_{2m} are iid from D. The joint distribution is invariant under permutations of {1,...,2m}.

    Key lemma: P_{D^mโŠ—D^m}[event(S,S')] = E_z[P_{split}[event | z]] where z = merged sample and the split is uniformly random among all C(2m,m) ways to partition z into two groups of m.

    -- Measure.pi permutation invariance have pi_perm_invariant : โˆ€ (ฯƒ : Equiv.Perm (Fin (2*m))), (Measure.pi (fun _ : Fin (2*m) => D)).map (fun z i => z (ฯƒ i)) = Measure.pi (fun _ : Fin (2*m) => D) := by ... -- Consequence: the event probability equals the split-averaged probability have exchangeability : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, gap(p) โ‰ฅ ฮต/2} = โˆซ z, SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs) โ‰ฅ ฮต/2} โˆ‚(Measure.pi (fun _ : Fin (2*m) => D)) := by ...

    2. CONDITIONING: For fixed merged sample z of 2m points:

    • C restricts to at most GF(C,2m) distinct labeling patterns on z (deterministic).
    • For each pattern p, define: diff(p, split) = EmpErr_{S'}(p) - EmpErr_S(p) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i where a_i = 1[pattern(z_i) โ‰  c(z_i)] โˆˆ {0,1}.
    -- Number of distinct patterns have num_patterns : โˆ€ (z : MergedSample X m), Set.ncard {p : Fin (2*m) โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h (z i) โ‰  c (z i))} โ‰ค GrowthFunction X C (2*m) := by ...

    3. PER-PATTERN HOEFFDING ON SPLITS: For fixed z and fixed pattern p: Under uniformly random split (S,S') of z into two groups of m: diff(p, split) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i

    This is a function of the random partition. By Hoeffding's inequality for sampling without replacement (Serfling 1974): P_split[diff โ‰ฅ ฮต/2] โ‰ค exp(-mฮตยฒ/8)

    Alternative derivation: Hoeffding without replacement from Hoeffding with replacement (iid signs) via coupling. The without-replacement bound is actually TIGHTER (variance reduction), but the with-replacement bound suffices.

    -- Per-pattern concentration have per_pattern_bound : โˆ€ (z : MergedSample X m) (a : Fin (2*m) โ†’ โ„) (ha : โˆ€ i, a i โˆˆ Set.Icc 0 1), SplitMeasure m {vs | (1/m) * โˆ‘ i โˆˆ second_group vs, a i - (1/m) * โˆ‘ i โˆˆ first_group vs, a i โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-(m : โ„) * (ฮต/2)^2 / 2)) := by ... -- Note: m*(ฮต/2)^2/2 = mฮตยฒ/8

    4. UNION BOUND: P_split[โˆƒ pattern: diff โ‰ฅ ฮต/2 | z] โ‰ค (number of patterns) ยท max_pattern P_split[diff โ‰ฅ ฮต/2] โ‰ค GF(C,2m) ยท exp(-mฮตยฒ/8)

    have union_bound : โˆ€ (z : MergedSample X m), SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs, h) โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (GrowthFunction X C (2*m) * Real.exp (-(m : โ„) * ฮต^2 / 8)) := by ...

    5. INTEGRATE: P_{D^mโŠ—D^m}[event] = E_z[P_split[event|z]] (by step 1) โ‰ค E_z[GF(C,2m) ยท exp(-mฮตยฒ/8)] (by step 4, pointwise) = GF(C,2m) ยท exp(-mฮตยฒ/8) (bound is independent of z)

    -- The bound is a constant, so integrating gives the same constant -- (using IsProbabilityMeasure for the 2m-fold product)

    Infrastructure needed:

    • Fin.sumFinEquiv : Fin m โŠ• Fin n โ‰ƒ Fin (m + n) (available in Mathlib)
    • mergeSamples / splitMergedSample (defined above)
    • SplitMeasure and ValidSplit (defined above)
    • Measure.pi permutation invariance (to be proved or imported)
    • Hoeffding for sampling without replacement
    • GrowthFunction on 2m points + sauer_shelah_exp_bound from Rademacher.lean

    MEASURABILITY CONCERNS:

    • The merged sample z โ†ฆ P_split[event|z] must be measurable as a function of z. Since the event is a finite union over patterns, and each pattern's indicator is a measurable function of z (finite evaluation), this follows.
    • GrowthFunction X C (2*m) is a natural number (deterministic), no measurability issue.

    References: SSBD Theorem 6.7, Hoeffding (1963), Serfling (1974)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  MeasureTheory.NullMeasurableSet
                      {p |
                        โˆƒ h โˆˆ C,
                          EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                            ฮต / 2}
                      ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                    ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2} โ‰ค
                      ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  41. Declexchangeability_chain_boundDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  ฮต โ‰ค 2 โ†’
                    Set.Nonempty C โ†’
                      MeasureTheory.NullMeasurableSet
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
                          ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                        have ฮผ := MeasureTheory.Measure.pi fun x => D;
                        (ฮผ.prod ฮผ)
                            {p |
                              โˆƒ h โˆˆ C,
                                EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                    EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                  ฮต / 2} โ‰ค
                          ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  42. DeclzeroOneLoss.congr_simpDeclaration kindtheorem
    โˆ€ (Y : Type v) {inst : DecidableEq Y} [inst_1 : DecidableEq Y] (a a_1 : Y),
      a = a_1 โ†’ โˆ€ (a_2 a_3 : Y), a_2 = a_3 โ†’ zeroOneLoss Y a a_2 = zeroOneLoss Y a_1 a_3
    Used by
  43. Declrestriction_pattern_countDeclaration kindtheorem

    The number of distinct restriction patterns of C on any n points is at most GF(C,n). For z : Fin n โ†’ X, define patterns(z) = {p : Fin n โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h(z i) โ‰  c(z i))}. Then patterns(z).ncard โ‰ค GrowthFunction X C n by definition of GrowthFunction.

    โˆ€ {X : Type u} [MeasurableSpace X] [Infinite X] (C : ConceptClass X Bool) (c : Concept X Bool) (n : โ„•) (z : Fin n โ†’ X),
      {p | โˆƒ h โˆˆ C, โˆ€ (i : Fin n), p i = decide (h (z i) โ‰  c (z i))}.ncard โ‰ค GrowthFunction X C n
    Used by
  44. Declrademacher_mgf_boundDeclaration kindtheorem

    Rademacher MGF bound.

    โˆ€ {m : โ„•},
      0 < m โ†’
        โˆ€ (a : Fin m โ†’ โ„) (c : โ„),
          0 โ‰ค c โ†’
            (โˆ€ (i : Fin m), |a i| โ‰ค c) โ†’
              โˆ€ (t : โ„),
                0 โ‰ค t โ†’
                  1 / โ†‘(Fintype.card (SignVector m)) * โˆ‘ ฯƒ, Real.exp (t * (1 / โ†‘m * โˆ‘ i, a i * boolToSign (ฯƒ i))) โ‰ค
                    Real.exp (t ^ 2 * c ^ 2 / (2 * โ†‘m))
    Uses
    Used by
  45. Declcosh_le_exp_sq_halfDeclaration kindtheorem

    cosh(x) โ‰ค exp(xยฒ/2). Standard sub-Gaussian bound.

    โˆ€ (x : โ„), Real.cosh x โ‰ค Real.exp (x ^ 2 / 2)
    Used by
  46. Declfinite_exchangeability_boundDeclaration kindtheorem

    Generic finite exchangeability bound. Given a measure-preserving family of transformations on a probability space, a NullMeasurableSet S, and a pointwise bound on the sum of preimage indicators, conclude ฮฝ(S) โ‰ค B.

    โˆ€ {ฮฉ : Type u_1} {G : Type u_2} [inst : MeasurableSpace ฮฉ] [inst_1 : Fintype G] [Nonempty G]
      {ฮฝ : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure ฮฝ] (T : G โ†’ ฮฉ โ†’ ฮฉ) (S : Set ฮฉ),
      (โˆ€ (g : G), MeasureTheory.MeasurePreserving (T g) ฮฝ ฮฝ) โ†’
        MeasureTheory.NullMeasurableSet S ฮฝ โ†’
          โˆ€ (B : ENNReal), (โˆ€ (z : ฮฉ), โˆ‘ g, (T g โปยน' S).indicator 1 z โ‰ค B * โ†‘(Fintype.card G)) โ†’ ฮฝ S โ‰ค B
    Used by
  47. Declgrowth_exp_le_deltaDeclaration kindtheorem
    โˆ€ {X : Type u} [MeasurableSpace X] (C : ConceptClass X Bool) (v : โ„•),
      0 < v โ†’
        โˆ€ (m : โ„•),
          0 < m โ†’
            โˆ€ (ฮต ฮด : โ„),
              0 < ฮต โ†’
                0 < ฮด โ†’
                  ฮด < 1 โ†’
                    (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                      (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                        4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)) โ‰ค ฮด โˆง 2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2
    Uses
    Used by
  48. Declsum_choose_le_exp_powDeclaration kindtheorem

    Pure combinatorial inequality: โˆ‘_{i=0}^d C(m,i) โ‰ค (em/d)^d for d โ‰ค m, d โ‰ฅ 1.

    โˆ€ (d m : โ„•), 0 < d โ†’ d โ‰ค m โ†’ โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) โ‰ค (Real.exp 1 * โ†‘m / โ†‘d) ^ d
    Used by
  49. Declpow_mul_exp_neg_le_factorial_divDeclaration kindtheorem

    Key arithmetic lemma for PAC bound: for t > 0, t^d * exp(-t) โ‰ค (d+1)!/t. Follows from exp(t) โ‰ฅ t^(d+1)/(d+1)! (partial sum of Taylor series).

    โˆ€ {d : โ„•} {t : โ„}, 0 < t โ†’ t ^ d * Real.exp (-t) โ‰ค โ†‘(d + 1).factorial / t
    Used by
  50. Declgrowth_function_le_two_powDeclaration kindtheorem

    Trivial bound: GrowthFunction โ‰ค 2^n for all concept classes. Each restriction to an n-element set yields a function in S โ†’ Bool, and there are at most 2^n such functions.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (n : โ„•), GrowthFunction X C n โ‰ค 2 ^ n
    Used by
  51. DeclboolTestExpectation_nonnegDeclaration kindtheorem

    A convex combination of values in {0, 1} is nonnegative.

    โˆ€ {H : Type u_1} [inst : Fintype H] (ฮผ : FinitePMF H) (f : H โ†’ Bool), 0 โ‰ค boolTestExpectation ฮผ f
    Uses
    Used by
  52. DeclboolTestExpectation_le_oneDeclaration kindtheorem

    A convex combination of values in {0, 1} is at most 1.

    โˆ€ {H : Type u_1} [inst : Fintype H] (ฮผ : FinitePMF H) (f : H โ†’ Bool), boolTestExpectation ฮผ f โ‰ค 1
    Uses
    Used by
  53. DeclFinitePMF.prob_nonnegDeclaration kindtheorem
    โˆ€ {H : Type u_1} [inst : Fintype H] (self : FinitePMF H) (h : H), 0 โ‰ค self.prob h
    Used by
  54. DeclFinitePMF.prob_sum_oneDeclaration kindtheorem
    โˆ€ {H : Type u_1} [inst : Fintype H] (self : FinitePMF H), โˆ‘ h, self.prob h = 1
    Used by
  55. DeclfinalizeIncidenceSchemeDeclaration kindtheorem

    Final existential wrapper: closes the theorem in the exact form expected.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (T K : โ„•)
      (compressCore : {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ Finset (X ร— Bool) ร— IncidenceInfo T K)
      (blockHyp : Finset (X ร— Bool) โ†’ IncidenceInfo T K โ†’ Fin T โ†’ X โ†’ Bool)
      (rowHyp : {m : โ„•} โ†’ (S : Fin m โ†’ X ร— Bool) โ†’ (โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) โ†’ Fin T โ†’ X โ†’ Bool),
      0 < T โ†’
        (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), (compressCore S).1.card โ‰ค K) โ†’
          (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), โ†‘(compressCore S).1 โІ Set.range S) โ†’
            (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m) (t : Fin T),
                blockHyp (compressCore S).1 (compressCore S).2 t (S i).1 = rowHyp S hreal t (S i).1) โ†’
              (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m),
                  (โˆ‘ t, if rowHyp S hreal t (S i).1 = (S i).2 then 1 else 0) / โ†‘T > 1 / 2) โ†’
                โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Used by
  56. DeclencodeWitnessInfo.congr_simpDeclaration kindtheorem
    โˆ€ {X : Type u} {inst : DecidableEq X} [inst_1 : DecidableEq X] (kernel kernel_1 : Finset (X ร— Bool)),
      kernel = kernel_1 โ†’
        โˆ€ (c c_1 : X โ†’ Bool),
          c = c_1 โ†’
            โˆ€ (K : โ„•) (W W_1 : Finset X), W = W_1 โ†’ encodeWitnessInfo kernel c K W = encodeWitnessInfo kernel_1 c_1 K W_1
    Used by
  57. DeclboolTestExpectation_empirical_eq_avgDeclaration kindtheorem

    Bridges the FinitePMF view and the sample-average view: the expectation of a Bool-valued test under the empirical PMF of a sample equals the sample average (1/T) โˆ‘_t f (s_t). This lets the MWU updates and the approximation transfer principle live in the same distributional framework.

    โˆ€ {H : Type u_1} [inst : Fintype H] [inst_1 : DecidableEq H] {T : โ„•} (hT : 0 < T) (hs : Fin T โ†’ H) (f : H โ†’ Bool),
      boolTestExpectation (empiricalPMF hT hs) f = (โˆ‘ t, if f (hs t) = true then 1 else 0) / โ†‘T
    Used by
  58. DeclboolGamePayoff_eq_boolTestExpectationDeclaration kindtheorem

    Identifies the game-theoretic payoff (a row distribution against a fixed column in the Bool game) with the corresponding test expectation. The translation that lets the MWU regret bound be applied directly to the compression problem.

    โˆ€ {R : Type u_1} [inst : Fintype R] [DecidableEq R] {C : Type u_2} (M : R โ†’ C โ†’ Bool) (p : FinitePMF R) (c : C),
      boolGamePayoff M p c = boolTestExpectation p fun r => M r c
    Used by
  59. DeclagreeTests_boolVCDim_leDeclaration kindtheorem

    VC dimension of the agreement-test family is bounded by 2^(d+1) - 1, where d bounds the VC dimension of the concept class C. Uses Assouad's coding argument directly: if a shattered set T in โ†ฅHY has |T| โ‰ฅ 2^(d+1), embed bitstrings into T, extract d+1 distinct points from Y via shattering, and show these points are shattered by C (using the XOR trick where b(j) = decide(g(x_j) = c(x_j)) absorbs the agree/disagree flip).

    โˆ€ {X : Type u} [DecidableEq X] (C : ConceptClass X Bool) (c : X โ†’ Bool) (Y : Finset X) (HY : Finset (X โ†’ Bool)),
      (โˆ€ h โˆˆ HY, h โˆˆ C) โ†’ โˆ€ {d : โ„•}, VCDim X C โ‰ค โ†‘d โ†’ (agreeTests c Y HY).boolVCDim โ‰ค 2 ^ (d + 1) - 1
    Used by
  60. Declcompression_with_info_imp_vcdim_finiteDeclaration kindtheorem

    Compression with side info implies finite VC dimension. Proof by pigeonhole: compress is injective on C-realizable labelings (by correctness), but compressed outputs form a bounded set.

    โˆ€ (X : Type u) (C : ConceptClass X Bool), (โˆƒ k cs, cs.size = k) โ†’ VCDim X C < โŠค
    Uses
    Used by
  61. Declshatters_subset_compressionDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} {S T : Finset X}, T โІ S โ†’ Shatters X C S โ†’ Shatters X C T
    Used by
  62. Declexp_beats_poly_compressionDeclaration kindtheorem

    Exponential beats polynomial for the compression pigeonhole argument.

    โˆ€ (s : โ„•), (s + 1) ^ 2 * (4 * (s + 1) ^ 2) ^ s < 2 ^ (2 * (s + 1) * (s + 1))
    Uses
    Used by
  63. Declsucc_le_two_pow_compressionDeclaration kindtheorem
    โˆ€ (k : โ„•), k + 1 โ‰ค 2 ^ k
    Used by
  64. Declcompress_with_info_injective_on_labelingsDeclaration kindtheorem

    Pigeonhole core: if two C-realizable samples over the same points with different labelings produce the same (kernel, info) pair, correctness forces the labelings to agree.

    โˆ€ {X : Type u} {n : โ„•} {C : ConceptClass X Bool} (cs : CompressionSchemeWithInfo X Bool C) (pts : Fin n โ†’ X),
      Function.Injective pts โ†’
        โˆ€ (f g : Fin n โ†’ Bool),
          (โˆƒ c โˆˆ C, โˆ€ (i : Fin n), c (pts i) = f i) โ†’
            (โˆƒ c โˆˆ C, โˆ€ (i : Fin n), c (pts i) = g i) โ†’
              ((cs.compress fun i => (pts i, f i)) = cs.compress fun i => (pts i, g i)) โ†’ f = g
    Uses
    Used by
  65. DeclCompressionSchemeWithInfo.correctDeclaration kindtheorem

    Correctness: reconstructed hypothesis agrees with every sample point, when the sample is C-realizable

    โˆ€ {X : Type u} {Y : Type v} {C : ConceptClass X Y} (self : CompressionSchemeWithInfo X Y C) {m : โ„•} (S : Fin m โ†’ X ร— Y),
      (โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) โ†’
        โˆ€ (i : Fin m), self.reconstruct (self.compress S).1 (self.compress S).2 (S i).1 = (S i).2
    Used by
  66. DeclCompressionSchemeWithInfo.compress_subDeclaration kindtheorem

    Compressed set is a subset of the sample

    โˆ€ {X : Type u} {Y : Type v} {C : ConceptClass X Y} (self : CompressionSchemeWithInfo X Y C) {m : โ„•} (S : Fin m โ†’ X ร— Y),
      โ†‘(self.compress S).1 โІ Set.range S
    Used by
  67. DeclCompressionSchemeWithInfo.compress_smallDeclaration kindtheorem

    Compressed set is small

    โˆ€ {X : Type u} {Y : Type v} {C : ConceptClass X Y} (self : CompressionSchemeWithInfo X Y C) {m : โ„•} (S : Fin m โ†’ X ร— Y),
      (self.compress S).1.card โ‰ค self.kernelSize
    Used by
  68. DefinitionCompressionSchemeWithInfostructure

    A labeled compression scheme with finite side information. This is the object proved to exist by Moran-Yehudayoff (2016, arXiv:1503.06960).

    The current CompressionScheme is strictly stronger: it requires reconstruction from the compressed Finset alone (no side information). See Open_NoInfoCompressionStrengthening for that conjecture.

    (X : Type u) โ†’ (Y : Type v) โ†’ ConceptClass X Y โ†’ Type (max (max u (u_1 + 1)) v)
  69. DefinitionCompressionSchemeWithInfo.Infodef

    The side information type

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ CompressionSchemeWithInfo X Y C โ†’ Type u_1
  70. DefinitionCompressionSchemeWithInfo.compressdef

    Compression: extract โ‰ค kernelSize labeled examples + side information

    {X : Type u} โ†’
      {Y : Type v} โ†’
        {C : ConceptClass X Y} โ†’
          (self : CompressionSchemeWithInfo X Y C) โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Finset (X ร— Y) ร— self.Info
  71. DefinitionCompressionSchemeWithInfo.info_finitedef

    Side information is finite

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ (self : CompressionSchemeWithInfo X Y C) โ†’ Fintype self.Info
  72. DefinitionCompressionSchemeWithInfo.kernelSizedef

    Kernel size bound

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ CompressionSchemeWithInfo X Y C โ†’ โ„•
  73. DefinitionCompressionSchemeWithInfo.reconstructdef

    Reconstruction: produce hypothesis from compressed subset AND side information

    {X : Type u} โ†’
      {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ (self : CompressionSchemeWithInfo X Y C) โ†’ Finset (X ร— Y) โ†’ self.Info โ†’ X โ†’ Y
  74. DefinitionCompressionSchemeWithInfo.sizedef

    Total size of a compression scheme with side information: kernel size + number of side information states. (The paper uses k + logโ‚‚(|I|+1); we use the simpler k + |I| which is an upper bound and avoids importing Real.log.)

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ CompressionSchemeWithInfo X Y C โ†’ โ„•
  75. DefinitionCompressionSchemeWithInfo0def

    Fix the hidden Info universe parameter of CompressionSchemeWithInfo to 0. This resolves the universe elaboration obstruction: Fin T โ†’ Finset (Fin K) is Type 0, while CompressionSchemeWithInfo X Bool C with X : Type u infers Info : Type u. Pinning to .{u, 0, 0} allows Type 0 Info directly.

    (X : Type u) โ†’ (Y : Type) โ†’ ConceptClass X Y โ†’ Type (max (max u 1) 0)
  76. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  77. DefinitionEmpiricalErrordef

    Empirical error: average loss on a finite sample.

    (X : Type u) โ†’ (Y : Type v) โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ LossFunction Y โ†’ โ„
  78. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  79. DefinitionFinitePMFstructure

    A probability mass function over a finite type. Named FinitePMF to avoid conflict with Mathlib's PMF.

    (H : Type u_1) โ†’ [Fintype H] โ†’ Type u_1
  80. DefinitionFinitePMF.probdef
    {H : Type u_1} โ†’ [inst : Fintype H] โ†’ FinitePMF H โ†’ H โ†’ โ„
  81. DefinitionFinitePMF.toPMFdef
    {H : Type u_1} โ†’ [inst : Fintype H] โ†’ FinitePMF H โ†’ PMF H
  82. DefinitionFinset.boolVCDimdef

    VC dimension of a finite Bool-valued family, computed via the set-system image boolFamilyToFinsetFamily and Mathlib's Finset.vcDim. Declared noncomputable because the underlying vcDim is.

    {H : Type u_1} โ†’ [Fintype H] โ†’ [DecidableEq H] โ†’ Finset (H โ†’ Bool) โ†’ โ„•
  83. DefinitionGrowthFunctiondef

    Growth function (shattering coefficient): ฯ€_C(m) = max_{|S|=m} |{c|_S : c โˆˆ C}|. For each m-element set S, counts the number of distinct restrictions of C to S, then takes the supremum over all such S.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ โ„• โ†’ โ„•
  84. DefinitionIncidenceInfodef

    Concrete side information for the MY construction: each of the T recovered blocks is represented by the set of kernel positions it uses.

    โ„• โ†’ โ„• โ†’ Type
  85. DefinitionMWUConfigstructure

    MWU config: weight vector with positivity proof.

    (C : Type u_1) โ†’ [Fintype C] โ†’ Type u_1
  86. DefinitionMWUConfig.potentialdef

    Potential = sum of weights.

    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ MWUConfig C โ†’ โ„
  87. DefinitionMWUConfig.toPMFdef

    Normalize config to PMF.

    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ [Nonempty C] โ†’ MWUConfig C โ†’ FinitePMF C
  88. DefinitionMWUConfig.weightsdef
    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ MWUConfig C โ†’ C โ†’ โ„
  89. DefinitionProperFiniteSupportLearnerstructure

    A proper finite-support learner for a concept class C. This structure captures the existence of a bounded-support ERM with error at most 1/3 for any C-realizable finite distribution. CORRECTED: good_on_support returns Finset X (not Fin k โ†’ X).

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Type u
  90. DefinitionProperFiniteSupportLearner.learndef
    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ ProperFiniteSupportLearner X C โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ X โ†’ Bool
  91. DefinitionProperFiniteSupportLearner.sampleBounddef
    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ ProperFiniteSupportLearner X C โ†’ โ„•
  92. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  93. DefinitionSignVectordef
    โ„• โ†’ Type
  94. DefinitionTrueErrordef

    True error (0-1 loss, realizable case): D-probability of disagreement. This is what PACLearnable's success event measures.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ ENNReal
  95. DefinitionTrueErrorRealdef

    True error in โ„: for use in bounds involving subtraction/absolute value. COUNTER-1 of TrueError. The toReal bridge loses information when the measure is โŠค.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ โ„
  96. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  97. DefinitionagreeTestdef

    Per-point agreement test: for a fixed point x โˆˆ Y and concept c, maps hypothesis h to whether h(x) = c(x).

    {X : Type u} โ†’ (X โ†’ Bool) โ†’ X โ†’ (HY : Finset (X โ†’ Bool)) โ†’ โ†ฅHY โ†’ Bool
  98. DefinitionagreeTestsdef

    The family of agreement tests over all points in Y.

    {X : Type u} โ†’ (X โ†’ Bool) โ†’ Finset X โ†’ (HY : Finset (X โ†’ Bool)) โ†’ Finset (โ†ฅHY โ†’ Bool)
  99. DefinitionboolFamilyToFinsetFamilydef

    Maps a finite family of Bool-valued functions to its image as a family of accepting sets. The set-system view is what Mathlib's Finset.Shatters and Finset.vcDim consume, so this is the entry point from the function-class view to the combinatorial VC machinery.

    {H : Type u_1} โ†’ [Fintype H] โ†’ [DecidableEq H] โ†’ Finset (H โ†’ Bool) โ†’ Finset (Finset H)
  100. DefinitionboolGamePayoffdef

    Expected payoff of distribution p against column c in a Boolean game.

    {R : Type u_1} โ†’ {C : Type u_2} โ†’ [inst : Fintype R] โ†’ (R โ†’ C โ†’ Bool) โ†’ FinitePMF R โ†’ C โ†’ โ„
  101. DefinitionboolTestExpectationdef

    Expected value of a Bool-valued test under a finite distribution, via the indicator embedding if f h then 1 else 0. The central quantity of the finite-VC approximation layer: a TV bound on distributions translates to a uniform bound on test expectations via expectation_approx_of_tv.

    {H : Type u_1} โ†’ [inst : Fintype H] โ†’ FinitePMF H โ†’ (H โ†’ Bool) โ†’ โ„
  102. DefinitionboolToSigndef

    Convert Bool labels to ยฑ1 reals. true โ†ฆ 1, false โ†ฆ -1.

    Bool โ†’ โ„
  103. DefinitionboundedSubsamplesdef

    Bounded subsamples: all subsets of Y with cardinality โ‰ค s.

    {X : Type u} โ†’ Finset X โ†’ โ„• โ†’ Finset (Finset X)
  104. DefinitiondecodeWitnessLabeldef

    Decode labels from the kernel. This is exactly the current MY reconstruction convention in your file.

    {X : Type u} โ†’ [DecidableEq X] โ†’ Finset (X ร— Bool) โ†’ X โ†’ Bool
  105. DefinitiondecodeWitnessXCoordsdef

    Decode the X-coordinates of a block from kernel positions. This matches the current blockHyp shape.

    {X : Type u} โ†’ Finset (X ร— Bool) โ†’ {K : โ„•} โ†’ Finset (Fin K) โ†’ Finset X
  106. DefinitiondisagreementFamilydef

    The disagreement family: for each h โˆˆ C, the test y โ†ฆ decide(h(y) โ‰  c(y)) restricted to Y. Used for the VC approximation step in the proper learner proof.

    {X : Type u} โ†’ ConceptClass X Bool โ†’ (X โ†’ Bool) โ†’ (Y : Finset X) โ†’ Finset (โ†ฅY โ†’ Bool)
  107. DefinitionempiricalPMFdef

    Build FinitePMF from empirical frequencies of a finite sequence.

    {ฮฑ : Type u_1} โ†’ [inst : Fintype ฮฑ] โ†’ [DecidableEq ฮฑ] โ†’ {T : โ„•} โ†’ 0 < T โ†’ (Fin T โ†’ ฮฑ) โ†’ FinitePMF ฮฑ
  108. DefinitionencodeWitnessInfodef

    Encode a witness set W as the set of kernel positions of the pairs (x, c x). The bound kernel.card โ‰ค K is fed into the encoding through the if branch, so the result has the same shape as the current compressCore code.

    {X : Type u} โ†’ [DecidableEq X] โ†’ Finset (X ร— Bool) โ†’ (X โ†’ Bool) โ†’ (K : โ„•) โ†’ Finset X โ†’ Finset (Fin K)
  109. DefinitionextendBooldef
    {H : Type u_1} โ†’ (H โ†’ Bool) โ†’ H โŠ• โ„• โ†’ Bool
  110. DefinitionhypothesisEnvelopedef

    The hypothesis envelope: the finite set of all possible learner outputs on bounded subsamples of Y, labeled by concept c.

    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ ProperFiniteSupportLearner X C โ†’ (X โ†’ Bool) โ†’ Finset X โ†’ Finset (X โ†’ Bool)
  111. DefinitionlabeledSampleOfFinsetdef

    Build a labeled sample from a Finset of points and a concept.

    {X : Type u} โ†’ (X โ†’ Bool) โ†’ (Z : Finset X) โ†’ Fin Z.card โ†’ X ร— Bool
  112. DefinitionliftClassdef
    {H : Type u_1} โ†’ Finset (H โ†’ Bool) โ†’ ConceptClass (H โŠ• โ„•) Bool
  113. DefinitionmkIncidenceSchemeOfMajoritydef

    The actual final closure helper. Packages the majority-vote construction. If decoded hypotheses agree with reference hypotheses on sample points, and majority of reference hypotheses agree with each label, then majority-vote reconstruction is correct.

    {X : Type u} โ†’
      {C : ConceptClass X Bool} โ†’
        (T K : โ„•) โ†’
          (compressCore : {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ Finset (X ร— Bool) ร— IncidenceInfo T K) โ†’
            (blockHyp : Finset (X ร— Bool) โ†’ IncidenceInfo T K โ†’ Fin T โ†’ X โ†’ Bool) โ†’
              (rowHyp :
                  {m : โ„•} โ†’ (S : Fin m โ†’ X ร— Bool) โ†’ (โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) โ†’ Fin T โ†’ X โ†’ Bool) โ†’
                0 < T โ†’
                  (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), (compressCore S).1.card โ‰ค K) โ†’
                    (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), โ†‘(compressCore S).1 โІ Set.range S) โ†’
                      (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m)
                          (t : Fin T),
                          blockHyp (compressCore S).1 (compressCore S).2 t (S i).1 = rowHyp S hreal t (S i).1) โ†’
                        (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m),
                            (โˆ‘ t, if rowHyp S hreal t (S i).1 = (S i).2 then 1 else 0) / โ†‘T > 1 / 2) โ†’
                          CompressionSchemeWithInfo0 X Bool C
  114. DefinitionmwuConfigdef

    The MWU config after T steps.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’
                      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ โ„• โ†’ MWUConfig C
  115. DefinitionmwuHitCountdef

    Count how many rounds hit a fixed column, aligned to the recursion of mwuRun.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’ (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ โ„• โ†’ C โ†’ โ„•
  116. DefinitionmwuInitdef

    Initial config: all weights = 1.

    (C : Type u_1) โ†’ [inst : Fintype C] โ†’ MWUConfig C
  117. DefinitionmwuRowsdef

    The MWU row sequence after T steps.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’
                      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ (T : โ„•) โ†’ Fin T โ†’ R
  118. DefinitionmwuRundef

    MWU run: iterate T steps, returning final config and row sequence.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’
                      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’
                        (T : โ„•) โ†’ MWUConfig C ร— (Fin T โ†’ R)
  119. DefinitionmwuUpdateWeightsdef

    One MWU update step on weights.

    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ {R : Type u_2} โ†’ (R โ†’ C โ†’ Bool) โ†’ (ฮท : โ„) โ†’ ฮท < 1 โ†’ MWUConfig C โ†’ R โ†’ MWUConfig C
  120. DefinitionpointSupportdef

    Extract the domain points from a labeled sample.

    {X : Type u} โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ Finset X
  121. DefinitionsupportErrordef

    Weighted error of hypothesis h vs concept c over a FinitePMF on Y.

    {X : Type u} โ†’ (Y : Finset X) โ†’ FinitePMF โ†ฅY โ†’ (X โ†’ Bool) โ†’ (X โ†’ Bool) โ†’ โ„
  122. DefinitionuniformPMFdef

    Uniform PMF over a nonempty Fintype.

    (C : Type u_1) โ†’ [inst : Fintype C] โ†’ [Nonempty C] โ†’ FinitePMF C
  123. DefinitionzeroOneLossdef

    The 0-1 loss for classification.

    (Y : Type v) โ†’ [DecidableEq Y] โ†’ LossFunction Y

Littlestone characterization: C is online-learnable iff LittlestoneDim(C) < โˆž.

Decllittlestone_characterization
โˆ€ (X : Type) (C : ConceptClass X Bool), OnlineLearnable X Bool C โ†” LittlestoneDim X C < โŠค
Layout
ThesisStepDefinition
littlestone_characterizatโ€ฆtheoremforward_directiontheoremadversary_coretheorembackward_directiontheoremsoa_mistakes_boundedtheoremversionSpace_appendtheoremtarget_in_versionSpacetheoremldim_strict_decrease_on_mโ€ฆtheoremsoa_predict_spectheoremldim_zero_all_agreetheoremldim_branch_lower_boundtheoremexists_shattered_of_ldim_โ€ฆtheoremisShattered_truncatetheoremnonempty_of_isShatteredtheoremWithBot_WithTop_lt_succ_letheoremSOA_mistakesFrom_constheoremisShattered_monotheoremmistakesFrom_init_eqtheoremSOA_init_eqtheoremConceptClassdefConceptdefLTreeinductiveisShattereddeftruncatedefLittlestoneDimdefMistakeBoundeddefOnlineLearnabledefOnlineLearnerstructureStatedefinitdefmistakesdefgodefmistakesFromdefpredictdefupdatedefSOAdefversionSpacedef
  1. Decllittlestone_characterizationDeclaration kindtheorem
    โˆ€ (X : Type) (C : ConceptClass X Bool), OnlineLearnable X Bool C โ†” LittlestoneDim X C < โŠค
    Uses
  2. Declforward_directionDeclaration kindtheorem

    Forward direction: OnlineLearnable โ†’ LittlestoneDim < โŠค

    โˆ€ (X : Type) (C : ConceptClass X Bool), OnlineLearnable X Bool C โ†’ LittlestoneDim X C < โŠค
    Uses
    Used by
  3. Decladversary_coreDeclaration kindtheorem

    Core adversary lemma.

    โˆ€ {X : Type} (L : OnlineLearner X Bool) (s : L.State) {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n),
      LTree.isShattered C T โ†’ Set.Nonempty C โ†’ โˆƒ seq, โˆƒ c โˆˆ C, L.mistakesFrom s c seq = n
    Used by
  4. Declbackward_directionDeclaration kindtheorem

    Backward direction: LittlestoneDim < โŠค โ†’ OnlineLearnable.

    โˆ€ (X : Type) (C : ConceptClass X Bool), LittlestoneDim X C < โŠค โ†’ OnlineLearnable X Bool C
    Uses
    Used by
  5. Declsoa_mistakes_boundedDeclaration kindtheorem

    SOA mistakes from a given state are bounded by the Ldim of the version space. This is the core M-Potential argument.

    โˆ€ {X : Type} {C : ConceptClass X Bool},
      โˆ€ c โˆˆ C,
        โˆ€ (history : List (X ร— Bool)),
          (โˆ€ p โˆˆ history, c p.1 = p.2) โ†’
            โˆ€ (d : โ„•),
              LittlestoneDim X (versionSpace C history) โ‰ค โ†‘โ†‘d โ†’
                LittlestoneDim X (versionSpace C history) < โŠค โ†’ โˆ€ (seq : List X), (SOA X C).mistakesFrom history c seq โ‰ค d
    Uses
    Used by
  6. DeclversionSpace_appendDeclaration kindtheorem

    Extending history restricts the version space.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {history : List (X ร— Bool)} {x : X} {y : Bool},
      versionSpace C (history ++ [(x, y)]) โІ versionSpace C history
    Used by
  7. Decltarget_in_versionSpaceDeclaration kindtheorem

    Target stays in version space.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {c : X โ†’ Bool},
      c โˆˆ C โ†’ โˆ€ {history : List (X ร— Bool)}, (โˆ€ p โˆˆ history, c p.1 = p.2) โ†’ c โˆˆ versionSpace C history
    Used by
  8. Declldim_strict_decrease_on_mistakeDeclaration kindtheorem

    On an SOA mistake, the Ldim of the version space strictly decreases.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {history : List (X ร— Bool)} {x : X} {c : X โ†’ Bool},
      c โˆˆ versionSpace C history โ†’
        (SOA X C).predict history x โ‰  c x โ†’
          LittlestoneDim X (versionSpace C history) < โŠค โ†’
            LittlestoneDim X (versionSpace C (history ++ [(x, c x)])) < LittlestoneDim X (versionSpace C history)
    Uses
    Used by
  9. Declsoa_predict_specDeclaration kindtheorem

    SOA predicts the label whose side has higher Ldim.

    โˆ€ {X : Type} (C : ConceptClass X Bool) (history : List (X ร— Bool)) (x : X),
      have V := versionSpace C history;
      have b := (SOA X C).predict history x;
      LittlestoneDim X {c | c โˆˆ V โˆง c x = b} โ‰ฅ LittlestoneDim X {c | c โˆˆ V โˆง c x = !b}
    Used by
  10. Declldim_zero_all_agreeDeclaration kindtheorem

    When Ldim(V) = 0 (โ†‘โ†‘0), all concepts in V agree on every point. Key lemma for M-VersionSpaceCollapse.

    โˆ€ {X : Type} {V : ConceptClass X Bool},
      LittlestoneDim X V = โ†‘0 โ†’ Set.Nonempty V โ†’ โˆ€ (x : X) (cโ‚ cโ‚‚ : X โ†’ Bool), cโ‚ โˆˆ V โ†’ cโ‚‚ โˆˆ V โ†’ cโ‚ x = cโ‚‚ x
    Used by
  11. Declldim_branch_lower_boundDeclaration kindtheorem

    Build a tree of depth k+1 from shattered subtrees on both sides. Parametrized over b : Bool so we don't need to case-split in the caller.

    โˆ€ {X : Type} {V : ConceptClass X Bool} {x : X} {k : โ„•} {b : Bool},
      (โˆƒ Tb, LTree.isShattered {c | c โˆˆ V โˆง c x = b} Tb) โ†’
        (โˆƒ Tnb, LTree.isShattered {c | c โˆˆ V โˆง c x = !b} Tnb) โ†’
          (โˆƒ c โˆˆ V, c x = b) โ†’ (โˆƒ c โˆˆ V, c x = !b) โ†’ LittlestoneDim X V โ‰ฅ โ†‘โ†‘(k + 1)
    Used by
  12. Declexists_shattered_of_ldim_geDeclaration kindtheorem

    From Ldim โ‰ฅ d, extract a shattered tree of depth exactly d.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {d : โ„•}, LittlestoneDim X C โ‰ฅ โ†‘โ†‘d โ†’ โˆƒ T, LTree.isShattered C T
    Uses
    Used by
  13. DeclLTree.isShattered_truncateDeclaration kindtheorem

    A truncated tree is shattered if the original is.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {m : โ„•} (T : LTree X m),
      LTree.isShattered C T โ†’ โˆ€ {n : โ„•} (h : n โ‰ค m), LTree.isShattered C (LTree.truncate h T)
    Uses
    Used by
  14. DeclLTree.nonempty_of_isShatteredDeclaration kindtheorem

    Helper: shattering implies the concept class is nonempty.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n), LTree.isShattered C T โ†’ Set.Nonempty C
    Used by
  15. DeclWithBot_WithTop_lt_succ_leDeclaration kindtheorem

    In WithBot (WithTop โ„•), a < โ†‘โ†‘(n+1) โ†’ a โ‰ค โ†‘โ†‘n. Reusable lattice fact.

    โˆ€ {a : WithBot (WithTop โ„•)} {n : โ„•}, a < โ†‘โ†‘(n + 1) โ†’ a โ‰ค โ†‘โ†‘n
    Used by
  16. DeclSOA_mistakesFrom_consDeclaration kindtheorem

    SOA mistakesFrom cons: unfold one step using the interface.

    โˆ€ (X : Type) (C : ConceptClass X Bool) (history : List (X ร— Bool)) (c : X โ†’ Bool) (x : X) (xs : List X),
      (SOA X C).mistakesFrom history c (x :: xs) =
        (if (SOA X C).predict history x โ‰  c x then 1 else 0) + (SOA X C).mistakesFrom (history ++ [(x, c x)]) c xs
    Used by
  17. DeclLTree.isShattered_monoDeclaration kindtheorem

    Shattering is upward-monotone in the concept class.

    โˆ€ {X : Type} {n : โ„•} (T : LTree X n) {C C' : ConceptClass X Bool},
      C โІ C' โ†’ LTree.isShattered C T โ†’ LTree.isShattered C' T
    Used by
  18. DeclmistakesFrom_init_eqDeclaration kindtheorem

    Relate mistakesFrom to the original mistakes function.

    โˆ€ {X : Type} (L : OnlineLearner X Bool) (c : X โ†’ Bool) (seq : List X), L.mistakesFrom L.init c seq = L.mistakes c seq
    Used by
  19. DeclSOA_init_eqDeclaration kindtheorem

    SOA init state is empty history.

    โˆ€ (X : Type) (C : ConceptClass X Bool), (SOA X C).init = []
    Used by
  20. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  21. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  22. DefinitionLTreeinductive

    A complete binary Littlestone tree of depth n.

    Type โ†’ โ„• โ†’ Type
  23. DefinitionLTree.isShattereddef

    Path-wise shattering for complete trees. Path B: leaf case requires C.Nonempty (NAโ‚โ‚€).

    {X : Type} โ†’ {n : โ„•} โ†’ ConceptClass X Bool โ†’ LTree X n โ†’ Prop
  24. DefinitionLTree.truncatedef

    Truncate a complete tree to a smaller depth.

    {X : Type} โ†’ {n m : โ„•} โ†’ n โ‰ค m โ†’ LTree X m โ†’ LTree X n
  25. DefinitionLittlestoneDimdef

    Littlestone dimension: the maximum depth of a complete shattered tree. Path B: returns WithBot (WithTop โ„•) so Ldim(โˆ…) = โŠฅ (NAโ‚โ‚€).

    (X : Type) โ†’ ConceptClass X Bool โ†’ WithBot (WithTop โ„•)
  26. DefinitionMistakeBoundeddef

    Mistake-bounded learning: the learner makes at most M mistakes on ANY sequence. No distribution assumption. Characterized by Littlestone dimension.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ ConceptClass X Y โ†’ โ„• โ†’ Prop
  27. DefinitionOnlineLearnabledef

    Online learnable: there exists a finite mistake bound.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ ConceptClass X Y โ†’ Prop
  28. DefinitionOnlineLearnerstructure

    An online learner: receives instances one at a time, makes predictions sequentially.

    Type u โ†’ Type v โ†’ Type (max (max 1 u) v)
  29. DefinitionOnlineLearner.Statedef

    Internal state type

    {X : Type u} โ†’ {Y : Type v} โ†’ OnlineLearner X Y โ†’ Type
  30. DefinitionOnlineLearner.initdef

    Initial state

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State
  31. DefinitionOnlineLearner.mistakesdef

    Helper: run an online learner on a sequence, counting mistakes.

    {X : Type u} โ†’ {Y : Type v} โ†’ [DecidableEq Y] โ†’ OnlineLearner X Y โ†’ Concept X Y โ†’ List X โ†’ โ„•
  32. DefinitionOnlineLearner.mistakes.godef
    {X : Type u} โ†’ {Y : Type v} โ†’ [DecidableEq Y] โ†’ (L : OnlineLearner X Y) โ†’ Concept X Y โ†’ L.State โ†’ List X โ†’ โ„• โ†’ โ„•
  33. DefinitionOnlineLearner.mistakesFromdef

    Count mistakes starting from state s.

    {X : Type} โ†’ (L : OnlineLearner X Bool) โ†’ L.State โ†’ (X โ†’ Bool) โ†’ List X โ†’ โ„•
  34. DefinitionOnlineLearner.predictdef

    Predict: given current state and new instance, output a prediction

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State โ†’ X โ†’ Y
  35. DefinitionOnlineLearner.updatedef

    Update: given current state, instance, and revealed true label, update state

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State โ†’ X โ†’ Y โ†’ self.State
  36. DefinitionSOAdef

    The Standard Optimal Algorithm (SOA).

    (X : Type) โ†’ ConceptClass X Bool โ†’ OnlineLearner X Bool
  37. DefinitionversionSpacedef

    Version space after observing a history.

    {X : Type} โ†’ ConceptClass X Bool โ†’ List (X ร— Bool) โ†’ ConceptClass X Bool

The optimal mistake bound equals the Littlestone dimension (for nonempty C). Path B: OptimalMistakeBound : WithTop โ„•, LittlestoneDim : WithBot (WithTop โ„•). For nonempty C, LittlestoneDim โ‰ฅ 0, so the coercion โ†‘(OptimalMistakeBound) works.

Decloptimal_mistake_bound_eq_ldim
โˆ€ (X : Type) (C : ConceptClass X Bool), Set.Nonempty C โ†’ โ†‘(OptimalMistakeBound X C) = LittlestoneDim X C
Layout
ThesisStepHypothesisDefinition
optimal_mistake_bound_eq_โ€ฆtheoremSet.Nonempty Chnebackward_directiontheoremsoa_mistakes_boundedtheoremversionSpace_appendtheoremtarget_in_versionSpacetheoremldim_strict_decrease_on_mโ€ฆtheoremsoa_predict_spectheoremldim_zero_all_agreetheoremldim_branch_lower_boundtheoremexists_shattered_of_ldim_โ€ฆtheoremisShattered_truncatetheoremWithBot_WithTop_lt_succ_letheoremSOA_mistakesFrom_constheoremisShattered_monotheoremadversary_lower_boundtheoremmistakesFrom_init_eqtheoremadversary_coretheoremnonempty_of_isShatteredtheoremSOA_init_eqtheoremConceptClassdefConceptdefLTreeinductiveisShattereddeftruncatedefLittlestoneDimdefMistakeBoundeddefOnlineLearnabledefOnlineLearnerstructureStatedefinitdefmistakesdefgodefmistakesFromdefpredictdefupdatedefOptimalMistakeBounddefSOAdefversionSpacedef
  1. Decloptimal_mistake_bound_eq_ldimDeclaration kindtheorem
    โˆ€ (X : Type) (C : ConceptClass X Bool), Set.Nonempty C โ†’ โ†‘(OptimalMistakeBound X C) = LittlestoneDim X C
    Uses
  2. Declbackward_directionDeclaration kindtheorem

    Backward direction: LittlestoneDim < โŠค โ†’ OnlineLearnable.

    โˆ€ (X : Type) (C : ConceptClass X Bool), LittlestoneDim X C < โŠค โ†’ OnlineLearnable X Bool C
    Uses
    Used by
  3. Declsoa_mistakes_boundedDeclaration kindtheorem

    SOA mistakes from a given state are bounded by the Ldim of the version space. This is the core M-Potential argument.

    โˆ€ {X : Type} {C : ConceptClass X Bool},
      โˆ€ c โˆˆ C,
        โˆ€ (history : List (X ร— Bool)),
          (โˆ€ p โˆˆ history, c p.1 = p.2) โ†’
            โˆ€ (d : โ„•),
              LittlestoneDim X (versionSpace C history) โ‰ค โ†‘โ†‘d โ†’
                LittlestoneDim X (versionSpace C history) < โŠค โ†’ โˆ€ (seq : List X), (SOA X C).mistakesFrom history c seq โ‰ค d
    Uses
    Used by
  4. DeclversionSpace_appendDeclaration kindtheorem

    Extending history restricts the version space.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {history : List (X ร— Bool)} {x : X} {y : Bool},
      versionSpace C (history ++ [(x, y)]) โІ versionSpace C history
    Used by
  5. Decltarget_in_versionSpaceDeclaration kindtheorem

    Target stays in version space.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {c : X โ†’ Bool},
      c โˆˆ C โ†’ โˆ€ {history : List (X ร— Bool)}, (โˆ€ p โˆˆ history, c p.1 = p.2) โ†’ c โˆˆ versionSpace C history
    Used by
  6. Declldim_strict_decrease_on_mistakeDeclaration kindtheorem

    On an SOA mistake, the Ldim of the version space strictly decreases.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {history : List (X ร— Bool)} {x : X} {c : X โ†’ Bool},
      c โˆˆ versionSpace C history โ†’
        (SOA X C).predict history x โ‰  c x โ†’
          LittlestoneDim X (versionSpace C history) < โŠค โ†’
            LittlestoneDim X (versionSpace C (history ++ [(x, c x)])) < LittlestoneDim X (versionSpace C history)
    Uses
    Used by
  7. Declsoa_predict_specDeclaration kindtheorem

    SOA predicts the label whose side has higher Ldim.

    โˆ€ {X : Type} (C : ConceptClass X Bool) (history : List (X ร— Bool)) (x : X),
      have V := versionSpace C history;
      have b := (SOA X C).predict history x;
      LittlestoneDim X {c | c โˆˆ V โˆง c x = b} โ‰ฅ LittlestoneDim X {c | c โˆˆ V โˆง c x = !b}
    Used by
  8. Declldim_zero_all_agreeDeclaration kindtheorem

    When Ldim(V) = 0 (โ†‘โ†‘0), all concepts in V agree on every point. Key lemma for M-VersionSpaceCollapse.

    โˆ€ {X : Type} {V : ConceptClass X Bool},
      LittlestoneDim X V = โ†‘0 โ†’ Set.Nonempty V โ†’ โˆ€ (x : X) (cโ‚ cโ‚‚ : X โ†’ Bool), cโ‚ โˆˆ V โ†’ cโ‚‚ โˆˆ V โ†’ cโ‚ x = cโ‚‚ x
    Used by
  9. Declldim_branch_lower_boundDeclaration kindtheorem

    Build a tree of depth k+1 from shattered subtrees on both sides. Parametrized over b : Bool so we don't need to case-split in the caller.

    โˆ€ {X : Type} {V : ConceptClass X Bool} {x : X} {k : โ„•} {b : Bool},
      (โˆƒ Tb, LTree.isShattered {c | c โˆˆ V โˆง c x = b} Tb) โ†’
        (โˆƒ Tnb, LTree.isShattered {c | c โˆˆ V โˆง c x = !b} Tnb) โ†’
          (โˆƒ c โˆˆ V, c x = b) โ†’ (โˆƒ c โˆˆ V, c x = !b) โ†’ LittlestoneDim X V โ‰ฅ โ†‘โ†‘(k + 1)
    Used by
  10. Declexists_shattered_of_ldim_geDeclaration kindtheorem

    From Ldim โ‰ฅ d, extract a shattered tree of depth exactly d.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {d : โ„•}, LittlestoneDim X C โ‰ฅ โ†‘โ†‘d โ†’ โˆƒ T, LTree.isShattered C T
    Uses
    Used by
  11. DeclLTree.isShattered_truncateDeclaration kindtheorem

    A truncated tree is shattered if the original is.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {m : โ„•} (T : LTree X m),
      LTree.isShattered C T โ†’ โˆ€ {n : โ„•} (h : n โ‰ค m), LTree.isShattered C (LTree.truncate h T)
    Uses
    Used by
  12. DeclWithBot_WithTop_lt_succ_leDeclaration kindtheorem

    In WithBot (WithTop โ„•), a < โ†‘โ†‘(n+1) โ†’ a โ‰ค โ†‘โ†‘n. Reusable lattice fact.

    โˆ€ {a : WithBot (WithTop โ„•)} {n : โ„•}, a < โ†‘โ†‘(n + 1) โ†’ a โ‰ค โ†‘โ†‘n
    Used by
  13. DeclSOA_mistakesFrom_consDeclaration kindtheorem

    SOA mistakesFrom cons: unfold one step using the interface.

    โˆ€ (X : Type) (C : ConceptClass X Bool) (history : List (X ร— Bool)) (c : X โ†’ Bool) (x : X) (xs : List X),
      (SOA X C).mistakesFrom history c (x :: xs) =
        (if (SOA X C).predict history x โ‰  c x then 1 else 0) + (SOA X C).mistakesFrom (history ++ [(x, c x)]) c xs
    Used by
  14. DeclLTree.isShattered_monoDeclaration kindtheorem

    Shattering is upward-monotone in the concept class.

    โˆ€ {X : Type} {n : โ„•} (T : LTree X n) {C C' : ConceptClass X Bool},
      C โІ C' โ†’ LTree.isShattered C T โ†’ LTree.isShattered C' T
    Used by
  15. Decladversary_lower_boundDeclaration kindtheorem

    Adversary lower bound (M-InfSup reusable primitive): If a tree of depth n is shattered by C, then any mistake-bounded learner must allow at least n mistakes. This is the "inf โ‰ฅ sup" half of minimax.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n),
      LTree.isShattered C T โ†’ โˆ€ {M : โ„•}, MistakeBounded X Bool C M โ†’ n โ‰ค M
    Uses
    Used by
  16. DeclmistakesFrom_init_eqDeclaration kindtheorem

    Relate mistakesFrom to the original mistakes function.

    โˆ€ {X : Type} (L : OnlineLearner X Bool) (c : X โ†’ Bool) (seq : List X), L.mistakesFrom L.init c seq = L.mistakes c seq
    Used by
  17. Decladversary_coreDeclaration kindtheorem

    Core adversary lemma.

    โˆ€ {X : Type} (L : OnlineLearner X Bool) (s : L.State) {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n),
      LTree.isShattered C T โ†’ Set.Nonempty C โ†’ โˆƒ seq, โˆƒ c โˆˆ C, L.mistakesFrom s c seq = n
    Used by
  18. DeclLTree.nonempty_of_isShatteredDeclaration kindtheorem

    Helper: shattering implies the concept class is nonempty.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n), LTree.isShattered C T โ†’ Set.Nonempty C
    Used by
  19. DeclSOA_init_eqDeclaration kindtheorem

    SOA init state is empty history.

    โˆ€ (X : Type) (C : ConceptClass X Bool), (SOA X C).init = []
    Used by
  20. Hypothesishne
    Set.Nonempty C
  21. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  22. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  23. DefinitionLTreeinductive

    A complete binary Littlestone tree of depth n.

    Type โ†’ โ„• โ†’ Type
  24. DefinitionLTree.isShattereddef

    Path-wise shattering for complete trees. Path B: leaf case requires C.Nonempty (NAโ‚โ‚€).

    {X : Type} โ†’ {n : โ„•} โ†’ ConceptClass X Bool โ†’ LTree X n โ†’ Prop
  25. DefinitionLTree.truncatedef

    Truncate a complete tree to a smaller depth.

    {X : Type} โ†’ {n m : โ„•} โ†’ n โ‰ค m โ†’ LTree X m โ†’ LTree X n
  26. DefinitionLittlestoneDimdef

    Littlestone dimension: the maximum depth of a complete shattered tree. Path B: returns WithBot (WithTop โ„•) so Ldim(โˆ…) = โŠฅ (NAโ‚โ‚€).

    (X : Type) โ†’ ConceptClass X Bool โ†’ WithBot (WithTop โ„•)
  27. DefinitionMistakeBoundeddef

    Mistake-bounded learning: the learner makes at most M mistakes on ANY sequence. No distribution assumption. Characterized by Littlestone dimension.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ ConceptClass X Y โ†’ โ„• โ†’ Prop
  28. DefinitionOnlineLearnabledef

    Online learnable: there exists a finite mistake bound.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ ConceptClass X Y โ†’ Prop
  29. DefinitionOnlineLearnerstructure

    An online learner: receives instances one at a time, makes predictions sequentially.

    Type u โ†’ Type v โ†’ Type (max (max 1 u) v)
  30. DefinitionOnlineLearner.Statedef

    Internal state type

    {X : Type u} โ†’ {Y : Type v} โ†’ OnlineLearner X Y โ†’ Type
  31. DefinitionOnlineLearner.initdef

    Initial state

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State
  32. DefinitionOnlineLearner.mistakesdef

    Helper: run an online learner on a sequence, counting mistakes.

    {X : Type u} โ†’ {Y : Type v} โ†’ [DecidableEq Y] โ†’ OnlineLearner X Y โ†’ Concept X Y โ†’ List X โ†’ โ„•
  33. DefinitionOnlineLearner.mistakes.godef
    {X : Type u} โ†’ {Y : Type v} โ†’ [DecidableEq Y] โ†’ (L : OnlineLearner X Y) โ†’ Concept X Y โ†’ L.State โ†’ List X โ†’ โ„• โ†’ โ„•
  34. DefinitionOnlineLearner.mistakesFromdef

    Count mistakes starting from state s.

    {X : Type} โ†’ (L : OnlineLearner X Bool) โ†’ L.State โ†’ (X โ†’ Bool) โ†’ List X โ†’ โ„•
  35. DefinitionOnlineLearner.predictdef

    Predict: given current state and new instance, output a prediction

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State โ†’ X โ†’ Y
  36. DefinitionOnlineLearner.updatedef

    Update: given current state, instance, and revealed true label, update state

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State โ†’ X โ†’ Y โ†’ self.State
  37. DefinitionOptimalMistakeBounddef

    Mistake bound: minimum worst-case mistakes for online learning of C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  38. DefinitionSOAdef

    The Standard Optimal Algorithm (SOA).

    (X : Type) โ†’ ConceptClass X Bool โ†’ OnlineLearner X Bool
  39. DefinitionversionSpacedef

    Version space after observing a history.

    {X : Type} โ†’ ConceptClass X Bool โ†’ List (X ร— Bool) โ†’ ConceptClass X Bool

Universal learnable โ†’ PAC learnable. Proof sketch: UniversalLearnable gives learner L with rate โ†’ 0 and Pr[error โ‰ค rate(m)] โ‰ฅ 2/3. Two components: 1. Event containment: rate(m) < ฮต โŸน {error โ‰ค rate(m)} โІ {error โ‰ค ฮต} (monotonicity). 2. Confidence boosting: 2/3 โ†’ 1-ฮด via median-of-means (ฮ“โ‚†โ‚‡, sorry'd in boost_two_thirds_to_pac). Routes through boost_two_thirds_to_pac which encapsulates the Chernoff-based boosting.

Decluniversal_imp_pac
โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableHypotheses X C],
  (โˆ€ (L : BatchLearner X Bool), LearnEvalMeasurable L) โ†’ UniversalLearnable X C โ†’ PACLearnable X C
Layout
ThesisStepHypothesisDefinition
universal_imp_pactheoremโˆ€ (L : BatchLearner X Booโ€ฆhL_measUniversalLearnable X Chulboost_two_thirds_to_pactheoremiIndepSet_goodBlockEventstheoremiIndepFun_block_extracttheoremgoodBlockEvent_prob_ge_twโ€ฆtheoremmeasurableSet_goodBlock_Atheoremmap_block_extract_eq_pitheoremgoodBlockEvent_measurabletheoremblock_extract_measurabletheoremchebyshev_seven_twelfths_โ€ฆtheoremboosted_sample_error_le_oโ€ฆtheoremmajority_error_le_seven_rโ€ฆtheoremlearn_measurable_fixedtheoremeval_measurabletheoremmem_measurabletheoremBatchLearnerstructurelearndefConceptClassdefConceptdefLearnEvalMeasurabledefMeasurableBatchLearnerstructureMeasurableHypothesesstructurePACLearnabledefUniversalLearnabledefblock_extractdefboosted_majoritydefgoodBlockEventdef
  1. Decluniversal_imp_pacDeclaration kindtheorem
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableHypotheses X C],
      (โˆ€ (L : BatchLearner X Bool), LearnEvalMeasurable L) โ†’ UniversalLearnable X C โ†’ PACLearnable X C
    Uses
  2. Declboost_two_thirds_to_pacDeclaration kindtheorem

    Boosting lemma: given a learner with success probability โ‰ฅ 2/3 under D^m, construct a boosted learner with success probability โ‰ฅ 1-ฮด for any ฮด > 0. Standard technique: run L independently k times on independent samples of size mโ‚€, take majority vote.

    Construction:

    • kmin = โŒˆ9/ฮดโŒ‰ + 2 (enough blocks for Chebyshev concentration)
    • mโ‚€ from hrate(ฮต/kmin) so that rate(mโ‚€) < ฮต/kmin
    • n = max mโ‚€ (kmin - 1). Then k = n + 1 โ‰ฅ kmin.
    • Total samples: (n + 1) * n, with Nat.sqrt((n+1)*n) = n.
    • At sample size m = (n+1)*n, L' recovers k = n+1 blocks of size n.
    • Event containment: when > k/2 blocks have D-error โ‰ค rate(n) < ฮต/kmin, majority D-error โ‰ค k ยท rate(n) < k/kmin ยท ฮต โ‰ค ฮต via union bound.

    ฮ“โ‚†โ‚‡: sorry โ€” the full measure-theoretic proof requires: (a) block_extract : (Fin (kn) โ†’ X) โ†’ Fin k โ†’ (Fin n โ†’ X) (b) iIndepFun for block extractions under product measure D^(kn) (c) chebyshev_majority_bound for i.i.d. Bernoulli(โ‰ฅ2/3) events (d) block extraction marginal = D^n (e) majority vote D-error analysis via union bound

    None of this infrastructure currently exists in the codebase. The sorry is A4-compliant (the conclusion PACLearnable X C is non-trivially-true: it requires genuine concentration + majority analysis) and A5-compliant (the proof strategy is structurally complete, only infrastructure is missing).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableHypotheses X C] (L : BatchLearner X Bool)
      [MeasurableBatchLearner X L] (rate : โ„• โ†’ โ„),
      (โˆ€ ฮต > 0, โˆƒ mโ‚€, โˆ€ m โ‰ฅ mโ‚€, rate m < ฮต) โ†’
        (โˆ€ (D : MeasureTheory.Measure X),
            MeasureTheory.IsProbabilityMeasure D โ†’
              โˆ€ c โˆˆ C,
                โˆ€ (m : โ„•),
                  (MeasureTheory.Measure.pi fun x => D)
                      {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal (rate m)} โ‰ฅ
                    ENNReal.ofReal (2 / 3)) โ†’
          PACLearnable X C
    Uses
    Used by
  3. DecliIndepSet_goodBlockEventsDeclaration kindtheorem

    T5: The goodBlockEvents are independent under the product measure.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (L : BatchLearner X Bool) [MeasurableBatchLearner X L]
      (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D] (c : Concept X Bool),
      Measurable c โ†’
        โˆ€ (rate : โ„• โ†’ โ„) (k n : โ„•),
          ProbabilityTheory.iIndepSet (goodBlockEventโœ L D c rate k n) (MeasureTheory.Measure.pi fun x => D)
    Uses
    Used by
  4. DecliIndepFun_block_extractDeclaration kindtheorem

    Block extractions are independent under the product measure. Key infrastructure for boosting (D4) and probability amplification.

    โˆ€ {X : Type u_1} [inst : MeasurableSpace X] (k m : โ„•) (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D],
      ProbabilityTheory.iIndepFun (fun j ฯ‰ => block_extract k m ฯ‰ j) (MeasureTheory.Measure.pi fun x => D)
    Used by
  5. DeclgoodBlockEvent_prob_ge_two_thirdsDeclaration kindtheorem

    T4: Each block's good event has probability โ‰ฅ 2/3, transported from the base learner guarantee.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) (L : BatchLearner X Bool)
      [MeasurableBatchLearner X L] (rate : โ„• โ†’ โ„),
      (โˆ€ (D : MeasureTheory.Measure X),
          MeasureTheory.IsProbabilityMeasure D โ†’
            โˆ€ c โˆˆ C,
              โˆ€ (m : โ„•),
                (MeasureTheory.Measure.pi fun x => D)
                    {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal (rate m)} โ‰ฅ
                  ENNReal.ofReal (2 / 3)) โ†’
        โˆ€ (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D],
          โˆ€ c โˆˆ C,
            Measurable c โ†’
              โˆ€ (k n : โ„•) (j : Fin k),
                (MeasureTheory.Measure.pi fun x => D) (goodBlockEventโœ L D c rate k n j) โ‰ฅ ENNReal.ofReal (2 / 3)
    Uses
    Used by
  6. DeclmeasurableSet_goodBlock_ADeclaration kindtheorem

    T0: Shared helper โ€” measurability of the "good training set" event for a single block.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (L : BatchLearner X Bool) [MeasurableBatchLearner X L]
      (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D] (c : Concept X Bool),
      Measurable c โ†’
        โˆ€ (rate : โ„• โ†’ โ„) (n : โ„•),
          MeasurableSet {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal (rate n)}
    Uses
    Used by
  7. Declmap_block_extract_eq_piDeclaration kindtheorem

    T3: Block extraction pushforward of product measure equals product measure.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (k n : โ„•) (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (j : Fin k),
      MeasureTheory.Measure.map (fun ฯ‰ => block_extract k n ฯ‰ j) (MeasureTheory.Measure.pi fun x => D) =
        MeasureTheory.Measure.pi fun x => D
    Used by
  8. DeclgoodBlockEvent_measurableDeclaration kindtheorem

    T2: goodBlockEvent is measurable for each block index j.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (L : BatchLearner X Bool) [MeasurableBatchLearner X L]
      (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D] (c : Concept X Bool),
      Measurable c โ†’ โˆ€ (rate : โ„• โ†’ โ„) (k n : โ„•) (j : Fin k), MeasurableSet (goodBlockEventโœ L D c rate k n j)
    Uses
    Used by
  9. Declblock_extract_measurableDeclaration kindtheorem

    Block extraction is measurable: extracting block j from a pi-type is measurable.

    โˆ€ {X : Type u_1} [inst : MeasurableSpace X] (k m : โ„•) (j : Fin k), Measurable fun ฯ‰ => block_extract k m ฯ‰ j
    Used by
  10. Declchebyshev_seven_twelfths_boundDeclaration kindtheorem

    T6: Chebyshev concentration for 7/12 threshold โ€” when k โ‰ฅ 36/ฮด independent events each have probability โ‰ฅ 2/3, the fraction exceeding 7/12 is โ‰ฅ 1-ฮด.

    โˆ€ {ฮฉ : Type u_1} [inst : MeasurableSpace ฮฉ] {ฮผ : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure ฮผ] {k : โ„•}
      {ฮด : โ„},
      0 < ฮด โ†’
        36 / ฮด โ‰ค โ†‘k โ†’
          โˆ€ (events : Fin k โ†’ Set ฮฉ),
            (โˆ€ (j : Fin k), MeasurableSet (events j)) โ†’
              ProbabilityTheory.iIndepSet (fun j => events j) ฮผ โ†’
                (โˆ€ (j : Fin k), ฮผ (events j) โ‰ฅ ENNReal.ofReal (2 / 3)) โ†’
                  ฮผ {ฯ‰ | 7 * k โ‰ค 12 * {j | ฯ‰ โˆˆ events j}.card} โ‰ฅ ENNReal.ofReal (1 - ฮด)
    Used by
  11. Declboosted_sample_error_le_of_good_blocksDeclaration kindtheorem

    T8: If โ‰ฅ 7/12 of blocks are good, the boosted hypothesis has D-error โ‰ค 7ยทmax(rate(n),0).

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (c : Concept X Bool),
      Measurable c โ†’
        โˆ€ (L : BatchLearner X Bool) [MeasurableBatchLearner X L] (rate : โ„• โ†’ โ„) (k n : โ„•) (ฯ‰ : Fin (k * n) โ†’ X),
          0 < k โ†’
            7 * k โ‰ค 12 * {j | ฯ‰ โˆˆ goodBlockEventโœ L D c rate k n j}.card โ†’
              D
                  {x |
                    (boosted_majorityโœ k fun j =>
                        L.learn (fun i => (block_extract k n ฯ‰ j i, c (block_extract k n ฯ‰ j i))) x) โ‰ 
                      c x} โ‰ค
                ENNReal.ofReal (7 * max (rate n) 0)
    Uses
    Used by
  12. Declmajority_error_le_seven_rate_of_good_fractionDeclaration kindtheorem

    T7: If โ‰ฅ 7/12 of the hypotheses have D-error โ‰ค ฯ, majority vote has D-error โ‰ค 7ฯ.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D] {k : โ„•},
      0 < k โ†’
        โˆ€ (c : Concept X Bool),
          Measurable c โ†’
            โˆ€ (hs : Fin k โ†’ Concept X Bool),
              (โˆ€ (j : Fin k), Measurable (hs j)) โ†’
                โˆ€ (good : Finset (Fin k)),
                  7 * k โ‰ค 12 * good.card โ†’
                    โˆ€ (ฯ : โ„),
                      0 โ‰ค ฯ โ†’
                        (โˆ€ j โˆˆ good, D {x | hs j x โ‰  c x} โ‰ค ENNReal.ofReal ฯ) โ†’
                          D {x | (boosted_majorityโœ k fun j => hs j x) โ‰  c x} โ‰ค ENNReal.ofReal (7 * ฯ)
    Used by
  13. Decllearn_measurable_fixedDeclaration kindtheorem

    T1: A learner with joint measurability gives measurable hypotheses for fixed training data.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (L : BatchLearner X Bool) [MeasurableBatchLearner X L] {m : โ„•}
      (S : Fin m โ†’ X ร— Bool), Measurable (L.learn S)
    Uses
    Used by
  14. DeclMeasurableBatchLearner.eval_measurableDeclaration kindtheorem

    Joint measurability of the evaluation map

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {L : BatchLearner X Bool} [self : MeasurableBatchLearner X L] (m : โ„•),
      Measurable fun p => L.learn p.1 p.2
    Used by
  15. DeclMeasurableHypotheses.mem_measurableDeclaration kindtheorem
    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableHypotheses X C],
      โˆ€ h โˆˆ C, Measurable h
    Used by
  16. HypothesishL_meas
    โˆ€ (L : BatchLearner X Bool), LearnEvalMeasurable L
  17. Hypothesishul
    UniversalLearnable X C
  18. DefinitionBatchLearnerstructure

    A batch learner (PAC paradigm): takes a finite sample, returns a hypothesis.

    Type u โ†’ Type v โ†’ Type (max u v)
  19. DefinitionBatchLearner.learndef

    The learning algorithm: given a sample, produce a hypothesis

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Concept X Y
  20. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  21. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  22. DefinitionLearnEvalMeasurabledef

    Joint measurability of a batch learner's evaluation map.

    {X : Type u} โ†’ [MeasurableSpace X] โ†’ BatchLearner X Bool โ†’ Prop
  23. DefinitionMeasurableBatchLearnerstructure

    A batch learner whose evaluation map is jointly measurable.

    The condition: for each sample size m, the map (S, x) โ†ฆ L.learn S x from (Fin m โ†’ X ร— Bool) ร— X to Bool is Measurable.

    This is the minimal regularity that makes the PAC success event {S | D{x | L.learn(S)(x) โ‰  c(x)} โ‰ค ฮต} a MeasurableSet (via measurable_measure_prod_mk_left).

    Equivalent to LearnEvalMeasurable (Separation.lean) and AdviceEvalMeasurable (Extended.lean) for the non-advice case.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ BatchLearner X Bool โ†’ Prop
  24. DefinitionMeasurableHypothesesstructure

    Every concept in C is a measurable function. Krapp-Wirth precondition: ฮ“(h) โˆˆ ฮฃ_Z for all h โˆˆ H.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  25. DefinitionPACLearnabledef

    PAC (Probably Approximately Correct) learning. The central definition of computational learning theory.

    Sample space: Fin m โ†’ X with i.i.d. product measure D^m. Labels: derived deterministically from target concept c (realizable case). Error: D-probability of disagreement between learner output and c.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  26. DefinitionUniversalLearnabledef

    Universal learning: distribution-free convergence rates. Strictly stronger than PAC.

    Sample space: Fin m โ†’ X with i.i.d. product measure D^m (matching PACLearnable). Labels: derived deterministically from target concept c (realizable case). The rate function converges to 0, and for every m, with probability โ‰ฅ 2/3 over D^m, the learner's error is at most rate(m).

    ฮ“โ‚„โ‚ˆ fix: changed from existential Dm to Measure.pi (CNAโ‚โ‚ definition repair).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  27. Definitionblock_extractdef

    Extract block j from a flat array of k*m elements, using finProdFinEquiv.

    {ฮฑ : Type u_1} โ†’ (k m : โ„•) โ†’ (Fin (k * m) โ†’ ฮฑ) โ†’ Fin k โ†’ Fin m โ†’ ฮฑ
  28. Definitionboosted_majoritydef

    Majority vote: returns true iff strictly more than half the votes are true.

    (k : โ„•) โ†’ (Fin k โ†’ Bool) โ†’ Bool
  29. DefinitiongoodBlockEventdef

    The event that block j produces a hypothesis with D-error โ‰ค rate(n).

    {X : Type u} โ†’
      [inst : MeasurableSpace X] โ†’
        BatchLearner X Bool โ†’ MeasureTheory.Measure X โ†’ Concept X Bool โ†’ (โ„• โ†’ โ„) โ†’ (k n : โ„•) โ†’ Fin k โ†’ Set (Fin (k * n) โ†’ X)

The Krappโ€“Wirth measurable-target separation holds unconditionally: the analytic non-Borel witness discharges the hypothesis of analytic_nonborel_set_gives_measTarget_separation.

DeclkrappWirthSeparationMeasTarget_holds
KrappWirthSeparationMeasTarget
Layout
ThesisStepDefinition
krappWirthSeparationMeasTโ€ฆtheoremanalytic_nonborel_set_givโ€ฆtheoremsingleton_badEvent_not_meโ€ฆtheoremsingleton_badEvent_eq_preโ€ฆtheoremplanarWitnessEvent_not_meโ€ฆtheoremoneSidedGhostGap_mem_gridtheoremempiricalError_mem_empErrโ€ฆtheoremborel_param_wellBehavedVCโ€ฆtheoremborel_param_nullMeasurablโ€ฆtheoremborel_param_badEvent_analโ€ฆtheoremparamWitnessSet_measurabletheoremanalyticSet_nullMeasurablโ€ฆtheoremanalyticSet_nullMeasurablโ€ฆtheoremnullMeasurableSettheoremexists_isCompact_measureRโ€ฆtheoremcompactCap_eqtheoremcompactCap_eq_iSup_isCompโ€ฆtheoremmeasure_isChoquetCapacitytheoremcap_eq_iSup_isCompacttheoremmonotone_cyl_splittheoremiInter_closure_image_cyl_โ€ฆtheoremtruncate_mem_bndtheoremtruncate_agree_on_cyltheoremisCompact_bndtheorembnd_subset_cyltheoremcyl_succ_eqtheoremcyl_inter_eq_cyl_updatetheoremcyl_exttheoremmonotheoremiUnion_nattheoremiInter_closedtheoremV_measurabletheoremexists_analyticSet_not_meโ€ฆtheoremexists_analyticSet_not_meโ€ฆtheoremexists_closed_proj_not_meโ€ฆtheoremexists_closed_universal_sโ€ฆtheoremembedBaireReal_injectivetheorembaireMarkerBits_injectivetheorembaireMarkers_strictMonotheoremcontinuous_embedBaireRealtheoremcontinuous_cantorFunctionโ€ฆtheoremcontinuous_baireMarkerBitstheoremBnddefConceptClassdefCyldefEmpiricalErrordefConceptdefGhostPairMeasuredefGhostPairsdefGhostPairs1defKrappWirthSeparationMeasTโ€ฆdefKrappWirthVdefKrappWirthWellBehavedstructureMeasurableHypothesesstructureIsChoquetCapacitystructurebaireMarkerBitsdefbaireMarkersdefcompactCapdefembedBaireRealdefWellBehavedVCMeasTargetdefchoquetTruncatedefempErrGriddefghostGapGriddefghostGapSupdefoneSidedGhostGapdefparamBadEventdefparamWitnessSetdefplanarWitnessEventdefsamplePair1ToPlanedefsingletonBadEventdefsingletonClassOndefsingletonConceptdefzeroConceptdefzeroOneLossdef
  1. DeclkrappWirthSeparationMeasTarget_holdsDeclaration kindtheorem
    KrappWirthSeparationMeasTarget
    Uses
  2. Declanalytic_nonborel_set_gives_measTarget_separationDeclaration kindtheorem

    Main separation theorem. Given any analytic non-Borel set A โІ โ„, the concept class obtained by parameterising singletonConcept (plus zeroConcept) over A is a concrete witness that WellBehavedVCMeasTarget is strictly weaker than the Krapp-Wirth Borel condition. The class is constructed as Set.range e for an evaluation map e : Bool ร— ฮฒ โ†’ Concept โ„ Bool built from a Polish parameterisation of A; post-construction, Set.range e equals singletonClassOn (Set.range g) where g realises A.

    The class satisfies:

    • MeasurableHypotheses: every individual hypothesis is Borel (singletonClassOn_measurable).
    • WellBehavedVCMeasTarget: the bad event is analytic (planarWitnessEvent_analytic lifted via singleton_badEvent_eq_preimage_planar), hence NullMeasurableSet by the Choquet bridge.
    • NOT KrappWirthWellBehaved: the bad event is not Borel (singleton_badEvent_not_measurable).

    The separation is realised by passing through the standard Borel space โ„ as the parameter space; the construction reuses no problem-specific fact beyond the existence of an analytic non-Borel subset of โ„ (Souslin's classical result), supplied in exists_measTarget_separation. The witness shows that the measurable-target variant proved in this kernel is a genuine improvement over the existing literature, not a restatement.

    โˆ€ (A : Set โ„), MeasureTheory.AnalyticSet A โ†’ ยฌMeasurableSet A โ†’ KrappWirthSeparationMeasTarget
    Uses
    Used by
  3. Declsingleton_badEvent_not_measurableDeclaration kindtheorem

    For A non-Borel, the singleton bad event is non-Borel. Combine singleton_badEvent_eq_preimage_planar with planarWitnessEvent_not_measurable: the preimage of a non-Borel set under a measurable surjection cannot itself be Borel.

    โˆ€ (A : Set โ„), ยฌMeasurableSet A โ†’ ยฌMeasurableSet (singletonBadEvent A)
    Uses
    Used by
  4. Declsingleton_badEvent_eq_preimage_planarDeclaration kindtheorem

    The singleton bad event equals samplePair1ToPlane โปยน' planarWitnessEvent. The set equality that transports both analyticity and non-Borelness from the planar witness to the learning-theoretic bad event.

    โˆ€ (A : Set โ„), singletonBadEvent A = samplePair1ToPlane โปยน' planarWitnessEvent A
    Used by
  5. DeclplanarWitnessEvent_not_measurableDeclaration kindtheorem

    For A non-Borel, planarWitnessEvent A is non-Borel. The proof picks some a โˆ‰ A and shows the vertical section y โ†ฆ (a, y) pulls the planar event back to A itself: if the planar event were Borel, its preimage under this measurable map would be Borel too, contradicting the hypothesis on A.

    โˆ€ (A : Set โ„), ยฌMeasurableSet A โ†’ ยฌMeasurableSet (planarWitnessEvent A)
    Used by
  6. DecloneSidedGhostGap_mem_gridDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (h c : Concept X Bool) (m : โ„•) (p : (Fin m โ†’ X) ร— (Fin m โ†’ X)),
      oneSidedGhostGap h c m p โˆˆ ghostGapGrid m
    Uses
    Used by
  7. DeclempiricalError_mem_empErrGridDeclaration kindtheorem
    โˆ€ {X : Type u} [MeasurableSpace X] (h : Concept X Bool) {m : โ„•} (S : Fin m โ†’ X ร— Bool),
      EmpiricalError X Bool h S (zeroOneLoss Bool) โˆˆ empErrGrid m
    Used by
  8. Declborel_param_wellBehavedVCMeasTargetDeclaration kindtheorem

    Class-level corollary: every Borel-parameterized concept class with a measurable evaluation map satisfies WellBehavedVCMeasTarget. Composes borel_param_nullMeasurableSet_bad_event over all measurable targets c. The measurable-target variant of WellBehavedVC is what the kernel actually proves; the unrestricted variant remains open and is the subject of the Borel-analytic separation witness in Theorem/BorelAnalyticSeparation.lean.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [inst_1 : TopologicalSpace X] [PolishSpace X] [BorelSpace X] {ฮ˜ : Type u_1}
      [inst_4 : MeasurableSpace ฮ˜] [StandardBorelSpace ฮ˜] (e : ฮ˜ โ†’ Concept X Bool),
      (Measurable fun p => e p.1 p.2) โ†’ WellBehavedVCMeasTarget X (Set.range e)
    Uses
    Used by
  9. Declborel_param_nullMeasurableSet_bad_eventDeclaration kindtheorem

    Positive bridge. If a concept class is parameterized by a Borel measurable map ฮ˜ โ†’ Concept X from a standard Borel space ฮ˜, then the symmetrization bad event is analytic, hence NullMeasurableSet. The bad event is a Suslin projection of a Borel witness set (the projection along ฮ˜ of {(ฮธ, p) | gap(eval ฮธ, p) โ‰ฅ ฮต / 2}), and projections of Borel sets are analytic by definition. This is the entry point through which Borel parameterization implies the regularity required by the fundamental theorem.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [inst_1 : TopologicalSpace X] [PolishSpace X] [BorelSpace X] {ฮ˜ : Type u_1}
      [inst_4 : MeasurableSpace ฮ˜] [StandardBorelSpace ฮ˜] (e : ฮ˜ โ†’ Concept X Bool),
      (Measurable fun p => e p.1 p.2) โ†’
        โˆ€ (c : Concept X Bool),
          Measurable c โ†’
            โˆ€ (m : โ„•) (ฮต : โ„) (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D],
              MeasureTheory.NullMeasurableSet (paramBadEvent e c m ฮต) (GhostPairMeasure D m)
    Uses
    Used by
  10. Declborel_param_badEvent_analyticDeclaration kindtheorem

    The bad event (projection of witness set) is analytic. Projection of a Borel set from a StandardBorelSpace is analytic (Suslin). This is the key step: existential quantification over parameters produces an analytic (ฮฃโ‚ยน) set, which may not be Borel.

    โˆ€ {X : Type u} [inst : TopologicalSpace X] [inst_1 : MeasurableSpace X] [BorelSpace X] [PolishSpace X] {ฮ˜ : Type u_1}
      [inst_4 : MeasurableSpace ฮ˜] [StandardBorelSpace ฮ˜] (e : ฮ˜ โ†’ Concept X Bool),
      (Measurable fun p => e p.1 p.2) โ†’
        โˆ€ (c : Concept X Bool), Measurable c โ†’ โˆ€ (m : โ„•) (ฮต : โ„), MeasureTheory.AnalyticSet (paramBadEvent e c m ฮต)
    Uses
    Used by
  11. DeclparamWitnessSet_measurableDeclaration kindtheorem

    The witness set {(ฮธ, p) | ghost-gap โ‰ฅ ฮต/2} is MeasurableSet when the evaluation map e and target c are measurable. This is the Borel half of the Borel-analytic bridge.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] {ฮ˜ : Type u_1} [inst_1 : MeasurableSpace ฮ˜] (e : ฮ˜ โ†’ Concept X Bool),
      (Measurable fun p => e p.1 p.2) โ†’
        โˆ€ (c : Concept X Bool), Measurable c โ†’ โˆ€ (m : โ„•) (ฮต : โ„), MeasurableSet (paramWitnessSet e c m ฮต)
    Used by
  12. DeclanalyticSet_nullMeasurableSet_ghostPairsDeclaration kindtheorem

    Analytic subsets of the ghost sample space (Fin m โ†’ X) ร— (Fin m โ†’ X) are NullMeasurableSet under the product probability measure. A specialisation of analyticSet_nullMeasurableSet from PureMath/AnalyticMeasurability.lean to the type the symmetrization argument actually consumes.

    โˆ€ {X : Type u} [inst : TopologicalSpace X] [inst_1 : MeasurableSpace X] [BorelSpace X] [PolishSpace X] {m : โ„•}
      {s : Set ((Fin m โ†’ X) ร— (Fin m โ†’ X))},
      MeasureTheory.AnalyticSet s โ†’
        โˆ€ (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D],
          MeasureTheory.NullMeasurableSet s (GhostPairMeasure D m)
    Uses
    Used by
  13. DeclanalyticSet_nullMeasurableSetDeclaration kindtheorem

    Analytic sets are null-measurable for finite Borel measures on Polish spaces. FLT-facing alias of the ZPM-canonical MeasureTheory.AnalyticSet.nullMeasurableSet.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      {ฮผ : MeasureTheory.Measure ฮฑ} [MeasureTheory.IsFiniteMeasure ฮผ] {s : Set ฮฑ},
      MeasureTheory.AnalyticSet s โ†’ MeasureTheory.NullMeasurableSet s ฮผ
    Uses
    Used by
  14. DeclMeasureTheory.AnalyticSet.nullMeasurableSetDeclaration kindtheorem

    Analytic sets are null-measurable. For any finite Borel measure on a Polish space, every analytic set is NullMeasurableSet. Proof inner- approximates the analytic set by compacts, takes the union of approximators (a Borel set), and shows the difference is contained in a Borel null set.

    This is the abstract bridge that the entire Borel-analytic measurability layer of downstream learning-theory kernels rests on.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      {ฮผ : MeasureTheory.Measure ฮฑ} [MeasureTheory.IsFiniteMeasure ฮผ] {s : Set ฮฑ},
      MeasureTheory.AnalyticSet s โ†’ MeasureTheory.NullMeasurableSet s ฮผ
    Uses
    Used by
  15. DeclMeasureTheory.AnalyticSet.exists_isCompact_measureReal_gtDeclaration kindtheorem

    Inner regularity for analytic sets: any analytic subset of a Polish space can be approximated from inside by a compact subset in measure, by any slack ฮต > 0. Specialisation of Choquet capacitability (Kechris 30.13) to the measure-as-capacity instance.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      {ฮผ : MeasureTheory.Measure ฮฑ} [MeasureTheory.IsFiniteMeasure ฮผ] {s : Set ฮฑ},
      MeasureTheory.AnalyticSet s โ†’ โˆ€ ฮต > 0, โˆƒ K, IsCompact K โˆง K โІ s โˆง ฮผ.real s < ฮผ.real K + ฮต
    Uses
    Used by
  16. DeclMeasureTheory.AnalyticSet.compactCap_eqDeclaration kindtheorem

    For analytic sets, compact capacity equals measure.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      {ฮผ : MeasureTheory.Measure ฮฑ} [MeasureTheory.IsFiniteMeasure ฮผ] {s : Set ฮฑ},
      MeasureTheory.AnalyticSet s โ†’ MeasureTheory.compactCap ฮผ s = ฮผ s
    Uses
    Used by
  17. DeclcompactCap_eq_iSup_isCompactDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] (ฮผ : MeasureTheory.Measure ฮฑ) (s : Set ฮฑ),
      MeasureTheory.compactCap ฮผ s = โจ† K, โจ† (_ : IsCompact K), โจ† (_ : K โІ s), ฮผ K
    Used by
  18. DeclMeasureTheory.measure_isChoquetCapacityDeclaration kindtheorem

    Every finite Borel measure on a Polish space is a Choquet capacity.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      (ฮผ : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsFiniteMeasure ฮผ], MeasureTheory.IsChoquetCapacity fun s => ฮผ s
    Used by
  19. DeclMeasureTheory.AnalyticSet.cap_eq_iSup_isCompactDeclaration kindtheorem

    Choquet capacitability. For analytic sets, capacity equals the supremum over compact subsets (Kechris 30.13).

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’
        โˆ€ {s : Set ฮฑ}, MeasureTheory.AnalyticSet s โ†’ cap s = โจ† K, โจ† (_ : IsCompact K), โจ† (_ : K โІ s), cap K
    Uses
    Used by
  20. Declmonotone_cyl_splitDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), Monotone fun k => Cyl N n โˆฉ {g | g (n + 1) โ‰ค k}
    Used by
  21. DecliInter_closure_image_cyl_eqDeclaration kindtheorem

    The intersection of closures of cylinder images equals the compact image. Key lemma for the capacitability proof: uses truncation and sequential compactness.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [PolishSpace ฮฑ] {f : (โ„• โ†’ โ„•) โ†’ ฮฑ},
      Continuous f โ†’ โˆ€ (N : โ„• โ†’ โ„•), โ‹‚ n, closure (f '' Cyl N n) = f '' Bnd N
    Uses
    Used by
  22. Decltruncate_mem_bndDeclaration kindtheorem
    โˆ€ (N g : โ„• โ†’ โ„•), choquetTruncate N g โˆˆ Bnd N
    Used by
  23. Decltruncate_agree_on_cylDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), โˆ€ g โˆˆ Cyl N n, โˆ€ i โ‰ค n, choquetTruncate N g i = g i
    Used by
  24. DeclisCompact_bndDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•), IsCompact (Bnd N)
    Used by
  25. Declbnd_subset_cylDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), Bnd N โІ Cyl N n
    Used by
  26. Declcyl_succ_eqDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), Cyl N n = โ‹ƒ k, Cyl N n โˆฉ {g | g (n + 1) โ‰ค k}
    Used by
  27. Declcyl_inter_eq_cyl_updateDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n k : โ„•), Cyl N n โˆฉ {g | g (n + 1) โ‰ค k} = Cyl (Function.update N (n + 1) k) (n + 1)
    Used by
  28. Declcyl_extDeclaration kindtheorem
    โˆ€ (N N' : โ„• โ†’ โ„•) (n : โ„•), (โˆ€ i โ‰ค n, N i = N' i) โ†’ Cyl N n = Cyl N' n
    Used by
  29. DeclMeasureTheory.IsChoquetCapacity.monoDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’ โˆ€ {s t : Set ฮฑ}, s โІ t โ†’ cap s โ‰ค cap t
    Used by
  30. DeclMeasureTheory.IsChoquetCapacity.iUnion_natDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’ โˆ€ (f : โ„• โ†’ Set ฮฑ), Monotone f โ†’ cap (โ‹ƒ n, f n) = โจ† n, cap (f n)
    Used by
  31. DeclMeasureTheory.IsChoquetCapacity.iInter_closedDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’
        โˆ€ (f : โ„• โ†’ Set ฮฑ), Antitone f โ†’ (โˆ€ (n : โ„•), IsClosed (f n)) โ†’ cap (โ‹‚ n, f n) = โจ… n, cap (f n)
    Used by
  32. DeclKrappWirthWellBehaved.V_measurableDeclaration kindtheorem
    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : KrappWirthWellBehaved X C], KrappWirthV X C
    Used by
  33. DeclMeasureTheory.exists_analyticSet_not_measurableSet_realDeclaration kindtheorem

    An analytic non-Borel subset of โ„: the image of the Baire-space witness under the continuous injection. Analyticity transfers along the continuous image; non-Borelness transfers back along the injective preimage.

    โˆƒ A, MeasureTheory.AnalyticSet A โˆง ยฌMeasurableSet A
    Uses
    Used by
  34. DeclMeasureTheory.exists_analyticSet_not_measurableSetDeclaration kindtheorem

    An analytic non-Borel subset of Baire space: the projection of the diagonal witness.

    โˆƒ A, MeasureTheory.AnalyticSet A โˆง ยฌMeasurableSet A
    Uses
    Used by
  35. DeclMeasureTheory.exists_closed_proj_not_measurableSetDeclaration kindtheorem

    A closed set with a non-Borel projection. Diagonalize the universal closed set of (โ„• โ†’ โ„•) ร— (โ„• โ†’ โ„•): were the projection Borel, its complement would be analytic, hence the projection of a closed set, hence a section of the universal set โ€” and evaluating that section at its own parameter is contradictory.

    โˆƒ D, IsClosed D โˆง ยฌMeasurableSet {x | โˆƒ y, (x, y) โˆˆ D}
    Uses
    Used by
  36. DeclMeasureTheory.exists_closed_universal_sectionsDeclaration kindtheorem

    A universal closed set. Every second-countable space X carries a closed subset of X ร— (โ„• โ†’ โ„•) whose sections run through all closed subsets of X: enumerate a countable basis together with โˆ…, and let the parameter select which basis elements to exclude.

    โˆ€ (X : Type u_1) [inst : TopologicalSpace X] [SecondCountableTopology X],
      โˆƒ S, IsClosed S โˆง โˆ€ (C : Set X), IsClosed C โ†’ โˆƒ y, {x | (x, y) โˆˆ S} = C
    Used by
  37. DeclMeasureTheory.embedBaireReal_injectiveDeclaration kindtheorem
    Function.Injective MeasureTheory.embedBaireReal
    Uses
    Used by
  38. DeclMeasureTheory.baireMarkerBits_injectiveDeclaration kindtheorem
    Function.Injective MeasureTheory.baireMarkerBits
    Uses
    Used by
  39. DeclMeasureTheory.baireMarkers_strictMonoDeclaration kindtheorem
    โˆ€ (x : โ„• โ†’ โ„•), StrictMono (MeasureTheory.baireMarkers x)
    Used by
  40. DeclMeasureTheory.continuous_embedBaireRealDeclaration kindtheorem
    Continuous MeasureTheory.embedBaireReal
    Uses
    Used by
  41. DeclMeasureTheory.continuous_cantorFunction_oneThirdDeclaration kindtheorem
    Continuous (Cardinal.cantorFunction (1 / 3))
    Used by
  42. DeclMeasureTheory.continuous_baireMarkerBitsDeclaration kindtheorem
    Continuous MeasureTheory.baireMarkerBits
    Used by
  43. DefinitionBnddef

    Bounded functions set: {g : โ„• โ†’ โ„• | โˆ€ i, g i โ‰ค N i}.

    (โ„• โ†’ โ„•) โ†’ Set (โ„• โ†’ โ„•)
  44. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  45. DefinitionCyldef

    Cylinder set: {g : โ„• โ†’ โ„• | โˆ€ i โ‰ค n, g i โ‰ค N i}.

    (โ„• โ†’ โ„•) โ†’ โ„• โ†’ Set (โ„• โ†’ โ„•)
  46. DefinitionEmpiricalErrordef

    Empirical error: average loss on a finite sample.

    (X : Type u) โ†’ (Y : Type v) โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ LossFunction Y โ†’ โ„
  47. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  48. DefinitionGhostPairMeasuredef
    {X : Type u} โ†’
      [inst : MeasurableSpace X] โ†’ MeasureTheory.Measure X โ†’ (m : โ„•) โ†’ MeasureTheory.Measure ((Fin m โ†’ X) ร— (Fin m โ†’ X))
  49. DefinitionGhostPairsdef

    Ghost sample pairs: two independent samples of size m.

    Type u โ†’ โ„• โ†’ Type u
  50. DefinitionGhostPairs1def

    The ghost sample space at sample size m = 1: (Fin 1 โ†’ โ„) ร— (Fin 1 โ†’ โ„). The smallest sample size at which the singleton-class obstruction is already visible.

    Type
  51. DefinitionKrappWirthSeparationMeasTargetdef

    OPEN QUESTION (measurable-target version): Does WellBehavedVCMeasTarget separate from KrappWirthWellBehaved? The Borel-analytic bridge (BorelAnalyticBridge.lean) closes this.

    Prop
  52. DefinitionKrappWirthVdef

    V-measurability (one-sided): the ghost gap sup map is measurable.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  53. DefinitionKrappWirthWellBehavedstructure

    Krapp-Wirth well-behavedness: measurable hypotheses + V + U. Extends MeasurableHypotheses (L1). Strictly stronger than MeasurableConceptClass (our condition).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  54. DefinitionMeasurableHypothesesstructure

    Every concept in C is a measurable function. Krapp-Wirth precondition: ฮ“(h) โˆˆ ฮฃ_Z for all h โˆˆ H.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  55. DefinitionMeasureTheory.IsChoquetCapacitystructure

    Bundled record of the three Choquet capacity axioms: monotonicity, sequential continuity from below along increasing unions, and sequential continuity from above along decreasing intersections of closed sets. The third axiom distinguishes a capacity from a general outer measure.

    {ฮฑ : Type u_1} โ†’ [TopologicalSpace ฮฑ] โ†’ (Set ฮฑ โ†’ ENNReal) โ†’ Prop
  56. DefinitionMeasureTheory.baireMarkerBitsdef

    The marker bits: the indicator stream of the marker set.

    (โ„• โ†’ โ„•) โ†’ โ„• โ†’ Bool
  57. DefinitionMeasureTheory.baireMarkersdef

    The marker sequence of x : โ„• โ†’ โ„•: the strictly increasing sequence n + 1 + โˆ‘_{k โ‰ค n} x k, whose successive gaps encode x.

    (โ„• โ†’ โ„•) โ†’ โ„• โ†’ โ„•
  58. DefinitionMeasureTheory.compactCapdef

    Compact capacity of a set s relative to a measure ฮผ: the supremum of ฮผ K over compact subsets K โІ s. The inner-regularity functional whose equality with ฮผ s characterises measurability for analytic sets.

    {ฮฑ : Type u_1} โ†’ [TopologicalSpace ฮฑ] โ†’ [inst : MeasurableSpace ฮฑ] โ†’ MeasureTheory.Measure ฮฑ โ†’ Set ฮฑ โ†’ ENNReal
  59. DefinitionMeasureTheory.embedBaireRealdef

    The embedding of Baire space into โ„: marker bits into the base-3 expansion.

    (โ„• โ†’ โ„•) โ†’ โ„
  60. DefinitionWellBehavedVCMeasTargetdef

    WellBehavedVC restricted to measurable targets. This is the correct target for the Borel-analytic positive bridge: Borel parameterization โ‡’ analytic bad event โ‡’ NullMeasurableSet, but only when c is measurable (so the ghost-gap map is measurable).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  61. DefinitionchoquetTruncatedef

    Truncation: replace g i by min (g i) (N i) to bring any g into the bounded set.

    (โ„• โ†’ โ„•) โ†’ (โ„• โ†’ โ„•) โ†’ โ„• โ†’ โ„•
  62. DefinitionempErrGriddef
    โ„• โ†’ Finset โ„
  63. DefinitionghostGapGriddef
    โ„• โ†’ Finset โ„
  64. DefinitionghostGapSupdef
    {X : Type u} โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Concept X Bool โ†’ (m : โ„•) โ†’ (Fin m โ†’ X) ร— (Fin m โ†’ X) โ†’ โ„
  65. DefinitiononeSidedGhostGapdef
    {X : Type u} โ†’ [MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ (m : โ„•) โ†’ (Fin m โ†’ X) ร— (Fin m โ†’ X) โ†’ โ„
  66. DefinitionparamBadEventdef

    The bad event in sample space: projection of the witness set. Existential over the parameter: {p | โˆƒ ฮธ, gap(ฮธ, p) โ‰ฅ ฮต/2}. This is analytic when the witness set is Borel (Theorem B).

    {X : Type u} โ†’
      [MeasurableSpace X] โ†’
        {ฮ˜ : Type u_1} โ†’ [MeasurableSpace ฮ˜] โ†’ (ฮ˜ โ†’ Concept X Bool) โ†’ Concept X Bool โ†’ (m : โ„•) โ†’ โ„ โ†’ Set (GhostPairs X m)
  67. DefinitionparamWitnessSetdef

    The witness set in parameter ร— sample space: {(ฮธ, p) | EmpErr(h_ฮธ, ghost, c) - EmpErr(h_ฮธ, train, c) โ‰ฅ ฮต/2}. This is Borel when e and c are measurable (Theorem A).

    {X : Type u} โ†’
      [MeasurableSpace X] โ†’
        {ฮ˜ : Type u_1} โ†’
          [MeasurableSpace ฮ˜] โ†’ (ฮ˜ โ†’ Concept X Bool) โ†’ Concept X Bool โ†’ (m : โ„•) โ†’ โ„ โ†’ Set (ฮ˜ ร— GhostPairs X m)
  68. DefinitionplanarWitnessEventdef

    The planar witness {(x, y) โˆˆ โ„ ร— โ„ | y โˆˆ A โˆง x โ‰  y}. For A analytic non-Borel, this set is itself analytic non-Borel. The geometric core of the separation: the learning-theoretic bad event below is a measurable preimage of this planar set.

    Set โ„ โ†’ Set (โ„ ร— โ„)
  69. DefinitionsamplePair1ToPlanedef

    The projection GhostPairs1 โ†’ โ„ ร— โ„, p โ†ฆ (p.1 0, p.2 0). Surjective and measurable; non-Borelness of a target set transfers to non-Borelness of its preimage under a measurable surjection.

    GhostPairs1 โ†’ โ„ ร— โ„
  70. DefinitionsingletonBadEventdef

    The symmetrization bad event for the singleton class at sample size m = 1, target concept zeroConcept, and threshold 1/2. Equals the preimage of planarWitnessEvent under samplePair1ToPlane (see singleton_badEvent_eq_preimage_planar), and inherits both analyticity and non-Borelness from the planar set when A is analytic non-Borel.

    Set โ„ โ†’ Set GhostPairs1
  71. DefinitionsingletonClassOndef

    The singleton class over A โІ โ„: {zeroConcept} โˆช {singletonConcept a | a โˆˆ A}. The zeroConcept disjunct is the target concept against which the symmetrization bad event is measured. For A analytic non-Borel, this is the witness used to separate WellBehavedVCMeasTarget from the Krapp-Wirth Borel condition.

    Set โ„ โ†’ ConceptClass โ„ Bool
  72. DefinitionsingletonConceptdef

    The point indicator singletonConcept a x = (x = a). Each singletonConcept a is itself Borel measurable; non-Borelness in the singleton-class witness comes from quantifying over a โˆˆ A for A analytic non-Borel, not from any individual concept.

    โ„ โ†’ Concept โ„ Bool
  73. DefinitionzeroConceptdef

    The constantly false concept. The base hypothesis of the singleton class, serving both as the target concept and as the zeroConcept disjunct of singletonClassOn.

    Concept โ„ Bool
  74. DefinitionzeroOneLossdef

    The 0-1 loss for classification.

    (Y : Type v) โ†’ [DecidableEq Y] โ†’ LossFunction Y

The Ambainis composition lock, at every depth: the product partition of the (d+1)-fold Ambainis iterate โ€” the construction giving the multiplicative upper bound on the partition number โ€” is not the leaf partition of any deterministic protocol, for every depth d. Index 0 is the base partition itself (a kernel-checked eight-rectangle monochromatic partition of the base game); index 1 is the 64-rectangle object of the depth-two frontier.

DeclKWLock.ambainis_tower_locked
โˆ€ (d : โ„•),
  ยฌโˆƒ t,
      KWLock.Realizes (KWLock.onesOf (KWLock.Fd 4 KWLock.fA (d + 1))) (KWLock.zerosOf (KWLock.Fd 4 KWLock.fA (d + 1)))
        (KWLock.towerP 4 KWLock.fA KWLock.pA d) t
Layout
ThesisStepDefinition
ambainis_tower_lockedtheoremtower_not_protocolizabletheoremtower_goodtheoremzerosOf_congrtheoremonesOf_congrtheoremcomp_rowConnectedtheoremcross_step_rowtheoremcluster_linked_rowtheoremcomp_rowTouch_sametheoremcomp_monoValidtheoremcomp_distincttheorempairwise_disjoint_of_netheoremcomp_isPartitiontheoremrowSideSel_valtheoremrowSideSel_nonemptytheoremcomp_pairwisetheoremmem_rows_compRecttheoremdisjointtheoremcomp_colConnectedtheoremcross_step_coltheoremexists_pointโ‚‚theoremcolSideSel_nonemptytheoremcomp_Q_ne_niltheorempartition_ne_niltheoremcoverstheoremcluster_linked_coltheoremmem_compPartitiontheoremlinked_all_memtheoremcomp_colTouch_sametheoremmem_cols_compRecttheoremexists_pointtheoremcolSideSel_valtheoremmem_zerosOftheoremmem_onesOftheoremcontainedtheoremrowctheoremparttheoremontotheoremmonotheoremdisttheoremcolctheoremFd_ontotheoremcomp_ontotheoremconnected_not_protocolizaโ€ฆtheoremrow_side_invarianttheoremcol_side_invarianttheoremleaves_ne_niltheoremfollows_leaf_subtheoremnonemptytheoremambainis_towerHyptheorempA_rowConnectedtheoremsymmtheorempA_monotheorempA_isPartitiontheorempA_distincttheorempA_colConnectedtheoremconnectedVia_of_walktheoremlinked_of_walktheoremlinked_mem_symmtheoremsymmtheoremfA_ontotheoremColConnecteddefColTouchdefConnectedViadefFddefIsPartitionstructureIsWalkdefKRectstructureCelldefcolsdeflabeldeforientdefrowsdefLabdefMonoValiddefProtocolinductiveFollowsdefgodefleavesdefRealizesdefRowConnecteddefRowTouchdefSpdefTStepdefTowerHypstructureblockPatdefcolSideSeldefcompFundefcompPartitiondefcompRectdeffAdefinstDecidableCellOfDecidaโ€ฆdefinstDecidableColTouchOfDeโ€ฆdefinstDecidableEqKRectdefinstDecidableEqSpdefinstDecidableIsWalkdefinstDecidableRowTouchOfDeโ€ฆdefinstFintypeSpdefonesOfdefpAdefrA1defrA2defrA3defrA4defrA5defrA6defrA7defrA8defrowSideSeldeftowerPdefvvaldefzerosOfdef
  1. DeclKWLock.ambainis_tower_lockedDeclaration kindtheorem
    โˆ€ (d : โ„•),
      ยฌโˆƒ t,
          KWLock.Realizes (KWLock.onesOf (KWLock.Fd 4 KWLock.fA (d + 1))) (KWLock.zerosOf (KWLock.Fd 4 KWLock.fA (d + 1)))
            (KWLock.towerP 4 KWLock.fA KWLock.pA d) t
    Uses
  2. DeclKWLock.tower_not_protocolizableDeclaration kindtheorem

    The composition lock. Under the base hypotheses, the product partition of the (d+1)-fold iterate is not the leaf partition of any deterministic protocol, for every depth.

    โˆ€ (k : โ„•) (f : (Fin k โ†’ Bool) โ†’ Bool) (Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))),
      KWLock.TowerHyp k f Pโ‚€ โ†’
        โˆ€ (d : โ„•),
          ยฌโˆƒ t,
              KWLock.Realizes (KWLock.onesOf (KWLock.Fd k f (d + 1))) (KWLock.zerosOf (KWLock.Fd k f (d + 1)))
                (KWLock.towerP k f Pโ‚€ d) t
    Uses
    Used by
  3. DeclKWLock.tower_goodDeclaration kindtheorem

    Everything transfers up the tower: at every depth the product partition is a valid, monochromatic partition of the iterate's game, with both overlap graphs connected and two distinct members.

    โˆ€ (k : โ„•) (f : (Fin k โ†’ Bool) โ†’ Bool) (Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))),
      KWLock.TowerHyp k f Pโ‚€ โ†’
        โˆ€ (d : โ„•),
          KWLock.IsPartition (KWLock.onesOf (KWLock.Fd k f (d + 1))) (KWLock.zerosOf (KWLock.Fd k f (d + 1)))
              (KWLock.towerP k f Pโ‚€ d) โˆง
            KWLock.MonoValid (KWLock.vval k d) (KWLock.vval k d) (KWLock.towerP k f Pโ‚€ d) โˆง
              KWLock.RowConnected (KWLock.towerP k f Pโ‚€ d) โˆง
                KWLock.ColConnected (KWLock.towerP k f Pโ‚€ d) โˆง
                  โˆƒ r โˆˆ KWLock.towerP k f Pโ‚€ d, โˆƒ s โˆˆ KWLock.towerP k f Pโ‚€ d, r โ‰  s
    Uses
    Used by
  4. DeclKWLock.zerosOf_congrDeclaration kindtheorem

    Pointwise-equal Boolean functions have equal zeros.

    โˆ€ {ฮฑ : Type} [inst : Fintype ฮฑ] {hโ‚ hโ‚‚ : ฮฑ โ†’ Bool}, (โˆ€ (x : ฮฑ), hโ‚ x = hโ‚‚ x) โ†’ KWLock.zerosOf hโ‚ = KWLock.zerosOf hโ‚‚
    Uses
    Used by
  5. DeclKWLock.onesOf_congrDeclaration kindtheorem

    Pointwise-equal Boolean functions have equal ones.

    โˆ€ {ฮฑ : Type} [inst : Fintype ฮฑ] {hโ‚ hโ‚‚ : ฮฑ โ†’ Bool}, (โˆ€ (x : ฮฑ), hโ‚ x = hโ‚‚ x) โ†’ KWLock.onesOf hโ‚ = KWLock.onesOf hโ‚‚
    Uses
    Used by
  6. DeclKWLock.comp_rowConnectedDeclaration kindtheorem

    The connectivity transfer, rows. Outer connectivity plus block connectivity (both graphs of every block partition) yields row connectivity of the product.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool)
      {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Po โ†’
          KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
            (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
              KWLock.RowConnected Po โ†’
                (โˆ€ (i : Fin k), KWLock.RowConnected (Q i)) โ†’
                  (โˆ€ (i : Fin k), KWLock.ColConnected (Q i)) โ†’ KWLock.RowConnected (KWLock.compPartition g Po Q)
    Uses
    Used by
  7. DeclKWLock.cross_step_rowDeclaration kindtheorem

    The hop. Outer rectangles sharing a row yield touching composed rectangles: directly across distinct blocks, and through a common block rectangle when the blocks coincide (in which case the shared pattern forces equal orientations).

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
          (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
            (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
              โˆ€ {Ro So : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)},
                Ro โˆˆ Po โ†’
                  So โˆˆ Po โ†’
                    KWLock.RowTouch Ro So โ†’
                      โˆ€ {q : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)},
                        q โˆˆ Q Ro.label โ†’ โˆƒ p โˆˆ Q So.label, KWLock.RowTouch (KWLock.compRect g Ro q) (KWLock.compRect g So p)
    Uses
    Used by
  8. DeclKWLock.cluster_linked_rowDeclaration kindtheorem

    Within one outer rectangle, composed rectangles over linked block rectangles are linked: the cluster inherits the block partition's row graph in the standard orientation and its column graph in the reversed one.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool)
      {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Po โ†’
          KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
            (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
              (โˆ€ (i : Fin k), KWLock.RowConnected (Q i)) โ†’
                (โˆ€ (i : Fin k), KWLock.ColConnected (Q i)) โ†’
                  โˆ€ {Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)},
                    Ro โˆˆ Po โ†’
                      โˆ€ {q q' : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)},
                        q โˆˆ Q Ro.label โ†’
                          q' โˆˆ Q Ro.label โ†’
                            Relation.ReflTransGen (KWLock.TStep KWLock.RowTouch (KWLock.compPartition g Po Q))
                              (KWLock.compRect g Ro q) (KWLock.compRect g Ro q')
    Uses
    Used by
  9. DeclKWLock.comp_rowTouch_sameDeclaration kindtheorem

    Same-outer composed rectangles sharing a side value share a row.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
          (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
            โˆ€ {Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)},
              Ro โˆˆ Po โ†’
                Ro.rows.Nonempty โ†’
                  โˆ€ {q q' : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)},
                    q โˆˆ Q Ro.label โ†’
                      โˆ€ {vโ‚€ : V Ro.label},
                        vโ‚€ โˆˆ KWLock.rowSideSel Ro.orient q โ†’
                          vโ‚€ โˆˆ KWLock.rowSideSel Ro.orient q' โ†’
                            KWLock.RowTouch (KWLock.compRect g Ro q) (KWLock.compRect g Ro q')
    Uses
    Used by
  10. DeclKWLock.comp_monoValidDeclaration kindtheorem

    Labels transfer. The composed partition is monochromatic at its physical coordinates, under the composed valuation.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))} (vฮบ : (i : Fin k) โ†’ V i โ†’ ฮบ i โ†’ Bool),
      (โˆ€ (i : Fin k), KWLock.MonoValid (vฮบ i) (vฮบ i) (Q i)) โ†’
        KWLock.MonoValid (fun w s => vฮบ s.fst (w s.fst) s.snd) (fun w s => vฮบ s.fst (w s.fst) s.snd)
          (KWLock.compPartition g Po Q)
    Uses
    Used by
  11. DeclKWLock.comp_distinctDeclaration kindtheorem

    Distinctness transfers: children of two distinct outer rectangles are distinct, because their cells are nonempty and outer-disjoint.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool)
      {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Po โ†’
          KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
            (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
              (โˆƒ r โˆˆ Po, โˆƒ s โˆˆ Po, r โ‰  s) โ†’ โˆƒ r โˆˆ KWLock.compPartition g Po Q, โˆƒ s โˆˆ KWLock.compPartition g Po Q, r โ‰  s
    Uses
    Used by
  12. DeclKWLock.pairwise_disjoint_of_neDeclaration kindtheorem

    Extract pairwise cell-disjointness for two distinct members.

    โˆ€ {X Y ฮน : Type} {P : List (KWLock.KRect X Y ฮน)},
      List.Pairwise (fun r s => โˆ€ (x : X) (y : Y), ยฌ(r.Cell x y โˆง s.Cell x y)) P โ†’
        โˆ€ {r s : KWLock.KRect X Y ฮน}, r โˆˆ P โ†’ s โˆˆ P โ†’ r โ‰  s โ†’ โˆ€ (x : X) (y : Y), ยฌ(r.Cell x y โˆง s.Cell x y)
    Used by
  13. DeclKWLock.comp_isPartitionDeclaration kindtheorem

    Validity transfers. The product of a valid labeled outer partition with valid block partitions is a valid partition of the composed game.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool)
      {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Po โ†’
        KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
          (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
            (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
              KWLock.IsPartition (KWLock.onesOf (KWLock.compFun g f)) (KWLock.zerosOf (KWLock.compFun g f))
                (KWLock.compPartition g Po Q)
    Uses
    Used by
  14. DeclKWLock.rowSideSel_valDeclaration kindtheorem

    A value on the row side of a block rectangle evaluates, under the block function, to the orientation โ€” provided the block partition is contained in its game.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ Fintype (V i)] {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool)
      {a : Fin k} {q : KWLock.KRect (V a) (V a) (ฮบ a)},
      q.rows โІ KWLock.onesOf (g a) โ†’
        q.cols โІ KWLock.zerosOf (g a) โ†’ โˆ€ (o : Bool) {v : V a}, v โˆˆ KWLock.rowSideSel o q โ†’ g a v = o
    Uses
    Used by
  15. DeclKWLock.rowSideSel_nonemptyDeclaration kindtheorem

    Row sides of members of a valid block partition are nonempty.

    โˆ€ {k : โ„•} {V ฮบ : Fin k โ†’ Type} {a : Fin k} {q : KWLock.KRect (V a) (V a) (ฮบ a)},
      q.rows.Nonempty โˆง q.cols.Nonempty โ†’ โˆ€ (o : Bool), (KWLock.rowSideSel o q).Nonempty
    Used by
  16. DeclKWLock.comp_pairwiseDeclaration kindtheorem

    Pairwise cell-disjointness transfers to the product: a shared composed cell projects to a shared outer cell (across outer rectangles) or a shared block cell in the orientation's order (within one outer rectangle).

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      List.Pairwise (fun r s => โˆ€ (x y : Fin k โ†’ Bool), ยฌ(r.Cell x y โˆง s.Cell x y)) Po โ†’
        (โˆ€ (i : Fin k), List.Pairwise (fun r s => โˆ€ (x y : V i), ยฌ(r.Cell x y โˆง s.Cell x y)) (Q i)) โ†’
          List.Pairwise (fun r s => โˆ€ (x y : (i : Fin k) โ†’ V i), ยฌ(r.Cell x y โˆง s.Cell x y)) (KWLock.compPartition g Po Q)
    Uses
    Used by
  17. DeclKWLock.mem_rows_compRectDeclaration kindtheorem
    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)}
      {q : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)} {w : (i : Fin k) โ†’ V i},
      w โˆˆ (KWLock.compRect g Ro q).rows โ†” KWLock.blockPat g w โˆˆ Ro.rows โˆง w Ro.label โˆˆ KWLock.rowSideSel Ro.orient q
    Used by
  18. DeclKWLock.IsPartition.disjointDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} {RX : Finset X} {CY : Finset Y} {P : List (KWLock.KRect X Y ฮน)},
      KWLock.IsPartition RX CY P โ†’ List.Pairwise (fun r s => โˆ€ (x : X) (y : Y), ยฌ(r.Cell x y โˆง s.Cell x y)) P
    Used by
  19. DeclKWLock.comp_colConnectedDeclaration kindtheorem

    The connectivity transfer, columns.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool)
      {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Po โ†’
          KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
            (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
              KWLock.ColConnected Po โ†’
                (โˆ€ (i : Fin k), KWLock.RowConnected (Q i)) โ†’
                  (โˆ€ (i : Fin k), KWLock.ColConnected (Q i)) โ†’ KWLock.ColConnected (KWLock.compPartition g Po Q)
    Uses
    Used by
  20. DeclKWLock.cross_step_colDeclaration kindtheorem

    The column mirror of cross_step_row.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
          (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
            (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
              โˆ€ {Ro So : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)},
                Ro โˆˆ Po โ†’
                  So โˆˆ Po โ†’
                    KWLock.ColTouch Ro So โ†’
                      โˆ€ {q : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)},
                        q โˆˆ Q Ro.label โ†’ โˆƒ p โˆˆ Q So.label, KWLock.ColTouch (KWLock.compRect g Ro q) (KWLock.compRect g So p)
    Uses
    Used by
  21. DeclKWLock.exists_pointโ‚‚Declaration kindtheorem

    Build a composed point with a prescribed block pattern and prescribed values at two distinct blocks.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool),
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        โˆ€ (u : Fin k โ†’ Bool) {aโ‚ aโ‚‚ : Fin k},
          aโ‚ โ‰  aโ‚‚ โ†’
            โˆ€ (vโ‚ : V aโ‚) (vโ‚‚ : V aโ‚‚),
              g aโ‚ vโ‚ = u aโ‚ โ†’ g aโ‚‚ vโ‚‚ = u aโ‚‚ โ†’ โˆƒ w, KWLock.blockPat g w = u โˆง w aโ‚ = vโ‚ โˆง w aโ‚‚ = vโ‚‚
    Used by
  22. DeclKWLock.colSideSel_nonemptyDeclaration kindtheorem

    Column sides of members of a valid block partition are nonempty.

    โˆ€ {k : โ„•} {V ฮบ : Fin k โ†’ Type} {a : Fin k} {q : KWLock.KRect (V a) (V a) (ฮบ a)},
      q.rows.Nonempty โˆง q.cols.Nonempty โ†’ โˆ€ (o : Bool), (KWLock.colSideSel o q).Nonempty
    Used by
  23. DeclKWLock.comp_Q_ne_nilDeclaration kindtheorem

    Block partitions of a game with a surjective block function are nonempty lists.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ Fintype (V i)] {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool)
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’ โˆ€ (i : Fin k), Q i โ‰  []
    Uses
    Used by
  24. DeclKWLock.partition_ne_nilDeclaration kindtheorem

    A valid nonempty-sided partition of a nonempty product is a nonempty list.

    โˆ€ {X Y ฮน : Type} {RX : Finset X} {CY : Finset Y} {P : List (KWLock.KRect X Y ฮน)},
      KWLock.IsPartition RX CY P โ†’ RX.Nonempty โ†’ CY.Nonempty โ†’ P โ‰  []
    Uses
    Used by
  25. DeclKWLock.IsPartition.coversDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} {RX : Finset X} {CY : Finset Y} {P : List (KWLock.KRect X Y ฮน)},
      KWLock.IsPartition RX CY P โ†’ โˆ€ x โˆˆ RX, โˆ€ y โˆˆ CY, โˆƒ r โˆˆ P, r.Cell x y
    Used by
  26. DeclKWLock.cluster_linked_colDeclaration kindtheorem

    The column mirror of cluster_linked_row.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool)
      {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Po โ†’
          KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
            (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
              (โˆ€ (i : Fin k), KWLock.RowConnected (Q i)) โ†’
                (โˆ€ (i : Fin k), KWLock.ColConnected (Q i)) โ†’
                  โˆ€ {Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)},
                    Ro โˆˆ Po โ†’
                      โˆ€ {q q' : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)},
                        q โˆˆ Q Ro.label โ†’
                          q' โˆˆ Q Ro.label โ†’
                            Relation.ReflTransGen (KWLock.TStep KWLock.ColTouch (KWLock.compPartition g Po Q))
                              (KWLock.compRect g Ro q) (KWLock.compRect g Ro q')
    Uses
    Used by
  27. DeclKWLock.mem_compPartitionDeclaration kindtheorem
    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))}
      {r : KWLock.KRect ((i : Fin k) โ†’ V i) ((i : Fin k) โ†’ V i) ((i : Fin k) ร— ฮบ i)},
      r โˆˆ KWLock.compPartition g Po Q โ†” โˆƒ Ro โˆˆ Po, โˆƒ q โˆˆ Q Ro.label, r = KWLock.compRect g Ro q
    Used by
  28. DeclKWLock.linked_all_memDeclaration kindtheorem

    Along linkage from a member, every node is a member.

    โˆ€ {X Y ฮน : Type} (T : KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop) {P : List (KWLock.KRect X Y ฮน)}
      {r s : KWLock.KRect X Y ฮน}, r โˆˆ P โ†’ Relation.ReflTransGen (KWLock.TStep T P) r s โ†’ s โˆˆ P
    Used by
  29. DeclKWLock.comp_colTouch_sameDeclaration kindtheorem

    Same-outer composed rectangles sharing a side value share a column.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Po : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))}
      {Q : (i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))},
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        KWLock.MonoValid (fun u i => u i) (fun u i => u i) Po โ†’
          (โˆ€ (i : Fin k), KWLock.IsPartition (KWLock.onesOf (g i)) (KWLock.zerosOf (g i)) (Q i)) โ†’
            โˆ€ {Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)},
              Ro โˆˆ Po โ†’
                Ro.cols.Nonempty โ†’
                  โˆ€ {q q' : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)},
                    q โˆˆ Q Ro.label โ†’
                      โˆ€ {vโ‚€ : V Ro.label},
                        vโ‚€ โˆˆ KWLock.colSideSel Ro.orient q โ†’
                          vโ‚€ โˆˆ KWLock.colSideSel Ro.orient q' โ†’
                            KWLock.ColTouch (KWLock.compRect g Ro q) (KWLock.compRect g Ro q')
    Uses
    Used by
  30. DeclKWLock.mem_cols_compRectDeclaration kindtheorem
    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ DecidableEq (V i)] [inst_1 : (i : Fin k) โ†’ Fintype (V i)]
      {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) {Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)}
      {q : KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label)} {w : (i : Fin k) โ†’ V i},
      w โˆˆ (KWLock.compRect g Ro q).cols โ†” KWLock.blockPat g w โˆˆ Ro.cols โˆง w Ro.label โˆˆ KWLock.colSideSel Ro.orient q
    Used by
  31. DeclKWLock.exists_pointDeclaration kindtheorem

    Build a composed point with a prescribed block pattern and a prescribed value at one block, from surjectivity of the block functions.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool),
      (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’
        โˆ€ (u : Fin k โ†’ Bool) (a : Fin k) (v : V a), g a v = u a โ†’ โˆƒ w, KWLock.blockPat g w = u โˆง w a = v
    Used by
  32. DeclKWLock.colSideSel_valDeclaration kindtheorem

    A value on the column side of a block rectangle evaluates to the negated orientation.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} [inst : (i : Fin k) โ†’ Fintype (V i)] {ฮบ : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool)
      {a : Fin k} {q : KWLock.KRect (V a) (V a) (ฮบ a)},
      q.rows โІ KWLock.onesOf (g a) โ†’
        q.cols โІ KWLock.zerosOf (g a) โ†’ โˆ€ (o : Bool) {v : V a}, v โˆˆ KWLock.colSideSel o q โ†’ g a v = !o
    Uses
    Used by
  33. DeclKWLock.mem_zerosOfDeclaration kindtheorem
    โˆ€ {ฮฑ : Type} [inst : Fintype ฮฑ] {h : ฮฑ โ†’ Bool} {x : ฮฑ}, x โˆˆ KWLock.zerosOf h โ†” h x = false
    Used by
  34. DeclKWLock.mem_onesOfDeclaration kindtheorem
    โˆ€ {ฮฑ : Type} [inst : Fintype ฮฑ] {h : ฮฑ โ†’ Bool} {x : ฮฑ}, x โˆˆ KWLock.onesOf h โ†” h x = true
    Used by
  35. DeclKWLock.IsPartition.containedDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} {RX : Finset X} {CY : Finset Y} {P : List (KWLock.KRect X Y ฮน)},
      KWLock.IsPartition RX CY P โ†’ โˆ€ r โˆˆ P, r.rows โІ RX โˆง r.cols โІ CY
    Used by
  36. DeclKWLock.TowerHyp.rowcDeclaration kindtheorem
    โˆ€ {k : โ„•} {f : (Fin k โ†’ Bool) โ†’ Bool} {Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))},
      KWLock.TowerHyp k f Pโ‚€ โ†’ KWLock.RowConnected Pโ‚€
    Used by
  37. DeclKWLock.TowerHyp.partDeclaration kindtheorem
    โˆ€ {k : โ„•} {f : (Fin k โ†’ Bool) โ†’ Bool} {Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))},
      KWLock.TowerHyp k f Pโ‚€ โ†’ KWLock.IsPartition (KWLock.onesOf f) (KWLock.zerosOf f) Pโ‚€
    Used by
  38. DeclKWLock.TowerHyp.ontoDeclaration kindtheorem
    โˆ€ {k : โ„•} {f : (Fin k โ†’ Bool) โ†’ Bool} {Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))},
      KWLock.TowerHyp k f Pโ‚€ โ†’ โˆ€ (b : Bool), โˆƒ u, f u = b
    Used by
  39. DeclKWLock.TowerHyp.monoDeclaration kindtheorem
    โˆ€ {k : โ„•} {f : (Fin k โ†’ Bool) โ†’ Bool} {Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))},
      KWLock.TowerHyp k f Pโ‚€ โ†’ KWLock.MonoValid (fun u i => u i) (fun u i => u i) Pโ‚€
    Used by
  40. DeclKWLock.TowerHyp.distDeclaration kindtheorem
    โˆ€ {k : โ„•} {f : (Fin k โ†’ Bool) โ†’ Bool} {Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))},
      KWLock.TowerHyp k f Pโ‚€ โ†’ โˆƒ r โˆˆ Pโ‚€, โˆƒ s โˆˆ Pโ‚€, r โ‰  s
    Used by
  41. DeclKWLock.TowerHyp.colcDeclaration kindtheorem
    โˆ€ {k : โ„•} {f : (Fin k โ†’ Bool) โ†’ Bool} {Pโ‚€ : List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k))},
      KWLock.TowerHyp k f Pโ‚€ โ†’ KWLock.ColConnected Pโ‚€
    Used by
  42. DeclKWLock.Fd_ontoDeclaration kindtheorem

    The iterate is surjective at every level.

    โˆ€ (k : โ„•) (f : (Fin k โ†’ Bool) โ†’ Bool),
      (โˆ€ (b : Bool), โˆƒ u, f u = b) โ†’ โˆ€ (d : โ„•) (b : Bool), โˆƒ w, KWLock.Fd k f (d + 1) w = b
    Uses
    Used by
  43. DeclKWLock.comp_ontoDeclaration kindtheorem

    Surjectivity composes.

    โˆ€ {k : โ„•} {V : Fin k โ†’ Type} (g : (i : Fin k) โ†’ V i โ†’ Bool) (f : (Fin k โ†’ Bool) โ†’ Bool),
      (โˆ€ (b : Bool), โˆƒ u, f u = b) โ†’
        (โˆ€ (i : Fin k) (b : Bool), โˆƒ v, g i v = b) โ†’ โˆ€ (b : Bool), โˆƒ w, KWLock.compFun g f w = b
    Used by
  44. DeclKWLock.connected_not_protocolizableDeclaration kindtheorem

    The atomicity obstruction. Any list of nonempty-sided rectangles with two distinct members whose row-overlap graph and column-overlap graph are both connected is not the leaf list of any deterministic protocol โ€” full partition validity is not needed. At the root split, every leaf's live side lies within one half; sharing a row (column) forces the same half; connectivity drags every rectangle to one half; yet both subtrees own a leaf.

    โˆ€ {X Y ฮน : Type} [inst : DecidableEq X] [inst_1 : DecidableEq Y] {RX : Finset X} {CY : Finset Y}
      {P : List (KWLock.KRect X Y ฮน)},
      (โˆ€ r โˆˆ P, r.rows.Nonempty โˆง r.cols.Nonempty) โ†’
        KWLock.RowConnected P โ†’ KWLock.ColConnected P โ†’ (โˆƒ r โˆˆ P, โˆƒ s โˆˆ P, r โ‰  s) โ†’ ยฌโˆƒ t, KWLock.Realizes RX CY P t
    Uses
    Used by
  45. DeclKWLock.row_side_invariantDeclaration kindtheorem

    Lying inside a fixed half of a row split is invariant along the row-overlap graph, provided every member of P lies inside one half or the other: a shared row cannot be on both sides.

    โˆ€ {X Y ฮน : Type} [inst : DecidableEq X] {P : List (KWLock.KRect X Y ฮน)} {RX A : Finset X},
      (โˆ€ p โˆˆ P, p.rows โІ RX โˆฉ A โˆจ p.rows โІ RX \ A) โ†’
        โˆ€ {p q : KWLock.KRect X Y ฮน},
          Relation.ReflTransGen (KWLock.TStep KWLock.RowTouch P) p q โ†’ p.rows โІ RX โˆฉ A โ†’ q.rows โІ RX โˆฉ A
    Used by
  46. DeclKWLock.col_side_invariantDeclaration kindtheorem

    The column mirror of row_side_invariant.

    โˆ€ {X Y ฮน : Type} [inst : DecidableEq Y] {P : List (KWLock.KRect X Y ฮน)} {CY B : Finset Y},
      (โˆ€ p โˆˆ P, p.cols โІ CY โˆฉ B โˆจ p.cols โІ CY \ B) โ†’
        โˆ€ {p q : KWLock.KRect X Y ฮน},
          Relation.ReflTransGen (KWLock.TStep KWLock.ColTouch P) p q โ†’ p.cols โІ CY โˆฉ B โ†’ q.cols โІ CY โˆฉ B
    Used by
  47. DeclKWLock.Protocol.leaves_ne_nilDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} (t : KWLock.Protocol X Y ฮน), t.leaves โ‰  []
    Used by
  48. DeclKWLock.Protocol.follows_leaf_subDeclaration kindtheorem

    Every leaf of a following protocol sits inside the current rectangle.

    โˆ€ {X Y ฮน : Type} [inst : DecidableEq X] [inst_1 : DecidableEq Y] {RX : Finset X} {CY : Finset Y}
      (t : KWLock.Protocol X Y ฮน), KWLock.Protocol.Follows RX CY t โ†’ โˆ€ r โˆˆ t.leaves, r.rows โІ RX โˆง r.cols โІ CY
    Used by
  49. DeclKWLock.IsPartition.nonemptyDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} {RX : Finset X} {CY : Finset Y} {P : List (KWLock.KRect X Y ฮน)},
      KWLock.IsPartition RX CY P โ†’ โˆ€ r โˆˆ P, r.rows.Nonempty โˆง r.cols.Nonempty
    Used by
  50. DeclKWLock.ambainis_towerHypDeclaration kindtheorem

    The Ambainis base satisfies every tower hypothesis.

    KWLock.TowerHyp 4 KWLock.fA KWLock.pA
    Uses
    Used by
  51. DeclKWLock.pA_rowConnectedDeclaration kindtheorem

    The row-overlap graph is connected: an explicit spanning walk.

    KWLock.RowConnected KWLock.pA
    Uses
    Used by
  52. DeclKWLock.RowTouch.symmDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} {r s : KWLock.KRect X Y ฮน}, KWLock.RowTouch r s โ†’ KWLock.RowTouch s r
    Used by
  53. DeclKWLock.pA_monoDeclaration kindtheorem

    Kernel re-check: every rectangle is monochromatic at its label, in its orientation.

    KWLock.MonoValid (fun u i => u i) (fun u i => u i) KWLock.pA
    Used by
  54. DeclKWLock.pA_isPartitionDeclaration kindtheorem

    Kernel re-check: the eight rectangles form a valid partition of the Ambainis game.

    KWLock.IsPartition (KWLock.onesOf KWLock.fA) (KWLock.zerosOf KWLock.fA) KWLock.pA
    Used by
  55. DeclKWLock.pA_distinctDeclaration kindtheorem

    Two distinct members.

    โˆƒ r โˆˆ KWLock.pA, โˆƒ s โˆˆ KWLock.pA, r โ‰  s
    Used by
  56. DeclKWLock.pA_colConnectedDeclaration kindtheorem

    The column-overlap graph is connected: an explicit spanning walk.

    KWLock.ColConnected KWLock.pA
    Uses
    Used by
  57. DeclKWLock.connectedVia_of_walkDeclaration kindtheorem

    A spanning walk โ€” inside P, visiting every member โ€” yields connectivity.

    โˆ€ {X Y ฮน : Type} (T : KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop),
      (โˆ€ {r s : KWLock.KRect X Y ฮน}, T r s โ†’ T s r) โ†’
        โˆ€ {P w : List (KWLock.KRect X Y ฮน)},
          w โ‰  [] โ†’ KWLock.IsWalk T w โ†’ (โˆ€ r โˆˆ w, r โˆˆ P) โ†’ (โˆ€ r โˆˆ P, r โˆˆ w) โ†’ KWLock.ConnectedVia T P
    Uses
    Used by
  58. DeclKWLock.linked_of_walkDeclaration kindtheorem

    The head of a walk inside P links to every element of the walk.

    โˆ€ {X Y ฮน : Type} (T : KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop) {P : List (KWLock.KRect X Y ฮน)}
      {a : KWLock.KRect X Y ฮน} {l : List (KWLock.KRect X Y ฮน)},
      KWLock.IsWalk T (a :: l) โ†’ (โˆ€ r โˆˆ a :: l, r โˆˆ P) โ†’ โˆ€ b โˆˆ a :: l, Relation.ReflTransGen (KWLock.TStep T P) a b
    Used by
  59. DeclKWLock.linked_mem_symmDeclaration kindtheorem

    From a member of P, every linked rectangle is a member, and the linkage reverses when the touch relation is symmetric.

    โˆ€ {X Y ฮน : Type} (T : KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop),
      (โˆ€ {r s : KWLock.KRect X Y ฮน}, T r s โ†’ T s r) โ†’
        โˆ€ {P : List (KWLock.KRect X Y ฮน)} {r s : KWLock.KRect X Y ฮน},
          r โˆˆ P โ†’ Relation.ReflTransGen (KWLock.TStep T P) r s โ†’ s โˆˆ P โˆง Relation.ReflTransGen (KWLock.TStep T P) s r
    Used by
  60. DeclKWLock.ColTouch.symmDeclaration kindtheorem
    โˆ€ {X Y ฮน : Type} {r s : KWLock.KRect X Y ฮน}, KWLock.ColTouch r s โ†’ KWLock.ColTouch s r
    Used by
  61. DeclKWLock.fA_ontoDeclaration kindtheorem

    The base function is surjective.

    โˆ€ (b : Bool), โˆƒ u, KWLock.fA u = b
    Used by
  62. DefinitionKWLock.ColConnecteddef

    Column connectivity.

    {X Y ฮน : Type} โ†’ List (KWLock.KRect X Y ฮน) โ†’ Prop
  63. DefinitionKWLock.ColTouchdef

    Two rectangles touch on columns when some column lies in both column sets.

    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop
  64. DefinitionKWLock.ConnectedViadef

    The touch graph of P is connected.

    {X Y ฮน : Type} โ†’ (KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop) โ†’ List (KWLock.KRect X Y ฮน) โ†’ Prop
  65. DefinitionKWLock.Fddef

    The d-th iterate of the base function.

    (k : โ„•) โ†’ ((Fin k โ†’ Bool) โ†’ Bool) โ†’ (d : โ„•) โ†’ KWLock.Sp k d โ†’ Bool
  66. DefinitionKWLock.IsPartitionstructure

    A valid partition of the product RX ร— CY into nonempty rectangles: contained, pairwise cell-disjoint, covering.

    {X Y ฮน : Type} โ†’ Finset X โ†’ Finset Y โ†’ List (KWLock.KRect X Y ฮน) โ†’ Prop
  67. DefinitionKWLock.IsWalkdef

    A walk: consecutive elements touch.

    {X Y ฮน : Type} โ†’ (KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop) โ†’ List (KWLock.KRect X Y ฮน) โ†’ Prop
  68. DefinitionKWLock.KRectstructure

    A labeled rectangle: row and column sets, a coordinate label, and the rectangle's orientation (true when rows carry value true at the label). The atomicity results never read label/orient; the composition and validity results do.

    Type โ†’ Type โ†’ Type โ†’ Type
  69. DefinitionKWLock.KRect.Celldef

    Cell membership.

    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ X โ†’ Y โ†’ Prop
  70. DefinitionKWLock.KRect.colsdef
    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ Finset Y
  71. DefinitionKWLock.KRect.labeldef
    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ ฮน
  72. DefinitionKWLock.KRect.orientdef
    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ Bool
  73. DefinitionKWLock.KRect.rowsdef
    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ Finset X
  74. DefinitionKWLock.Labdef

    Physical coordinates at depth d: paths of blocks ending in a base coordinate.

    โ„• โ†’ โ„• โ†’ Type
  75. DefinitionKWLock.MonoValiddef

    Per-rectangle monochromaticity relative to valuations: rows carry the rectangle's orientation at its label, columns the negation.

    {X Y ฮน : Type} โ†’ (X โ†’ ฮน โ†’ Bool) โ†’ (Y โ†’ ฮน โ†’ Bool) โ†’ List (KWLock.KRect X Y ฮน) โ†’ Prop
  76. DefinitionKWLock.Protocolinductive

    A deterministic protocol tree: the row player splits the current row set, the column player the current column set; leaves announce rectangles.

    Type โ†’ Type โ†’ Type โ†’ Type
  77. DefinitionKWLock.Protocol.Followsdef

    The protocol respects the current rectangle (RX, CY): each split partitions the live side, and every leaf rectangle sits inside its branch's constraints.

    {X Y ฮน : Type} โ†’ [DecidableEq X] โ†’ [DecidableEq Y] โ†’ Finset X โ†’ Finset Y โ†’ KWLock.Protocol X Y ฮน โ†’ Prop
  78. DefinitionKWLock.Protocol.brecOn.godef
    {X Y ฮน : Type} โ†’
      {motive : KWLock.Protocol X Y ฮน โ†’ Sort u} โ†’
        (t : KWLock.Protocol X Y ฮน) โ†’
          ((t : KWLock.Protocol X Y ฮน) โ†’ KWLock.Protocol.below t โ†’ motive t) โ†’ motive t ร—' KWLock.Protocol.below t
  79. DefinitionKWLock.Protocol.leavesdef

    The leaves of a protocol tree.

    {X Y ฮน : Type} โ†’ KWLock.Protocol X Y ฮน โ†’ List (KWLock.KRect X Y ฮน)
  80. DefinitionKWLock.Realizesdef

    t realizes the partition P on (RX, CY): it follows the tree constraints and its leaves are exactly the members of P.

    {X Y ฮน : Type} โ†’
      [DecidableEq X] โ†’ [DecidableEq Y] โ†’ Finset X โ†’ Finset Y โ†’ List (KWLock.KRect X Y ฮน) โ†’ KWLock.Protocol X Y ฮน โ†’ Prop
  81. DefinitionKWLock.RowConnecteddef

    Row connectivity.

    {X Y ฮน : Type} โ†’ List (KWLock.KRect X Y ฮน) โ†’ Prop
  82. DefinitionKWLock.RowTouchdef

    Two rectangles touch on rows when some row lies in both row sets.

    {X Y ฮน : Type} โ†’ KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop
  83. DefinitionKWLock.Spdef

    The input space of the d-th iterate: Sp 1 is the base pattern space.

    โ„• โ†’ โ„• โ†’ Type
  84. DefinitionKWLock.TStepdef

    One linkage step inside P: the target is a member and the rectangles touch.

    {X Y ฮน : Type} โ†’
      (KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop) โ†’
        List (KWLock.KRect X Y ฮน) โ†’ KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop
  85. DefinitionKWLock.TowerHypstructure

    The base hypotheses of the tower: a valid, monochromatic, doubly-connected base partition with two distinct members, over a surjective base function.

    (k : โ„•) โ†’ ((Fin k โ†’ Bool) โ†’ Bool) โ†’ List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)) โ†’ Prop
  86. DefinitionKWLock.blockPatdef

    The block pattern of a composed point: the vector of block outputs.

    {k : โ„•} โ†’ {V : Fin k โ†’ Type} โ†’ ((i : Fin k) โ†’ V i โ†’ Bool) โ†’ ((i : Fin k) โ†’ V i) โ†’ Fin k โ†’ Bool
  87. DefinitionKWLock.colSideSeldef

    The column side of a block rectangle, in a given orientation.

    {k : โ„•} โ†’ {V ฮบ : Fin k โ†’ Type} โ†’ Bool โ†’ {a : Fin k} โ†’ KWLock.KRect (V a) (V a) (ฮบ a) โ†’ Finset (V a)
  88. DefinitionKWLock.compFundef

    The composed function.

    {k : โ„•} โ†’ {V : Fin k โ†’ Type} โ†’ ((i : Fin k) โ†’ V i โ†’ Bool) โ†’ ((Fin k โ†’ Bool) โ†’ Bool) โ†’ ((i : Fin k) โ†’ V i) โ†’ Bool
  89. DefinitionKWLock.compPartitiondef

    The product partition of the composed game.

    {k : โ„•} โ†’
      {V : Fin k โ†’ Type} โ†’
        [(i : Fin k) โ†’ DecidableEq (V i)] โ†’
          [(i : Fin k) โ†’ Fintype (V i)] โ†’
            {ฮบ : Fin k โ†’ Type} โ†’
              ((i : Fin k) โ†’ V i โ†’ Bool) โ†’
                List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)) โ†’
                  ((i : Fin k) โ†’ List (KWLock.KRect (V i) (V i) (ฮบ i))) โ†’
                    List (KWLock.KRect ((i : Fin k) โ†’ V i) ((i : Fin k) โ†’ V i) ((i : Fin k) ร— ฮบ i))
  90. DefinitionKWLock.compRectdef

    The composed rectangle: outer patterns from the outer rectangle, the active block constrained to the block rectangle's side in the outer orientation, other blocks free. The label is the physical coordinate; the orientation composes.

    {k : โ„•} โ†’
      {V : Fin k โ†’ Type} โ†’
        [(i : Fin k) โ†’ DecidableEq (V i)] โ†’
          [(i : Fin k) โ†’ Fintype (V i)] โ†’
            {ฮบ : Fin k โ†’ Type} โ†’
              ((i : Fin k) โ†’ V i โ†’ Bool) โ†’
                (Ro : KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)) โ†’
                  KWLock.KRect (V Ro.label) (V Ro.label) (ฮบ Ro.label) โ†’
                    KWLock.KRect ((i : Fin k) โ†’ V i) ((i : Fin k) โ†’ V i) ((i : Fin k) ร— ฮบ i)
  91. DefinitionKWLock.fAdef

    The four-variable Ambainis function, in Ueno's ten-leaf form (truth table 0xd18b: exactly the monotone four-bit sequences evaluate to one).

    (Fin 4 โ†’ Bool) โ†’ Bool
  92. DefinitionKWLock.instDecidableCellOfDecidableEqdef
    {X Y ฮน : Type} โ†’
      [DecidableEq X] โ†’ [DecidableEq Y] โ†’ (r : KWLock.KRect X Y ฮน) โ†’ (x : X) โ†’ (y : Y) โ†’ Decidable (r.Cell x y)
  93. DefinitionKWLock.instDecidableColTouchOfDecidableEqdef
    {X Y ฮน : Type} โ†’ [DecidableEq Y] โ†’ (r s : KWLock.KRect X Y ฮน) โ†’ Decidable (KWLock.ColTouch r s)
  94. DefinitionKWLock.instDecidableEqKRectdef
    {X Y ฮน : Type} โ†’ [DecidableEq X] โ†’ [DecidableEq Y] โ†’ [DecidableEq ฮน] โ†’ DecidableEq (KWLock.KRect X Y ฮน)
  95. DefinitionKWLock.instDecidableEqSpdef
    (k d : โ„•) โ†’ DecidableEq (KWLock.Sp k d)
  96. DefinitionKWLock.instDecidableIsWalkdef
    {X Y ฮน : Type} โ†’
      (T : KWLock.KRect X Y ฮน โ†’ KWLock.KRect X Y ฮน โ†’ Prop) โ†’
        [(r s : KWLock.KRect X Y ฮน) โ†’ Decidable (T r s)] โ†’ (w : List (KWLock.KRect X Y ฮน)) โ†’ Decidable (KWLock.IsWalk T w)
  97. DefinitionKWLock.instDecidableRowTouchOfDecidableEqdef
    {X Y ฮน : Type} โ†’ [DecidableEq X] โ†’ (r s : KWLock.KRect X Y ฮน) โ†’ Decidable (KWLock.RowTouch r s)
  98. DefinitionKWLock.instFintypeSpdef
    (k d : โ„•) โ†’ Fintype (KWLock.Sp k d)
  99. DefinitionKWLock.onesOfdef

    The ones of a Boolean function, as a finite set.

    {ฮฑ : Type} โ†’ [Fintype ฮฑ] โ†’ (ฮฑ โ†’ Bool) โ†’ Finset ฮฑ
  100. DefinitionKWLock.pAdef

    The witness partition.

    List (KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4))
  101. DefinitionKWLock.rA1def

    The eight-rectangle base partition, found by exact search and re-verified by the kernel below: eight monochromatic rectangles of eight cells each, in mixed orientations.

    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  102. DefinitionKWLock.rA2def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  103. DefinitionKWLock.rA3def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  104. DefinitionKWLock.rA4def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  105. DefinitionKWLock.rA5def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  106. DefinitionKWLock.rA6def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  107. DefinitionKWLock.rA7def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  108. DefinitionKWLock.rA8def
    KWLock.KRect (Fin 4 โ†’ Bool) (Fin 4 โ†’ Bool) (Fin 4)
  109. DefinitionKWLock.rowSideSeldef

    The row side of a block rectangle, in a given orientation (the transposed side for the reversed orientation).

    {k : โ„•} โ†’ {V ฮบ : Fin k โ†’ Type} โ†’ Bool โ†’ {a : Fin k} โ†’ KWLock.KRect (V a) (V a) (ฮบ a) โ†’ Finset (V a)
  110. DefinitionKWLock.towerPdef

    The tower of product partitions: depth 0 is the base partition; each next depth composes the base as the outer partition with the previous depth at every block.

    (k : โ„•) โ†’
      ((Fin k โ†’ Bool) โ†’ Bool) โ†’
        List (KWLock.KRect (Fin k โ†’ Bool) (Fin k โ†’ Bool) (Fin k)) โ†’
          (d : โ„•) โ†’ List (KWLock.KRect (KWLock.Sp k (d + 1)) (KWLock.Sp k (d + 1)) (KWLock.Lab k d))
  111. DefinitionKWLock.vvaldef

    The valuation of an iterate point at a physical coordinate.

    (k d : โ„•) โ†’ KWLock.Sp k (d + 1) โ†’ KWLock.Lab k d โ†’ Bool
  112. DefinitionKWLock.zerosOfdef

    The zeros of a Boolean function, as a finite set.

    {ฮฑ : Type} โ†’ [Fintype ฮฑ] โ†’ (ฮฑ โ†’ Bool) โ†’ Finset ฮฑ

If every candidate's loss is measurable and a.e. valued in [a, b] under Q, every training-generated trajectory is admissible for F, and the resulting uniform-deviation failure event is measurable, then on an i.i.d. panel of size n drawn from Q, measured cumulative empirical-loss progress exceeds population-loss progress by more than 2 ยท deltaFiniteExperts (card ฮน) n (b - a) ฮด with probability at most ENNReal.ofReal ฮด.

DeclAuditCP.auditBlind_finiteTrajectory_goodhart
โˆ€ {ฮฉtrain : Type u_1} {Z : Type u_2} {ฮน : Type u_3} [inst : MeasurableSpace ฮฉtrain] [inst_1 : MeasurableSpace Z]
  [inst_2 : Fintype ฮน] [Nonempty ฮน] (ฮผtrain : AuditCP.AuditSampleLaw ฮฉtrain) [MeasureTheory.IsProbabilityMeasure ฮผtrain]
  (Q : AuditCP.AuditSampleLaw Z) [MeasureTheory.IsProbabilityMeasure Q] (n : โ„•),
  0 < n โ†’
    โˆ€ (a b : โ„),
      a < b โ†’
        โˆ€ (ฮด : โ„),
          0 < ฮด โ†’
            ฮด โ‰ค 1 โ†’
              โˆ€ (loss : ฮน โ†’ Z โ†’ โ„),
                (โˆ€ (i : ฮน), Measurable (loss i)) โ†’
                  (โˆ€ (i : ฮน), โˆ€แต (z : Z) โˆ‚Q, loss i z โˆˆ Set.Icc a b) โ†’
                    โˆ€ (F : ฮฉtrain โ†’ AuditCP.AuditEnvelope ฮน) (g : ฮฉtrain โ†’ AuditCP.AuditTrajectory ฮน),
                      (โˆ€ (t : ฮฉtrain), AuditCP.Admissible (g t) (F t)) โ†’
                        MeasurableSet
                            {p |
                              ยฌAuditCP.UniformDev (F p.1) (fun i => AuditCP.empiricalLoss loss i p.2)
                                  (fun i => AuditCP.populationLoss Q loss i)
                                  (AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด)} โ†’
                          โˆ€ (T : โ„•),
                            (MeasureTheory.Measure.prod ฮผtrain (MeasureTheory.Measure.pi fun x => Q))
                                {p |
                                  AuditCP.cumCP (fun i => AuditCP.empiricalLoss loss i p.2) (g p.1) T >
                                    AuditCP.cumCP (fun i => AuditCP.populationLoss Q loss i) (g p.1) T +
                                      2 * AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด} โ‰ค
                              ENNReal.ofReal ฮด
Layout
ThesisStepHypothesisDefinition
auditBlind_finiteTrajectoโ€ฆtheorem0 < nhna < bhab0 < ฮดhฮด0ฮด โ‰ค 1hฮด1โˆ€ (i : ฮน), Measurable (loโ€ฆhmeasโˆ€ (i : ฮน), โˆ€แต (z : Z) โˆ‚Q,โ€ฆhbddโˆ€ (t : ฮฉtrain), AuditCP.Aโ€ฆhadmMeasurableSet {p | ยฌAuditโ€ฆhBadfinite_experts_iid_badEveโ€ฆtheoremfinite_experts_iid_uniforโ€ฆtheoremfinite_experts_subgaussiaโ€ฆtheoremauditBlind_randomTrajectoโ€ฆtheoremfinite_audit_goodharttheoremcumCP_telescopetheoremauditBlind_randomClass_baโ€ฆtheoremAdmissibledefAuditEnvelopedefAuditPotentialdefAuditSampleLawdefAuditTrajectorydefUniformDevdefcumCPdefdeltaFiniteExpertsdefempiricalLossdefpopulationLossdef
  1. DeclAuditCP.auditBlind_finiteTrajectory_goodhartDeclaration kindtheorem
    โˆ€ {ฮฉtrain : Type u_1} {Z : Type u_2} {ฮน : Type u_3} [inst : MeasurableSpace ฮฉtrain] [inst_1 : MeasurableSpace Z]
      [inst_2 : Fintype ฮน] [Nonempty ฮน] (ฮผtrain : AuditCP.AuditSampleLaw ฮฉtrain) [MeasureTheory.IsProbabilityMeasure ฮผtrain]
      (Q : AuditCP.AuditSampleLaw Z) [MeasureTheory.IsProbabilityMeasure Q] (n : โ„•),
      0 < n โ†’
        โˆ€ (a b : โ„),
          a < b โ†’
            โˆ€ (ฮด : โ„),
              0 < ฮด โ†’
                ฮด โ‰ค 1 โ†’
                  โˆ€ (loss : ฮน โ†’ Z โ†’ โ„),
                    (โˆ€ (i : ฮน), Measurable (loss i)) โ†’
                      (โˆ€ (i : ฮน), โˆ€แต (z : Z) โˆ‚Q, loss i z โˆˆ Set.Icc a b) โ†’
                        โˆ€ (F : ฮฉtrain โ†’ AuditCP.AuditEnvelope ฮน) (g : ฮฉtrain โ†’ AuditCP.AuditTrajectory ฮน),
                          (โˆ€ (t : ฮฉtrain), AuditCP.Admissible (g t) (F t)) โ†’
                            MeasurableSet
                                {p |
                                  ยฌAuditCP.UniformDev (F p.1) (fun i => AuditCP.empiricalLoss loss i p.2)
                                      (fun i => AuditCP.populationLoss Q loss i)
                                      (AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด)} โ†’
                              โˆ€ (T : โ„•),
                                (MeasureTheory.Measure.prod ฮผtrain (MeasureTheory.Measure.pi fun x => Q))
                                    {p |
                                      AuditCP.cumCP (fun i => AuditCP.empiricalLoss loss i p.2) (g p.1) T >
                                        AuditCP.cumCP (fun i => AuditCP.populationLoss Q loss i) (g p.1) T +
                                          2 * AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด} โ‰ค
                                  ENNReal.ofReal ฮด
    Uses
  2. DeclAuditCP.finite_experts_iid_badEvent_leDeclaration kindtheorem

    Under the hypotheses of finite_experts_iid_uniformDev, the ENNReal-valued probability that the panel fails uniform deviation is at most ENNReal.ofReal ฮด.

    โˆ€ {Z : Type u_1} {ฮน : Type u_2} [inst : MeasurableSpace Z] [inst_1 : Fintype ฮน] [Nonempty ฮน]
      (Q : AuditCP.AuditSampleLaw Z) [MeasureTheory.IsProbabilityMeasure Q] (n : โ„•),
      0 < n โ†’
        โˆ€ (a b : โ„),
          a < b โ†’
            โˆ€ (ฮด : โ„),
              0 < ฮด โ†’
                ฮด โ‰ค 1 โ†’
                  โˆ€ (loss : ฮน โ†’ Z โ†’ โ„),
                    (โˆ€ (i : ฮน), Measurable (loss i)) โ†’
                      (โˆ€ (i : ฮน), โˆ€แต (z : Z) โˆ‚Q, loss i z โˆˆ Set.Icc a b) โ†’
                        (MeasureTheory.Measure.pi fun x => Q)
                            {panel |
                              ยฌAuditCP.UniformDev Set.univ (fun i => AuditCP.empiricalLoss loss i panel)
                                  (fun i => AuditCP.populationLoss Q loss i)
                                  (AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด)} โ‰ค
                          ENNReal.ofReal ฮด
    Uses
    Used by
  3. DeclAuditCP.finite_experts_iid_uniformDevDeclaration kindtheorem

    If every candidate's loss is measurable and a.e. valued in [a, b] under Q, then on an i.i.d. panel of size n drawn from Q, with probability at least 1 โˆ’ ฮด the empirical loss empiricalLoss loss i panel and the population loss populationLoss Q loss i agree within deltaFiniteExperts (card ฮน) n (b - a) ฮด for every candidate i (hoeffding1963; cesabianchi2006).

    โˆ€ {Z : Type u_1} {ฮน : Type u_2} [inst : MeasurableSpace Z] [inst_1 : Fintype ฮน] [Nonempty ฮน]
      (Q : AuditCP.AuditSampleLaw Z) [MeasureTheory.IsProbabilityMeasure Q] (n : โ„•),
      0 < n โ†’
        โˆ€ (a b : โ„),
          a < b โ†’
            โˆ€ (ฮด : โ„),
              0 < ฮด โ†’
                ฮด โ‰ค 1 โ†’
                  โˆ€ (loss : ฮน โ†’ Z โ†’ โ„),
                    (โˆ€ (i : ฮน), Measurable (loss i)) โ†’
                      (โˆ€ (i : ฮน), โˆ€แต (z : Z) โˆ‚Q, loss i z โˆˆ Set.Icc a b) โ†’
                        1 - ฮด โ‰ค
                          (MeasureTheory.Measure.pi fun x => Q).real
                            {panel |
                              AuditCP.UniformDev Set.univ (fun i => AuditCP.empiricalLoss loss i panel)
                                (fun i => AuditCP.populationLoss Q loss i)
                                (AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด)}
    Uses
    Used by
  4. DeclAuditCP.finite_experts_subgaussian_uniformDevDeclaration kindtheorem

    If each Y i j is ฮผ-sub-Gaussian with proxy (L/2)ยฒ and, for each candidate i, independent across panel positions j, then with probability at least 1 โˆ’ ฮด the panel means (โˆ‘โฑผ Y i j) / n all lie within deltaFiniteExperts (card ฮน) n L ฮด of 0 (hoeffding1963).

    โˆ€ {ฮฉ : Type u_1} {ฮน : Type u_2} [inst : MeasurableSpace ฮฉ] [inst_1 : Fintype ฮน] [Nonempty ฮน]
      (ฮผ : AuditCP.AuditSampleLaw ฮฉ) [MeasureTheory.IsProbabilityMeasure ฮผ] (n : โ„•),
      0 < n โ†’
        โˆ€ (L : โ„),
          0 < L โ†’
            โˆ€ (ฮด : โ„),
              0 < ฮด โ†’
                ฮด โ‰ค 1 โ†’
                  โˆ€ (Y : ฮน โ†’ Fin n โ†’ ฮฉ โ†’ โ„),
                    (โˆ€ (i : ฮน) (j : Fin n), ProbabilityTheory.HasSubgaussianMGF (Y i j) ((โ€–Lโ€–โ‚Š / 2) ^ 2) ฮผ) โ†’
                      (โˆ€ (i : ฮน), ProbabilityTheory.iIndepFun (Y i) ฮผ) โ†’
                        1 - ฮด โ‰ค
                          MeasureTheory.Measure.real ฮผ
                            {ฯ‰ |
                              AuditCP.UniformDev Set.univ (fun i => (โˆ‘ j, Y i j ฯ‰) / โ†‘n) (fun x => 0)
                                (AuditCP.deltaFiniteExperts (Fintype.card ฮน) n L ฮด)}
    Used by
  5. DeclAuditCP.auditBlind_randomTrajectory_goodhartDeclaration kindtheorem

    If every training-generated trajectory g t is admissible for F t, the uniform-deviation failure event is measurable, and its audit fiber has probability at most ฮด for ฮผtrain-almost every training history, then measured cumulative compression progress exceeds true progress by more than 2ฮ” with probability at most ฮด under ฮผtrain.prod ฮผaudit.

    โˆ€ {ฮฉtrain : Type u_1} {ฮฉaudit : Type u_2} {ฮน : Type u_3} [inst : MeasurableSpace ฮฉtrain]
      [inst_1 : MeasurableSpace ฮฉaudit] (ฮผtrain : AuditCP.AuditSampleLaw ฮฉtrain) [MeasureTheory.IsProbabilityMeasure ฮผtrain]
      (ฮผaudit : AuditCP.AuditSampleLaw ฮฉaudit) [MeasureTheory.IsProbabilityMeasure ฮผaudit]
      (F : ฮฉtrain โ†’ AuditCP.AuditEnvelope ฮน) (g : ฮฉtrain โ†’ AuditCP.AuditTrajectory ฮน)
      (Ehat : ฮฉaudit โ†’ AuditCP.AuditPotential ฮน) (E : AuditCP.AuditPotential ฮน) (ฮ” : โ„) (ฮด : ENNReal),
      (โˆ€ (t : ฮฉtrain), AuditCP.Admissible (g t) (F t)) โ†’
        MeasurableSet {p | ยฌAuditCP.UniformDev (F p.1) (Ehat p.2) E ฮ”} โ†’
          (โˆ€แต (t : ฮฉtrain) โˆ‚ฮผtrain, ฮผaudit {a | ยฌAuditCP.UniformDev (F t) (Ehat a) E ฮ”} โ‰ค ฮด) โ†’
            โˆ€ (T : โ„•),
              (MeasureTheory.Measure.prod ฮผtrain ฮผaudit)
                  {p | AuditCP.cumCP (Ehat p.2) (g p.1) T > AuditCP.cumCP E (g p.1) T + 2 * ฮ”} โ‰ค
                ฮด
    Uses
    Used by
  6. DeclAuditCP.finite_audit_goodhartDeclaration kindtheorem

    Under UniformDev F Ehat E ฮ” and Admissible g F, empirical cumulative compression progress is bounded by true cumulative progress plus 2ฮ” at every horizon T: cumCP Ehat g T โ‰ค cumCP E g T + 2ฮ”.

    โˆ€ {ฮน : Type u_1} {F : AuditCP.AuditEnvelope ฮน} {Ehat E : AuditCP.AuditPotential ฮน} {ฮ” : โ„},
      AuditCP.UniformDev F Ehat E ฮ” โ†’
        โˆ€ {g : AuditCP.AuditTrajectory ฮน},
          AuditCP.Admissible g F โ†’ โˆ€ (T : โ„•), AuditCP.cumCP Ehat g T โ‰ค AuditCP.cumCP E g T + 2 * ฮ”
    Uses
    Used by
  7. DeclAuditCP.cumCP_telescopeDeclaration kindtheorem

    Cumulative signed compression progress telescopes: cumCP E g T = E (g 0) - E (g T).

    โˆ€ {ฮน : Type u_1} (E : AuditCP.AuditPotential ฮน) (g : AuditCP.AuditTrajectory ฮน) (T : โ„•),
      AuditCP.cumCP E g T = E (g 0) - E (g T)
    Used by
  8. DeclAuditCP.auditBlind_randomClass_badEvent_leDeclaration kindtheorem

    If the event {p | Bad (ฮ“ p.1) p.2} is measurable and its audit fiber {a | Bad (ฮ“ t) a} has ฮผaudit-probability at most ฮด for ฮผtrain-almost every training history t, then its probability under the product law ฮผtrain.prod ฮผaudit is at most ฮด.

    โˆ€ {ฮฉtrain : Type u_1} {ฮฉaudit : Type u_2} {ฮน : Type u_3} [inst : MeasurableSpace ฮฉtrain]
      [inst_1 : MeasurableSpace ฮฉaudit] (ฮผtrain : AuditCP.AuditSampleLaw ฮฉtrain) [MeasureTheory.IsProbabilityMeasure ฮผtrain]
      (ฮผaudit : AuditCP.AuditSampleLaw ฮฉaudit) [MeasureTheory.IsProbabilityMeasure ฮผaudit]
      (ฮ“ : ฮฉtrain โ†’ AuditCP.AuditEnvelope ฮน) (Bad : AuditCP.AuditEnvelope ฮน โ†’ ฮฉaudit โ†’ Prop) (ฮด : ENNReal),
      MeasurableSet {p | Bad (ฮ“ p.1) p.2} โ†’
        (โˆ€แต (t : ฮฉtrain) โˆ‚ฮผtrain, ฮผaudit {a | Bad (ฮ“ t) a} โ‰ค ฮด) โ†’
          (MeasureTheory.Measure.prod ฮผtrain ฮผaudit) {p | Bad (ฮ“ p.1) p.2} โ‰ค ฮด
    Used by
  9. Hypothesishn
    0 < n
  10. Hypothesishab
    a < b
  11. Hypothesishฮด0
    0 < ฮด
  12. Hypothesishฮด1
    ฮด โ‰ค 1
  13. Hypothesishmeas
    โˆ€ (i : ฮน), Measurable (loss i)
  14. Hypothesishbdd
    โˆ€ (i : ฮน), โˆ€แต (z : Z) โˆ‚Q, loss i z โˆˆ Set.Icc a b
  15. Hypothesishadm
    โˆ€ (t : ฮฉtrain), AuditCP.Admissible (g t) (F t)
  16. HypothesishBad
    MeasurableSet
      {p |
        ยฌAuditCP.UniformDev (F p.1) (fun i => AuditCP.empiricalLoss loss i p.2) (fun i => AuditCP.populationLoss Q loss i)
            (AuditCP.deltaFiniteExperts (Fintype.card ฮน) n (b - a) ฮด)}
  17. DefinitionAuditCP.Admissibledef

    Every stage of the trajectory g lies in the envelope F.

    {ฮน : Type u_1} โ†’ AuditCP.AuditTrajectory ฮน โ†’ AuditCP.AuditEnvelope ฮน โ†’ Prop
  18. DefinitionAuditCP.AuditEnvelopedef

    B4 โ€” AuditEnvelope ฮน is the type of subsets Set ฮน of the index ฮน.

    AuditCP.AuditIndex โ†’ Type u
  19. DefinitionAuditCP.AuditPotentialdef

    B2 โ€” AuditPotential ฮน is the type of real-valued readings ฮน โ†’ โ„ of the index ฮน.

    AuditCP.AuditIndex โ†’ Type u
  20. DefinitionAuditCP.AuditSampleLawdef

    B7 โ€” AuditSampleLaw ฮฉ is MeasureTheory.Measure ฮฉ, a ฯƒ-additive probability law on the measurable space ฮฉ.

    (ฮฉ : AuditCP.AuditIndex) โ†’ [MeasurableSpace ฮฉ] โ†’ Type u
  21. DefinitionAuditCP.AuditTrajectorydef

    B3 โ€” AuditTrajectory ฮน is the type of stage-indexed selections โ„• โ†’ ฮน of the index ฮน.

    AuditCP.AuditIndex โ†’ Type u
  22. DefinitionAuditCP.UniformDevdef

    The potentials Ehat and E agree to within ฮ” at every point of the envelope F.

    {ฮน : Type u_1} โ†’ AuditCP.AuditEnvelope ฮน โ†’ AuditCP.AuditPotential ฮน โ†’ AuditCP.AuditPotential ฮน โ†’ โ„ โ†’ Prop
  23. DefinitionAuditCP.cumCPdef

    Cumulative signed compression progress of a potential E read along a trajectory g over T stages, โˆ‘_{t < T} (E(g t) โˆ’ E(g(t+1))) (schmidhuber1991; schmidhuber2010).

    {ฮน : Type u_1} โ†’ AuditCP.AuditPotential ฮน โ†’ AuditCP.AuditTrajectory ฮน โ†’ โ„• โ†’ โ„
  24. DefinitionAuditCP.deltaFiniteExpertsdef

    The finite-experts uniform-deviation radius, Lยทโˆš(log(2N/ฮด)/(2n)), for N candidates, panel size n, loss range L, and failure probability ฮด (hoeffding1963).

    โ„• โ†’ โ„• โ†’ โ„ โ†’ โ„ โ†’ โ„
  25. DefinitionAuditCP.empiricalLossdef

    The empirical mean loss of candidate i on the panel, (โˆ‘โฑผ loss i (panel j)) / n.

    {Z : Type u_1} โ†’ {ฮน : Type u_2} โ†’ {n : โ„•} โ†’ (ฮน โ†’ Z โ†’ โ„) โ†’ ฮน โ†’ (Fin n โ†’ Z) โ†’ โ„
  26. DefinitionAuditCP.populationLossdef

    The population loss of candidate i under the law Q, โˆซ loss i z โˆ‚Q.

    {Z : Type u_1} โ†’ {ฮน : Type u_2} โ†’ [inst : MeasurableSpace Z] โ†’ AuditCP.AuditSampleLaw Z โ†’ (ฮน โ†’ Z โ†’ โ„) โ†’ ฮน โ†’ โ„

F2 โ€” given A nonempty, BlackwellEquivalent (learnerExperiment K) publicOnlyExperiment โ†” AuditSealed K (blackwell1953).

DeclAuditCP.blackwellEquivalent_publicOnly_iff_auditSealed
โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} [Nonempty A] (K : AuditCP.AuditChannel S A Y),
  AuditCP.BlackwellEquivalent (AuditCP.learnerExperiment K) AuditCP.publicOnlyExperiment โ†” AuditCP.AuditSealed K
Layout
ThesisStepDefinition
blackwellEquivalent_publiโ€ฆtheorempublicOnly_blackwellBelowโ€ฆtheoremlearner_blackwellBelow_puโ€ฆtheorempmf_map_publicTag_injectiโ€ฆtheoremauditSealed_iff_factorsThโ€ฆtheoremAuditChanneldefAuditExperimentdefAuditSealeddefBlackwellBelowdefBlackwellEquivalentdefFactorsThroughPublicdeflearnerExperimentdefpublicOnlyExperimentdef
  1. DeclAuditCP.blackwellEquivalent_publicOnly_iff_auditSealedDeclaration kindtheorem
    โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} [Nonempty A] (K : AuditCP.AuditChannel S A Y),
      AuditCP.BlackwellEquivalent (AuditCP.learnerExperiment K) AuditCP.publicOnlyExperiment โ†” AuditCP.AuditSealed K
    Uses
  2. DeclAuditCP.publicOnly_blackwellBelow_learnerDeclaration kindtheorem

    F2a โ€” public information is Blackwell-below the complete learner view: BlackwellBelow publicOnlyExperiment (learnerExperiment K).

    โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} (K : AuditCP.AuditChannel S A Y),
      AuditCP.BlackwellBelow AuditCP.publicOnlyExperiment (AuditCP.learnerExperiment K)
    Used by
  3. DeclAuditCP.learner_blackwellBelow_publicOnly_iff_auditSealedDeclaration kindtheorem

    F2b โ€” given A nonempty, BlackwellBelow (learnerExperiment K) publicOnlyExperiment โ†” AuditSealed K (blackwell1953).

    โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} [Nonempty A] (K : AuditCP.AuditChannel S A Y),
      AuditCP.BlackwellBelow (AuditCP.learnerExperiment K) AuditCP.publicOnlyExperiment โ†” AuditCP.AuditSealed K
    Uses
    Used by
  4. DeclAuditCP.pmf_map_publicTag_injectiveDeclaration kindtheorem

    Pushing a PMF on Y through the tag y โ†ฆ (s, y) is injective.

    โˆ€ {S : Type uS} {Y : Type uY} (s : S), Function.Injective fun p => PMF.map (fun y => (s, y)) p
    Used by
  5. DeclAuditCP.auditSealed_iff_factorsThroughPublicDeclaration kindtheorem

    F1 โ€” given A nonempty, AuditSealed K โ†” FactorsThroughPublic K.

    โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} [Nonempty A] (K : AuditCP.AuditChannel S A Y),
      AuditCP.AuditSealed K โ†” AuditCP.FactorsThroughPublic K
    Used by
  6. DefinitionAuditCP.AuditChanneldef

    B6 โ€” AuditChannel S A Y is AuditExperiment (S ร— A) Y, an experiment whose parameter is split into a public coordinate S and an audit coordinate A.

    AuditCP.AuditIndex โ†’ AuditCP.AuditIndex โ†’ AuditCP.AuditIndex โ†’ Type (max u v w)
  7. DefinitionAuditCP.AuditExperimentdef

    B5 โ€” AuditExperiment ฮ˜ X is the type of parameter-indexed discrete observation laws ฮ˜ โ†’ PMF X.

    AuditCP.AuditIndex โ†’ AuditCP.AuditIndex โ†’ Type (max u v)
  8. DefinitionAuditCP.AuditSealeddef

    The channel K is audit-sealed: its output law at fixed public state s does not depend on the audit state a.

    {S : Type uS} โ†’ {A : Type uA} โ†’ {Y : Type uY} โ†’ AuditCP.AuditChannel S A Y โ†’ Prop
  9. DefinitionAuditCP.BlackwellBelowdef

    Eโ‚€ is Blackwell-below Eโ‚ when some garbling G of Eโ‚'s output reproduces Eโ‚€: โˆƒ G, โˆ€ ฮธ, Eโ‚€ ฮธ = (Eโ‚ ฮธ).bind G (blackwell1953).

    {ฮ˜ : Type uฮ˜} โ†’ {Xโ‚€ : Type uXโ‚€} โ†’ {Xโ‚ : Type uXโ‚} โ†’ AuditCP.AuditExperiment ฮ˜ Xโ‚€ โ†’ AuditCP.AuditExperiment ฮ˜ Xโ‚ โ†’ Prop
  10. DefinitionAuditCP.BlackwellEquivalentdef

    Eโ‚€ and Eโ‚ are Blackwell-equivalent when each is Blackwell-below the other (blackwell1953).

    {ฮ˜ : Type uฮ˜} โ†’ {Xโ‚€ : Type uXโ‚€} โ†’ {Xโ‚ : Type uXโ‚} โ†’ AuditCP.AuditExperiment ฮ˜ Xโ‚€ โ†’ AuditCP.AuditExperiment ฮ˜ Xโ‚ โ†’ Prop
  11. DefinitionAuditCP.FactorsThroughPublicdef

    The channel K factors through the public coordinate: โˆƒ H, โˆ€ s a, K (s, a) = H s.

    {S : Type uS} โ†’ {A : Type uA} โ†’ {Y : Type uY} โ†’ AuditCP.AuditChannel S A Y โ†’ Prop
  12. DefinitionAuditCP.learnerExperimentdef

    The channel revealing the public state together with K's output, fun sa => (K sa).map (fun y => (sa.1, y)).

    {S : Type uS} โ†’ {A : Type uA} โ†’ {Y : Type uY} โ†’ AuditCP.AuditChannel S A Y โ†’ AuditCP.AuditChannel S A (S ร— Y)
  13. DefinitionAuditCP.publicOnlyExperimentdef

    The channel revealing exactly the public state s and nothing else, fun (s, a) => PMF.pure s.

    {S : Type uS} โ†’ {A : Type uA} โ†’ AuditCP.AuditChannel S A S

F3 โ€” AuditSealed K โ†” โˆ€ s a a', equalPriorBayesError (K (s, a)) (K (s, a')) = 1/2.

DeclAuditCP.auditSealed_iff_no_binary_decision_advantage
โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} [inst : Fintype Y] (K : AuditCP.AuditChannel S A Y),
  AuditCP.AuditSealed K โ†” โˆ€ (s : S) (a a' : A), AuditCP.equalPriorBayesError (K (s, a)) (K (s, a')) = 1 / 2
Layout
ThesisStepDefinition
auditSealed_iff_no_binaryโ€ฆtheoremequalPriorBayesError_eq_hโ€ฆtheoremfiniteTotalVariation_eq_zโ€ฆtheoremequalPriorBayesError_eq_hโ€ฆtheoremsum_pmfMass_eq_onetheoremmin_eq_add_sub_abs_div_twotheoremAuditChanneldefAuditSealeddefequalPriorBayesErrordeffiniteTotalVariationdefpmfMassdef
  1. DeclAuditCP.auditSealed_iff_no_binary_decision_advantageDeclaration kindtheorem
    โˆ€ {S : Type uS} {A : Type uA} {Y : Type uY} [inst : Fintype Y] (K : AuditCP.AuditChannel S A Y),
      AuditCP.AuditSealed K โ†” โˆ€ (s : S) (a a' : A), AuditCP.equalPriorBayesError (K (s, a)) (K (s, a')) = 1 / 2
    Uses
  2. DeclAuditCP.equalPriorBayesError_eq_half_iffDeclaration kindtheorem

    F3b โ€” equalPriorBayesError p q = 1/2 โ†” p = q.

    โˆ€ {Y : Type uY} [inst : Fintype Y] (p q : PMF Y), AuditCP.equalPriorBayesError p q = 1 / 2 โ†” p = q
    Uses
    Used by
  3. DeclAuditCP.finiteTotalVariation_eq_zero_iffDeclaration kindtheorem

    finiteTotalVariation p q = 0 โ†” p = q.

    โˆ€ {Y : Type uY} [inst : Fintype Y] (p q : PMF Y), AuditCP.finiteTotalVariation p q = 0 โ†” p = q
    Used by
  4. DeclAuditCP.equalPriorBayesError_eq_half_one_sub_tvDeclaration kindtheorem

    F3a โ€” equalPriorBayesError p q = (1 - finiteTotalVariation p q) / 2.

    โˆ€ {Y : Type uY} [inst : Fintype Y] (p q : PMF Y),
      AuditCP.equalPriorBayesError p q = (1 - AuditCP.finiteTotalVariation p q) / 2
    Uses
    Used by
  5. DeclAuditCP.sum_pmfMass_eq_oneDeclaration kindtheorem

    On a finite type, the real point masses of p sum to 1.

    โˆ€ {Y : Type uY} [inst : Fintype Y] (p : PMF Y), โˆ‘ y, AuditCP.pmfMass p y = 1
    Used by
  6. DeclAuditCP.min_eq_add_sub_abs_div_twoDeclaration kindtheorem

    min x y = (x + y - |x - y|) / 2.

    โˆ€ (x y : โ„), min x y = (x + y - |x - y|) / 2
    Used by
  7. DefinitionAuditCP.AuditChanneldef

    B6 โ€” AuditChannel S A Y is AuditExperiment (S ร— A) Y, an experiment whose parameter is split into a public coordinate S and an audit coordinate A.

    AuditCP.AuditIndex โ†’ AuditCP.AuditIndex โ†’ AuditCP.AuditIndex โ†’ Type (max u v w)
  8. DefinitionAuditCP.AuditSealeddef

    The channel K is audit-sealed: its output law at fixed public state s does not depend on the audit state a.

    {S : Type uS} โ†’ {A : Type uA} โ†’ {Y : Type uY} โ†’ AuditCP.AuditChannel S A Y โ†’ Prop
  9. DefinitionAuditCP.equalPriorBayesErrordef

    The equal-prior Bayes error between p and q, (1/2) * โˆ‘ y, min (pmfMass p y) (pmfMass q y).

    {Y : Type uY} โ†’ [Fintype Y] โ†’ PMF Y โ†’ PMF Y โ†’ โ„
  10. DefinitionAuditCP.finiteTotalVariationdef

    The total variation distance between p and q, half the โ„“ยน distance of their point masses, (1/2) * โˆ‘ y, |pmfMass p y - pmfMass q y|.

    {Y : Type uY} โ†’ [Fintype Y] โ†’ PMF Y โ†’ PMF Y โ†’ โ„
  11. DefinitionAuditCP.pmfMassdef

    The real-valued point mass of y under the Mathlib PMF p, (p y).toReal.

    {Y : Type uY} โ†’ PMF Y โ†’ Y โ†’ โ„

Choquet capacitability. For analytic sets, capacity equals the supremum over compact subsets (Kechris 30.13).

DeclMeasureTheory.AnalyticSet.cap_eq_iSup_isCompact
โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
  {cap : Set ฮฑ โ†’ ENNReal},
  MeasureTheory.IsChoquetCapacity cap โ†’
    โˆ€ {s : Set ฮฑ}, MeasureTheory.AnalyticSet s โ†’ cap s = โจ† K, โจ† (_ : IsCompact K), โจ† (_ : K โІ s), cap K
Layout
ThesisStepHypothesisDefinition
cap_eq_iSup_isCompacttheoremMeasureTheory.IsChoquetCaโ€ฆhcapMeasureTheory.AnalyticSetโ€ฆhsmonotone_cyl_splittheoremiInter_closure_image_cyl_โ€ฆtheoremtruncate_mem_bndtheoremtruncate_agree_on_cyltheoremisCompact_bndtheorembnd_subset_cyltheoremcyl_succ_eqtheoremcyl_inter_eq_cyl_updatetheoremcyl_exttheoremmonotheoremiUnion_nattheoremiInter_closedtheoremBnddefCyldefIsChoquetCapacitystructurechoquetTruncatedef
  1. DeclMeasureTheory.AnalyticSet.cap_eq_iSup_isCompactDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [inst_1 : MeasurableSpace ฮฑ] [BorelSpace ฮฑ] [PolishSpace ฮฑ]
      {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’
        โˆ€ {s : Set ฮฑ}, MeasureTheory.AnalyticSet s โ†’ cap s = โจ† K, โจ† (_ : IsCompact K), โจ† (_ : K โІ s), cap K
    Uses
  2. Declmonotone_cyl_splitDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), Monotone fun k => Cyl N n โˆฉ {g | g (n + 1) โ‰ค k}
    Used by
  3. DecliInter_closure_image_cyl_eqDeclaration kindtheorem

    The intersection of closures of cylinder images equals the compact image. Key lemma for the capacitability proof: uses truncation and sequential compactness.

    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] [PolishSpace ฮฑ] {f : (โ„• โ†’ โ„•) โ†’ ฮฑ},
      Continuous f โ†’ โˆ€ (N : โ„• โ†’ โ„•), โ‹‚ n, closure (f '' Cyl N n) = f '' Bnd N
    Uses
    Used by
  4. Decltruncate_mem_bndDeclaration kindtheorem
    โˆ€ (N g : โ„• โ†’ โ„•), choquetTruncate N g โˆˆ Bnd N
    Used by
  5. Decltruncate_agree_on_cylDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), โˆ€ g โˆˆ Cyl N n, โˆ€ i โ‰ค n, choquetTruncate N g i = g i
    Used by
  6. DeclisCompact_bndDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•), IsCompact (Bnd N)
    Used by
  7. Declbnd_subset_cylDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), Bnd N โІ Cyl N n
    Used by
  8. Declcyl_succ_eqDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n : โ„•), Cyl N n = โ‹ƒ k, Cyl N n โˆฉ {g | g (n + 1) โ‰ค k}
    Used by
  9. Declcyl_inter_eq_cyl_updateDeclaration kindtheorem
    โˆ€ (N : โ„• โ†’ โ„•) (n k : โ„•), Cyl N n โˆฉ {g | g (n + 1) โ‰ค k} = Cyl (Function.update N (n + 1) k) (n + 1)
    Used by
  10. Declcyl_extDeclaration kindtheorem
    โˆ€ (N N' : โ„• โ†’ โ„•) (n : โ„•), (โˆ€ i โ‰ค n, N i = N' i) โ†’ Cyl N n = Cyl N' n
    Used by
  11. DeclMeasureTheory.IsChoquetCapacity.monoDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’ โˆ€ {s t : Set ฮฑ}, s โІ t โ†’ cap s โ‰ค cap t
    Used by
  12. DeclMeasureTheory.IsChoquetCapacity.iUnion_natDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’ โˆ€ (f : โ„• โ†’ Set ฮฑ), Monotone f โ†’ cap (โ‹ƒ n, f n) = โจ† n, cap (f n)
    Used by
  13. DeclMeasureTheory.IsChoquetCapacity.iInter_closedDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : TopologicalSpace ฮฑ] {cap : Set ฮฑ โ†’ ENNReal},
      MeasureTheory.IsChoquetCapacity cap โ†’
        โˆ€ (f : โ„• โ†’ Set ฮฑ), Antitone f โ†’ (โˆ€ (n : โ„•), IsClosed (f n)) โ†’ cap (โ‹‚ n, f n) = โจ… n, cap (f n)
    Used by
  14. Hypothesishcap
    MeasureTheory.IsChoquetCapacity cap
  15. Hypothesishs
    MeasureTheory.AnalyticSet s
  16. DefinitionBnddef

    Bounded functions set: {g : โ„• โ†’ โ„• | โˆ€ i, g i โ‰ค N i}.

    (โ„• โ†’ โ„•) โ†’ Set (โ„• โ†’ โ„•)
  17. DefinitionCyldef

    Cylinder set: {g : โ„• โ†’ โ„• | โˆ€ i โ‰ค n, g i โ‰ค N i}.

    (โ„• โ†’ โ„•) โ†’ โ„• โ†’ Set (โ„• โ†’ โ„•)
  18. DefinitionMeasureTheory.IsChoquetCapacitystructure

    Bundled record of the three Choquet capacity axioms: monotonicity, sequential continuity from below along increasing unions, and sequential continuity from above along decreasing intersections of closed sets. The third axiom distinguishes a capacity from a general outer measure.

    {ฮฑ : Type u_1} โ†’ [TopologicalSpace ฮฑ] โ†’ (Set ฮฑ โ†’ ENNReal) โ†’ Prop
  19. DefinitionchoquetTruncatedef

    Truncation: replace g i by min (g i) (N i) to bring any g into the bounded set.

    (โ„• โ†’ โ„•) โ†’ (โ„• โ†’ โ„•) โ†’ โ„• โ†’ โ„•

The discrete Vorob'ev theorem: a cover's base structure is acyclic exactly when local pairwise consistency always forces a global structure, i.e. every pairwise-consistent family of nonempty local relations on it glues.

DeclHiddenChannelCapacity.acyclic_iff_forall_consistent_glues
โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] (๐’ž : Finset (Finset ฮน)),
  HiddenChannelCapacity.Acyclic ๐’ž โ†”
    โˆ€ (fam : List (HiddenChannelCapacity.LocalStruct ฮน fun x => ZMod 2)),
      List.map (fun x => x.team) fam = ๐’ž.toList โ†’
        HiddenChannelCapacity.Consistent fam โ†’ (โˆ€ L โˆˆ fam, L.rel.Nonempty) โ†’ HiddenChannelCapacity.Glues fam
Layout
ThesisStepDefinition
acyclic_iff_forall_consisโ€ฆtheoremglues_of_acyclictheoremrip_iff_ripCovertheoremfamCover_eq_listCovertheoremglues_of_riptheoremprojS_joinFamtheoremteam_subset_famCovertheoremprojS_image_restrictโ‚‚theoremmem_joinFamtheoremexists_restrict_eqtheoremimarg_imagetheoremglues_of_permtheoremexists_perm_map_eqtheoremconsistent_of_permtheoremexists_consistent_not_gluโ€ฆtheoremearFree_dichotomytheoremshared_nonempty_of_earFreetheoremisEarOf_of_simplicialtheorembndry_eq_inter_sharedtheoremmem_sharedtheoremdirac_strongtheoremsep_clique_steptheoremno_chord_of_minimaltheoremgetLast_getElemtheoremreachOn_transtheoremreachOn_symmtheoremreachOn_refltheoremreachOn_of_mem_walktheoremreachOn_extendtheoremexists_min_paththeoremexists_connectortheoremerase_separatestheoremreachOn_of_walktheoremisChain_droptheoremisChain_taketheoremhead_getElemtheoremgcast_listtheoremsymm'theoremcapstone_of_dichotomytheoremexists_earFree_core_chaintheoremclean_system_of_uncoveredโ€ฆtheoremxorSum_eq_empty_ifftheoremmem_xorSumtheoremerase_union_erasetheoremcovered_of_card_le_twotheoremmem_coverUtheoremclean_system_of_chordlessโ€ฆtheoremxorSumL_cyclePairstheoremxorSumL_zipWith_symmDifftheoremxorSumL_permtheorempair_eq_symmDifftheoremgetElem_ne_nexttheoremnodup_cyclePairstheoremcyclePairs_ne_emptytheoremclean_of_chordlessCycletheoremmod_succ_casestheoremgetElem_cyclePairstheoremlength_cyclePairstheoremadj_or_eq_of_cohostedtheoremcapstone_of_coretheoremclean_system_obstructiontheoremaffine_obstructiontheoremnot_glues_affFamtheoremparityOn_xorSumtheoremconsistent_affFamtheoremimarg_affLocaltheoremwsum_restrictโ‚‚theoremsysCoherent_pinnedtheoremxorSum_subsettheoremxorSumL_singletonstheoremxorSumL_appendtheoremxorSumL_niltheoremmap_snd_pintheoremmap_fst_pintheoremaffLocal_nonemptytheoremwsum_restricttheoremsysCoherent_hostedListtheoremxorSumL_eq_xorSumtheoremmap_snd_pairtheoremmap_fst_pairtheoremmem_affLocal_reltheoremexists_parity_solutiontheoremxorSumL_constheoremtransform_bookkeepingtheoremsymmDiff_emptytheoremparityOn_symmDifftheoremzmod2_add_selftheoremacyclic_iff_grahamReducibโ€ฆtheoremgrahamN_of_ripCovertheoremexists_ripCover_of_grahamNtheoremlistCover_eq_coverUtheoremAcyclicdefAdjdefClosedAtdefCoherentAtdefConformaldefConsistentdefCovereddefEarFreedefGluesdefGrahamNdefGrahamReducibledefIsChordlessCycledefIsCliquedefIsEarOfdefIsWalkOndefLocalStructstructureimargdefreldefteamdefRIPdefRIPCoverdefReachOndefSimpIndefSysCoherentdefaffFamdefaffLocaldefcoverUdefcyclePairsdefdecidableAcyclicdefdecidableIsEarOfdeffamCoverdefhostedListdefinstDecidableAdjdefinstDecidableCovereddefinstDecidableIsCliquedefjoinFamdeflistCoverdefparityOndefprojSdefshareddefwsumdefxorSumdefxorSumLdef
  1. DeclHiddenChannelCapacity.acyclic_iff_forall_consistent_gluesDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] (๐’ž : Finset (Finset ฮน)),
      HiddenChannelCapacity.Acyclic ๐’ž โ†”
        โˆ€ (fam : List (HiddenChannelCapacity.LocalStruct ฮน fun x => ZMod 2)),
          List.map (fun x => x.team) fam = ๐’ž.toList โ†’
            HiddenChannelCapacity.Consistent fam โ†’ (โˆ€ L โˆˆ fam, L.rel.Nonempty) โ†’ HiddenChannelCapacity.Glues fam
    Uses
  2. DeclHiddenChannelCapacity.glues_of_acyclicDeclaration kindtheorem

    The order-free amalgamation theorem: an acyclic cover forces every pairwise-consistent family with duplicate-free teams to glue. The base structure, acyclicity, is decidable, so the sufficiency is machine-checkable.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} [inst_1 : (i : ฮน) โ†’ DecidableEq (X i)] [inst_2 : Fintype ฮน]
      [(i : ฮน) โ†’ Fintype (X i)] [โˆ€ (i : ฮน), Nonempty (X i)] (fam : List (HiddenChannelCapacity.LocalStruct ฮน X)),
      HiddenChannelCapacity.Consistent fam โ†’
        (List.map (fun x => x.team) fam).Nodup โ†’
          HiddenChannelCapacity.Acyclic (List.map (fun x => x.team) fam).toFinset โ†’ HiddenChannelCapacity.Glues fam
    Uses
    Used by
  3. DeclHiddenChannelCapacity.rip_iff_ripCoverDeclaration kindtheorem

    The family-level running intersection property reads only the teams.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} (fam : List (HiddenChannelCapacity.LocalStruct ฮน X)),
      HiddenChannelCapacity.RIP fam โ†” HiddenChannelCapacity.RIPCover (List.map (fun x => x.team) fam)
    Uses
    Used by
  4. DeclHiddenChannelCapacity.famCover_eq_listCoverDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {X : ฮน โ†’ Type u_2} [inst : DecidableEq ฮน] (fam : List (HiddenChannelCapacity.LocalStruct ฮน X)),
      HiddenChannelCapacity.famCover fam = HiddenChannelCapacity.listCover (List.map (fun x => x.team) fam)
    Used by
  5. DeclHiddenChannelCapacity.glues_of_ripDeclaration kindtheorem

    The amalgamation leg: over a running-intersection cover, a pairwise-consistent family glues: the base geometry forces the global structure.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} [inst_1 : (i : ฮน) โ†’ DecidableEq (X i)] [inst_2 : Fintype ฮน]
      [(i : ฮน) โ†’ Fintype (X i)] [โˆ€ (i : ฮน), Nonempty (X i)] (fam : List (HiddenChannelCapacity.LocalStruct ฮน X)),
      HiddenChannelCapacity.RIP fam โ†’ HiddenChannelCapacity.Consistent fam โ†’ HiddenChannelCapacity.Glues fam
    Uses
    Used by
  6. DeclHiddenChannelCapacity.projS_joinFamDeclaration kindtheorem

    The amalgamation theorem (positive Vorob'ev, certificate form): once the cover carries the running intersection property, the natural join of any pairwise-consistent family realizes every member exactly, so the base geometry licenses the global structure.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} [inst_1 : (i : ฮน) โ†’ DecidableEq (X i)] [inst_2 : Fintype ฮน]
      [inst_3 : (i : ฮน) โ†’ Fintype (X i)] [โˆ€ (i : ฮน), Nonempty (X i)] (fam : List (HiddenChannelCapacity.LocalStruct ฮน X)),
      HiddenChannelCapacity.RIP fam โ†’
        HiddenChannelCapacity.Consistent fam โ†’
          โˆ€ L โˆˆ fam, HiddenChannelCapacity.projS (HiddenChannelCapacity.joinFam fam) L.team = L.rel
    Uses
    Used by
  7. DeclHiddenChannelCapacity.team_subset_famCoverDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} {fam : List (HiddenChannelCapacity.LocalStruct ฮน X)}
      {L : HiddenChannelCapacity.LocalStruct ฮน X}, L โˆˆ fam โ†’ L.team โІ HiddenChannelCapacity.famCover fam
    Used by
  8. DeclHiddenChannelCapacity.projS_image_restrictโ‚‚Declaration kindtheorem

    The presheaf law: the restriction map carries the T-marginal onto the S-marginal. This is the compatibility any ฤŒech-type complex over the marginal family consumes.

    โˆ€ {ฮน : Type u_1} {X : ฮน โ†’ Type u_2} [inst : (i : ฮน) โ†’ DecidableEq (X i)] (ฮบ : Finset ((i : ฮน) โ†’ X i)) {S T : Finset ฮน}
      (hST : S โІ T), Finset.image (Finset.restrictโ‚‚ hST) (HiddenChannelCapacity.projS ฮบ T) = HiddenChannelCapacity.projS ฮบ S
    Used by
  9. DeclHiddenChannelCapacity.mem_joinFamDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} [inst_1 : (i : ฮน) โ†’ DecidableEq (X i)] [inst_2 : Fintype ฮน]
      [inst_3 : (i : ฮน) โ†’ Fintype (X i)] {fam : List (HiddenChannelCapacity.LocalStruct ฮน X)} {f : (i : ฮน) โ†’ X i},
      f โˆˆ HiddenChannelCapacity.joinFam fam โ†” โˆ€ L โˆˆ fam, L.team.restrict f โˆˆ L.rel
    Used by
  10. DeclHiddenChannelCapacity.exists_restrict_eqDeclaration kindtheorem

    Any local configuration extends to a global one, on nonempty parts.

    โˆ€ {ฮน : Type u_1} {X : ฮน โ†’ Type u_2} [โˆ€ (i : ฮน), Nonempty (X i)] (T : Finset ฮน) (g : (i : โ†ฅT) โ†’ X โ†‘i),
      โˆƒ f, T.restrict f = g
    Used by
  11. DeclHiddenChannelCapacity.LocalStruct.imarg_imageDeclaration kindtheorem

    Sub-marginalizing an interface marginal composes.

    โˆ€ {ฮน : Type u_1} {X : ฮน โ†’ Type u_2} [inst : (i : ฮน) โ†’ DecidableEq (X i)] (L : HiddenChannelCapacity.LocalStruct ฮน X)
      {S T : Finset ฮน} (hS : S โІ T) (hT : T โІ L.team), Finset.image (Finset.restrictโ‚‚ hS) (L.imarg hT) = L.imarg โ‹ฏ
    Used by
  12. DeclHiddenChannelCapacity.glues_of_permDeclaration kindtheorem

    Gluing is permutation-invariant.

    โˆ€ {ฮน : Type u_1} {X : ฮน โ†’ Type u_2} [inst : (i : ฮน) โ†’ DecidableEq (X i)] [inst_1 : Fintype ฮน] [(i : ฮน) โ†’ Fintype (X i)]
      {fam fam' : List (HiddenChannelCapacity.LocalStruct ฮน X)},
      fam'.Perm fam โ†’ HiddenChannelCapacity.Glues fam' โ†’ HiddenChannelCapacity.Glues fam
    Used by
  13. DeclHiddenChannelCapacity.exists_perm_map_eqDeclaration kindtheorem

    A permutation of a mapped list lifts along the map.

    โˆ€ {ฮฑ : Type u_3} {ฮฒ : Type u_4} {g : ฮฑ โ†’ ฮฒ} {ฯƒ : List ฮฒ} {l : List ฮฑ},
      ฯƒ.Perm (List.map g l) โ†’ โˆƒ l', l'.Perm l โˆง List.map g l' = ฯƒ
    Used by
  14. DeclHiddenChannelCapacity.consistent_of_permDeclaration kindtheorem

    Pairwise consistency is permutation-invariant.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {X : ฮน โ†’ Type u_2} [inst_1 : (i : ฮน) โ†’ DecidableEq (X i)]
      {fam fam' : List (HiddenChannelCapacity.LocalStruct ฮน X)},
      fam'.Perm fam โ†’ HiddenChannelCapacity.Consistent fam โ†’ HiddenChannelCapacity.Consistent fam'
    Used by
  15. DeclHiddenChannelCapacity.exists_consistent_not_glues_of_not_acyclicDeclaration kindtheorem

    The CAPSTONE: a non-acyclic cover hosts a pairwise-consistent family of nonempty local relations that no global structure realizes: the base structure carries what local consistency cannot.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] (๐’ž : Finset (Finset ฮน)),
      ยฌHiddenChannelCapacity.Acyclic ๐’ž โ†’
        โˆƒ fam,
          List.map (fun x => x.team) fam = ๐’ž.toList โˆง
            HiddenChannelCapacity.Consistent fam โˆง (โˆ€ L โˆˆ fam, L.rel.Nonempty) โˆง ยฌHiddenChannelCapacity.Glues fam
    Uses
    Used by
  16. DeclHiddenChannelCapacity.earFree_dichotomyDeclaration kindtheorem

    The ear-free dichotomy: an ear-free cover is non-conformal or contains a chordless cycle. Dirac's lemma on the shared vertices produces a simplicial shared vertex, and the one-step GYO collapse turns it into an ear.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
      HiddenChannelCapacity.EarFree ๐’ž โ†’ ยฌHiddenChannelCapacity.Conformal ๐’ž โˆจ โˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l
    Uses
    Used by
  17. DeclHiddenChannelCapacity.shared_nonempty_of_earFreeDeclaration kindtheorem

    An ear-free cover has a shared vertex: every team has nonempty boundary.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)},
      HiddenChannelCapacity.EarFree ๐’ž โ†’ (HiddenChannelCapacity.shared ๐’ž).Nonempty
    Uses
    Used by
  18. DeclHiddenChannelCapacity.isEarOf_of_simplicialDeclaration kindtheorem

    The one-step GYO collapse: in a conformal cover, a simplicial shared vertex yields an ear โ€” every team containing it has boundary inside the team covering its closed shared neighborhood.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)},
      HiddenChannelCapacity.Conformal ๐’ž โ†’
        โˆ€ {v : ฮน},
          v โˆˆ HiddenChannelCapacity.shared ๐’ž โ†’
            (โˆ€ x โˆˆ HiddenChannelCapacity.shared ๐’ž,
                โˆ€ y โˆˆ HiddenChannelCapacity.shared ๐’ž,
                  HiddenChannelCapacity.Adj ๐’ž v x โ†’
                    HiddenChannelCapacity.Adj ๐’ž v y โ†’ x โ‰  y โ†’ HiddenChannelCapacity.Adj ๐’ž x y) โ†’
              โˆƒ T โˆˆ ๐’ž, HiddenChannelCapacity.IsEarOf ๐’ž T
    Uses
    Used by
  19. DeclHiddenChannelCapacity.bndry_eq_inter_sharedDeclaration kindtheorem

    A team's boundary is its shared part.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {T : Finset ฮน},
      T โˆˆ ๐’ž โ†’ T โˆฉ HiddenChannelCapacity.coverU (๐’ž.erase T) = T โˆฉ HiddenChannelCapacity.shared ๐’ž
    Uses
    Used by
  20. DeclHiddenChannelCapacity.mem_sharedDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {v : ฮน},
      v โˆˆ HiddenChannelCapacity.shared ๐’ž โ†” โˆƒ T โˆˆ ๐’ž, โˆƒ T' โˆˆ ๐’ž, T โ‰  T' โˆง v โˆˆ T โˆง v โˆˆ T'
    Uses
    Used by
  21. DeclHiddenChannelCapacity.dirac_strongDeclaration kindtheorem

    Dirac's lemma, strong form: in a chordless-cycle-free adjacency structure, every vertex set is a clique or contains two nonadjacent simplicial vertices.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
      (ยฌโˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l) โ†’
        โˆ€ (S : Finset ฮน),
          (โˆ€ x โˆˆ S, โˆ€ y โˆˆ S, x โ‰  y โ†’ HiddenChannelCapacity.Adj ๐’ž x y) โˆจ
            โˆƒ u w,
              HiddenChannelCapacity.SimpIn ๐’ž S u โˆง
                HiddenChannelCapacity.SimpIn ๐’ž S w โˆง u โ‰  w โˆง ยฌHiddenChannelCapacity.Adj ๐’ž u w
    Uses
    Used by
  22. DeclHiddenChannelCapacity.sep_clique_stepDeclaration kindtheorem

    The assembled-cycle contradiction: two length-minimal x-y connectors through disjoint, mutually non-adjacent sides cannot coexist with chordless-cycle-freeness when x and y are non-adjacent.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)},
      (ยฌโˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l) โ†’
        โˆ€ {QA QB : ฮน โ†’ Prop} {x y : ฮน},
          x โ‰  y โ†’
            ยฌHiddenChannelCapacity.Adj ๐’ž x y โ†’
              ยฌQB x โ†’
                ยฌQB y โ†’
                  (โˆ€ (v : ฮน), QA v โ†’ QB v โ†’ False) โ†’
                    (โˆ€ (u v : ฮน), QA u โ†’ QB v โ†’ ยฌHiddenChannelCapacity.Adj ๐’ž u v) โ†’
                      โˆ€ (pA : List ฮน),
                        List.IsChain (HiddenChannelCapacity.Adj ๐’ž) pA โ†’
                          pA.Nodup โ†’
                            pA.head? = some x โ†’
                              pA.getLast? = some y โ†’
                                (โˆ€ v โˆˆ pA, v = x โˆจ v = y โˆจ QA v) โ†’
                                  (โˆ€ (q : List ฮน),
                                      (List.IsChain (HiddenChannelCapacity.Adj ๐’ž) q โˆง
                                          q.Nodup โˆง
                                            q.head? = some x โˆง q.getLast? = some y โˆง โˆ€ v โˆˆ q, v = x โˆจ v = y โˆจ QA v) โ†’
                                        pA.length โ‰ค q.length) โ†’
                                    โˆ€ (pB : List ฮน),
                                      List.IsChain (HiddenChannelCapacity.Adj ๐’ž) pB โ†’
                                        pB.Nodup โ†’
                                          pB.head? = some x โ†’
                                            pB.getLast? = some y โ†’
                                              (โˆ€ v โˆˆ pB, v = x โˆจ v = y โˆจ QB v) โ†’
                                                (โˆ€ (q : List ฮน),
                                                    (List.IsChain (HiddenChannelCapacity.Adj ๐’ž) q โˆง
                                                        q.Nodup โˆง
                                                          q.head? = some x โˆง
                                                            q.getLast? = some y โˆง โˆ€ v โˆˆ q, v = x โˆจ v = y โˆจ QB v) โ†’
                                                      pB.length โ‰ค q.length) โ†’
                                                  False
    Uses
    Used by
  23. DeclHiddenChannelCapacity.no_chord_of_minimalDeclaration kindtheorem

    Minimality kills chords: a length-minimal constrained x-y path has no adjacency between positions at distance โ‰ฅ 2.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {Q : ฮน โ†’ Prop} {x y : ฮน} {p : List ฮน},
      List.IsChain (HiddenChannelCapacity.Adj ๐’ž) p โ†’
        p.head? = some x โ†’
          p.getLast? = some y โ†’
            (โˆ€ v โˆˆ p, v = x โˆจ v = y โˆจ Q v) โ†’
              (โˆ€ (q : List ฮน),
                  (List.IsChain (HiddenChannelCapacity.Adj ๐’ž) q โˆง
                      q.Nodup โˆง q.head? = some x โˆง q.getLast? = some y โˆง โˆ€ v โˆˆ q, v = x โˆจ v = y โˆจ Q v) โ†’
                    p.length โ‰ค q.length) โ†’
                p.Nodup โ†’
                  โˆ€ {i j : โ„•} (hi : i < p.length) (hj : j < p.length), i + 2 โ‰ค j โ†’ ยฌHiddenChannelCapacity.Adj ๐’ž p[i] p[j]
    Uses
    Used by
  24. DeclHiddenChannelCapacity.getLast_getElemDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {p : List ฮน} {y : ฮน}, p.getLast? = some y โ†’ โˆ€ (h0 : 0 < p.length), p[p.length - 1] = y
    Used by
  25. DeclHiddenChannelCapacity.reachOn_transDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v w : ฮน},
      HiddenChannelCapacity.ReachOn ๐’ž P u v โ†’ HiddenChannelCapacity.ReachOn ๐’ž P v w โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u w
    Uses
    Used by
  26. DeclHiddenChannelCapacity.reachOn_symmDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v : ฮน},
      HiddenChannelCapacity.ReachOn ๐’ž P u v โ†’ HiddenChannelCapacity.ReachOn ๐’ž P v u
    Uses
    Used by
  27. DeclHiddenChannelCapacity.reachOn_reflDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u : ฮน}, P u โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u u
    Used by
  28. DeclHiddenChannelCapacity.reachOn_of_mem_walkDeclaration kindtheorem

    Every vertex on a walk is reachable from its head.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v : ฮน} {p : List ฮน},
      HiddenChannelCapacity.IsWalkOn ๐’ž P p โ†’ p.head? = some u โ†’ v โˆˆ p โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u v
    Uses
    Used by
  29. DeclHiddenChannelCapacity.reachOn_extendDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v w : ฮน},
      HiddenChannelCapacity.ReachOn ๐’ž P u v โ†’ HiddenChannelCapacity.Adj ๐’ž v w โ†’ P w โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u w
    Uses
    Used by
  30. DeclHiddenChannelCapacity.exists_min_pathDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {Q : List ฮน โ†’ Prop}, (โˆƒ p, Q p) โ†’ โˆƒ p, Q p โˆง โˆ€ (q : List ฮน), Q q โ†’ p.length โ‰ค q.length
    Used by
  31. DeclHiddenChannelCapacity.exists_connectorDeclaration kindtheorem

    A connector: an x-y path with interior inside Q, from adjacent entry points and interior reachability.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {Q : ฮน โ†’ Prop} {x y uโ‚ uโ‚‚ : ฮน},
      x โ‰  y โ†’
        HiddenChannelCapacity.Adj ๐’ž x uโ‚ โ†’
          HiddenChannelCapacity.Adj ๐’ž y uโ‚‚ โ†’
            HiddenChannelCapacity.ReachOn ๐’ž Q uโ‚ uโ‚‚ โ†’
              ยฌQ x โ†’
                ยฌQ y โ†’
                  โˆƒ p,
                    List.IsChain (HiddenChannelCapacity.Adj ๐’ž) p โˆง
                      p.Nodup โˆง p.head? = some x โˆง p.getLast? = some y โˆง โˆ€ v โˆˆ p, v = x โˆจ v = y โˆจ Q v
    Uses
    Used by
  32. DeclHiddenChannelCapacity.erase_separatesDeclaration kindtheorem

    If x has no neighbor reachable from a off the separator, then erasing x still separates: the first x-occurrence on any violating path has its predecessor reachable from a and adjacent to x.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {S Sep : Finset ฮน} {a b x : ฮน},
      x โ‰  a โ†’
        (โˆ€ (u : ฮน),
            u โˆˆ S \ Sep โˆง HiddenChannelCapacity.ReachOn ๐’ž (fun v => v โˆˆ S \ Sep) a u โ†’ ยฌHiddenChannelCapacity.Adj ๐’ž x u) โ†’
          ยฌHiddenChannelCapacity.ReachOn ๐’ž (fun v => v โˆˆ S \ Sep) a b โ†’
            ยฌHiddenChannelCapacity.ReachOn ๐’ž (fun v => v โˆˆ S \ Sep.erase x) a b
    Uses
    Used by
  33. DeclHiddenChannelCapacity.reachOn_of_walkDeclaration kindtheorem

    Every chained walk contains a duplicate-free path with the same endpoints and vertices.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} (p : List ฮน),
      HiddenChannelCapacity.IsWalkOn ๐’ž P p โ†’
        โˆ€ {u v : ฮน}, p.head? = some u โ†’ p.getLast? = some v โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u v
    Uses
    Used by
  34. DeclHiddenChannelCapacity.isChain_dropDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {R : ฮน โ†’ ฮน โ†’ Prop} {p : List ฮน}, List.IsChain R p โ†’ โˆ€ (n : โ„•), List.IsChain R (List.drop n p)
    Used by
  35. DeclHiddenChannelCapacity.isChain_takeDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {R : ฮน โ†’ ฮน โ†’ Prop} {p : List ฮน}, List.IsChain R p โ†’ โˆ€ (n : โ„•), List.IsChain R (List.take n p)
    Used by
  36. DeclHiddenChannelCapacity.head_getElemDeclaration kindtheorem

    Positional form of the head.

    โˆ€ {ฮน : Type u_1} {p : List ฮน} {x : ฮน}, p.head? = some x โ†’ โˆ€ (h0 : 0 < p.length), p[0] = x
    Used by
  37. DeclHiddenChannelCapacity.gcast_listDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (l : List ฮน) {s t : โ„•} (hs : s < l.length) (ht : t < l.length), s = t โ†’ l[s] = l[t]
    Used by
  38. DeclHiddenChannelCapacity.Adj.symm'Declaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {u v : ฮน}, HiddenChannelCapacity.Adj ๐’ž u v โ†’ HiddenChannelCapacity.Adj ๐’ž v u
    Used by
  39. DeclHiddenChannelCapacity.capstone_of_dichotomyDeclaration kindtheorem

    The capstone, modulo the dichotomy: once every ear-free core is non-conformal or has a chordless cycle (the Dirac edge, URS D26 L6), every non-Graham-reducible cover hosts the base structure that licenses the verdict: a pairwise-consistent family of nonempty local relations that no global structure realizes.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] (๐’ž : Finset (Finset ฮน)),
      ยฌHiddenChannelCapacity.GrahamReducible ๐’ž โ†’
        (โˆ€ ๐’ž' โІ ๐’ž,
            HiddenChannelCapacity.EarFree ๐’ž' โ†’
              ยฌHiddenChannelCapacity.Conformal ๐’ž' โˆจ โˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž' l) โ†’
          โˆƒ fam,
            List.map (fun x => x.team) fam = ๐’ž.toList โˆง
              HiddenChannelCapacity.Consistent fam โˆง (โˆ€ L โˆˆ fam, L.rel.Nonempty) โˆง ยฌHiddenChannelCapacity.Glues fam
    Uses
    Used by
  40. DeclHiddenChannelCapacity.exists_earFree_core_chainDeclaration kindtheorem

    Chain extraction: a non-Graham-reducible cover has an ear-free core such that any vertex set inside the core's cover hosted anywhere in the cover is hosted inside the core.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
      ยฌHiddenChannelCapacity.GrahamReducible ๐’ž โ†’
        โˆƒ ๐’ž' โІ ๐’ž,
          HiddenChannelCapacity.EarFree ๐’ž' โˆง โˆ€ w โІ HiddenChannelCapacity.coverU ๐’ž', (โˆƒ V โˆˆ ๐’ž, w โІ V) โ†’ โˆƒ W โˆˆ ๐’ž', w โІ W
    Used by
  41. DeclHiddenChannelCapacity.clean_system_of_uncovered_cliqueDeclaration kindtheorem

    The clique datum: a cardinality-minimal non-covered clique yields a clean system. Minimality covers the erase-sets; non-coveredness is cleanliness; parity closes by counting.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
      ๐’ž.Nonempty โ†’
        ยฌHiddenChannelCapacity.Conformal ๐’ž โ†’
          โˆƒ ๐’ฒ,
            ๐’ฒ.Nonempty โˆง
              (โˆ€ w โˆˆ ๐’ฒ, w โ‰  โˆ…) โˆง
                (โˆ€ w โˆˆ ๐’ฒ, โˆƒ T โˆˆ ๐’ž, w โІ T) โˆง
                  (โˆ€ V โˆˆ ๐’ž, โˆ€ wโ‚ โˆˆ ๐’ฒ, โˆ€ wโ‚‚ โˆˆ ๐’ฒ, wโ‚ โІ V โ†’ wโ‚‚ โІ V โ†’ wโ‚ = wโ‚‚) โˆง HiddenChannelCapacity.xorSum ๐’ฒ = โˆ…
    Uses
    Used by
  42. DeclHiddenChannelCapacity.xorSum_eq_empty_iffDeclaration kindtheorem

    An F2 sum vanishes iff every incidence count is even.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {D : Finset (Finset ฮน)},
      HiddenChannelCapacity.xorSum D = โˆ… โ†” โˆ€ (i : ฮน), ยฌOdd {x โˆˆ D | i โˆˆ x}.card
    Uses
    Used by
  43. DeclHiddenChannelCapacity.mem_xorSumDeclaration kindtheorem

    Membership in an F2 sum is odd incidence.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {D : Finset (Finset ฮน)} {i : ฮน},
      i โˆˆ HiddenChannelCapacity.xorSum D โ†” Odd {x โˆˆ D | i โˆˆ x}.card
    Used by
  44. DeclHiddenChannelCapacity.erase_union_eraseDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {K : Finset ฮน} {i j : ฮน}, i โ‰  j โ†’ K.erase i โˆช K.erase j = K
    Used by
  45. DeclHiddenChannelCapacity.covered_of_card_le_twoDeclaration kindtheorem

    Small cliques are covered: the empty set (nonempty cover), singletons, edges.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)},
      ๐’ž.Nonempty โ†’
        โˆ€ {K : Finset ฮน},
          K โІ HiddenChannelCapacity.coverU ๐’ž โ†’
            HiddenChannelCapacity.IsClique ๐’ž K โ†’ K.card โ‰ค 2 โ†’ HiddenChannelCapacity.Covered ๐’ž K
    Uses
    Used by
  46. DeclHiddenChannelCapacity.mem_coverUDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {v : ฮน},
      v โˆˆ HiddenChannelCapacity.coverU ๐’ž โ†” โˆƒ T โˆˆ ๐’ž, v โˆˆ T
    Used by
  47. DeclHiddenChannelCapacity.clean_system_of_chordlessCycleDeclaration kindtheorem

    The clean system of a chordless cycle, in finder form.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {l : List ฮน},
      HiddenChannelCapacity.IsChordlessCycle ๐’ž l โ†’
        โˆƒ ๐’ฒ,
          ๐’ฒ.Nonempty โˆง
            (โˆ€ w โˆˆ ๐’ฒ, w โ‰  โˆ…) โˆง
              (โˆ€ w โˆˆ ๐’ฒ, โˆƒ T โˆˆ ๐’ž, w โІ T) โˆง
                (โˆ€ V โˆˆ ๐’ž, โˆ€ wโ‚ โˆˆ ๐’ฒ, โˆ€ wโ‚‚ โˆˆ ๐’ฒ, wโ‚ โІ V โ†’ wโ‚‚ โІ V โ†’ wโ‚ = wโ‚‚) โˆง HiddenChannelCapacity.xorSum ๐’ฒ = โˆ…
    Uses
    Used by
  48. DeclHiddenChannelCapacity.xorSumL_cyclePairsDeclaration kindtheorem

    The cycle sum telescopes: consecutive pairs of a duplicate-free cyclic list sum to โˆ… over F2 โ€” every vertex lies in exactly two pairs.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List ฮน),
      l.Nodup โ†’ 2 โ‰ค l.length โ†’ HiddenChannelCapacity.xorSumL (HiddenChannelCapacity.cyclePairs l) = โˆ…
    Uses
    Used by
  49. DeclHiddenChannelCapacity.xorSumL_zipWith_symmDiffDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (lโ‚ lโ‚‚ : List (Finset ฮน)),
      lโ‚.length = lโ‚‚.length โ†’
        HiddenChannelCapacity.xorSumL (List.zipWith (fun x1 x2 => symmDiff x1 x2) lโ‚ lโ‚‚) =
          symmDiff (HiddenChannelCapacity.xorSumL lโ‚) (HiddenChannelCapacity.xorSumL lโ‚‚)
    Uses
    Used by
  50. DeclHiddenChannelCapacity.xorSumL_permDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {lโ‚ lโ‚‚ : List (Finset ฮน)},
      lโ‚.Perm lโ‚‚ โ†’ HiddenChannelCapacity.xorSumL lโ‚ = HiddenChannelCapacity.xorSumL lโ‚‚
    Uses
    Used by
  51. DeclHiddenChannelCapacity.pair_eq_symmDiffDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {a b : ฮน}, a โ‰  b โ†’ {a, b} = symmDiff {a} {b}
    Used by
  52. DeclHiddenChannelCapacity.getElem_ne_nextDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (l : List ฮน), l.Nodup โ†’ โˆ€ (h2 : 2 โ‰ค l.length) (i : โ„•) (hi : i < l.length), l[i] โ‰  l[(i + 1) % l.length]
    Uses
    Used by
  53. DeclHiddenChannelCapacity.nodup_cyclePairsDeclaration kindtheorem

    Distinct positions carry distinct pairs: the pair list is duplicate-free.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List ฮน),
      l.Nodup โ†’ 3 โ‰ค l.length โ†’ (HiddenChannelCapacity.cyclePairs l).Nodup
    Uses
    Used by
  54. DeclHiddenChannelCapacity.cyclePairs_ne_emptyDeclaration kindtheorem

    Members of the cycle-pair list are nonempty.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {l : List ฮน},
      0 < l.length โ†’ โˆ€ {w : Finset ฮน}, w โˆˆ HiddenChannelCapacity.cyclePairs l โ†’ w โ‰  โˆ…
    Uses
    Used by
  55. DeclHiddenChannelCapacity.clean_of_chordlessCycleDeclaration kindtheorem

    Chordlessness is cleanliness: no team hosts two distinct pairs of a chordless cycle.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {l : List ฮน},
      HiddenChannelCapacity.IsChordlessCycle ๐’ž l โ†’
        โˆ€ V โˆˆ ๐’ž,
          โˆ€ wโ‚ โˆˆ HiddenChannelCapacity.cyclePairs l, โˆ€ wโ‚‚ โˆˆ HiddenChannelCapacity.cyclePairs l, wโ‚ โІ V โ†’ wโ‚‚ โІ V โ†’ wโ‚ = wโ‚‚
    Uses
    Used by
  56. DeclHiddenChannelCapacity.mod_succ_casesDeclaration kindtheorem
    โˆ€ (n i : โ„•), i < n โ†’ (i + 1) % n = i + 1 โˆง i + 1 < n โˆจ (i + 1) % n = 0 โˆง i + 1 = n
    Used by
  57. DeclHiddenChannelCapacity.getElem_cyclePairsDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List ฮน) (h0 : 0 < l.length) (i : โ„•)
      (h : i < (HiddenChannelCapacity.cyclePairs l).length),
      (HiddenChannelCapacity.cyclePairs l)[i] = {l[i], l[(i + 1) % l.length]}
    Uses
    Used by
  58. DeclHiddenChannelCapacity.length_cyclePairsDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List ฮน), (HiddenChannelCapacity.cyclePairs l).length = l.length
    Used by
  59. DeclHiddenChannelCapacity.adj_or_eq_of_cohostedDeclaration kindtheorem

    Co-hosted vertices are adjacent or equal.

    โˆ€ {ฮน : Type u_1} [DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {V : Finset ฮน},
      V โˆˆ ๐’ž โ†’ โˆ€ {u v : ฮน}, u โˆˆ V โ†’ v โˆˆ V โ†’ HiddenChannelCapacity.Adj ๐’ž u v โˆจ u = v
    Used by
  60. DeclHiddenChannelCapacity.capstone_of_coreDeclaration kindtheorem

    The transfer: a clean system on a chained ear-free core is a clean system on the full cover โ€” any team hosting two members routes them into a single core team.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] (๐’ž ๐’ž' : Finset (Finset ฮน)),
      ๐’ž' โІ ๐’ž โ†’
        (โˆ€ w โІ HiddenChannelCapacity.coverU ๐’ž', (โˆƒ V โˆˆ ๐’ž, w โІ V) โ†’ โˆƒ W โˆˆ ๐’ž', w โІ W) โ†’
          โˆ€ (๐’ฒ : Finset (Finset ฮน)),
            ๐’ฒ.Nonempty โ†’
              (โˆ€ w โˆˆ ๐’ฒ, w โ‰  โˆ…) โ†’
                (โˆ€ w โˆˆ ๐’ฒ, โˆƒ T โˆˆ ๐’ž', w โІ T) โ†’
                  (โˆ€ V โˆˆ ๐’ž', โˆ€ wโ‚ โˆˆ ๐’ฒ, โˆ€ wโ‚‚ โˆˆ ๐’ฒ, wโ‚ โІ V โ†’ wโ‚‚ โІ V โ†’ wโ‚ = wโ‚‚) โ†’
                    HiddenChannelCapacity.xorSum ๐’ฒ = โˆ… โ†’
                      โˆƒ fam,
                        List.map (fun x => x.team) fam = ๐’ž.toList โˆง
                          HiddenChannelCapacity.Consistent fam โˆง
                            (โˆ€ L โˆˆ fam, L.rel.Nonempty) โˆง ยฌHiddenChannelCapacity.Glues fam
    Uses
    Used by
  61. DeclHiddenChannelCapacity.clean_system_obstructionDeclaration kindtheorem

    The clean-system obstruction, the unified consumption theorem of C-ENGINE: a base-side clean system (a nonempty hosted family of distinct nonempty supports with vanishing F2 sum, no team hosting two) licenses a verdict on local measurement, a pairwise-consistent family of nonempty local relations over the whole cover that no global structure realizes. Every witness rung (chordless cycles, even boundary data, landings, the H_k clique parities) differs only as a FINDER of such a base system.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] (๐’ž ๐’ฒ : Finset (Finset ฮน)),
      ๐’ฒ.Nonempty โ†’
        (โˆ€ w โˆˆ ๐’ฒ, w โ‰  โˆ…) โ†’
          (โˆ€ w โˆˆ ๐’ฒ, โˆƒ V โˆˆ ๐’ž, w โІ V) โ†’
            (โˆ€ V โˆˆ ๐’ž, โˆ€ wโ‚ โˆˆ ๐’ฒ, โˆ€ wโ‚‚ โˆˆ ๐’ฒ, wโ‚ โІ V โ†’ wโ‚‚ โІ V โ†’ wโ‚ = wโ‚‚) โ†’
              HiddenChannelCapacity.xorSum ๐’ฒ = โˆ… โ†’
                โˆƒ fam,
                  List.map (fun x => x.team) fam = ๐’ž.toList โˆง
                    HiddenChannelCapacity.Consistent fam โˆง (โˆ€ L โˆˆ fam, L.rel.Nonempty) โˆง ยฌHiddenChannelCapacity.Glues fam
    Uses
    Used by
  62. DeclHiddenChannelCapacity.affine_obstructionDeclaration kindtheorem

    The affine obstruction engine, packaged: from a base-side hosted odd dependency (over a closed coherent system) follows a verdict on local measurement, a family of nonempty local relations that is pairwise consistent yet realizes no global structure.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] {teams : List (Finset ฮน)} {๐’ฒ : Finset (Finset ฮน)}
      {c : Finset ฮน โ†’ ZMod 2},
      teams โ‰  [] โ†’
        (โˆ€ V โˆˆ teams, HiddenChannelCapacity.ClosedAt ๐’ฒ V) โ†’
          (โˆ€ V โˆˆ teams, HiddenChannelCapacity.CoherentAt ๐’ฒ c V) โ†’
            โˆ€ D โІ ๐’ฒ,
              HiddenChannelCapacity.xorSum D = โˆ… โ†’
                โˆ‘ w โˆˆ D, c w = 1 โ†’
                  (โˆ€ w โˆˆ D, โˆƒ V โˆˆ teams, w โІ V) โ†’
                    HiddenChannelCapacity.Consistent (HiddenChannelCapacity.affFam teams ๐’ฒ c) โˆง
                      (โˆ€ L โˆˆ HiddenChannelCapacity.affFam teams ๐’ฒ c, L.rel.Nonempty) โˆง
                        ยฌHiddenChannelCapacity.Glues (HiddenChannelCapacity.affFam teams ๐’ฒ c)
    Uses
    Used by
  63. DeclHiddenChannelCapacity.not_glues_affFamDeclaration kindtheorem

    The obstruction theorem: a hosted odd dependency (a base-side witness) forecloses every global structure; any global realizing all the local relations would satisfy every hosted constraint, and the dependency sums those satisfactions to 0 = 1.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] [inst_1 : Fintype ฮน] {teams : List (Finset ฮน)} {๐’ฒ : Finset (Finset ฮน)}
      {c : Finset ฮน โ†’ ZMod 2},
      teams โ‰  [] โ†’
        (โˆ€ V โˆˆ teams, HiddenChannelCapacity.CoherentAt ๐’ฒ c V) โ†’
          โˆ€ D โІ ๐’ฒ,
            HiddenChannelCapacity.xorSum D = โˆ… โ†’
              โˆ‘ w โˆˆ D, c w = 1 โ†’
                (โˆ€ w โˆˆ D, โˆƒ V โˆˆ teams, w โІ V) โ†’ ยฌHiddenChannelCapacity.Glues (HiddenChannelCapacity.affFam teams ๐’ฒ c)
    Uses
    Used by
  64. DeclHiddenChannelCapacity.parityOn_xorSumDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (D : Finset (Finset ฮน)) (f : ฮน โ†’ ZMod 2),
      HiddenChannelCapacity.parityOn (HiddenChannelCapacity.xorSum D) f = โˆ‘ w โˆˆ D, HiddenChannelCapacity.parityOn w f
    Uses
    Used by
  65. DeclHiddenChannelCapacity.consistent_affFamDeclaration kindtheorem

    Closed coherent affine families are pairwise consistent: both interface marginals ARE the interface's visible system.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {teams : List (Finset ฮน)} {๐’ฒ : Finset (Finset ฮน)} {c : Finset ฮน โ†’ ZMod 2},
      (โˆ€ V โˆˆ teams, HiddenChannelCapacity.ClosedAt ๐’ฒ V) โ†’
        (โˆ€ V โˆˆ teams, HiddenChannelCapacity.CoherentAt ๐’ฒ c V) โ†’
          HiddenChannelCapacity.Consistent (HiddenChannelCapacity.affFam teams ๐’ฒ c)
    Uses
    Used by
  66. DeclHiddenChannelCapacity.imarg_affLocalDeclaration kindtheorem

    The exact marginal computation: the interface marginal of a closed coherent local structure is exactly the local structure of the interface โ€” the interface sees precisely the visible constraints.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V S : Finset ฮน} {๐’ฒ : Finset (Finset ฮน)} {c : Finset ฮน โ†’ ZMod 2} (hS : S โІ V),
      HiddenChannelCapacity.ClosedAt ๐’ฒ V โ†’
        HiddenChannelCapacity.CoherentAt ๐’ฒ c V โ†’
          (HiddenChannelCapacity.affLocal V ๐’ฒ c).imarg hS = (HiddenChannelCapacity.affLocal S ๐’ฒ c).rel
    Uses
    Used by
  67. DeclHiddenChannelCapacity.wsum_restrictโ‚‚Declaration kindtheorem

    Transport of team parities along nested restriction: the value only reads the support.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V S w : Finset ฮน} (hS : S โІ V),
      w โІ S โ†’ โˆ€ (F : โ†ฅV โ†’ ZMod 2), HiddenChannelCapacity.wsum S w (Finset.restrictโ‚‚ hS F) = HiddenChannelCapacity.wsum V w F
    Uses
    Used by
  68. DeclHiddenChannelCapacity.sysCoherent_pinnedDeclaration kindtheorem

    The pinned system: hosted constraints of V plus a singleton pin at every S-coordinate of a visible-constraint-satisfying trace. Coherent, by closedness.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V S : Finset ฮน} {๐’ฒ : Finset (Finset ฮน)} {c : Finset ฮน โ†’ ZMod 2},
      HiddenChannelCapacity.ClosedAt ๐’ฒ V โ†’
        HiddenChannelCapacity.CoherentAt ๐’ฒ c V โ†’
          โˆ€ (gโ‚€ : ฮน โ†’ ZMod 2),
            (โˆ€ w โˆˆ ๐’ฒ, w โІ S โ†’ HiddenChannelCapacity.parityOn w gโ‚€ = c w) โ†’
              HiddenChannelCapacity.SysCoherent
                (HiddenChannelCapacity.hostedListโœ V ๐’ฒ c ++ List.map (fun i => ({i}, gโ‚€ i)) S.toList)
    Uses
    Used by
  69. DeclHiddenChannelCapacity.xorSum_subsetDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V : Finset ฮน} {๐’ฒ D : Finset (Finset ฮน)},
      D โІ {x โˆˆ ๐’ฒ | x โІ V} โ†’ HiddenChannelCapacity.xorSum D โІ V
    Used by
  70. DeclHiddenChannelCapacity.xorSumL_singletonsDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {l : List ฮน},
      l.Nodup โ†’ HiddenChannelCapacity.xorSumL (List.map (fun x => {x}) l) = l.toFinset
    Uses
    Used by
  71. DeclHiddenChannelCapacity.xorSumL_appendDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (a b : List (Finset ฮน)),
      HiddenChannelCapacity.xorSumL (a ++ b) = symmDiff (HiddenChannelCapacity.xorSumL a) (HiddenChannelCapacity.xorSumL b)
    Uses
    Used by
  72. DeclHiddenChannelCapacity.xorSumL_nilDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน], HiddenChannelCapacity.xorSumL [] = โˆ…
    Used by
  73. DeclHiddenChannelCapacity.map_snd_pinDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (gโ‚€ : ฮน โ†’ ZMod 2) (l : List ฮน), List.map Prod.snd (List.map (fun i => ({i}, gโ‚€ i)) l) = List.map gโ‚€ l
    Used by
  74. DeclHiddenChannelCapacity.map_fst_pinDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (gโ‚€ : ฮน โ†’ ZMod 2) (l : List ฮน),
      List.map Prod.fst (List.map (fun i => ({i}, gโ‚€ i)) l) = List.map (fun x => {x}) l
    Used by
  75. DeclHiddenChannelCapacity.affLocal_nonemptyDeclaration kindtheorem

    Every local relation of a coherent system is nonempty.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V : Finset ฮน} {๐’ฒ : Finset (Finset ฮน)} {c : Finset ฮน โ†’ ZMod 2},
      HiddenChannelCapacity.CoherentAt ๐’ฒ c V โ†’ (HiddenChannelCapacity.affLocal V ๐’ฒ c).rel.Nonempty
    Uses
    Used by
  76. DeclHiddenChannelCapacity.wsum_restrictDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V w : Finset ฮน},
      w โІ V โ†’ โˆ€ (f : ฮน โ†’ ZMod 2), HiddenChannelCapacity.wsum V w (V.restrict f) = HiddenChannelCapacity.parityOn w f
    Used by
  77. DeclHiddenChannelCapacity.sysCoherent_hostedListDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V : Finset ฮน} {๐’ฒ : Finset (Finset ฮน)} {c : Finset ฮน โ†’ ZMod 2},
      HiddenChannelCapacity.CoherentAt ๐’ฒ c V โ†’ HiddenChannelCapacity.SysCoherent (HiddenChannelCapacity.hostedListโœ V ๐’ฒ c)
    Uses
    Used by
  78. DeclHiddenChannelCapacity.xorSumL_eq_xorSumDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {l : List (Finset ฮน)},
      l.Nodup โ†’ HiddenChannelCapacity.xorSumL l = HiddenChannelCapacity.xorSum l.toFinset
    Uses
    Used by
  79. DeclHiddenChannelCapacity.map_snd_pairDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (c : Finset ฮน โ†’ ZMod 2) (l : List (Finset ฮน)),
      List.map Prod.snd (List.map (fun w => (w, c w)) l) = List.map c l
    Used by
  80. DeclHiddenChannelCapacity.map_fst_pairDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (c : Finset ฮน โ†’ ZMod 2) (l : List (Finset ฮน)), List.map Prod.fst (List.map (fun w => (w, c w)) l) = l
    Used by
  81. DeclHiddenChannelCapacity.mem_affLocal_relDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {V : Finset ฮน} {๐’ฒ : Finset (Finset ฮน)} {c : Finset ฮน โ†’ ZMod 2}
      {F : โ†ฅV โ†’ ZMod 2},
      F โˆˆ (HiddenChannelCapacity.affLocal V ๐’ฒ c).rel โ†” โˆ€ w โˆˆ ๐’ฒ, w โІ V โ†’ HiddenChannelCapacity.wsum V w F = c w
    Used by
  82. DeclHiddenChannelCapacity.exists_parity_solutionDeclaration kindtheorem

    The solvability core: a coherent list-presented parity system has a solution. Elementary Gaussian elimination, by induction on the list.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (L : List (Finset ฮน ร— ZMod 2)),
      HiddenChannelCapacity.SysCoherent L โ†’ โˆƒ f, โˆ€ p โˆˆ L, HiddenChannelCapacity.parityOn p.1 f = p.2
    Uses
    Used by
  83. DeclHiddenChannelCapacity.xorSumL_consDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (w : Finset ฮน) (l : List (Finset ฮน)),
      HiddenChannelCapacity.xorSumL (w :: l) = symmDiff w (HiddenChannelCapacity.xorSumL l)
    Used by
  84. DeclHiddenChannelCapacity.transform_bookkeepingDeclaration kindtheorem

    The Gaussian transform bookkeeping: transforming the x-containing entries by โˆ† wโ‚€ shifts the F2 sum by wโ‚€ per transformed entry, and the constants by cโ‚€ likewise.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (x : ฮน) (wโ‚€ : Finset ฮน) (cโ‚€ : ZMod 2) (sub : List (Finset ฮน ร— ZMod 2)),
      HiddenChannelCapacity.xorSumL
            (List.map Prod.fst (List.map (fun p => if x โˆˆ p.1 then (symmDiff p.1 wโ‚€, p.2 + cโ‚€) else p) sub)) =
          symmDiff (HiddenChannelCapacity.xorSumL (List.map Prod.fst sub))
            (if List.countP (fun p => decide (x โˆˆ p.1)) sub % 2 = 1 then wโ‚€ else โˆ…) โˆง
        (List.map Prod.snd (List.map (fun p => if x โˆˆ p.1 then (symmDiff p.1 wโ‚€, p.2 + cโ‚€) else p) sub)).sum =
          (List.map Prod.snd sub).sum + if List.countP (fun p => decide (x โˆˆ p.1)) sub % 2 = 1 then cโ‚€ else 0
    Uses
    Used by
  85. DeclHiddenChannelCapacity.symmDiff_emptyDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (a : Finset ฮน), symmDiff a โˆ… = a
    Used by
  86. DeclHiddenChannelCapacity.parityOn_symmDiffDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (w w' : Finset ฮน) (f : ฮน โ†’ ZMod 2),
      HiddenChannelCapacity.parityOn (symmDiff w w') f =
        HiddenChannelCapacity.parityOn w f + HiddenChannelCapacity.parityOn w' f
    Uses
    Used by
  87. DeclHiddenChannelCapacity.zmod2_add_selfDeclaration kindtheorem
    โˆ€ (a : ZMod 2), a + a = 0
    Used by
  88. DeclHiddenChannelCapacity.acyclic_iff_grahamReducibleDeclaration kindtheorem

    The Graham bridge: acyclicity is exactly Graham reducibility.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
      HiddenChannelCapacity.Acyclic ๐’ž โ†” HiddenChannelCapacity.GrahamReducible ๐’ž
    Uses
    Used by
  89. DeclHiddenChannelCapacity.grahamN_of_ripCoverDeclaration kindtheorem

    An RIP order eliminates from the front: its head is an ear and the tail remains RIP.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (order : List (Finset ฮน)),
      order.Nodup โ†’ HiddenChannelCapacity.RIPCover order โ†’ HiddenChannelCapacity.GrahamN order.length order.toFinset
    Uses
    Used by
  90. DeclHiddenChannelCapacity.exists_ripCover_of_grahamNDeclaration kindtheorem

    An elimination run is a running-intersection order read forward.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (n : โ„•) (๐’ž : Finset (Finset ฮน)),
      HiddenChannelCapacity.GrahamN n ๐’ž โ†’ โˆƒ order, order.Nodup โˆง order.toFinset = ๐’ž โˆง HiddenChannelCapacity.RIPCover order
    Uses
    Used by
  91. DeclHiddenChannelCapacity.listCover_eq_coverUDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List (Finset ฮน)),
      HiddenChannelCapacity.listCover l = HiddenChannelCapacity.coverU l.toFinset
    Used by
  92. DefinitionHiddenChannelCapacity.Acyclicdef

    Order-free acyclicity: some duplicate-free enumeration of the cover is a running-intersection order.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Prop
  93. DefinitionHiddenChannelCapacity.Adjdef

    Primal adjacency: distinct co-hosted vertices.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ ฮน โ†’ ฮน โ†’ Prop
  94. DefinitionHiddenChannelCapacity.ClosedAtdef

    Intra-team span closure: subset sums of the constraints hosted by V vanish or stay in the system.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Finset ฮน โ†’ Prop
  95. DefinitionHiddenChannelCapacity.CoherentAtdef

    Intra-team coherence: constants vanish on the dependencies hosted by V.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ (Finset ฮน โ†’ ZMod 2) โ†’ Finset ฮน โ†’ Prop
  96. DefinitionHiddenChannelCapacity.Conformaldef

    Conformality: every clique inside the cover is covered.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Prop
  97. DefinitionHiddenChannelCapacity.Consistentdef

    Pairwise consistency: any two members expose the same interface marginal.

    {ฮน : Type u_1} โ†’
      [DecidableEq ฮน] โ†’
        {X : ฮน โ†’ Type u_2} โ†’ [(i : ฮน) โ†’ DecidableEq (X i)] โ†’ List (HiddenChannelCapacity.LocalStruct ฮน X) โ†’ Prop
  98. DefinitionHiddenChannelCapacity.Covereddef

    A vertex set covered by a single team.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ Finset ฮน โ†’ Prop
  99. DefinitionHiddenChannelCapacity.EarFreedef

    An ear-free nonempty cover: the stuck core condition.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Prop
  100. DefinitionHiddenChannelCapacity.Gluesdef

    Gluing: some global structure realizes every member exactly.

    {ฮน : Type u_1} โ†’
      {X : ฮน โ†’ Type u_2} โ†’ [(i : ฮน) โ†’ DecidableEq (X i)] โ†’ [Fintype ฮน] โ†’ List (HiddenChannelCapacity.LocalStruct ฮน X) โ†’ Prop
  101. DefinitionHiddenChannelCapacity.GrahamNdef

    Nondeterministic ear elimination, fueled.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ โ„• โ†’ Finset (Finset ฮน) โ†’ Prop
  102. DefinitionHiddenChannelCapacity.GrahamReducibledef

    Graham reducibility: ear elimination empties the cover; the cover's size is fuel enough since every elimination removes exactly one team.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Prop
  103. DefinitionHiddenChannelCapacity.IsChordlessCycledef

    A chordless cycle: duplicate-free, length โ‰ฅ 4, consecutive pairs hosted, and the only adjacencies among its vertices are the cyclically consecutive ones.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ List ฮน โ†’ Prop
  104. DefinitionHiddenChannelCapacity.IsCliquedef

    A clique of the primal graph.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ Finset ฮน โ†’ Prop
  105. DefinitionHiddenChannelCapacity.IsEarOfdef

    The ear condition: the team meets the union of the others inside a single other team (or there are no others).

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Finset ฮน โ†’ Prop
  106. DefinitionHiddenChannelCapacity.IsWalkOndef

    A walk constrained to P: chained adjacencies, every vertex satisfies P.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ (ฮน โ†’ Prop) โ†’ List ฮน โ†’ Prop
  107. DefinitionHiddenChannelCapacity.LocalStructstructure

    A local structure: a team of parts together with an ignorance structure on the team's marginal type.

    (ฮน : Type u_3) โ†’ (ฮน โ†’ Type u_4) โ†’ Type (max u_3 u_4)
  108. DefinitionHiddenChannelCapacity.LocalStruct.imargdef

    The interface marginal of a local structure over a sub-team.

    {ฮน : Type u_1} โ†’
      {X : ฮน โ†’ Type u_2} โ†’
        [(i : ฮน) โ†’ DecidableEq (X i)] โ†’
          (L : HiddenChannelCapacity.LocalStruct ฮน X) โ†’ {S : Finset ฮน} โ†’ S โІ L.team โ†’ Finset ((i : โ†ฅS) โ†’ X โ†‘i)
  109. DefinitionHiddenChannelCapacity.LocalStruct.reldef

    The admissible local configurations.

    {ฮน : Type u_3} โ†’ {X : ฮน โ†’ Type u_4} โ†’ (self : HiddenChannelCapacity.LocalStruct ฮน X) โ†’ Finset ((i : โ†ฅself.team) โ†’ X โ†‘i)
  110. DefinitionHiddenChannelCapacity.LocalStruct.teamdef

    The team of parts this local structure constrains.

    {ฮน : Type u_3} โ†’ {X : ฮน โ†’ Type u_4} โ†’ HiddenChannelCapacity.LocalStruct ฮน X โ†’ Finset ฮน
  111. DefinitionHiddenChannelCapacity.RIPdef

    Running intersection property: each member meets the union of the later members inside a single later member (the head is the last-eliminated team).

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ {X : ฮน โ†’ Type u_2} โ†’ List (HiddenChannelCapacity.LocalStruct ฮน X) โ†’ Prop
  112. DefinitionHiddenChannelCapacity.RIPCoverdef

    Team-level running intersection property: each team meets the union of the later teams inside a single later team.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ List (Finset ฮน) โ†’ Prop
  113. DefinitionHiddenChannelCapacity.ReachOndef

    Reachability within P: a duplicate-free walk with the given endpoints.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ (ฮน โ†’ Prop) โ†’ ฮน โ†’ ฮน โ†’ Prop
  114. DefinitionHiddenChannelCapacity.SimpIndef

    v is simplicial within the vertex set S: it lies in S and its ๐’ž-neighbors inside S are pairwise adjacent.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ Finset ฮน โ†’ ฮน โ†’ Prop
  115. DefinitionHiddenChannelCapacity.SysCoherentdef

    Coherence of a list-presented parity system: constants vanish on every dependency.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ List (Finset ฮน ร— ZMod 2) โ†’ Prop
  116. DefinitionHiddenChannelCapacity.affFamdef

    The affine family over a cover: every team with its fitting constraints.

    {ฮน : Type u_1} โ†’
      [DecidableEq ฮน] โ†’
        List (Finset ฮน) โ†’
          Finset (Finset ฮน) โ†’ (Finset ฮน โ†’ ZMod 2) โ†’ List (HiddenChannelCapacity.LocalStruct ฮน fun x => ZMod 2)
  117. DefinitionHiddenChannelCapacity.affLocaldef

    The team V with every constraint of the system that fits inside it: the uniform replication rule.

    {ฮน : Type u_1} โ†’
      [DecidableEq ฮน] โ†’
        Finset ฮน โ†’ Finset (Finset ฮน) โ†’ (Finset ฮน โ†’ ZMod 2) โ†’ HiddenChannelCapacity.LocalStruct ฮน fun x => ZMod 2
  118. DefinitionHiddenChannelCapacity.coverUdef

    The union of a finite set of teams.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Finset ฮน
  119. DefinitionHiddenChannelCapacity.cyclePairsdef

    The consecutive-pair supports of a cyclic vertex list.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ List ฮน โ†’ List (Finset ฮน)
  120. DefinitionHiddenChannelCapacity.decidableAcyclicdef

    Acyclicity is decidable โ€” the payoff of the bridge.

    {ฮน : Type u_1} โ†’ [inst : DecidableEq ฮน] โ†’ (๐’ž : Finset (Finset ฮน)) โ†’ Decidable (HiddenChannelCapacity.Acyclic ๐’ž)
  121. DefinitionHiddenChannelCapacity.decidableIsEarOfdef
    {ฮน : Type u_1} โ†’
      [inst : DecidableEq ฮน] โ†’ (๐’ž : Finset (Finset ฮน)) โ†’ (T : Finset ฮน) โ†’ Decidable (HiddenChannelCapacity.IsEarOf ๐’ž T)
  122. DefinitionHiddenChannelCapacity.famCoverdef

    The union of a family's teams.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ {X : ฮน โ†’ Type u_2} โ†’ List (HiddenChannelCapacity.LocalStruct ฮน X) โ†’ Finset ฮน
  123. DefinitionHiddenChannelCapacity.hostedListdef

    The hosted constraints of V, as a list system.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset ฮน โ†’ Finset (Finset ฮน) โ†’ (Finset ฮน โ†’ ZMod 2) โ†’ List (Finset ฮน ร— ZMod 2)
  124. DefinitionHiddenChannelCapacity.instDecidableAdjdef
    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ (๐’ž : Finset (Finset ฮน)) โ†’ (u v : ฮน) โ†’ Decidable (HiddenChannelCapacity.Adj ๐’ž u v)
  125. DefinitionHiddenChannelCapacity.instDecidableCovereddef
    {ฮน : Type u_1} โ†’
      [DecidableEq ฮน] โ†’ (๐’ž : Finset (Finset ฮน)) โ†’ (K : Finset ฮน) โ†’ Decidable (HiddenChannelCapacity.Covered ๐’ž K)
  126. DefinitionHiddenChannelCapacity.instDecidableIsCliquedef
    {ฮน : Type u_1} โ†’
      [DecidableEq ฮน] โ†’ (๐’ž : Finset (Finset ฮน)) โ†’ (K : Finset ฮน) โ†’ Decidable (HiddenChannelCapacity.IsClique ๐’ž K)
  127. DefinitionHiddenChannelCapacity.joinFamdef

    The natural join of a family: all global configurations passing every local test.

    {ฮน : Type u_1} โ†’
      [DecidableEq ฮน] โ†’
        {X : ฮน โ†’ Type u_2} โ†’
          [(i : ฮน) โ†’ DecidableEq (X i)] โ†’
            [Fintype ฮน] โ†’ [(i : ฮน) โ†’ Fintype (X i)] โ†’ List (HiddenChannelCapacity.LocalStruct ฮน X) โ†’ Finset ((i : ฮน) โ†’ X i)
  128. DefinitionHiddenChannelCapacity.listCoverdef

    The union of a list of teams.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ List (Finset ฮน) โ†’ Finset ฮน
  129. DefinitionHiddenChannelCapacity.parityOndef

    Parity of a global configuration over a support.

    {ฮน : Type u_1} โ†’ Finset ฮน โ†’ (ฮน โ†’ ZMod 2) โ†’ ZMod 2
  130. DefinitionHiddenChannelCapacity.projSdef

    The marginal of a multipartite relation over a sub-team S: the image under Finset.restrict.

    {ฮน : Type u_1} โ†’
      {X : ฮน โ†’ Type u_2} โ†’
        [(i : ฮน) โ†’ DecidableEq (X i)] โ†’ Finset ((i : ฮน) โ†’ X i) โ†’ (S : Finset ฮน) โ†’ Finset ((i : โ†ฅS) โ†’ X โ†‘i)
  131. DefinitionHiddenChannelCapacity.shareddef

    The shared vertices of a cover.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Finset ฮน
  132. DefinitionHiddenChannelCapacity.wsumdef

    Parity of a team configuration over the team part of a support.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ (V : Finset ฮน) โ†’ Finset ฮน โ†’ (โ†ฅV โ†’ ZMod 2) โ†’ ZMod 2
  133. DefinitionHiddenChannelCapacity.xorSumdef

    F2 sum of a finite collection of supports.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ Finset ฮน
  134. DefinitionHiddenChannelCapacity.xorSumLdef

    F2 sum of a list of supports.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ List (Finset ฮน) โ†’ Finset ฮน

Dirac's lemma, strong form: in a chordless-cycle-free adjacency structure, every vertex set is a clique or contains two nonadjacent simplicial vertices.

DeclHiddenChannelCapacity.dirac_strong
โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
  (ยฌโˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l) โ†’
    โˆ€ (S : Finset ฮน),
      (โˆ€ x โˆˆ S, โˆ€ y โˆˆ S, x โ‰  y โ†’ HiddenChannelCapacity.Adj ๐’ž x y) โˆจ
        โˆƒ u w,
          HiddenChannelCapacity.SimpIn ๐’ž S u โˆง
            HiddenChannelCapacity.SimpIn ๐’ž S w โˆง u โ‰  w โˆง ยฌHiddenChannelCapacity.Adj ๐’ž u w
Layout
ThesisStepHypothesisDefinition
dirac_strongtheoremยฌโˆƒ l, HiddenChannelCapaciโ€ฆhchordsep_clique_steptheoremno_chord_of_minimaltheoremmod_succ_casestheoremgetLast_getElemtheoremgetElem_cyclePairstheoremlength_cyclePairstheoremreachOn_transtheoremreachOn_symmtheoremreachOn_refltheoremreachOn_of_mem_walktheoremreachOn_extendtheoremexists_min_paththeoremexists_connectortheoremerase_separatestheoremreachOn_of_walktheoremisChain_droptheoremisChain_taketheoremhead_getElemtheoremgcast_listtheoremsymm'theoremAdjdefIsChordlessCycledefIsWalkOndefReachOndefSimpIndefcyclePairsdefinstDecidableAdjdef
  1. DeclHiddenChannelCapacity.dirac_strongDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (๐’ž : Finset (Finset ฮน)),
      (ยฌโˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l) โ†’
        โˆ€ (S : Finset ฮน),
          (โˆ€ x โˆˆ S, โˆ€ y โˆˆ S, x โ‰  y โ†’ HiddenChannelCapacity.Adj ๐’ž x y) โˆจ
            โˆƒ u w,
              HiddenChannelCapacity.SimpIn ๐’ž S u โˆง
                HiddenChannelCapacity.SimpIn ๐’ž S w โˆง u โ‰  w โˆง ยฌHiddenChannelCapacity.Adj ๐’ž u w
    Uses
  2. DeclHiddenChannelCapacity.sep_clique_stepDeclaration kindtheorem

    The assembled-cycle contradiction: two length-minimal x-y connectors through disjoint, mutually non-adjacent sides cannot coexist with chordless-cycle-freeness when x and y are non-adjacent.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)},
      (ยฌโˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l) โ†’
        โˆ€ {QA QB : ฮน โ†’ Prop} {x y : ฮน},
          x โ‰  y โ†’
            ยฌHiddenChannelCapacity.Adj ๐’ž x y โ†’
              ยฌQB x โ†’
                ยฌQB y โ†’
                  (โˆ€ (v : ฮน), QA v โ†’ QB v โ†’ False) โ†’
                    (โˆ€ (u v : ฮน), QA u โ†’ QB v โ†’ ยฌHiddenChannelCapacity.Adj ๐’ž u v) โ†’
                      โˆ€ (pA : List ฮน),
                        List.IsChain (HiddenChannelCapacity.Adj ๐’ž) pA โ†’
                          pA.Nodup โ†’
                            pA.head? = some x โ†’
                              pA.getLast? = some y โ†’
                                (โˆ€ v โˆˆ pA, v = x โˆจ v = y โˆจ QA v) โ†’
                                  (โˆ€ (q : List ฮน),
                                      (List.IsChain (HiddenChannelCapacity.Adj ๐’ž) q โˆง
                                          q.Nodup โˆง
                                            q.head? = some x โˆง q.getLast? = some y โˆง โˆ€ v โˆˆ q, v = x โˆจ v = y โˆจ QA v) โ†’
                                        pA.length โ‰ค q.length) โ†’
                                    โˆ€ (pB : List ฮน),
                                      List.IsChain (HiddenChannelCapacity.Adj ๐’ž) pB โ†’
                                        pB.Nodup โ†’
                                          pB.head? = some x โ†’
                                            pB.getLast? = some y โ†’
                                              (โˆ€ v โˆˆ pB, v = x โˆจ v = y โˆจ QB v) โ†’
                                                (โˆ€ (q : List ฮน),
                                                    (List.IsChain (HiddenChannelCapacity.Adj ๐’ž) q โˆง
                                                        q.Nodup โˆง
                                                          q.head? = some x โˆง
                                                            q.getLast? = some y โˆง โˆ€ v โˆˆ q, v = x โˆจ v = y โˆจ QB v) โ†’
                                                      pB.length โ‰ค q.length) โ†’
                                                  False
    Uses
    Used by
  3. DeclHiddenChannelCapacity.no_chord_of_minimalDeclaration kindtheorem

    Minimality kills chords: a length-minimal constrained x-y path has no adjacency between positions at distance โ‰ฅ 2.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {Q : ฮน โ†’ Prop} {x y : ฮน} {p : List ฮน},
      List.IsChain (HiddenChannelCapacity.Adj ๐’ž) p โ†’
        p.head? = some x โ†’
          p.getLast? = some y โ†’
            (โˆ€ v โˆˆ p, v = x โˆจ v = y โˆจ Q v) โ†’
              (โˆ€ (q : List ฮน),
                  (List.IsChain (HiddenChannelCapacity.Adj ๐’ž) q โˆง
                      q.Nodup โˆง q.head? = some x โˆง q.getLast? = some y โˆง โˆ€ v โˆˆ q, v = x โˆจ v = y โˆจ Q v) โ†’
                    p.length โ‰ค q.length) โ†’
                p.Nodup โ†’
                  โˆ€ {i j : โ„•} (hi : i < p.length) (hj : j < p.length), i + 2 โ‰ค j โ†’ ยฌHiddenChannelCapacity.Adj ๐’ž p[i] p[j]
    Uses
    Used by
  4. DeclHiddenChannelCapacity.mod_succ_casesDeclaration kindtheorem
    โˆ€ (n i : โ„•), i < n โ†’ (i + 1) % n = i + 1 โˆง i + 1 < n โˆจ (i + 1) % n = 0 โˆง i + 1 = n
    Used by
  5. DeclHiddenChannelCapacity.getLast_getElemDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {p : List ฮน} {y : ฮน}, p.getLast? = some y โ†’ โˆ€ (h0 : 0 < p.length), p[p.length - 1] = y
    Used by
  6. DeclHiddenChannelCapacity.getElem_cyclePairsDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List ฮน) (h0 : 0 < l.length) (i : โ„•)
      (h : i < (HiddenChannelCapacity.cyclePairs l).length),
      (HiddenChannelCapacity.cyclePairs l)[i] = {l[i], l[(i + 1) % l.length]}
    Uses
    Used by
  7. DeclHiddenChannelCapacity.length_cyclePairsDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] (l : List ฮน), (HiddenChannelCapacity.cyclePairs l).length = l.length
    Used by
  8. DeclHiddenChannelCapacity.reachOn_transDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v w : ฮน},
      HiddenChannelCapacity.ReachOn ๐’ž P u v โ†’ HiddenChannelCapacity.ReachOn ๐’ž P v w โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u w
    Uses
    Used by
  9. DeclHiddenChannelCapacity.reachOn_symmDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v : ฮน},
      HiddenChannelCapacity.ReachOn ๐’ž P u v โ†’ HiddenChannelCapacity.ReachOn ๐’ž P v u
    Uses
    Used by
  10. DeclHiddenChannelCapacity.reachOn_reflDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u : ฮน}, P u โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u u
    Used by
  11. DeclHiddenChannelCapacity.reachOn_of_mem_walkDeclaration kindtheorem

    Every vertex on a walk is reachable from its head.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v : ฮน} {p : List ฮน},
      HiddenChannelCapacity.IsWalkOn ๐’ž P p โ†’ p.head? = some u โ†’ v โˆˆ p โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u v
    Uses
    Used by
  12. DeclHiddenChannelCapacity.reachOn_extendDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} {u v w : ฮน},
      HiddenChannelCapacity.ReachOn ๐’ž P u v โ†’ HiddenChannelCapacity.Adj ๐’ž v w โ†’ P w โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u w
    Uses
    Used by
  13. DeclHiddenChannelCapacity.exists_min_pathDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {Q : List ฮน โ†’ Prop}, (โˆƒ p, Q p) โ†’ โˆƒ p, Q p โˆง โˆ€ (q : List ฮน), Q q โ†’ p.length โ‰ค q.length
    Used by
  14. DeclHiddenChannelCapacity.exists_connectorDeclaration kindtheorem

    A connector: an x-y path with interior inside Q, from adjacent entry points and interior reachability.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {Q : ฮน โ†’ Prop} {x y uโ‚ uโ‚‚ : ฮน},
      x โ‰  y โ†’
        HiddenChannelCapacity.Adj ๐’ž x uโ‚ โ†’
          HiddenChannelCapacity.Adj ๐’ž y uโ‚‚ โ†’
            HiddenChannelCapacity.ReachOn ๐’ž Q uโ‚ uโ‚‚ โ†’
              ยฌQ x โ†’
                ยฌQ y โ†’
                  โˆƒ p,
                    List.IsChain (HiddenChannelCapacity.Adj ๐’ž) p โˆง
                      p.Nodup โˆง p.head? = some x โˆง p.getLast? = some y โˆง โˆ€ v โˆˆ p, v = x โˆจ v = y โˆจ Q v
    Uses
    Used by
  15. DeclHiddenChannelCapacity.erase_separatesDeclaration kindtheorem

    If x has no neighbor reachable from a off the separator, then erasing x still separates: the first x-occurrence on any violating path has its predecessor reachable from a and adjacent to x.

    โˆ€ {ฮน : Type u_1} [inst : DecidableEq ฮน] {๐’ž : Finset (Finset ฮน)} {S Sep : Finset ฮน} {a b x : ฮน},
      x โ‰  a โ†’
        (โˆ€ (u : ฮน),
            u โˆˆ S \ Sep โˆง HiddenChannelCapacity.ReachOn ๐’ž (fun v => v โˆˆ S \ Sep) a u โ†’ ยฌHiddenChannelCapacity.Adj ๐’ž x u) โ†’
          ยฌHiddenChannelCapacity.ReachOn ๐’ž (fun v => v โˆˆ S \ Sep) a b โ†’
            ยฌHiddenChannelCapacity.ReachOn ๐’ž (fun v => v โˆˆ S \ Sep.erase x) a b
    Uses
    Used by
  16. DeclHiddenChannelCapacity.reachOn_of_walkDeclaration kindtheorem

    Every chained walk contains a duplicate-free path with the same endpoints and vertices.

    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {P : ฮน โ†’ Prop} (p : List ฮน),
      HiddenChannelCapacity.IsWalkOn ๐’ž P p โ†’
        โˆ€ {u v : ฮน}, p.head? = some u โ†’ p.getLast? = some v โ†’ HiddenChannelCapacity.ReachOn ๐’ž P u v
    Uses
    Used by
  17. DeclHiddenChannelCapacity.isChain_dropDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {R : ฮน โ†’ ฮน โ†’ Prop} {p : List ฮน}, List.IsChain R p โ†’ โˆ€ (n : โ„•), List.IsChain R (List.drop n p)
    Used by
  18. DeclHiddenChannelCapacity.isChain_takeDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} {R : ฮน โ†’ ฮน โ†’ Prop} {p : List ฮน}, List.IsChain R p โ†’ โˆ€ (n : โ„•), List.IsChain R (List.take n p)
    Used by
  19. DeclHiddenChannelCapacity.head_getElemDeclaration kindtheorem

    Positional form of the head.

    โˆ€ {ฮน : Type u_1} {p : List ฮน} {x : ฮน}, p.head? = some x โ†’ โˆ€ (h0 : 0 < p.length), p[0] = x
    Used by
  20. DeclHiddenChannelCapacity.gcast_listDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} (l : List ฮน) {s t : โ„•} (hs : s < l.length) (ht : t < l.length), s = t โ†’ l[s] = l[t]
    Used by
  21. DeclHiddenChannelCapacity.Adj.symm'Declaration kindtheorem
    โˆ€ {ฮน : Type u_1} {๐’ž : Finset (Finset ฮน)} {u v : ฮน}, HiddenChannelCapacity.Adj ๐’ž u v โ†’ HiddenChannelCapacity.Adj ๐’ž v u
    Used by
  22. Hypothesishchord
    ยฌโˆƒ l, HiddenChannelCapacity.IsChordlessCycle ๐’ž l
  23. DefinitionHiddenChannelCapacity.Adjdef

    Primal adjacency: distinct co-hosted vertices.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ ฮน โ†’ ฮน โ†’ Prop
  24. DefinitionHiddenChannelCapacity.IsChordlessCycledef

    A chordless cycle: duplicate-free, length โ‰ฅ 4, consecutive pairs hosted, and the only adjacencies among its vertices are the cyclically consecutive ones.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ Finset (Finset ฮน) โ†’ List ฮน โ†’ Prop
  25. DefinitionHiddenChannelCapacity.IsWalkOndef

    A walk constrained to P: chained adjacencies, every vertex satisfies P.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ (ฮน โ†’ Prop) โ†’ List ฮน โ†’ Prop
  26. DefinitionHiddenChannelCapacity.ReachOndef

    Reachability within P: a duplicate-free walk with the given endpoints.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ (ฮน โ†’ Prop) โ†’ ฮน โ†’ ฮน โ†’ Prop
  27. DefinitionHiddenChannelCapacity.SimpIndef

    v is simplicial within the vertex set S: it lies in S and its ๐’ž-neighbors inside S are pairwise adjacent.

    {ฮน : Type u_1} โ†’ Finset (Finset ฮน) โ†’ Finset ฮน โ†’ ฮน โ†’ Prop
  28. DefinitionHiddenChannelCapacity.cyclePairsdef

    The consecutive-pair supports of a cyclic vertex list.

    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ List ฮน โ†’ List (Finset ฮน)
  29. DefinitionHiddenChannelCapacity.instDecidableAdjdef
    {ฮน : Type u_1} โ†’ [DecidableEq ฮน] โ†’ (๐’ž : Finset (Finset ฮน)) โ†’ (u v : ฮน) โ†’ Decidable (HiddenChannelCapacity.Adj ๐’ž u v)

The two-clique quantum junction tree theorem (Lauritzenโ€“Zwiernik, arXiv:2605.19453, Theorem 3.1): over the acyclic two-clique base, the base's compatibility datum decides base-side reconstruction. For strictly positive consistent marginals, a quantum Markov completion exists iff Tr T(R) = 1; the completion is then unique and equals the normalized logarithmic candidate ฯƒ(R) = T(R)/Tr T(R). Together with trC_le_one (the trace bound) this is the full theorem.

DeclHiddenChannelCapacity.lz_theorem_3_1
โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
  [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
  [inst_8 : Nonempty b] {ฯAC : MState (a ร— c)} {ฯCB : MState (c ร— b)},
  ฯAC.m.PosDef โ†’
    ฯCB.m.PosDef โ†’
      ฯAC.traceLeft = ฯCB.traceRight โ†’
        (HiddenChannelCapacity.trC ฯAC ฯCB = 1 โ†” โˆƒ ฯ‰, HiddenChannelCapacity.IsMarkovCompletion ฯAC ฯCB ฯ‰) โˆง
          โˆ€ (ฯ‰ : MState (a ร— c ร— b)),
            HiddenChannelCapacity.IsMarkovCompletion ฯAC ฯCB ฯ‰ โ†’ ฯ‰ = HiddenChannelCapacity.sigT ฯAC ฯCB
Layout
ThesisStepHypothesisDefinition
lz_theorem_3_1theoremฯAC.m.PosDefhACฯCB.m.PosDefhCBฯAC.traceLeft = ฯCB.traceโ€ฆhconssigT_markov_of_trC_eq_onetheoremmarkov_completion_eq_sigTtheoremtrC_le_onetheoremdeltaR_nonnegtheoremqDivR_dpi_traceLefttheoremqDivR_eq_toRealtheoremtoReal_bridgetheoremposDef_traceLefttheoremsigT_posDeftheoremqDivR_selftheoremqDivR_nonnegtheoremker_le_of_posDeftheoremlem_3_2theoremlog_sigTtheoremtrC_postheoremexp_log_idtheoreminner_embedCtheoremmargC_eq_CBrighttheoreminner_kron_onetheoremtraceRight_mul_kron_onetheoreminner_embedCBtheoremtraceLeft_mul_one_krontheoreminner_embedACtheoremtraceAlong_dualitytheoremtrace_submatrix_equivtheoremtraceRight_kron_one_multheoremmargAC_eq_traceAlongtheoremassoc'_eq_relabeltheoreminner_log_faithfultheoremkleinTerm_nonnegtheoremkleinTerm_eq_zero_ifftheoremoverlap_row_sumtheoremoverlap_col_sumtheoremlog_eq_cfctheoreminner_cfc_cfctheoremtrace_single_conjtheoremtrace_single_multheoremIsCompletiondefIsMarkovCompletiondefTRdefTmatdefembedACdefembedCdefembedCBdefkleinTermdefmargACdefmargCdefmargCBdefqDivRdefsigTdeftrCdeftraceAlongdefembedAlongdef
  1. DeclHiddenChannelCapacity.lz_theorem_3_1Declaration kindtheorem
    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
      [inst_8 : Nonempty b] {ฯAC : MState (a ร— c)} {ฯCB : MState (c ร— b)},
      ฯAC.m.PosDef โ†’
        ฯCB.m.PosDef โ†’
          ฯAC.traceLeft = ฯCB.traceRight โ†’
            (HiddenChannelCapacity.trC ฯAC ฯCB = 1 โ†” โˆƒ ฯ‰, HiddenChannelCapacity.IsMarkovCompletion ฯAC ฯCB ฯ‰) โˆง
              โˆ€ (ฯ‰ : MState (a ร— c ร— b)),
                HiddenChannelCapacity.IsMarkovCompletion ฯAC ฯCB ฯ‰ โ†’ ฯ‰ = HiddenChannelCapacity.sigT ฯAC ฯCB
    Uses
  2. DeclHiddenChannelCapacity.sigT_markov_of_trC_eq_oneDeclaration kindtheorem

    LZ Theorem 3.1, existence direction: if Tr T(R) = 1 then the normalized candidate IS a quantum Markov completion (extraction of ฮ”_R = 0 via DPI and the faithfulness of relative entropy, in the order recorded in the QJT_URS front-load).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
      [inst_8 : Nonempty b] {ฯAC : MState (a ร— c)} {ฯCB : MState (c ร— b)},
      ฯAC.m.PosDef โ†’
        ฯCB.m.PosDef โ†’
          ฯAC.traceLeft = ฯCB.traceRight โ†’
            HiddenChannelCapacity.trC ฯAC ฯCB = 1 โ†’
              HiddenChannelCapacity.IsMarkovCompletion ฯAC ฯCB (HiddenChannelCapacity.sigT ฯAC ฯCB)
    Uses
    Used by
  3. DeclHiddenChannelCapacity.markov_completion_eq_sigTDeclaration kindtheorem

    LZ Theorem 3.1, uniqueness direction: any quantum Markov completion forces Tr T(R) = 1 and equals the normalized candidate ฯƒ(R).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
      [inst_8 : Nonempty b] {ฯAC : MState (a ร— c)} {ฯCB : MState (c ร— b)},
      ฯAC.m.PosDef โ†’
        ฯCB.m.PosDef โ†’
          ฯAC.traceLeft = ฯCB.traceRight โ†’
            โˆ€ (ฯ‰ : MState (a ร— c ร— b)),
              HiddenChannelCapacity.IsMarkovCompletion ฯAC ฯCB ฯ‰ โ†’
                HiddenChannelCapacity.trC ฯAC ฯCB = 1 โˆง ฯ‰ = HiddenChannelCapacity.sigT ฯAC ฯCB
    Uses
    Used by
  4. DeclHiddenChannelCapacity.trC_le_oneDeclaration kindtheorem

    LZ Theorem 3.1, the trace bound: Tr T(R) โ‰ค 1. Proved WITHOUT Lieb's three-matrix inequality, by the eq. 13 route specialized to two cliques (Lemma 3.2 at ฯ‰ = ฯƒ(R) plus SSA and DPI); see the QJT_URS L2a front-load.

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b] [Nonempty b]
      {ฯAC : MState (a ร— c)} {ฯCB : MState (c ร— b)}, ฯAC.m.PosDef โ†’ ฯCB.m.PosDef โ†’ HiddenChannelCapacity.trC ฯAC ฯCB โ‰ค 1
    Uses
    Used by
  5. DeclHiddenChannelCapacity.deltaR_nonnegDeclaration kindtheorem

    ฮ”_R(ฯ‰) โ‰ฅ 0: one DPI application plus Klein nonnegativity (LZ Lem 3.2's nonnegativity clause, via Prop A.7 imported through the vendored channel DPI).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Fintype b] [inst_6 : DecidableEq b] {ฯAC : MState (a ร— c)}
      {ฯCB : MState (c ร— b)},
      ฯAC.m.PosDef โ†’
        ฯCB.m.PosDef โ†’
          โˆ€ (ฯ‰ : MState (a ร— c ร— b)),
            0 โ‰ค
              HiddenChannelCapacity.qDivR (HiddenChannelCapacity.margAC ฯ‰) ฯAC +
                  HiddenChannelCapacity.qDivR (HiddenChannelCapacity.margCB ฯ‰) ฯCB -
                HiddenChannelCapacity.qDivR (HiddenChannelCapacity.margC ฯ‰) ฯAC.traceLeft
    Uses
    Used by
  6. DeclHiddenChannelCapacity.qDivR_dpi_traceLeftDeclaration kindtheorem

    DPI for the real divergence under the left partial trace (monotonicity of relative entropy, LZ Prop A.7; imported from the vendored channel DPI sandwichedRenyiEntropy_DPI_eq_one at the partial-trace channel).

    โˆ€ {dโ‚ : Type u_5} {dโ‚‚ : Type u_6} [inst : Fintype dโ‚] [inst_1 : DecidableEq dโ‚] [inst_2 : Fintype dโ‚‚]
      [inst_3 : DecidableEq dโ‚‚] (ฯ ฯƒ : MState (dโ‚ ร— dโ‚‚)),
      ฯƒ.m.PosDef โ†’
        ฯƒ.traceLeft.m.PosDef โ†’ HiddenChannelCapacity.qDivR ฯ.traceLeft ฯƒ.traceLeft โ‰ค HiddenChannelCapacity.qDivR ฯ ฯƒ
    Uses
    Used by
  7. DeclHiddenChannelCapacity.qDivR_eq_toRealDeclaration kindtheorem

    The single ENNReal-to-โ„ seam: qDivR equals the vendored relative entropy. (LZ p. 5; vendored qRelativeEnt_rank.)

    โˆ€ {d : Type u_4} [inst : Fintype d] [inst_1 : DecidableEq d] {ฯ ฯƒ : MState d},
      ฯƒ.m.PosDef โ†’ HiddenChannelCapacity.qDivR ฯ ฯƒ = ๐ƒ(ฯโ€–ฯƒ).toReal
    Uses
    Used by
  8. DeclHiddenChannelCapacity.toReal_bridgeDeclaration kindtheorem
    โˆ€ {x : ENNReal} {r : โ„}, x โ‰  โŠค โ†’ โ†‘x = โ†‘r โ†’ x.toReal = r
    Used by
  9. DeclHiddenChannelCapacity.posDef_traceLeftDeclaration kindtheorem

    The partial trace of a strictly positive state is strictly positive (marginals of elements of Sโ‚โบ stay in Sโ‚โบ, LZ p. 4).

    โˆ€ {dโ‚ : Type u_1} {dโ‚‚ : Type u_2} [inst : Fintype dโ‚] [inst_1 : DecidableEq dโ‚] [Nonempty dโ‚] [inst_3 : Fintype dโ‚‚]
      [inst_4 : DecidableEq dโ‚‚] {ฯƒ : MState (dโ‚ ร— dโ‚‚)}, ฯƒ.m.PosDef โ†’ ฯƒ.traceLeft.m.PosDef
    Used by
  10. DeclHiddenChannelCapacity.sigT_posDefDeclaration kindtheorem
    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
      [inst_8 : Nonempty b] (ฯAC : MState (a ร— c)) (ฯCB : MState (c ร— b)), (HiddenChannelCapacity.sigT ฯAC ฯCB).m.PosDef
    Uses
    Used by
  11. DeclHiddenChannelCapacity.qDivR_selfDeclaration kindtheorem
    โˆ€ {d : Type u_4} [inst : Fintype d] [inst_1 : DecidableEq d] (ฯ : MState d), HiddenChannelCapacity.qDivR ฯ ฯ = 0
    Used by
  12. DeclHiddenChannelCapacity.qDivR_nonnegDeclaration kindtheorem

    Klein nonnegativity in real form (vendored core: inner_log_sub_log_nonneg).

    โˆ€ {d : Type u_4} [inst : Fintype d] [inst_1 : DecidableEq d] {ฯ ฯƒ : MState d},
      ฯƒ.m.PosDef โ†’ 0 โ‰ค HiddenChannelCapacity.qDivR ฯ ฯƒ
    Uses
    Used by
  13. DeclHiddenChannelCapacity.ker_le_of_posDefDeclaration kindtheorem
    โˆ€ {d : Type u_4} [inst : Fintype d] [inst_1 : DecidableEq d] {ฯ ฯƒ : MState d}, ฯƒ.m.PosDef โ†’ (โ†‘ฯƒ).ker โ‰ค (โ†‘ฯ).ker
    Used by
  14. DeclHiddenChannelCapacity.lem_3_2Declaration kindtheorem

    LZ Lemma 3.2, normalized form: for EVERY state ฯ‰, D(ฯ‰โ€–ฯƒ(R)) โˆ’ log Tr T(R) = I(A:B|C)_ฯ‰ + ฮ”_R(ฯ‰) with ฮ”_R(ฯ‰) := D(ฯ‰_ACโ€–ฯ_AC) + D(ฯ‰_CBโ€–ฯ_CB) โˆ’ D(ฯ‰_Cโ€–ฯ_C). This is the paper's divergence identity (p. 8) restated against the NORMALIZED candidate via log T(R) = log Tr T(R) + log ฯƒ(R) (the presentation variant recorded in QJT_URS; pure real algebra over the duality, no positivity hypotheses).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
      [inst_8 : Nonempty b] (ฯAC : MState (a ร— c)) (ฯCB : MState (c ร— b)) (ฯ‰ : MState (a ร— c ร— b)),
      HiddenChannelCapacity.qDivR ฯ‰ (HiddenChannelCapacity.sigT ฯAC ฯCB) - Real.log (HiddenChannelCapacity.trC ฯAC ฯCB) =
        qcmi ฯ‰ +
          (HiddenChannelCapacity.qDivR (HiddenChannelCapacity.margAC ฯ‰) ฯAC +
              HiddenChannelCapacity.qDivR (HiddenChannelCapacity.margCB ฯ‰) ฯCB -
            HiddenChannelCapacity.qDivR (HiddenChannelCapacity.margC ฯ‰) ฯAC.traceLeft)
    Uses
    Used by
  15. DeclHiddenChannelCapacity.log_sigTDeclaration kindtheorem

    The log of the normalized candidate splits into the trace constant and the embedded-log sum (log T(R) = log Tr T(R) + log ฯƒ(R), the normalization step of the LZ eq. 13 route).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [inst_5 : Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b]
      [inst_8 : Nonempty b] (ฯAC : MState (a ร— c)) (ฯCB : MState (c ร— b)),
      (โ†‘(HiddenChannelCapacity.sigT ฯAC ฯCB)).log =
        Real.log (HiddenChannelCapacity.trC ฯAC ฯCB)โปยน โ€ข 1 + HiddenChannelCapacity.Tmat ฯAC ฯCB
    Uses
    Used by
  16. DeclHiddenChannelCapacity.trC_posDeclaration kindtheorem
    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [Nonempty a]
      [inst_3 : Fintype c] [inst_4 : DecidableEq c] [Nonempty c] [inst_6 : Fintype b] [inst_7 : DecidableEq b] [Nonempty b]
      (ฯAC : MState (a ร— c)) (ฯCB : MState (c ร— b)), 0 < HiddenChannelCapacity.trC ฯAC ฯCB
    Used by
  17. DeclHiddenChannelCapacity.exp_log_idDeclaration kindtheorem

    exp then log is the identity on Hermitian matrices (unconditionally: both are cfc transports and Real.log โˆ˜ Real.exp = id).

    โˆ€ {d : Type u_4} [inst : Fintype d] [inst_1 : DecidableEq d] (A : HermitianMat d โ„‚), A.exp.log = A
    Used by
  18. DeclHiddenChannelCapacity.inner_embedCDeclaration kindtheorem

    Duality for the C-embedding (two-step pull-out; uses the marginal coherence margC_eq_CBright, LZ Lem 2.2).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Fintype c]
      [inst_3 : DecidableEq c] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ‰ : MState (a ร— c ร— b))
      (L : HermitianMat c โ„‚), inner โ„ (โ†‘ฯ‰) (HiddenChannelCapacity.embedC L) = inner โ„ (โ†‘(HiddenChannelCapacity.margC ฯ‰)) L
    Uses
    Used by
  19. DeclHiddenChannelCapacity.margC_eq_CBrightDeclaration kindtheorem

    Coherence of the two separator-marginal routes (iterated marginalization, LZ Lem 2.2): tracing a then b is tracing b then a.

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Fintype c]
      [inst_3 : DecidableEq c] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ‰ : MState (a ร— c ร— b)),
      HiddenChannelCapacity.margC ฯ‰ = (HiddenChannelCapacity.margCB ฯ‰).traceRight
    Uses
    Used by
  20. DeclHiddenChannelCapacity.inner_kron_oneDeclaration kindtheorem

    Duality for a right-identity Kronecker factor on any bipartite carrier.

    โˆ€ {dโ‚ : Type u_4} {dโ‚‚ : Type u_5} [inst : Fintype dโ‚] [inst_1 : DecidableEq dโ‚] [inst_2 : Fintype dโ‚‚]
      [inst_3 : DecidableEq dโ‚‚] (X : MState (dโ‚ ร— dโ‚‚)) (L : HermitianMat dโ‚ โ„‚),
      inner โ„ (โ†‘X) (L.kronecker 1) = inner โ„ (โ†‘X.traceRight) L
    Uses
    Used by
  21. DeclMatrix.traceRight_mul_kron_oneDeclaration kindtheorem

    Pull-out for the right partial trace, right-multiplication form: Tr_B(ฯ (M โŠ— 1_B)) = Tr_B(ฯ) ยท M.

    โˆ€ {R : Type u_1} [inst : NonAssocSemiring R] {d : Type u_2} {dโ‚ : Type u_3} {dโ‚‚ : Type u_4} {dโ‚ƒ : Type u_5}
      [inst_1 : Fintype d] [inst_2 : Fintype dโ‚‚] [inst_3 : DecidableEq d] (ฯ : Matrix (dโ‚ ร— d) (dโ‚‚ ร— d) R)
      (M : Matrix dโ‚‚ dโ‚ƒ R), Matrix.traceRight (ฯ * Matrix.kroneckerMap (fun x1 x2 => x1 * x2) M 1) = ฯ.traceRight * M
    Used by
  22. DeclHiddenChannelCapacity.inner_embedCBDeclaration kindtheorem

    Duality for the CโˆชB-embedding: testing the state against an embedded observable is testing the marginal (LZ eq. 2).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Fintype c]
      [inst_3 : DecidableEq c] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ‰ : MState (a ร— c ร— b))
      (L : HermitianMat (c ร— b) โ„‚),
      inner โ„ (โ†‘ฯ‰) (HiddenChannelCapacity.embedCB L) = inner โ„ (โ†‘(HiddenChannelCapacity.margCB ฯ‰)) L
    Uses
    Used by
  23. DeclMatrix.traceLeft_mul_one_kronDeclaration kindtheorem

    Pull-out, right-multiplication form: Tr_A(ฯ (1_A โŠ— M)) = Tr_A(ฯ) ยท M.

    โˆ€ {R : Type u_1} [inst : NonAssocSemiring R] {d : Type u_2} {dโ‚ : Type u_3} {dโ‚‚ : Type u_4} {dโ‚ƒ : Type u_5}
      [inst_1 : Fintype d] [inst_2 : Fintype dโ‚‚] [inst_3 : DecidableEq d] (ฯ : Matrix (d ร— dโ‚) (d ร— dโ‚‚) R)
      (M : Matrix dโ‚‚ dโ‚ƒ R), Matrix.traceLeft (ฯ * Matrix.kroneckerMap (fun x1 x2 => x1 * x2) 1 M) = ฯ.traceLeft * M
    Used by
  24. DeclHiddenChannelCapacity.inner_embedACDeclaration kindtheorem

    Duality for the AโˆชC-embedding (via the L0 primitive traceAlong_duality).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Fintype c]
      [inst_3 : DecidableEq c] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ‰ : MState (a ร— c ร— b))
      (L : HermitianMat (a ร— c) โ„‚),
      inner โ„ (โ†‘ฯ‰) (HiddenChannelCapacity.embedAC L) = inner โ„ (โ†‘(HiddenChannelCapacity.margAC ฯ‰)) L
    Uses
    Used by
  25. DeclMState.traceAlong_dualityDeclaration kindtheorem

    The partial-trace duality (LZ eq (2), the defining property of the partial trace, split-indexed): testing the marginal against an observable is testing the state against the embedded observable, Tr(embedAlong e M ยท ฯ) = Tr(M ยท traceAlong e ฯ).

    โˆ€ {d : Type u_1} {a : Type u_2} {b : Type u_3} [inst : Fintype d] [inst_1 : DecidableEq d] [inst_2 : Fintype a]
      [inst_3 : DecidableEq a] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ : MState d) (e : d โ‰ƒ a ร— b)
      (M : Matrix a a โ„‚), (Matrix.embedAlong e M * ฯ.m).trace = (M * (ฯ.traceAlong e).m).trace
    Uses
    Used by
  26. DeclMatrix.trace_submatrix_equivDeclaration kindtheorem

    The trace is invariant under simultaneous reindexing by an equivalence.

    โˆ€ {R : Type u_1} [inst : NonAssocSemiring R] {n : Type u_6} {m : Type u_7} [inst_1 : Fintype n] [inst_2 : Fintype m]
      (A : Matrix m m R) (e : n โ‰ƒ m), (A.submatrix โ‡‘e โ‡‘e).trace = A.trace
    Used by
  27. DeclMatrix.traceRight_kron_one_mulDeclaration kindtheorem

    Pull-out for the right partial trace, left-multiplication form: Tr_B((M โŠ— 1_B) ฯ) = M ยท Tr_B(ฯ).

    โˆ€ {R : Type u_1} [inst : NonAssocSemiring R] {d : Type u_2} {dโ‚ : Type u_3} {dโ‚‚ : Type u_4} {dโ‚ƒ : Type u_5}
      [inst_1 : Fintype d] [inst_2 : Fintype dโ‚‚] [inst_3 : DecidableEq d] (M : Matrix dโ‚ dโ‚‚ R)
      (ฯ : Matrix (dโ‚‚ ร— d) (dโ‚ƒ ร— d) R),
      Matrix.traceRight (Matrix.kroneckerMap (fun x1 x2 => x1 * x2) M 1 * ฯ) = M * ฯ.traceRight
    Used by
  28. DeclHiddenChannelCapacity.margAC_eq_traceAlongDeclaration kindtheorem

    The AC-marginal in traceAlong form (the L0 primitive).

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Fintype c]
      [inst_3 : DecidableEq c] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ‰ : MState (a ร— c ร— b)),
      HiddenChannelCapacity.margAC ฯ‰ = ฯ‰.traceAlong (Equiv.prodAssoc a c b).symm
    Uses
    Used by
  29. DeclHiddenChannelCapacity.assoc'_eq_relabelDeclaration kindtheorem

    The vendored associator is the plain prodAssoc relabel.

    โˆ€ {a : Type u_1} {c : Type u_2} {b : Type u_3} [inst : Fintype a] [inst_1 : DecidableEq a] [inst_2 : Fintype c]
      [inst_3 : DecidableEq c] [inst_4 : Fintype b] [inst_5 : DecidableEq b] (ฯ‰ : MState (a ร— c ร— b)),
      ฯ‰.assoc' = ฯ‰.relabel (Equiv.prodAssoc a c b)
    Used by
  30. DeclHiddenChannelCapacity.inner_log_faithfulDeclaration kindtheorem

    Faithfulness of quantum relative entropy (the equality case of Klein's inequality, LZ p. 5, Ruskai 2002 Thm 3; not present in the vendored corpus): for a state ฯ and a STRICTLY POSITIVE state ฯƒ, Tr[ฯ(log ฯ โˆ’ log ฯƒ)] = 0 forces ฯ = ฯƒ.

    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (ฯ ฯƒ : MState d),
      ฯƒ.m.PosDef โ†’ inner โ„ (โ†‘ฯ) ((โ†‘ฯ).log - (โ†‘ฯƒ).log) = 0 โ†’ ฯ = ฯƒ
    Uses
    Used by
  31. DeclHiddenChannelCapacity.kleinTerm_nonnegDeclaration kindtheorem
    โˆ€ {x y : โ„}, 0 โ‰ค x โ†’ 0 < y โ†’ 0 โ‰ค HiddenChannelCapacity.kleinTerm x y
    Used by
  32. DeclHiddenChannelCapacity.kleinTerm_eq_zero_iffDeclaration kindtheorem
    โˆ€ {x y : โ„}, 0 โ‰ค x โ†’ 0 < y โ†’ (HiddenChannelCapacity.kleinTerm x y = 0 โ†” x = y)
    Used by
  33. DeclHermitianMat.overlap_row_sumDeclaration kindtheorem

    Rows of the shared-basis kernel sum to one (C is unitary).

    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (A B : HermitianMat d โ„‚) (i : d),
      โˆ‘ j, โ€–((โ†‘โ‹ฏ.eigenvectorUnitary).conjTranspose * โ†‘โ‹ฏ.eigenvectorUnitary) i jโ€– ^ 2 = 1
    Used by
  34. DeclHermitianMat.overlap_col_sumDeclaration kindtheorem

    Columns of the shared-basis kernel sum to one.

    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (A B : HermitianMat d โ„‚) (j : d),
      โˆ‘ i, โ€–((โ†‘โ‹ฏ.eigenvectorUnitary).conjTranspose * โ†‘โ‹ฏ.eigenvectorUnitary) i jโ€– ^ 2 = 1
    Used by
  35. DeclHermitianMat.log_eq_cfcDeclaration kindtheorem

    A.log is cfc at Real.log, definitionally (QuantumInfo LogExp.lean).

    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (A : HermitianMat d โ„‚), A.log = A.cfc Real.log
    Used by
  36. DeclHermitianMat.inner_cfc_cfcDeclaration kindtheorem

    The shared-basis double sum (generalizing the vendored inner_eq_doubly_stochastic_sum from (A, B) to (A.cfc f, B.cfc g) with the SAME overlap kernel): the inner product of two matrix functions expands over the pair of eigenbases with weights โ€–C i jโ€–ยฒ, C = U_Aโ€  U_B. All four divergence pairings of the faithfulness argument are instances of this one lemma at a single shared kernel.

    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (A B : HermitianMat d โ„‚) (f g : โ„ โ†’ โ„),
      inner โ„ (A.cfc f) (B.cfc g) =
        โˆ‘ i,
          โˆ‘ j,
            f (โ‹ฏ.eigenvalues i) * g (โ‹ฏ.eigenvalues j) *
              โ€–((โ†‘โ‹ฏ.eigenvectorUnitary).conjTranspose * โ†‘โ‹ฏ.eigenvectorUnitary) i jโ€– ^ 2
    Uses
    Used by
  37. DeclHermitianMat.trace_single_conjDeclaration kindtheorem
    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (C : Matrix d d โ„‚) (i j : d),
      (Matrix.single i i 1 * C * Matrix.single j j 1 * C.conjTranspose).trace = C i j * star (C i j)
    Uses
    Used by
  38. DeclHermitianMat.trace_single_mulDeclaration kindtheorem
    โˆ€ {d : Type u_1} [inst : Fintype d] [inst_1 : DecidableEq d] (X : Matrix d d โ„‚) (i : d),
      (Matrix.single i i 1 * X).trace = X i i
    Used by
  39. HypothesishAC
    ฯAC.m.PosDef
  40. HypothesishCB
    ฯCB.m.PosDef
  41. Hypothesishcons
    ฯAC.traceLeft = ฯCB.traceRight
  42. DefinitionHiddenChannelCapacity.IsCompletiondef

    A completion: a global state with the prescribed marginals (LZ M(R), p. 7).

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’
                    [inst_5 : DecidableEq b] โ†’ MState (a ร— c) โ†’ MState (c ร— b) โ†’ MState (a ร— c ร— b) โ†’ Prop
  43. DefinitionHiddenChannelCapacity.IsMarkovCompletiondef

    A quantum Markov completion: a completion with I(A:B|C) = 0 (LZ Def 2.4 quantum conditional independence + the Markov completion of p. 7).

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’
                    [inst_5 : DecidableEq b] โ†’ MState (a ร— c) โ†’ MState (c ร— b) โ†’ MState (a ร— c ร— b) โ†’ Prop
  44. DefinitionHiddenChannelCapacity.TRdef

    The logarithmic candidate T(R) = exp(log ฯ_{AC} + log ฯ_{CB} โˆ’ log ฯ_C) (LZ eq. 5). A Hermitian matrix, NOT a priori a state: its trace deficit is the subject of the theorem.

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’
                    [inst_5 : DecidableEq b] โ†’ MState (a ร— c) โ†’ MState (c ร— b) โ†’ HermitianMat (a ร— c ร— b) โ„‚
  45. DefinitionHiddenChannelCapacity.Tmatdef

    The Hermitian exponent of the logarithmic candidate: the sum of the embedded logarithms of the marginals (log ฯ_{AC} + log ฯ_{CB} โˆ’ log ฯ_C, every operator embedded BEFORE exp; LZ eq. 5 with the p. 23 embedding convention; the separator marginal is taken from the AC side).

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’
                    [inst_5 : DecidableEq b] โ†’ MState (a ร— c) โ†’ MState (c ร— b) โ†’ HermitianMat (a ร— c ร— b) โ„‚
  46. DefinitionHiddenChannelCapacity.embedACdef

    Embed an AโˆชC-local operator into the global system.

    {a : Type u_1} โ†’ {c : Type u_2} โ†’ {b : Type u_3} โ†’ [DecidableEq b] โ†’ HermitianMat (a ร— c) โ„‚ โ†’ HermitianMat (a ร— c ร— b) โ„‚
  47. DefinitionHiddenChannelCapacity.embedCdef

    Embed a C-local operator into the global system.

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’ {b : Type u_3} โ†’ [DecidableEq a] โ†’ [DecidableEq b] โ†’ HermitianMat c โ„‚ โ†’ HermitianMat (a ร— c ร— b) โ„‚
  48. DefinitionHiddenChannelCapacity.embedCBdef

    Embed a CโˆชB-local operator into the global system (tensoring with the identity, LZ p. 23).

    {a : Type u_1} โ†’ {c : Type u_2} โ†’ {b : Type u_3} โ†’ [DecidableEq a] โ†’ HermitianMat (c ร— b) โ„‚ โ†’ HermitianMat (a ร— c ร— b) โ„‚
  49. DefinitionHiddenChannelCapacity.kleinTermdef

    The scalar Klein term x log x โˆ’ x log y โˆ’ x + y (the integrand of Klein's inequality, LZ p. 5 / Ruskai 2002 Thm 3).

    โ„ โ†’ โ„ โ†’ โ„
  50. DefinitionHiddenChannelCapacity.margACdef

    The AโˆชC-marginal of a global state (LZ p. 4: reduced density operator).

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’ [inst_5 : DecidableEq b] โ†’ MState (a ร— c ร— b) โ†’ MState (a ร— c)
  51. DefinitionHiddenChannelCapacity.margCdef

    The C-marginal (the separator marginal), as the vendor composite the qcmi definition consumes.

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’ [inst_4 : Fintype b] โ†’ [inst_5 : DecidableEq b] โ†’ MState (a ร— c ร— b) โ†’ MState c
  52. DefinitionHiddenChannelCapacity.margCBdef

    The CโˆชB-marginal of a global state.

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’ [inst_5 : DecidableEq b] โ†’ MState (a ร— c ร— b) โ†’ MState (c ร— b)
  53. DefinitionHiddenChannelCapacity.qDivRdef

    The quantum relative entropy in real form, Tr[ฯ (log ฯ โˆ’ log ฯƒ)] (LZ eq. 4 on density operators; equals the vendored qRelativeEnt by qRelativeEnt_rank when ฯƒ is nonsingular).

    {d : Type u_4} โ†’ [inst : Fintype d] โ†’ [inst_1 : DecidableEq d] โ†’ MState d โ†’ MState d โ†’ โ„
  54. DefinitionHiddenChannelCapacity.sigTdef

    The normalized candidate ฯƒ(R) = T(R)/Tr T(R): the state the equivalences of LZ Thm 3.1 are about.

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [Nonempty a] โ†’
                [inst_3 : Fintype c] โ†’
                  [inst_4 : DecidableEq c] โ†’
                    [Nonempty c] โ†’
                      [inst_6 : Fintype b] โ†’
                        [inst_7 : DecidableEq b] โ†’ [Nonempty b] โ†’ MState (a ร— c) โ†’ MState (c ร— b) โ†’ MState (a ร— c ร— b)
  55. DefinitionHiddenChannelCapacity.trCdef

    The trace of the logarithmic candidate.

    {a : Type u_1} โ†’
      {c : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype a] โ†’
            [inst_1 : DecidableEq a] โ†’
              [inst_2 : Fintype c] โ†’
                [inst_3 : DecidableEq c] โ†’
                  [inst_4 : Fintype b] โ†’ [inst_5 : DecidableEq b] โ†’ MState (a ร— c) โ†’ MState (c ร— b) โ†’ โ„
  56. DefinitionMState.traceAlongdef

    Trace out the second block of a coordinate split: the abstract partial-trace primitive of the L0 layer.

    {d : Type u_1} โ†’
      {a : Type u_2} โ†’
        {b : Type u_3} โ†’
          [inst : Fintype d] โ†’
            [inst_1 : DecidableEq d] โ†’
              [inst_2 : Fintype a] โ†’
                [inst_3 : DecidableEq a] โ†’ [Fintype b] โ†’ [DecidableEq b] โ†’ MState d โ†’ d โ‰ƒ a ร— b โ†’ MState a
  57. DefinitionMatrix.embedAlongdef

    Embed an operator on one block of a coordinate split into the whole space (tensor with the identity, transported along the split): the dual of MState.traceAlong, and the paper's embedding convention ("tensoring with identities BEFORE logs") as a named primitive.

    {R : Type u_1} โ†’
      [NonAssocSemiring R] โ†’
        {d : Type u_2} โ†’ {a : Type u_6} โ†’ {b : Type u_7} โ†’ [DecidableEq b] โ†’ d โ‰ƒ a ร— b โ†’ Matrix a a R โ†’ Matrix d d R

Closed form of the multivariate Gaussian KL divergence (M3b). For positive-definite covariances Sโ‚, Sโ‚‚, KL(N(mโ‚,Sโ‚) โ€– N(mโ‚‚,Sโ‚‚)) = ยฝ ( log(det Sโ‚‚ / det Sโ‚) + tr(Sโ‚‚โปยน Sโ‚) + โŸชmโ‚-mโ‚‚, Sโ‚‚โปยน(mโ‚-mโ‚‚)โŸซ - d ).

The whitening reduction (klDivReal_multivariateGaussian_whiten) sends the pair to a KL against the standard Gaussian (klDivReal_multivariateGaussian_stdGaussian); the three scalar invariants of the whitened covariance (det_whitened, trace_whitened, normSq_cfcSqrt_inv_apply) then identify the arguments.

DeclProbabilityTheory.klDivReal_multivariateGaussian
โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (mโ‚ mโ‚‚ : EuclideanSpace โ„ ฮน) {Sโ‚ Sโ‚‚ : Matrix ฮน ฮน โ„},
  Sโ‚.PosDef โ†’
    Sโ‚‚.PosDef โ†’
      InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian mโ‚ Sโ‚)
          (ProbabilityTheory.multivariateGaussian mโ‚‚ Sโ‚‚) =
        1 / 2 *
          (Real.log (Sโ‚‚.det / Sโ‚.det) + (Sโ‚‚โปยน * Sโ‚).trace + (mโ‚ - mโ‚‚).ofLp โฌแตฅ Sโ‚‚โปยน.mulVec (mโ‚.ofLp - mโ‚‚.ofLp) -
            โ†‘(Fintype.card ฮน))
Layout
ThesisStepHypothesisDefinition
klDivReal_multivariateGauโ€ฆtheoremSโ‚.PosDefhSโ‚Sโ‚‚.PosDefhSโ‚‚trace_whitenedtheoremposDef_whitenedtheoremnormSq_cfcSqrt_inv_applytheoremconjTranspose_cfcSqrt_invtheoremconjTranspose_cfcSqrttheoremcfcSqrt_inv_mul_selftheoremklDivReal_multivariateGauโ€ฆtheoremmultivariateGaussian_eq_mโ€ฆtheoremgaussianAffineEquiv_applytheoremgaussianAffineEquiv_symm_โ€ฆtheoremklDivReal_multivariateGauโ€ฆtheoremnormSq_toEuclideanCLM_of_โ€ฆtheoremmap_multivariateGaussian_โ€ฆtheoremklDivReal_multivariateGauโ€ฆtheoremmultivariateGaussian_diagโ€ฆtheoremmap_stdGaussian_affinetheoreminner_adjoint_toEuclideanโ€ฆtheoremadjoint_toEuclideanCLMtheoremklDiv_gaussianReal_ne_toptheoremklDivReal_pi'theoremklDiv_pi'theoremklDiv_pitheoremklDiv_prodtheoremklDiv_prod_same_lefttheoremklDiv_map_equivtheoremllr_map_equivtheoremklDivReal_eq_toReal_klDivtheoremintegrand_eq_llrtheoremklDivReal_gaussianRealtheoremrnDeriv_gaussianReal_ratiotheoremlog_gaussianPDFRealtheoremintegral_sq_sub_consttheoremintegral_sub_mean_selftheoremintegral_sq_sub_mean_selftheoremklDivReal_map_measurableEโ€ฆtheoremdet_whitenedtheoremisUnit_det_cfcSqrttheoremklDivRealdefgaussianAffineEquivdeftoEuclideanCLEdeftoLpMeasurableEquivdef
  1. DeclProbabilityTheory.klDivReal_multivariateGaussianDeclaration kindtheorem
    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (mโ‚ mโ‚‚ : EuclideanSpace โ„ ฮน) {Sโ‚ Sโ‚‚ : Matrix ฮน ฮน โ„},
      Sโ‚.PosDef โ†’
        Sโ‚‚.PosDef โ†’
          InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian mโ‚ Sโ‚)
              (ProbabilityTheory.multivariateGaussian mโ‚‚ Sโ‚‚) =
            1 / 2 *
              (Real.log (Sโ‚‚.det / Sโ‚.det) + (Sโ‚‚โปยน * Sโ‚).trace + (mโ‚ - mโ‚‚).ofLp โฌแตฅ Sโ‚‚โปยน.mulVec (mโ‚.ofLp - mโ‚‚.ofLp) -
                โ†‘(Fintype.card ฮน))
    Uses
  2. DeclProbabilityTheory.trace_whitenedDeclaration kindtheorem

    tr C(Sโ‚,Sโ‚‚) = tr(Sโ‚‚โปยน Sโ‚).

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] {Sโ‚ Sโ‚‚ : Matrix ฮน ฮน โ„},
      Sโ‚.PosDef โ†’
        Sโ‚‚.PosDef โ†’
          ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚ * ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚).conjTranspose).trace = (Sโ‚‚โปยน * Sโ‚).trace
    Uses
    Used by
  3. DeclProbabilityTheory.posDef_whitenedDeclaration kindtheorem

    The whitened covariance (โˆšSโ‚‚โปยน โˆšSโ‚)(โˆšSโ‚‚โปยน โˆšSโ‚)แดด is positive-definite (its factor is invertible).

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] {Sโ‚ Sโ‚‚ : Matrix ฮน ฮน โ„},
      Sโ‚.PosDef โ†’ Sโ‚‚.PosDef โ†’ ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚ * ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚).conjTranspose).PosDef
    Uses
    Used by
  4. DeclProbabilityTheory.normSq_cfcSqrt_inv_applyDeclaration kindtheorem

    The whitening map preserves the quadratic form: โ€–โˆšSโ‚‚โปยน vโ€–ยฒ = โŸชv, Sโ‚‚โปยน vโŸซ.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] {Sโ‚‚ : Matrix ฮน ฮน โ„},
      Sโ‚‚.PosDef โ†’ โˆ€ (v : EuclideanSpace โ„ ฮน), โ€–(Matrix.toEuclideanCLM (CFC.sqrt Sโ‚‚)โปยน) vโ€– ^ 2 = v.ofLp โฌแตฅ Sโ‚‚โปยน.mulVec v.ofLp
    Uses
    Used by
  5. DeclProbabilityTheory.conjTranspose_cfcSqrt_invDeclaration kindtheorem

    The inverse of a functional-calculus square root is self-adjoint.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (S : Matrix ฮน ฮน โ„),
      (CFC.sqrt S)โปยน.conjTranspose = (CFC.sqrt S)โปยน
    Uses
    Used by
  6. DeclProbabilityTheory.conjTranspose_cfcSqrtDeclaration kindtheorem

    The functional-calculus square root of a matrix is self-adjoint.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (S : Matrix ฮน ฮน โ„), (CFC.sqrt S).conjTranspose = CFC.sqrt S
    Used by
  7. DeclProbabilityTheory.cfcSqrt_inv_mul_selfDeclaration kindtheorem

    (โˆšS)โปยน (โˆšS)โปยน = Sโปยน for positive-definite S.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] {S : Matrix ฮน ฮน โ„},
      S.PosDef โ†’ (CFC.sqrt S)โปยน * (CFC.sqrt S)โปยน = Sโปยน
    Used by
  8. DeclProbabilityTheory.klDivReal_multivariateGaussian_whitenDeclaration kindtheorem

    Whitening reduction of the multivariate Gaussian KL. For positive-definite Sโ‚‚, pushing both measures through the whitening equivalence (gaussianAffineEquiv mโ‚‚ hSโ‚‚).symm reduces the KL divergence of two multivariate Gaussians to a KL against the standard Gaussian, with whitened mean โˆšSโ‚‚โปยน (mโ‚ โˆ’ mโ‚‚) and covariance (โˆšSโ‚‚โปยน โˆšSโ‚)(โˆšSโ‚‚โปยน โˆšSโ‚)แดด.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (mโ‚ mโ‚‚ : EuclideanSpace โ„ ฮน) (Sโ‚ Sโ‚‚ : Matrix ฮน ฮน โ„),
      Sโ‚‚.PosDef โ†’
        InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian mโ‚ Sโ‚)
            (ProbabilityTheory.multivariateGaussian mโ‚‚ Sโ‚‚) =
          InformationTheory.klDivReal
            (ProbabilityTheory.multivariateGaussian ((Matrix.toEuclideanCLM (CFC.sqrt Sโ‚‚)โปยน) (mโ‚ - mโ‚‚))
              ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚ * ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚).conjTranspose))
            (ProbabilityTheory.stdGaussian (EuclideanSpace โ„ ฮน))
    Uses
    Used by
  9. DeclProbabilityTheory.multivariateGaussian_eq_map_gaussianAffineEquivDeclaration kindtheorem

    multivariateGaussian m S is the pushforward of the standard Gaussian by the affine equivalence gaussianAffineEquiv m hS.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (m : EuclideanSpace โ„ ฮน) {S : Matrix ฮน ฮน โ„}
      (hS : S.PosDef),
      ProbabilityTheory.multivariateGaussian m S =
        MeasureTheory.Measure.map (โ‡‘(ProbabilityTheory.gaussianAffineEquiv m hS))
          (ProbabilityTheory.stdGaussian (EuclideanSpace โ„ ฮน))
    Uses
    Used by
  10. DeclProbabilityTheory.gaussianAffineEquiv_applyDeclaration kindtheorem

    gaussianAffineEquiv m hS is the affine map z โ†ฆ m + โˆšS z.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (m : EuclideanSpace โ„ ฮน) {S : Matrix ฮน ฮน โ„} (hS : S.PosDef)
      (z : EuclideanSpace โ„ ฮน), (ProbabilityTheory.gaussianAffineEquiv m hS) z = m + (Matrix.toEuclideanCLM (CFC.sqrt S)) z
    Uses
    Used by
  11. DeclProbabilityTheory.gaussianAffineEquiv_symm_applyDeclaration kindtheorem

    The whitening map: the inverse of gaussianAffineEquiv m hS is z โ†ฆ โˆšSโปยน (z - m).

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (m : EuclideanSpace โ„ ฮน) {S : Matrix ฮน ฮน โ„} (hS : S.PosDef)
      (z : EuclideanSpace โ„ ฮน),
      (ProbabilityTheory.gaussianAffineEquiv m hS).symm z = (Matrix.toEuclideanCLM (CFC.sqrt S)โปยน) (z - m)
    Uses
    Used by
  12. DeclProbabilityTheory.klDivReal_multivariateGaussian_stdGaussianDeclaration kindtheorem

    Closed form of the multivariate Gaussian KL against the standard Gaussian. For a positive-definite covariance C, klDivReal (N(w, C)) (stdGaussian) = ยฝ ( -log det C + tr C + โ€–wโ€–ยฒ - d ).

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (w : EuclideanSpace โ„ ฮน) {C : Matrix ฮน ฮน โ„},
      C.PosDef โ†’
        InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian w C)
            (ProbabilityTheory.stdGaussian (EuclideanSpace โ„ ฮน)) =
          1 / 2 * (-Real.log C.det + C.trace + โ€–wโ€– ^ 2 - โ†‘(Fintype.card ฮน))
    Uses
    Used by
  13. DeclProbabilityTheory.normSq_toEuclideanCLM_of_isometryDeclaration kindtheorem

    An orthogonal change of variables preserves the Euclidean norm: if Mแดด M = 1 then โ€–toEuclideanCLM M wโ€–ยฒ = โ€–wโ€–ยฒ.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] {M : Matrix ฮน ฮน โ„},
      M.conjTranspose * M = 1 โ†’ โˆ€ (w : EuclideanSpace โ„ ฮน), โ€–(Matrix.toEuclideanCLM M) wโ€– ^ 2 = โ€–wโ€– ^ 2
    Uses
    Used by
  14. DeclProbabilityTheory.map_multivariateGaussian_affineDeclaration kindtheorem

    General affine image of a multivariate Gaussian. For positive-semidefinite covariance S, the affine pushforward x โ†ฆ a + B x of multivariateGaussian ฮผ S is the multivariate Gaussian with transported mean a + B ฮผ and congruent covariance B * S * Bแดด. This is the covariance- transport engine of the diagonalization step: an orthogonal B = Uแต€ sends the whitened covariance to its eigenvalue diagonal Uแต€ S U. Proved by composing the two affine maps and reducing to the standard-Gaussian image map_stdGaussian_affine, using โˆšS ยท โˆšSแดด = โˆšS ยท โˆšS = S.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (a ฮผ : EuclideanSpace โ„ ฮน) (B S : Matrix ฮน ฮน โ„),
      S.PosSemidef โ†’
        MeasureTheory.Measure.map (fun x => a + (Matrix.toEuclideanCLM B) x) (ProbabilityTheory.multivariateGaussian ฮผ S) =
          ProbabilityTheory.multivariateGaussian (a + (Matrix.toEuclideanCLM B) ฮผ) (B * S * B.conjTranspose)
    Uses
    Used by
  15. DeclProbabilityTheory.klDivReal_multivariateGaussian_diagonal_stdGaussianDeclaration kindtheorem

    KL of a diagonal multivariate Gaussian against the standard Gaussian, tensorized. For strictly positive diagonal covariance d > 0, klDivReal (mvG ฮผ (diagonal d)) stdGaussian = โˆ‘แตข ยฝ(-log dแตข + dแตข + ฮผแตขยฒ - 1), the coordinatewise sum of the scalar Gaussian-Gaussian KL closed forms. This is the diagonalized-and-tensorized leg of the multivariate Gaussian KL closed form.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (ฮผ : EuclideanSpace โ„ ฮน) (d : ฮน โ†’ โ„),
      (โˆ€ (i : ฮน), 0 < d i) โ†’
        InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian ฮผ (Matrix.diagonal d))
            (ProbabilityTheory.stdGaussian (EuclideanSpace โ„ ฮน)) =
          โˆ‘ i, 1 / 2 * (-Real.log (d i) + d i + ฮผ.ofLp i ^ 2 - 1)
    Uses
    Used by
  16. DeclProbabilityTheory.multivariateGaussian_diagonal_eq_map_piDeclaration kindtheorem

    A diagonal multivariate Gaussian is a pushed-forward product of scalar Gaussians. For d โ‰ฅ 0, multivariateGaussian ฮผ (diagonal d) is the image under toLp 2 of the product measure โˆแตข gaussianReal ฮผแตข dแตข.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (ฮผ : EuclideanSpace โ„ ฮน) (d : ฮน โ†’ โ„),
      (โˆ€ (i : ฮน), 0 โ‰ค d i) โ†’
        ProbabilityTheory.multivariateGaussian ฮผ (Matrix.diagonal d) =
          MeasureTheory.Measure.map (WithLp.toLp 2)
            (MeasureTheory.Measure.pi fun i => ProbabilityTheory.gaussianReal (ฮผ.ofLp i) (d i).toNNReal)
    Uses
    Used by
  17. DeclProbabilityTheory.map_stdGaussian_affineDeclaration kindtheorem

    The affine image z โ†ฆ a + B z of the standard Gaussian on EuclideanSpace โ„ ฮน is the multivariate Gaussian with mean a and covariance B * Bแดด.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (a : EuclideanSpace โ„ ฮน) (B : Matrix ฮน ฮน โ„),
      MeasureTheory.Measure.map (fun z => a + (Matrix.toEuclideanCLM B) z)
          (ProbabilityTheory.stdGaussian (EuclideanSpace โ„ ฮน)) =
        ProbabilityTheory.multivariateGaussian a (B * B.conjTranspose)
    Uses
    Used by
  18. DeclProbabilityTheory.inner_adjoint_toEuclideanCLMDeclaration kindtheorem

    The real inner product of the two adjoint images (toEuclideanCLM B)แดด x and (toEuclideanCLM B)แดด y equals the quadratic form x โฌแตฅ (B * Bแดด) *แตฅ y.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (B : Matrix ฮน ฮน โ„) (x y : EuclideanSpace โ„ ฮน),
      inner โ„ ((ContinuousLinearMap.adjoint (Matrix.toEuclideanCLM B)) x)
          ((ContinuousLinearMap.adjoint (Matrix.toEuclideanCLM B)) y) =
        x.ofLp โฌแตฅ (B * B.conjTranspose).mulVec y.ofLp
    Uses
    Used by
  19. DeclProbabilityTheory.adjoint_toEuclideanCLMDeclaration kindtheorem

    The adjoint of toEuclideanCLM B is toEuclideanCLM Bแดด: toEuclideanCLM is a star algebra equivalence, so it carries the matrix conjugate transpose to the operator adjoint.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (B : Matrix ฮน ฮน โ„),
      ContinuousLinearMap.adjoint (Matrix.toEuclideanCLM B) = Matrix.toEuclideanCLM B.conjTranspose
    Used by
  20. DeclInformationTheory.klDiv_gaussianReal_ne_topDeclaration kindtheorem

    Finiteness of the one-dimensional Gaussian-Gaussian KL divergence. For variance parameters vโ‚ โ‰  0, vโ‚‚ โ‰  0, the โ„โ‰ฅ0โˆž-valued klDiv (N(mโ‚, vโ‚)) (N(mโ‚‚, vโ‚‚)) is finite. This is the integrability side-condition that klDivReal_pi requires per coordinate: the log-likelihood ratio is P-a.e. an explicit quadratic, whose square-integrability against P = N(mโ‚, vโ‚) is the finiteness of the second moment.

    โˆ€ {mโ‚ mโ‚‚ : โ„} {vโ‚ vโ‚‚ : NNReal},
      vโ‚ โ‰  0 โ†’
        vโ‚‚ โ‰  0 โ†’ InformationTheory.klDiv (ProbabilityTheory.gaussianReal mโ‚ vโ‚) (ProbabilityTheory.gaussianReal mโ‚‚ vโ‚‚) โ‰  โŠค
    Uses
    Used by
  21. DeclInformationTheory.klDivReal_pi'Declaration kindtheorem

    KL tensorization for klDivReal over an arbitrary finite product (general Fintype index): the real-valued analogue of klDiv_pi'.

    โˆ€ {ฮน : Type u_3} [inst : Fintype ฮน] {X : ฮน โ†’ Type u_4} {mX : (i : ฮน) โ†’ MeasurableSpace (X i)}
      (P Q : (i : ฮน) โ†’ MeasureTheory.Measure (X i)) [โˆ€ (i : ฮน), MeasureTheory.IsProbabilityMeasure (P i)]
      [โˆ€ (i : ฮน), MeasureTheory.IsProbabilityMeasure (Q i)],
      (โˆ€ (i : ฮน), (P i).AbsolutelyContinuous (Q i)) โ†’
        (โˆ€ (i : ฮน), InformationTheory.klDiv (P i) (Q i) โ‰  โŠค) โ†’
          InformationTheory.klDivReal (MeasureTheory.Measure.pi P) (MeasureTheory.Measure.pi Q) =
            โˆ‘ i, InformationTheory.klDivReal (P i) (Q i)
    Uses
    Used by
  22. DeclInformationTheory.klDiv_pi'Declaration kindtheorem

    KL tensorization over an arbitrary finite product (general Fintype index). Reduces to the Fin-indexed klDiv_pi by reindexing through ฮน โ‰ƒ Fin (card ฮน).

    โˆ€ {ฮน : Type u_3} [inst : Fintype ฮน] {X : ฮน โ†’ Type u_4} {mX : (i : ฮน) โ†’ MeasurableSpace (X i)}
      (P Q : (i : ฮน) โ†’ MeasureTheory.Measure (X i)) [โˆ€ (i : ฮน), MeasureTheory.IsProbabilityMeasure (P i)]
      [โˆ€ (i : ฮน), MeasureTheory.IsProbabilityMeasure (Q i)],
      InformationTheory.klDiv (MeasureTheory.Measure.pi P) (MeasureTheory.Measure.pi Q) =
        โˆ‘ i, InformationTheory.klDiv (P i) (Q i)
    Uses
    Used by
  23. DeclInformationTheory.klDiv_piDeclaration kindtheorem

    KL tensorization over a finite product, indexed by Fin (n+1): klDiv (Measure.pi P) (Measure.pi Q) = โˆ‘ i, klDiv (P i) (Q i).

    โˆ€ {n : โ„•} {X : Fin n โ†’ Type u_3} {mX : (i : Fin n) โ†’ MeasurableSpace (X i)}
      (P Q : (i : Fin n) โ†’ MeasureTheory.Measure (X i)) [โˆ€ (i : Fin n), MeasureTheory.IsProbabilityMeasure (P i)]
      [โˆ€ (i : Fin n), MeasureTheory.IsProbabilityMeasure (Q i)],
      InformationTheory.klDiv (MeasureTheory.Measure.pi P) (MeasureTheory.Measure.pi Q) =
        โˆ‘ i, InformationTheory.klDiv (P i) (Q i)
    Uses
    Used by
  24. DeclInformationTheory.klDiv_prodDeclaration kindtheorem

    Binary KL tensorization. For probability measures, klDiv (ฮผ.prod ฮฝ) (ฮผ'.prod ฮฝ') = klDiv ฮผ ฮผ' + klDiv ฮฝ ฮฝ'.

    โˆ€ {ฮฑ : Type u_1} {ฮฒ : Type u_2} {mฮฑ : MeasurableSpace ฮฑ} {mฮฒ : MeasurableSpace ฮฒ} (ฮผ ฮผ' : MeasureTheory.Measure ฮฑ)
      (ฮฝ ฮฝ' : MeasureTheory.Measure ฮฒ) [MeasureTheory.IsProbabilityMeasure ฮผ] [MeasureTheory.IsProbabilityMeasure ฮผ']
      [MeasureTheory.IsProbabilityMeasure ฮฝ] [MeasureTheory.IsProbabilityMeasure ฮฝ'],
      InformationTheory.klDiv (ฮผ.prod ฮฝ) (ฮผ'.prod ฮฝ') = InformationTheory.klDiv ฮผ ฮผ' + InformationTheory.klDiv ฮฝ ฮฝ'
    Uses
    Used by
  25. DeclInformationTheory.klDiv_prod_same_leftDeclaration kindtheorem

    Two products sharing the same first marginal reduce to the second-coordinate KL: klDiv (ฮผ.prod ฮฝ) (ฮผ.prod ฮฝ') = klDiv ฮฝ ฮฝ'.

    โˆ€ {ฮฑ : Type u_1} {ฮฒ : Type u_2} {mฮฑ : MeasurableSpace ฮฑ} {mฮฒ : MeasurableSpace ฮฒ} (ฮผ : MeasureTheory.Measure ฮฑ)
      (ฮฝ ฮฝ' : MeasureTheory.Measure ฮฒ) [MeasureTheory.IsProbabilityMeasure ฮผ] [MeasureTheory.IsFiniteMeasure ฮฝ]
      [MeasureTheory.IsFiniteMeasure ฮฝ'], InformationTheory.klDiv (ฮผ.prod ฮฝ) (ฮผ.prod ฮฝ') = InformationTheory.klDiv ฮฝ ฮฝ'
    Uses
    Used by
  26. DeclInformationTheory.klDiv_map_equivDeclaration kindtheorem

    KL invariance under a measurable equivalence (โ„โ‰ฅ0โˆž-valued). For finite measures ฮผ, ฮฝ and a measurable equivalence e : ฮฑ โ‰ƒแต ฮฒ, klDiv (ฮผ.map e) (ฮฝ.map e) = klDiv ฮผ ฮฝ.

    โˆ€ {ฮฑ : Type u_1} {ฮฒ : Type u_2} [inst : MeasurableSpace ฮฑ] [inst_1 : MeasurableSpace ฮฒ] (e : ฮฑ โ‰ƒแต ฮฒ)
      (ฮผ ฮฝ : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsFiniteMeasure ฮผ] [MeasureTheory.IsFiniteMeasure ฮฝ],
      InformationTheory.klDiv (MeasureTheory.Measure.map (โ‡‘e) ฮผ) (MeasureTheory.Measure.map (โ‡‘e) ฮฝ) =
        InformationTheory.klDiv ฮผ ฮฝ
    Uses
    Used by
  27. DeclInformationTheory.llr_map_equivDeclaration kindtheorem

    The log-likelihood ratio is invariant (a.e.) under pushforward by a measurable equivalence: llr (ฮผ.map e) (ฮฝ.map e) (e x) =แต[ฮฝ] llr ฮผ ฮฝ x.

    โˆ€ {ฮฑ : Type u_1} {ฮฒ : Type u_2} [inst : MeasurableSpace ฮฑ] [inst_1 : MeasurableSpace ฮฒ] (e : ฮฑ โ‰ƒแต ฮฒ)
      (ฮผ ฮฝ : MeasureTheory.Measure ฮฑ) [MeasureTheory.SigmaFinite ฮผ] [MeasureTheory.SigmaFinite ฮฝ],
      (fun x => MeasureTheory.llr (MeasureTheory.Measure.map (โ‡‘e) ฮผ) (MeasureTheory.Measure.map (โ‡‘e) ฮฝ) (e x)) =แต[ฮฝ]
        MeasureTheory.llr ฮผ ฮฝ
    Used by
  28. DeclInformationTheory.klDivReal_eq_toReal_klDivDeclaration kindtheorem

    For probability measures with P โ‰ช Q, the โ„-valued KL equals (Mathlib.klDiv P Q).toReal. Both measures have total mass 1, so the Mathlib correction term vanishes.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsProbabilityMeasure P]
      [MeasureTheory.IsProbabilityMeasure Q],
      P.AbsolutelyContinuous Q โ†’ InformationTheory.klDivReal P Q = (InformationTheory.klDiv P Q).toReal
    Uses
    Used by
  29. DeclInformationTheory.integrand_eq_llrDeclaration kindtheorem

    The integrand log ((P.rnDeriv Q x).toReal) is definitionally Mathlib's log-likelihood ratio llr P Q x.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ),
      (fun x => Real.log (P.rnDeriv Q x).toReal) = MeasureTheory.llr P Q
    Used by
  30. DeclInformationTheory.klDivReal_gaussianRealDeclaration kindtheorem

    Closed form of the 1-D Gaussian-Gaussian KL divergence. For variance parameters vโ‚ โ‰  0, vโ‚‚ โ‰  0, KL( N(mโ‚, vโ‚) โ€– N(mโ‚‚, vโ‚‚) ) = ยฝ ( log(vโ‚‚/vโ‚) + (vโ‚ + (mโ‚-mโ‚‚)ยฒ)/vโ‚‚ - 1 ).

    โˆ€ {mโ‚ mโ‚‚ : โ„} {vโ‚ vโ‚‚ : NNReal},
      vโ‚ โ‰  0 โ†’
        vโ‚‚ โ‰  0 โ†’
          InformationTheory.klDivReal (ProbabilityTheory.gaussianReal mโ‚ vโ‚) (ProbabilityTheory.gaussianReal mโ‚‚ vโ‚‚) =
            1 / 2 * (Real.log (โ†‘vโ‚‚ / โ†‘vโ‚) + (โ†‘vโ‚ + (mโ‚ - mโ‚‚) ^ 2) / โ†‘vโ‚‚ - 1)
    Uses
    Used by
  31. DeclInformationTheory.rnDeriv_gaussianReal_ratioDeclaration kindtheorem

    The Radon-Nikodym derivative of one real Gaussian w.r.t. another is, volume-a.e., the ratio of their densities.

    โˆ€ {mโ‚ mโ‚‚ : โ„} {vโ‚ vโ‚‚ : NNReal},
      vโ‚ โ‰  0 โ†’
        vโ‚‚ โ‰  0 โ†’
          (ProbabilityTheory.gaussianReal mโ‚ vโ‚).rnDeriv (ProbabilityTheory.gaussianReal mโ‚‚ vโ‚‚) =แต[MeasureTheory.volume]
            fun x => ProbabilityTheory.gaussianPDF mโ‚ vโ‚ x / ProbabilityTheory.gaussianPDF mโ‚‚ vโ‚‚ x
    Used by
  32. DeclInformationTheory.log_gaussianPDFRealDeclaration kindtheorem

    log (gaussianPDFReal m v x) = -ยฝ log(2ฯ€v) - (x - m)ยฒ/(2v) for v โ‰  0.

    โˆ€ {mโ‚ : โ„} {vโ‚ : NNReal},
      vโ‚ โ‰  0 โ†’
        โˆ€ (x : โ„),
          Real.log (ProbabilityTheory.gaussianPDFReal mโ‚ vโ‚ x) =
            -(1 / 2) * Real.log (2 * Real.pi * โ†‘vโ‚) - (x - mโ‚) ^ 2 / (2 * โ†‘vโ‚)
    Used by
  33. DeclInformationTheory.integral_sq_sub_constDeclaration kindtheorem

    โˆซ (x - mโ‚‚)ยฒ โˆ‚gaussianReal mโ‚ vโ‚ = vโ‚ + (mโ‚ - mโ‚‚)ยฒ (bias-variance split).

    โˆ€ {mโ‚ mโ‚‚ : โ„} {vโ‚ : NNReal}, โˆซ (x : โ„), (x - mโ‚‚) ^ 2 โˆ‚ProbabilityTheory.gaussianReal mโ‚ vโ‚ = โ†‘vโ‚ + (mโ‚ - mโ‚‚) ^ 2
    Uses
    Used by
  34. DeclInformationTheory.integral_sub_mean_selfDeclaration kindtheorem

    โˆซ (x - mโ‚) โˆ‚gaussianReal mโ‚ vโ‚ = 0.

    โˆ€ {mโ‚ : โ„} {vโ‚ : NNReal}, โˆซ (x : โ„), x - mโ‚ โˆ‚ProbabilityTheory.gaussianReal mโ‚ vโ‚ = 0
    Used by
  35. DeclInformationTheory.integral_sq_sub_mean_selfDeclaration kindtheorem

    โˆซ (x - mโ‚)ยฒ โˆ‚gaussianReal mโ‚ vโ‚ = vโ‚.

    โˆ€ {mโ‚ : โ„} {vโ‚ : NNReal}, โˆซ (x : โ„), (x - mโ‚) ^ 2 โˆ‚ProbabilityTheory.gaussianReal mโ‚ vโ‚ = โ†‘vโ‚
    Used by
  36. DeclInformationTheory.klDivReal_map_measurableEquivDeclaration kindtheorem

    KL invariance under a measurable equivalence. For ฯƒ-finite measures P, Q on ฮฑ and a measurable equivalence e : ฮฑ โ‰ƒแต ฮฒ, klDivReal (P.map e) (Q.map e) = klDivReal P Q.

    โˆ€ {ฮฑ : Type u_1} {ฮฒ : Type u_2} [inst : MeasurableSpace ฮฑ] [inst_1 : MeasurableSpace ฮฒ] (e : ฮฑ โ‰ƒแต ฮฒ)
      (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.SigmaFinite P] [MeasureTheory.SigmaFinite Q],
      InformationTheory.klDivReal (MeasureTheory.Measure.map (โ‡‘e) P) (MeasureTheory.Measure.map (โ‡‘e) Q) =
        InformationTheory.klDivReal P Q
    Used by
  37. DeclProbabilityTheory.det_whitenedDeclaration kindtheorem

    det C(Sโ‚,Sโ‚‚) = det Sโ‚ / det Sโ‚‚.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] {Sโ‚ Sโ‚‚ : Matrix ฮน ฮน โ„},
      Sโ‚.PosDef โ†’
        Sโ‚‚.PosDef โ†’ ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚ * ((CFC.sqrt Sโ‚‚)โปยน * CFC.sqrt Sโ‚).conjTranspose).det = Sโ‚.det / Sโ‚‚.det
    Uses
    Used by
  38. DeclProbabilityTheory.isUnit_det_cfcSqrtDeclaration kindtheorem

    For a positive-definite matrix S, the functional-calculus square root has invertible determinant: (CFC.sqrt S).det ^ 2 = S.det > 0, so the sqrt is itself invertible.

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [inst_1 : DecidableEq ฮน] (S : Matrix ฮน ฮน โ„), S.PosDef โ†’ IsUnit (CFC.sqrt S).det
    Used by
  39. HypothesishSโ‚
    Sโ‚.PosDef
  40. HypothesishSโ‚‚
    Sโ‚‚.PosDef
  41. DefinitionInformationTheory.klDivRealdef

    โ„-valued KL divergence. Returns 0 when P is not absolutely continuous with respect to Q (by convention; the โ„โ‰ฅ0โˆž-valued klDiv returns โŠค in that case).

    {ฮฑ : Type u_1} โ†’ [inst : MeasurableSpace ฮฑ] โ†’ MeasureTheory.Measure ฮฑ โ†’ MeasureTheory.Measure ฮฑ โ†’ โ„
  42. DefinitionProbabilityTheory.gaussianAffineEquivdef

    The defining affine map z โ†ฆ m + โˆšS z of multivariateGaussian m S, as a measurable equivalence for positive-definite S (whose functional-calculus square root is invertible).

    {ฮน : Type u_1} โ†’
      [Fintype ฮน] โ†’
        [DecidableEq ฮน] โ†’ EuclideanSpace โ„ ฮน โ†’ {S : Matrix ฮน ฮน โ„} โ†’ S.PosDef โ†’ EuclideanSpace โ„ ฮน โ‰ƒแต EuclideanSpace โ„ ฮน
  43. DefinitionProbabilityTheory.toEuclideanCLEdef

    An invertible matrix as a continuous linear equivalence on EuclideanSpace โ„ ฮน.

    {ฮน : Type u_1} โ†’
      [inst : Fintype ฮน] โ†’
        [inst_1 : DecidableEq ฮน] โ†’ (M : Matrix ฮน ฮน โ„) โ†’ IsUnit M.det โ†’ EuclideanSpace โ„ ฮน โ‰ƒL[โ„] EuclideanSpace โ„ ฮน
  44. DefinitionProbabilityTheory.toLpMeasurableEquivdef

    The Euclidean identification toLp 2 : (ฮน โ†’ โ„) โ†’ EuclideanSpace โ„ ฮน as a measurable equivalence, used to transport the tensorization of Measure.pi onto EuclideanSpace.

    {ฮน : Type u_1} โ†’ [Fintype ฮน] โ†’ (ฮน โ†’ โ„) โ‰ƒแต EuclideanSpace โ„ ฮน

An analytic non-Borel subset of โ„: the image of the Baire-space witness under the continuous injection. Analyticity transfers along the continuous image; non-Borelness transfers back along the injective preimage.

DeclMeasureTheory.exists_analyticSet_not_measurableSet_real
โˆƒ A, MeasureTheory.AnalyticSet A โˆง ยฌMeasurableSet A
Layout
ThesisStepDefinition
exists_analyticSet_not_meโ€ฆtheoremexists_analyticSet_not_meโ€ฆtheoremexists_closed_proj_not_meโ€ฆtheoremexists_closed_universal_sโ€ฆtheoremembedBaireReal_injectivetheorembaireMarkerBits_injectivetheorembaireMarkers_strictMonotheoremcontinuous_embedBaireRealtheoremcontinuous_cantorFunctionโ€ฆtheoremcontinuous_baireMarkerBitstheorembaireMarkerBitsdefbaireMarkersdefembedBaireRealdef
  1. DeclMeasureTheory.exists_analyticSet_not_measurableSet_realDeclaration kindtheorem
    โˆƒ A, MeasureTheory.AnalyticSet A โˆง ยฌMeasurableSet A
    Uses
  2. DeclMeasureTheory.exists_analyticSet_not_measurableSetDeclaration kindtheorem

    An analytic non-Borel subset of Baire space: the projection of the diagonal witness.

    โˆƒ A, MeasureTheory.AnalyticSet A โˆง ยฌMeasurableSet A
    Uses
    Used by
  3. DeclMeasureTheory.exists_closed_proj_not_measurableSetDeclaration kindtheorem

    A closed set with a non-Borel projection. Diagonalize the universal closed set of (โ„• โ†’ โ„•) ร— (โ„• โ†’ โ„•): were the projection Borel, its complement would be analytic, hence the projection of a closed set, hence a section of the universal set โ€” and evaluating that section at its own parameter is contradictory.

    โˆƒ D, IsClosed D โˆง ยฌMeasurableSet {x | โˆƒ y, (x, y) โˆˆ D}
    Uses
    Used by
  4. DeclMeasureTheory.exists_closed_universal_sectionsDeclaration kindtheorem

    A universal closed set. Every second-countable space X carries a closed subset of X ร— (โ„• โ†’ โ„•) whose sections run through all closed subsets of X: enumerate a countable basis together with โˆ…, and let the parameter select which basis elements to exclude.

    โˆ€ (X : Type u_1) [inst : TopologicalSpace X] [SecondCountableTopology X],
      โˆƒ S, IsClosed S โˆง โˆ€ (C : Set X), IsClosed C โ†’ โˆƒ y, {x | (x, y) โˆˆ S} = C
    Used by
  5. DeclMeasureTheory.embedBaireReal_injectiveDeclaration kindtheorem
    Function.Injective MeasureTheory.embedBaireReal
    Uses
    Used by
  6. DeclMeasureTheory.baireMarkerBits_injectiveDeclaration kindtheorem
    Function.Injective MeasureTheory.baireMarkerBits
    Uses
    Used by
  7. DeclMeasureTheory.baireMarkers_strictMonoDeclaration kindtheorem
    โˆ€ (x : โ„• โ†’ โ„•), StrictMono (MeasureTheory.baireMarkers x)
    Used by
  8. DeclMeasureTheory.continuous_embedBaireRealDeclaration kindtheorem
    Continuous MeasureTheory.embedBaireReal
    Uses
    Used by
  9. DeclMeasureTheory.continuous_cantorFunction_oneThirdDeclaration kindtheorem
    Continuous (Cardinal.cantorFunction (1 / 3))
    Used by
  10. DeclMeasureTheory.continuous_baireMarkerBitsDeclaration kindtheorem
    Continuous MeasureTheory.baireMarkerBits
    Used by
  11. DefinitionMeasureTheory.baireMarkerBitsdef

    The marker bits: the indicator stream of the marker set.

    (โ„• โ†’ โ„•) โ†’ โ„• โ†’ Bool
  12. DefinitionMeasureTheory.baireMarkersdef

    The marker sequence of x : โ„• โ†’ โ„•: the strictly increasing sequence n + 1 + โˆ‘_{k โ‰ค n} x k, whose successive gaps encode x.

    (โ„• โ†’ โ„•) โ†’ โ„• โ†’ โ„•
  13. DefinitionMeasureTheory.embedBaireRealdef

    The embedding of Baire space into โ„: marker bits into the base-3 expansion.

    (โ„• โ†’ โ„•) โ†’ โ„

Pinsker's inequality with the sharp constant. tvDistReal P Q โ‰ค sqrt(klDivReal P Q / 2) for probability measures P โ‰ช Q with finite KL divergence.

DeclInformationTheory.pinsker_proof
โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ)
  [inst_1 : MeasureTheory.IsProbabilityMeasure P] [inst_2 : MeasureTheory.IsProbabilityMeasure Q],
  P.AbsolutelyContinuous Q โ†’
    MeasureTheory.Integrable (MeasureTheory.llr P Q) P โ†’
      MeasureTheory.tvDistReal P Q โ‰ค โˆš(InformationTheory.klDivReal P Q / 2)
Layout
ThesisStepHypothesisDefinition
pinsker_prooftheoremP.AbsolutelyContinuous QhacMeasureTheory.Integrable โ€ฆh_inttvDistReal_set_nonemptytheoremtwo_sq_sub_le_klDivRealtheoremklBin_le_klDivRealtheoremklFun_integral_ge_of_measโ€ฆtheoremklBin_eq_klFun_sumtheorembinary_pinskertheoremtwo_sq_le_neg_logtheoremtwo_sq_le_neg_log_one_subtheoremmonotoneOn_h_zerotheoremhasDerivAt_h_zerotheoremmonotoneOn_gtheoremderiv_g_nonneg_of_getheoremcontinuousOn_g_IcotheoremcontinuousOn_klBin_IcotheoremklBin_zero_lefttheoremklBin_selftheoremklBin_one_lefttheoremantitoneOn_gtheoremhasDerivAt_gtheoremhasDerivAt_sub_sqtheoremderiv_g_nonpos_of_letheoremderiv_factor_nonnegtheoremcontinuousOn_g_IoctheoremcontinuousOn_sub_sqtheoremcontinuousOn_klBin_IoctheoremhasDerivAt_klBin_qtheoremklBin_expandtheoremklDivReal_nonnegtheoremklDivReal_eq_toReal_klDivtheoremintegrand_eq_llrtheoremklBindefklDivRealdeftvDistRealdef
  1. DeclInformationTheory.pinsker_proofDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ)
      [inst_1 : MeasureTheory.IsProbabilityMeasure P] [inst_2 : MeasureTheory.IsProbabilityMeasure Q],
      P.AbsolutelyContinuous Q โ†’
        MeasureTheory.Integrable (MeasureTheory.llr P Q) P โ†’
          MeasureTheory.tvDistReal P Q โ‰ค โˆš(InformationTheory.klDivReal P Q / 2)
    Uses
  2. DeclMeasureTheory.tvDistReal_set_nonemptyDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsFiniteMeasure P]
      [MeasureTheory.IsFiniteMeasure Q], {x | โˆƒ A, MeasurableSet A โˆง x = |(P A).toReal - (Q A).toReal|}.Nonempty
    Used by
  3. DeclInformationTheory.two_sq_sub_le_klDivRealDeclaration kindtheorem

    Per-set squared bound. 2 (P(A) โˆ’ Q(A))ยฒ โ‰ค klDivReal P Q for any measurable set A, given P โ‰ช Q and finite KL.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsProbabilityMeasure P]
      [MeasureTheory.IsProbabilityMeasure Q],
      P.AbsolutelyContinuous Q โ†’
        MeasureTheory.Integrable (MeasureTheory.llr P Q) P โ†’
          โˆ€ (A : Set ฮฑ), MeasurableSet A โ†’ 2 * (P.real A - Q.real A) ^ 2 โ‰ค InformationTheory.klDivReal P Q
    Uses
    Used by
  4. DeclInformationTheory.klBin_le_klDivRealDeclaration kindtheorem

    Data processing inequality for indicators. For probability measures P โ‰ช Q with finite KL divergence and any measurable set A, the binary KL between the marginals on (A, Aแถœ) is bounded by the full KL: klBin(P(A), Q(A)) โ‰ค klDivReal P Q.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsProbabilityMeasure P]
      [MeasureTheory.IsProbabilityMeasure Q],
      P.AbsolutelyContinuous Q โ†’
        MeasureTheory.Integrable (MeasureTheory.llr P Q) P โ†’
          โˆ€ (A : Set ฮฑ), MeasurableSet A โ†’ InformationTheory.klBin (P.real A) (Q.real A) โ‰ค InformationTheory.klDivReal P Q
    Uses
    Used by
  5. DeclInformationTheory.klFun_integral_ge_of_measurableSetDeclaration kindtheorem

    Jensen on a subset. For a finite measure Q and a measurable set A with positive mass, if f and klFun โˆ˜ f are integrable and f โ‰ฅ 0 almost everywhere, then Q(A) ยท klFun((1/Q(A)) ยท โˆซ_A f dQ) โ‰ค โˆซ_A klFun(f) dQ.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] {Q : MeasureTheory.Measure ฮฑ} [MeasureTheory.IsFiniteMeasure Q] (f : ฮฑ โ†’ โ„),
      MeasureTheory.Integrable f Q โ†’
        MeasureTheory.Integrable (fun x => InformationTheory.klFun (f x)) Q โ†’
          (โˆ€แต (x : ฮฑ) โˆ‚Q, 0 โ‰ค f x) โ†’
            โˆ€ {A : Set ฮฑ},
              0 < Q.real A โ†’
                Q.real A * InformationTheory.klFun ((Q.real A)โปยน * โˆซ (x : ฮฑ) in A, f x โˆ‚Q) โ‰ค
                  โˆซ (x : ฮฑ) in A, InformationTheory.klFun (f x) โˆ‚Q
    Used by
  6. DeclInformationTheory.klBin_eq_klFun_sumDeclaration kindtheorem

    Algebraic identity. The binary KL factors through klFun: klBin p q = q ยท klFun(p/q) + (1 โˆ’ q) ยท klFun((1 โˆ’ p)/(1 โˆ’ q)).

    โˆ€ (p q : โ„),
      0 < q โ†’
        q < 1 โ†’
          InformationTheory.klBin p q =
            q * InformationTheory.klFun (p / q) + (1 - q) * InformationTheory.klFun ((1 - p) / (1 - q))
    Used by
  7. DeclInformationTheory.binary_pinskerDeclaration kindtheorem

    Binary Pinsker inequality. 2 (p โˆ’ q)ยฒ โ‰ค klBin p q for p โˆˆ [0, 1], q โˆˆ (0, 1). Sharp constant 2.

    โˆ€ (p q : โ„), 0 โ‰ค p โ†’ p โ‰ค 1 โ†’ 0 < q โ†’ q < 1 โ†’ 2 * (p - q) ^ 2 โ‰ค InformationTheory.klBin p q
    Uses
    Used by
  8. DeclInformationTheory.two_sq_le_neg_logDeclaration kindtheorem

    2 (1 - q)ยฒ โ‰ค -log q for q โˆˆ (0, 1]. Substitute r = 1 - q into the previous.

    โˆ€ (q : โ„), 0 < q โ†’ q โ‰ค 1 โ†’ 2 * (1 - q) ^ 2 โ‰ค -Real.log q
    Uses
    Used by
  9. DeclInformationTheory.two_sq_le_neg_log_one_subDeclaration kindtheorem

    2 qยฒ โ‰ค -log(1 - q) for q โˆˆ [0, 1).

    โˆ€ (q : โ„), 0 โ‰ค q โ†’ q < 1 โ†’ 2 * q ^ 2 โ‰ค -Real.log (1 - q)
    Uses
    Used by
  10. DeclInformationTheory.monotoneOn_h_zeroDeclaration kindtheorem

    h(q) = -log(1-q) - 2 qยฒ is monotone on [0, 1).

    MonotoneOn (fun q => -Real.log (1 - q) - 2 * q ^ 2) (Set.Ico 0 1)
    Uses
    Used by
  11. DeclInformationTheory.hasDerivAt_h_zeroDeclaration kindtheorem

    Derivative of h(q) = -log(1-q) - 2 qยฒ at q < 1.

    โˆ€ q < 1, HasDerivAt (fun q => -Real.log (1 - q) - 2 * q ^ 2) ((2 * q - 1) ^ 2 / (1 - q)) q
    Used by
  12. DeclInformationTheory.monotoneOn_gDeclaration kindtheorem

    g(q) = klBin p q โˆ’ 2 (p โˆ’ q)ยฒ is monotone on [p, 1).

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ MonotoneOn (fun q => InformationTheory.klBin p q - 2 * (p - q) ^ 2) (Set.Ico p 1)
    Uses
    Used by
  13. DeclInformationTheory.deriv_g_nonneg_of_geDeclaration kindtheorem

    On [p, 1): derivative of g is nonnegative.

    โˆ€ (p q : โ„), p โ‰ค q โ†’ 0 < q โ†’ q < 1 โ†’ 0 โ‰ค (q - p) * (1 - 2 * q) ^ 2 / (q * (1 - q))
    Uses
    Used by
  14. DeclInformationTheory.continuousOn_g_IcoDeclaration kindtheorem

    Continuity of g on Ico p 1.

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ ContinuousOn (fun q => InformationTheory.klBin p q - 2 * (p - q) ^ 2) (Set.Ico p 1)
    Uses
    Used by
  15. DeclInformationTheory.continuousOn_klBin_IcoDeclaration kindtheorem

    Continuity of klBin p ยท on Ico p 1.

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ ContinuousOn (fun q => InformationTheory.klBin p q) (Set.Ico p 1)
    Uses
    Used by
  16. DeclInformationTheory.klBin_zero_leftDeclaration kindtheorem

    Boundary case: klBin 0 q = -log(1 - q).

    โˆ€ (q : โ„), InformationTheory.klBin 0 q = -Real.log (1 - q)
    Used by
  17. DeclInformationTheory.klBin_selfDeclaration kindtheorem

    klBin p p = 0 for p โˆˆ (0, 1).

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ InformationTheory.klBin p p = 0
    Used by
  18. DeclInformationTheory.klBin_one_leftDeclaration kindtheorem

    Boundary case: klBin 1 q = -log q.

    โˆ€ (q : โ„), InformationTheory.klBin 1 q = -Real.log q
    Used by
  19. DeclInformationTheory.antitoneOn_gDeclaration kindtheorem

    g(q) = klBin p q โˆ’ 2 (p โˆ’ q)ยฒ is antitone on (0, p].

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ AntitoneOn (fun q => InformationTheory.klBin p q - 2 * (p - q) ^ 2) (Set.Ioc 0 p)
    Uses
    Used by
  20. DeclInformationTheory.hasDerivAt_gDeclaration kindtheorem

    Factored derivative identity. Derivative of g(q) := klBin(p, q) โˆ’ 2 (p โˆ’ q)ยฒ has the factored form (q โˆ’ p) ยท (1 โˆ’ 2q)ยฒ / (q ยท (1 โˆ’ q)), reducing the sign of the derivative to sign(q โˆ’ p).

    โˆ€ (p q : โ„),
      0 < p โ†’
        p < 1 โ†’
          0 < q โ†’
            q < 1 โ†’
              HasDerivAt (fun q => InformationTheory.klBin p q - 2 * (p - q) ^ 2)
                ((q - p) * (1 - 2 * q) ^ 2 / (q * (1 - q))) q
    Uses
    Used by
  21. DeclInformationTheory.hasDerivAt_sub_sqDeclaration kindtheorem

    Derivative of (p โˆ’ q)ยฒ with respect to q.

    โˆ€ (p q : โ„), HasDerivAt (fun q => (p - q) ^ 2) (-2 * (p - q)) q
    Used by
  22. DeclInformationTheory.deriv_g_nonpos_of_leDeclaration kindtheorem

    On (0, p]: derivative of g is nonpositive.

    โˆ€ (p q : โ„), q โ‰ค p โ†’ 0 < q โ†’ q < 1 โ†’ (q - p) * (1 - 2 * q) ^ 2 / (q * (1 - q)) โ‰ค 0
    Uses
    Used by
  23. DeclInformationTheory.deriv_factor_nonnegDeclaration kindtheorem

    The derivative factor (1 โˆ’ 2q)ยฒ / (q (1 โˆ’ q)) is nonnegative on (0, 1).

    โˆ€ (q : โ„), 0 < q โ†’ q < 1 โ†’ 0 โ‰ค (1 - 2 * q) ^ 2 / (q * (1 - q))
    Used by
  24. DeclInformationTheory.continuousOn_g_IocDeclaration kindtheorem

    Continuity of g on Ioc 0 p.

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ ContinuousOn (fun q => InformationTheory.klBin p q - 2 * (p - q) ^ 2) (Set.Ioc 0 p)
    Uses
    Used by
  25. DeclInformationTheory.continuousOn_sub_sqDeclaration kindtheorem

    Continuity of fun q => (p - q)ยฒ on any set.

    โˆ€ (p : โ„) (s : Set โ„), ContinuousOn (fun q => (p - q) ^ 2) s
    Used by
  26. DeclInformationTheory.continuousOn_klBin_IocDeclaration kindtheorem

    Continuity of klBin p ยท on Ioc 0 p.

    โˆ€ (p : โ„), 0 < p โ†’ p < 1 โ†’ ContinuousOn (fun q => InformationTheory.klBin p q) (Set.Ioc 0 p)
    Uses
    Used by
  27. DeclInformationTheory.hasDerivAt_klBin_qDeclaration kindtheorem

    Derivative of klBin p ยท at a point q โˆˆ (0, 1) with p โˆˆ (0, 1).

    โˆ€ (p q : โ„),
      0 < p โ†’ p < 1 โ†’ 0 < q โ†’ q < 1 โ†’ HasDerivAt (fun q => InformationTheory.klBin p q) ((q - p) / (q * (1 - q))) q
    Uses
    Used by
  28. DeclInformationTheory.klBin_expandDeclaration kindtheorem

    Expanded form: split into constants and q-dependent pieces. Used to compute the derivative via HasDerivAt in the next shard.

    โˆ€ (p q : โ„),
      0 < p โ†’
        p < 1 โ†’
          0 < q โ†’
            q < 1 โ†’
              InformationTheory.klBin p q =
                p * Real.log p - p * Real.log q + (1 - p) * Real.log (1 - p) - (1 - p) * Real.log (1 - q)
    Used by
  29. DeclInformationTheory.klDivReal_nonnegDeclaration kindtheorem

    โ„-valued KL is nonnegative for probability measures.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsProbabilityMeasure P]
      [MeasureTheory.IsProbabilityMeasure Q], 0 โ‰ค InformationTheory.klDivReal P Q
    Uses
    Used by
  30. DeclInformationTheory.klDivReal_eq_toReal_klDivDeclaration kindtheorem

    For probability measures with P โ‰ช Q, the โ„-valued KL equals (Mathlib.klDiv P Q).toReal. Both measures have total mass 1, so the Mathlib correction term vanishes.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ) [MeasureTheory.IsProbabilityMeasure P]
      [MeasureTheory.IsProbabilityMeasure Q],
      P.AbsolutelyContinuous Q โ†’ InformationTheory.klDivReal P Q = (InformationTheory.klDiv P Q).toReal
    Uses
    Used by
  31. DeclInformationTheory.integrand_eq_llrDeclaration kindtheorem

    The integrand log ((P.rnDeriv Q x).toReal) is definitionally Mathlib's log-likelihood ratio llr P Q x.

    โˆ€ {ฮฑ : Type u_1} [inst : MeasurableSpace ฮฑ] (P Q : MeasureTheory.Measure ฮฑ),
      (fun x => Real.log (P.rnDeriv Q x).toReal) = MeasureTheory.llr P Q
    Used by
  32. Hypothesishac
    P.AbsolutelyContinuous Q
  33. Hypothesish_int
    MeasureTheory.Integrable (MeasureTheory.llr P Q) P
  34. DefinitionInformationTheory.klBindef

    Binary KL divergence between Bernoulli(p) and Bernoulli(q).

    โ„ โ†’ โ„ โ†’ โ„
  35. DefinitionInformationTheory.klDivRealdef

    โ„-valued KL divergence. Returns 0 when P is not absolutely continuous with respect to Q (by convention; the โ„โ‰ฅ0โˆž-valued klDiv returns โŠค in that case).

    {ฮฑ : Type u_1} โ†’ [inst : MeasurableSpace ฮฑ] โ†’ MeasureTheory.Measure ฮฑ โ†’ MeasureTheory.Measure ฮฑ โ†’ โ„
  36. DefinitionMeasureTheory.tvDistRealdef

    Total variation distance between two probability measures, metric form.

    Defined as the supremum of |P(A).toReal - Q(A).toReal| over measurable sets A.

    {ฮฑ : Type u_1} โ†’
      [inst : MeasurableSpace ฮฑ] โ†’
        (P Q : MeasureTheory.Measure ฮฑ) โ†’ [MeasureTheory.IsFiniteMeasure P] โ†’ [MeasureTheory.IsFiniteMeasure Q] โ†’ โ„

d = 1 universality: every VC-1 class compresses at kernel size one, with no side information. No finiteness, no distinguished member, no chain hypothesis. Twist the class by any member to place โˆ… in it; there the VC bound makes co-member points comparable in the membership order, so every label set is a finite chain; anchor at its maximum, reconstruct with interConvention, and transport the scheme back with the same kernels.

DeclStructuralIgnorance.hasKernelScheme_one_of_vcBounded_one
โˆ€ {ฮฑ : Type u_1} [inst : DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)},
  StructuralIgnorance.vcBounded ๐’œ 1 โ†’ StructuralIgnorance.HasKernelScheme ๐’œ 1
Layout
ThesisStepHypothesisDefinition
hasKernelScheme_one_of_vcโ€ฆtheoremStructuralIgnorance.vcBouโ€ฆhvcBounded_twistClasstheoremof_twistClasstheoremmemOrder_total_of_vcBoundโ€ฆtheoremisKernel_interConvention_โ€ฆtheoremsubsettheoremexists_memOrder_max_of_toโ€ฆtheoremmemOrder_transtheoremmemOrder_refltheoremempty_mem_twistClasstheoremof_twistClasstheoremset_symmDiff_inter_righttheoremfinset_inter_symmDifftheoremtwisttheoremcoe_baseLabelstheoremConventiondefHasKernelSchemedefIsKerneldefIsSampledefSetShattersdefbaseLabelsdefinterConventiondefmemOrderdeftwistClassdeftwistConventiondefvcBoundeddef
  1. DeclStructuralIgnorance.hasKernelScheme_one_of_vcBounded_oneDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)},
      StructuralIgnorance.vcBounded ๐’œ 1 โ†’ StructuralIgnorance.HasKernelScheme ๐’œ 1
    Uses
  2. DeclStructuralIgnorance.vcBounded_twistClassDeclaration kindtheorem

    VC bounds are twist-invariant (the direction needed for normalization).

    โˆ€ {ฮฑ : Type u_1} [DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)} {d : โ„•},
      StructuralIgnorance.vcBounded ๐’œ d โ†’
        โˆ€ (Sโ‚€ : Set ฮฑ), StructuralIgnorance.vcBounded (StructuralIgnorance.twistClass ๐’œ Sโ‚€) d
    Uses
    Used by
  3. DeclStructuralIgnorance.SetShatters.of_twistClassDeclaration kindtheorem

    Shattering transports from the twisted class back to the original: the witnesses untwist, and the patterns correspond through the involution C โ†ฆ C โˆ† (B โˆฉ Sโ‚€).

    โˆ€ {ฮฑ : Type u_1} [DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)} {Sโ‚€ : Set ฮฑ} {B : Finset ฮฑ},
      StructuralIgnorance.SetShatters (StructuralIgnorance.twistClass ๐’œ Sโ‚€) B โ†’ StructuralIgnorance.SetShatters ๐’œ B
    Uses
    Used by
  4. DeclStructuralIgnorance.memOrder_total_of_vcBounded_oneDeclaration kindtheorem

    With the empty set in the class, a VC bound of one makes any two points of a common member comparable in the membership order: otherwise the four assembled patterns shatter the pair.

    โˆ€ {ฮฑ : Type u_1} [DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)},
      StructuralIgnorance.vcBounded ๐’œ 1 โ†’
        โˆ… โˆˆ ๐’œ โ†’
          โˆ€ {a b : ฮฑ}, (โˆƒ S โˆˆ ๐’œ, a โˆˆ S โˆง b โˆˆ S) โ†’ StructuralIgnorance.memOrder ๐’œ a b โˆจ StructuralIgnorance.memOrder ๐’œ b a
    Uses
    Used by
  5. DeclStructuralIgnorance.isKernel_interConvention_anchorDeclaration kindtheorem

    The anchor leg of the intersection convention: a maximum of the label set in the membership order is a size-1 kernel. The upper inclusion comes from the realizing member, the lower from maximality.

    โˆ€ {ฮฑ : Type u_1} [inst : DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)} {A T : Finset ฮฑ},
      StructuralIgnorance.IsSample ๐’œ A T โ†’
        โˆ€ {x : ฮฑ},
          x โˆˆ T โ†’
            (โˆ€ a โˆˆ T, StructuralIgnorance.memOrder ๐’œ a x) โ†’
              StructuralIgnorance.IsKernel (StructuralIgnorance.interConvention ๐’œ) 1 A T {x}
    Uses
    Used by
  6. DeclStructuralIgnorance.IsSample.subsetDeclaration kindtheorem

    Realizable label patterns are supported inside their window.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {A T : Finset ฮฑ}, StructuralIgnorance.IsSample ๐’œ A T โ†’ T โІ A
    Used by
  7. DeclStructuralIgnorance.exists_memOrder_max_of_totalDeclaration kindtheorem

    A finite nonempty set on which the membership order is total has a maximum.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {T : Finset ฮฑ},
      (โˆ€ a โˆˆ T, โˆ€ b โˆˆ T, StructuralIgnorance.memOrder ๐’œ a b โˆจ StructuralIgnorance.memOrder ๐’œ b a) โ†’
        T.Nonempty โ†’ โˆƒ x โˆˆ T, โˆ€ a โˆˆ T, StructuralIgnorance.memOrder ๐’œ a x
    Uses
    Used by
  8. DeclStructuralIgnorance.memOrder_transDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {a b c : ฮฑ},
      StructuralIgnorance.memOrder ๐’œ a b โ†’ StructuralIgnorance.memOrder ๐’œ b c โ†’ StructuralIgnorance.memOrder ๐’œ a c
    Used by
  9. DeclStructuralIgnorance.memOrder_reflDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} (๐’œ : Set (Set ฮฑ)) (a : ฮฑ), StructuralIgnorance.memOrder ๐’œ a a
    Used by
  10. DeclStructuralIgnorance.empty_mem_twistClassDeclaration kindtheorem

    Twisting by a member places the empty set in the class.

    โˆ€ {ฮฑ : Type u_1} {๐’œ : Set (Set ฮฑ)} {Sโ‚€ : Set ฮฑ}, Sโ‚€ โˆˆ ๐’œ โ†’ โˆ… โˆˆ StructuralIgnorance.twistClass ๐’œ Sโ‚€
    Used by
  11. DeclStructuralIgnorance.HasKernelScheme.of_twistClassDeclaration kindtheorem

    Kernel schemes transport back through a twist, with the same kernels.

    โˆ€ {ฮฑ : Type u_1} [inst : DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)} {Sโ‚€ : Set ฮฑ} {k : โ„•},
      StructuralIgnorance.HasKernelScheme (StructuralIgnorance.twistClass ๐’œ Sโ‚€) k โ†’ StructuralIgnorance.HasKernelScheme ๐’œ k
    Uses
    Used by
  12. DeclStructuralIgnorance.set_symmDiff_inter_rightDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} (s t u : Set ฮฑ), symmDiff s t โˆฉ u = symmDiff (s โˆฉ u) (t โˆฉ u)
    Used by
  13. DeclStructuralIgnorance.finset_inter_symmDiffDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} [inst : DecidableEq ฮฑ] (Z T F : Finset ฮฑ), Z โˆฉ symmDiff T F = symmDiff (Z โˆฉ T) (Z โˆฉ F)
    Used by
  14. DeclStructuralIgnorance.IsSample.twistDeclaration kindtheorem

    Realizability transports through the twist, with the label set twisted inside the window.

    โˆ€ {ฮฑ : Type u_1} [inst : DecidableEq ฮฑ] {๐’œ : Set (Set ฮฑ)} {A T : Finset ฮฑ},
      StructuralIgnorance.IsSample ๐’œ A T โ†’
        โˆ€ (Sโ‚€ : Set ฮฑ),
          StructuralIgnorance.IsSample (StructuralIgnorance.twistClass ๐’œ Sโ‚€) A
            (symmDiff T (StructuralIgnorance.baseLabels Sโ‚€ A))
    Uses
    Used by
  15. DeclStructuralIgnorance.coe_baseLabelsDeclaration kindtheorem
    โˆ€ {ฮฑ : Type u_1} (Sโ‚€ : Set ฮฑ) (Z : Finset ฮฑ), โ†‘(StructuralIgnorance.baseLabels Sโ‚€ Z) = โ†‘Z โˆฉ Sโ‚€
    Used by
  16. Hypothesish
    StructuralIgnorance.vcBounded ๐’œ 1
  17. DefinitionStructuralIgnorance.Conventiondef

    A reconstruction rule: from a kept labeled pair โ€” kernel points and their 1-labeled part โ€” to a total hypothesis. Total by convention; only values on realizable pairs matter.

    Type u_2 โ†’ Type u_2
  18. DefinitionStructuralIgnorance.HasKernelSchemedef

    A kernel scheme of size k with no side information: one reconstruction rule under which every realizable sample contains a generating kernel of at most k points (Littlestoneโ€“Warmuth 1986, in compression-map-free form).

    {ฮฑ : Type u_1} โ†’ [DecidableEq ฮฑ] โ†’ Set (Set ฮฑ) โ†’ โ„• โ†’ Prop
  19. DefinitionStructuralIgnorance.IsKerneldef

    ฯ regenerates the sample (A, T) from the kernel Z: the kernel is kept inside the sample, has at most k points, and the reconstructed hypothesis meets A in exactly T.

    {ฮฑ : Type u_1} โ†’ [DecidableEq ฮฑ] โ†’ StructuralIgnorance.Convention ฮฑ โ†’ โ„• โ†’ Finset ฮฑ โ†’ Finset ฮฑ โ†’ Finset ฮฑ โ†’ Prop
  20. DefinitionStructuralIgnorance.IsSampledef

    The labeled window (A, T) is realizable in ๐’œ: some member meets A in exactly T. Points of T are labeled 1, points of A \ T are labeled 0 (Littlestoneโ€“Warmuth 1986, realizable samples).

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Finset ฮฑ โ†’ Finset ฮฑ โ†’ Prop
  21. DefinitionStructuralIgnorance.SetShattersdef

    The class ๐’œ shatters the finite set B: every sub-pattern of B is realized by a member. Set-grammar port of Finset.Shatters (Mathlib Combinatorics.SetFamily.Shatter).

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Finset ฮฑ โ†’ Prop
  22. DefinitionStructuralIgnorance.baseLabelsdef

    The part of a finite window lying in the base set.

    {ฮฑ : Type u_1} โ†’ Set ฮฑ โ†’ Finset ฮฑ โ†’ Finset ฮฑ
  23. DefinitionStructuralIgnorance.interConventiondef

    Reconstruction by intersection: the hypothesis is the intersection of all members containing the kernel's 1-labeled part. Improper โ€” the output need not be a member โ€” which is what dense chains require; the kernel's point set is not consulted beyond its labels.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ StructuralIgnorance.Convention ฮฑ
  24. DefinitionStructuralIgnorance.memOrderdef

    The membership order of a class: a lies below b when every member containing b contains a.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ ฮฑ โ†’ ฮฑ โ†’ Prop
  25. DefinitionStructuralIgnorance.twistClassdef

    The class relabeled by symmetric difference with a base set.

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ Set ฮฑ โ†’ Set (Set ฮฑ)
  26. DefinitionStructuralIgnorance.twistConventiondef

    The conjugated convention: untwist the kernel's labels, reconstruct in the twisted class, twist the hypothesis back.

    {ฮฑ : Type u_1} โ†’ [DecidableEq ฮฑ] โ†’ Set ฮฑ โ†’ StructuralIgnorance.Convention ฮฑ โ†’ StructuralIgnorance.Convention ฮฑ
  27. DefinitionStructuralIgnorance.vcBoundeddef

    VC bound in Set grammar: no shattered set exceeds d points (the port of Finset.vcDim โ‰ค d, Mathlib Combinatorics.SetFamily.Shatter).

    {ฮฑ : Type u_1} โ†’ Set (Set ฮฑ) โ†’ โ„• โ†’ Prop

Fundamental theorem of statistical learning (5-way equivalence, BPโ‚…).

Declfundamental_theorem
โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
  [MeasurableConceptClass X C],
  (PACLearnable X C โ†” VCDim X C < โŠค) โˆง
    (VCDim X C < โŠค โ†” โˆƒ k cs, CompressionSchemeWithInfo.size cs = k) โˆง
      (VCDim X C < โŠค โ†”
          โˆ€ ฮต > 0,
            โˆƒ mโ‚€,
              โˆ€ (D : MeasureTheory.Measure X),
                MeasureTheory.IsProbabilityMeasure D โ†’ โˆ€ m โ‰ฅ mโ‚€, RademacherComplexity X C D m < ฮต) โˆง
        (PACLearnable X C โ†’
            โˆƒ L mf,
              (โˆ€ (ฮต ฮด : โ„),
                  0 < ฮต โ†’
                    0 < ฮด โ†’
                      โˆ€ (D : MeasureTheory.Measure X),
                        MeasureTheory.IsProbabilityMeasure D โ†’
                          โˆ€ c โˆˆ C,
                            (MeasureTheory.Measure.pi fun x => D)
                                {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal ฮต} โ‰ฅ
                              ENNReal.ofReal (1 - ฮด)) โˆง
                (โˆ€ (ฮต ฮด : โ„), 0 < ฮต โ†’ 0 < ฮด โ†’ SampleComplexity X C ฮต ฮด โ‰ค mf ฮต ฮด) โˆง
                  โˆ€ (d : โ„•),
                    VCDim X C = โ†‘d โ†’
                      โˆ€ (ฮต ฮด : โ„),
                        0 < ฮต โ†’
                          ฮต โ‰ค 1 / 4 โ†’
                            0 < ฮด โ†’
                              ฮด โ‰ค 1 โ†’
                                ฮด โ‰ค 1 / 7 โ†’
                                  1 โ‰ค d โ†’ โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค SampleComplexity X C ฮต ฮด โˆง โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค mf ฮต ฮด) โˆง
          (VCDim X C < โŠค โ†” โˆƒ d, โˆ€ (m : โ„•), d โ‰ค m โ†’ GrowthFunction X C m โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), m.choose i)
Layout
ThesisStepDefinition
fundamental_theoremtheoremvc_characterizationtheoremvcdim_finite_imp_pactheorempac_sample_complexity_sanโ€ฆtheoremsample_complexity_upper_oโ€ฆtheoremsample_complexity_lower_bโ€ฆtheorempac_lower_bound_membertheoremgrowth_bounded_imp_vcdim_โ€ฆtheoremfundamental_vc_compressiontheoremfundamental_vc_compressioโ€ฆtheoremvcdim_finite_imp_compressโ€ฆtheoremvcdim_finite_imp_proper_fโ€ฆtheoremsupportError_eq_boolTestEโ€ฆtheoremdisagreementFamily_boolVCโ€ฆtheoremmoran_yehudayoff_forward_โ€ฆtheoremroundtrip_blockHyp_eq_reptheoremlabeledSampleOfFinset_eq_โ€ฆtheoremdecodeWitnessXCoords_encoโ€ฆtheoremdecodeWitnessLabel_eq_on_โ€ฆtheoremmwu_approx_minimaxtheoremweight_le_potentialtheoremmwu_weight_eq_pow_hitCounttheoremcongr_simptheoremmwu_potential_T_boundtheorempotential_one_step_boundtheorembest_response_payoff_weigโ€ฆtheorempotential_postheoremweights_postheoremcongr_simptheoremmwuInit_potentialtheoremminimax_value_le_onetheoremhitRate_from_potentialtheoremboolGamePayoff_nonnegtheoremboolGamePayoff_empirical_โ€ฆtheoremmwuHitCount_eq_sum_indicaโ€ฆtheoremboolGamePayoff_empirical_โ€ฆtheoremhypothesisEnvelope_subtheoremoutput_memtheoremgood_on_support_gives_rowโ€ฆtheoremsupportAgreement_eq_one_sโ€ฆtheoremgood_on_supporttheoremfinite_support_vc_approxtheoremtrueErrorReal_extend_falsetheoremboolTestExpectation_nonnegtheoremboolTestExpectation_le_onetheoremprob_nonnegtheoremprob_sum_onetheoremfinalizeIncidenceSchemetheoremcongr_simptheoremboolTestExpectation_empirโ€ฆtheoremboolGamePayoff_eq_boolTesโ€ฆtheoremagreeTests_boolVCDim_letheoremcompression_with_info_impโ€ฆtheoremshatters_subset_compressiโ€ฆtheoremexp_beats_poly_compressiontheoremsucc_le_two_pow_compressiโ€ฆtheoremcompress_with_info_injectโ€ฆtheoremcorrecttheoremcompress_subtheoremcompress_smalltheoremfundamental_rademachertheoremvcdim_finite_imp_rademachโ€ฆtheoremvcdim_zero_rademacher_le_โ€ฆtheoremvcdim_zero_concepts_agreetheoremvcdim_bounds_rademacher_qโ€ฆtheoremncard_restrictions_le_sumโ€ฆtheoremfinite_massart_lemmatheoremexp_mul_sup'_le_sumtheoremrademacherComplexity_le_oโ€ฆtheoremanalytical_log_sqrt_boundtheoremvcdim_finite_imp_pac_via_โ€ฆtheoremvcdim_finite_imp_uc'theoremvcdim_finite_imp_growth_bโ€ฆtheoremuc_bad_event_le_delta_proโ€ฆtheoremsymmetrization_uc_boundtheoremsymmetrization_step_lowertheoremsymmetrization_steptheoremdouble_sample_pattern_bouโ€ฆtheoremexchangeability_chain_bouโ€ฆtheoremcongr_simptheoremrestriction_pattern_counttheoremrademacher_mgf_boundtheoremcosh_le_exp_sq_halftheoremfinite_exchangeability_boโ€ฆtheoremgrowth_exp_le_deltatheoremsum_choose_le_exp_powtheorempow_mul_exp_neg_le_factorโ€ฆtheoremgrowth_function_le_two_powtheoremhoeffding_one_sided_uppertheoremhoeffding_one_sidedtheoremuc_imp_pactheoremoutput_in_Htheoremrademacher_lower_bound_onโ€ฆtheoremempiricalRademacherCompleโ€ฆtheoremempRad_nonnegtheoremsum_boolToSign_canceltheoremflipAt_othertheoremflipAt_involutivetheoremflipAt_boolToSigntheoremempRad_eq_one_of_injectivโ€ฆtheoremshatters_subsettheoremempRad_eq_one_of_all_labeโ€ฆtheoremrademacherCorrelation_absโ€ฆtheoremboolToSign_mul_abs_le_onetheoremboolToSign_abs_le_onetheoremboolToSign_abs_eq_onetheoremcorr_eq_one_of_agreetheorempac_imp_vcdim_finitetheoremvcdim_infinite_not_pactheoremuniformMeasure_isProbabilโ€ฆtheoremnfl_counting_coretheoremper_sample_labeling_boundtheoremhmeas_Ctheoremmem_measurabletheoremhc_meastheoremall_measurabletheoremhWBtheoremwellBehavedtheoremBatchLearnerstructurehypothesesdeflearndefCompressionSchemeWithInfostructureInfodefcompressdefinfo_finitedefkernelSizedefreconstructdefsizedefCompressionSchemeWithInfo0defConceptClassdefEmpiricalErrordefEmpiricalRademacherCompleโ€ฆdefConceptdefFinitePMFstructureprobdeftoPMFdefboolVCDimdefGrowthFunctiondefHasUniformConvergencedefHypothesisSpacedefIncidenceInfodefIsConsistentWithdefMWUConfigstructurepotentialdeftoPMFdefweightsdefMeasurableConceptClassstructurePACLearnabledefProperFiniteSupportLearnerstructurelearndefsampleBounddefRademacherComplexitydefSampleComplexitydefShattersdefSignVectordefTrueErrordefTrueErrorRealdefVCDimdefWellBehavedVCdefagreeTestdefagreeTestsdefboolFamilyToFinsetFamilydefboolGamePayoffdefboolTestExpectationdefboolToSigndefboundedSubsamplesdefdecodeWitnessLabeldefdecodeWitnessXCoordsdefdisagreementFamilydefempiricalPMFdefencodeWitnessInfodefextendBooldefflipAtdefhypothesisEnvelopedeflabeledSampleOfFinsetdefliftClassdefmkIncidenceSchemeOfMajoriโ€ฆdefmwuConfigdefmwuHitCountdefmwuInitdefmwuRowsdefmwuRundefmwuUpdateWeightsdefpointSupportdefrademacherCorrelationdefsupportErrordefuniformMeasuredefuniformPMFdefzeroOneLossdef
  1. Declfundamental_theoremDeclaration kindtheorem
    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C],
      (PACLearnable X C โ†” VCDim X C < โŠค) โˆง
        (VCDim X C < โŠค โ†” โˆƒ k cs, CompressionSchemeWithInfo.size cs = k) โˆง
          (VCDim X C < โŠค โ†”
              โˆ€ ฮต > 0,
                โˆƒ mโ‚€,
                  โˆ€ (D : MeasureTheory.Measure X),
                    MeasureTheory.IsProbabilityMeasure D โ†’ โˆ€ m โ‰ฅ mโ‚€, RademacherComplexity X C D m < ฮต) โˆง
            (PACLearnable X C โ†’
                โˆƒ L mf,
                  (โˆ€ (ฮต ฮด : โ„),
                      0 < ฮต โ†’
                        0 < ฮด โ†’
                          โˆ€ (D : MeasureTheory.Measure X),
                            MeasureTheory.IsProbabilityMeasure D โ†’
                              โˆ€ c โˆˆ C,
                                (MeasureTheory.Measure.pi fun x => D)
                                    {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal ฮต} โ‰ฅ
                                  ENNReal.ofReal (1 - ฮด)) โˆง
                    (โˆ€ (ฮต ฮด : โ„), 0 < ฮต โ†’ 0 < ฮด โ†’ SampleComplexity X C ฮต ฮด โ‰ค mf ฮต ฮด) โˆง
                      โˆ€ (d : โ„•),
                        VCDim X C = โ†‘d โ†’
                          โˆ€ (ฮต ฮด : โ„),
                            0 < ฮต โ†’
                              ฮต โ‰ค 1 / 4 โ†’
                                0 < ฮด โ†’
                                  ฮด โ‰ค 1 โ†’
                                    ฮด โ‰ค 1 / 7 โ†’
                                      1 โ‰ค d โ†’ โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค SampleComplexity X C ฮต ฮด โˆง โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค mf ฮต ฮด) โˆง
              (VCDim X C < โŠค โ†” โˆƒ d, โˆ€ (m : โ„•), d โ‰ค m โ†’ GrowthFunction X C m โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), m.choose i)
    Uses
  2. Declvc_characterizationDeclaration kindtheorem

    VC characterization: C is PAC-learnable iff VCDim(C) < โˆž.

    PROOF DECOMPOSITION: This theorem factors through the two directions above: โ† : vcdim_finite_imp_uc + uc_imp_pac (in Generalization.lean) โ†’ : pac_imp_vcdim_finite (contrapositive via double-sample)

    HC at this joint: The โ† direction crosses from combinatorics (VCDim, GrowthFunction) to measure theory (Measure.pi, TrueError). The โ†’ direction crosses from measure theory back to combinatorics. Both crossings have HC > 0.

    UKโ‚ˆ: The โ†” hides an ASYMMETRY: the โ† proof is constructive (produces ERM), while the โ†’ proof is non-constructive (produces hard distribution).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C], PACLearnable X C โ†” VCDim X C < โŠค
    Uses
    Used by
  3. Declvcdim_finite_imp_pacDeclaration kindtheorem

    Direction โ†: finite VCDim implies PAC learnability.

    PROOF ROUTE (via new infrastructure in Generalization.lean): Step 1: VCDim < โˆž โ†’ HasUniformConvergence (vcdim_finite_imp_uc) Sub-step 1a: Sauer-Shelah gives GrowthFunction bound Sub-step 1b: Symmetrization reduces UC to growth function counting Sub-step 1c: Concentration inequality closes the bound Step 2: HasUniformConvergence โ†’ PACLearnable (uc_imp_pac) Sub-step 2a: Construct ERM learner Sub-step 2b: ERM is consistent in realizable case Sub-step 2c: Consistent + UC โ†’ low TrueError

    KUโ‚โ‚ˆ: C.Nonempty is needed for ERM but not stated as hypothesis. If C = โˆ…, then PACLearnable is vacuously true (โˆ€ c โˆˆ C, ... is vacuous). But ERM needs a fallback hypothesis from C. Is this a genuine gap or does the empty case work out vacuously?

    Counterdefinition (COUNTER-4): If the ERM approach fails for computational reasons (ERM is noncomputable, and we need a computable learner for computational learning theory), swap to the compression-based proof: VCDim < โˆž โ†’ finite compression scheme (Moran-Yehudayoff 2016) โ†’ compression scheme learner is PAC. Swap condition: When proving COMPUTATIONAL PAC learnability (polynomial time).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’ โˆ€ [MeasurableConceptClass X C], PACLearnable X C
    Uses
    Used by
  4. Declpac_sample_complexity_sandwichDeclaration kindtheorem

    Quantitative sample-complexity sandwich attached to any PAC witness. Packages: (1) PAC guarantee, (2) SampleComplexity โ‰ค mf, (3) NFL/VC lower bound on both SampleComplexity and mf.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C],
      PACLearnable X C โ†’
        โˆƒ L mf,
          (โˆ€ (ฮต ฮด : โ„),
              0 < ฮต โ†’
                0 < ฮด โ†’
                  โˆ€ (D : MeasureTheory.Measure X),
                    MeasureTheory.IsProbabilityMeasure D โ†’
                      โˆ€ c โˆˆ C,
                        (MeasureTheory.Measure.pi fun x => D)
                            {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal ฮต} โ‰ฅ
                          ENNReal.ofReal (1 - ฮด)) โˆง
            (โˆ€ (ฮต ฮด : โ„), 0 < ฮต โ†’ 0 < ฮด โ†’ SampleComplexity X C ฮต ฮด โ‰ค mf ฮต ฮด) โˆง
              โˆ€ (d : โ„•),
                VCDim X C = โ†‘d โ†’
                  โˆ€ (ฮต ฮด : โ„),
                    0 < ฮต โ†’
                      ฮต โ‰ค 1 / 4 โ†’
                        0 < ฮด โ†’
                          ฮด โ‰ค 1 โ†’ ฮด โ‰ค 1 / 7 โ†’ 1 โ‰ค d โ†’ โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค SampleComplexity X C ฮต ฮด โˆง โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค mf ฮต ฮด
    Uses
    Used by
  5. Declsample_complexity_upper_of_pac_witnessDeclaration kindtheorem

    Any PAC witness (L, mf) gives an upper bound on SampleComplexity: the infimum is at most the witness sample size.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) (L : BatchLearner X Bool) (mf : โ„ โ†’ โ„ โ†’ โ„•),
      (โˆ€ (ฮต ฮด : โ„),
          0 < ฮต โ†’
            0 < ฮด โ†’
              โˆ€ (D : MeasureTheory.Measure X),
                MeasureTheory.IsProbabilityMeasure D โ†’
                  โˆ€ c โˆˆ C,
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal ฮต} โ‰ฅ
                      ENNReal.ofReal (1 - ฮด)) โ†’
        โˆ€ (ฮต ฮด : โ„), 0 < ฮต โ†’ 0 < ฮด โ†’ SampleComplexity X C ฮต ฮด โ‰ค mf ฮต ฮด
    Used by
  6. Declsample_complexity_lower_boundDeclaration kindtheorem

    Sample complexity lower bound: โŒˆ(d-1)/2โŒ‰ โ‰ค SampleComplexity.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool) (d : โ„•),
      VCDim X C = โ†‘d โ†’
        โˆ€ (ฮต ฮด : โ„),
          0 < ฮต โ†’
            ฮต โ‰ค 1 / 4 โ†’
              0 < ฮด โ†’
                ฮด โ‰ค 1 โ†’
                  ฮด โ‰ค 1 / 7 โ†’
                    1 โ‰ค d โ†’
                      (โˆ€ h โˆˆ C, Measurable h) โ†’
                        (โˆ€ (c : Concept X Bool), Measurable c) โ†’
                          WellBehavedVC X C โ†’ โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค SampleComplexity X C ฮต ฮด
    Uses
    Used by
  7. Declpac_lower_bound_memberDeclaration kindtheorem

    PAC lower bound membership: if m achieves PAC for C with VCDim = d, then m โ‰ฅ โŒˆ(d-1)/(64ฮต)โŒ‰. This is the core adversarial counting argument factored for PAC.lean assembly. Note: the tight constant is (d-1)/(2ฮต) (EHKV 1989); see EHKV.lean.

    Proof route (double-averaging on shattered set): 1. VCDim = d โ†’ โˆƒ shattered S with |S| = d 2. D = uniform on S (probability measure, each point has weight 1/d) 3. m < โŒˆ(d-1)/(64ฮต)โŒ‰ โ†’ 2m < d โ†’ NFL counting applies 4. Double-averaging over 2^d labelings: E_f[E_xs[error]] โ‰ฅ (d-m)/(2d) > 1/4 5. Reversed Markov: โˆƒ cโ‚€ โˆˆ C with Pr[error โ‰ค 1/8] โ‰ค 6/7 6. For ฮต โ‰ค 1/8: Pr[error โ‰ค ฮต] โ‰ค 6/7 = 1 - 1/7, contradicting PAC

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool) (d : โ„•),
      VCDim X C = โ†‘d โ†’
        โˆ€ (ฮต ฮด : โ„),
          0 < ฮต โ†’
            ฮต โ‰ค 1 / 4 โ†’
              0 < ฮด โ†’
                ฮด โ‰ค 1 โ†’
                  ฮด โ‰ค 1 / 7 โ†’
                    1 โ‰ค d โ†’
                      โˆ€
                        m โˆˆ
                          {m |
                            โˆƒ L,
                              โˆ€ (D : MeasureTheory.Measure X),
                                MeasureTheory.IsProbabilityMeasure D โ†’
                                  โˆ€ c โˆˆ C,
                                    (MeasureTheory.Measure.pi fun x => D)
                                        {xs | D {x | L.learn (fun i => (xs i, c (xs i))) x โ‰  c x} โ‰ค ENNReal.ofReal ฮต} โ‰ฅ
                                      ENNReal.ofReal (1 - ฮด)},
                        โŒˆ(โ†‘d - 1) / 2โŒ‰โ‚Š โ‰ค m
    Uses
    Used by
  8. Declgrowth_bounded_imp_vcdim_finiteDeclaration kindtheorem

    Growth function polynomially bounded โ†’ VCDim < โŠค. Reverse direction: if GrowthFunction m โ‰ค โˆ‘_{iโ‰คd} C(m,i) for all m โ‰ฅ d, then VCDim โ‰ค d (otherwise GrowthFunction = 2^m for m = VCDim > d).

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      (โˆƒ d, โˆ€ (m : โ„•), d โ‰ค m โ†’ GrowthFunction X C m โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), m.choose i) โ†’ VCDim X C < โŠค
    Used by
  9. Declfundamental_vc_compressionDeclaration kindtheorem

    Fundamental theorem: finite VC dim โ†” finite compression scheme with side information. Moran-Yehudayoff 2016 (arXiv:1503.06960). Sorry-free via Compression.lean. ฮ“โ‚‡โ‚ƒ RESOLVED: CompressionSchemeWithInfo parameterized by concept class C. The no-side-info version (Littlestone-Warmuth conjecture) remains open.

    โˆ€ (X : Type u) (C : ConceptClass X Bool), VCDim X C < โŠค โ†” โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
    Used by
  10. Declfundamental_vc_compression_with_infoDeclaration kindtheorem
    โˆ€ (X : Type u) (C : ConceptClass X Bool), VCDim X C < โŠค โ†” โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
    Used by
  11. Declvcdim_finite_imp_compression_with_infoDeclaration kindtheorem

    The forward direction of the Moran-Yehudayoff theorem: finite VC dimension implies existence of a compression scheme with finite side information.

    The construction: 1. Build a proper finite-support learner L from VC + Sauer-Shelah 2. For sample S: extract c, Y = pointSupport S, HY = hypothesis envelope 3. Apply approximate minimax on the agreement game โ†’ distribution p on HY 4. Apply VC ฮต-approximation on agreement tests โ†’ T representative hypotheses 5. Kernel = union of witness subsets for T hypotheses 6. Side info = incidence: which hypothesis's witness contains each kernel point 7. Reconstruct by majority vote over T hypotheses

    โˆ€ (X : Type u) (C : ConceptClass X Bool), VCDim X C < โŠค โ†’ โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
    Used by
  12. Declvcdim_finite_imp_proper_finite_support_learnerDeclaration kindtheorem

    Finite VC dimension implies existence of a proper finite-support learner. The construction uses ERM + finite_support_vc_approx on the disagreement family.

    โˆ€ (X : Type u) (C : ConceptClass X Bool), Set.Nonempty C โ†’ VCDim X C < โŠค โ†’ โˆƒ _L, True
    Uses
    Used by
  13. DeclsupportError_eq_boolTestExpectationDeclaration kindtheorem

    supportError expressed in terms of boolTestExpectation of a disagreement test.

    โˆ€ {X : Type u} (Y : Finset X) (q : FinitePMF โ†ฅY) (h c : X โ†’ Bool),
      supportError Y q h c = boolTestExpectation q fun y => decide (h โ†‘y โ‰  c โ†‘y)
    Used by
  14. DecldisagreementFamily_boolVCDim_leDeclaration kindtheorem

    VC dimension of the disagreement family is bounded by VCDim(C). Restriction to Y and xor with c do not increase shattering dimension.

    โˆ€ {X : Type u} [inst : DecidableEq X] (C : ConceptClass X Bool) (c : X โ†’ Bool) (Y : Finset X) {d : โ„•},
      VCDim X C โ‰ค โ†‘d โ†’ (disagreementFamilyโœ C c Y).boolVCDim โ‰ค d
    Used by
  15. Declmoran_yehudayoff_forward_constructionDeclaration kindtheorem

    The Moran-Yehudayoff forward construction. Uses finalizeIncidenceScheme to package the majority-vote scheme with universe-correct Info type.

    The agent must provide: compressCore, blockHyp, rowHyp, hsmall, hsub, hagree, hmajor. These are the MY wiring.

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      Set.Nonempty C โ†’
        โˆ€ (L : ProperFiniteSupportLearner X C), VCDim X C < โŠค โ†’ โˆ€ (_K : โ„•), โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Uses
    Used by
  16. Declroundtrip_blockHyp_eq_repDeclaration kindtheorem

    Generic roundtrip theorem for the hround sorry.

    If:

    • encodeWitnessInfo is used in compressCore,
    • decodeWitnessXCoords and decodeWitnessLabel are used in blockHyp, and
    • the kernel contains the witness pairs with the correct labels,

    then the decoded block hypothesis is exactly the representative hypothesis.

    โˆ€ {X : Type u} [inst : DecidableEq X] (learn : {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ X โ†’ Bool) (kernel : Finset (X ร— Bool))
      (c : X โ†’ Bool) (K : โ„•) (W : Finset X) (h : X โ†’ Bool),
      kernel.card โ‰ค K โ†’
        (โˆ€ x โˆˆ W, (x, c x) โˆˆ kernel) โ†’
          (โˆ€ p โˆˆ kernel, p.2 = c p.1) โ†’
            learn (labeledSampleOfFinset c W) = h โ†’
              โˆ€ (x : X),
                have info := encodeWitnessInfo kernel c K W;
                have blockXCoords := decodeWitnessXCoords kernel info;
                have blockLabel := decodeWitnessLabel kernel;
                learn (labeledSampleOfFinset blockLabel blockXCoords) x = h x
    Uses
    Used by
  17. DecllabeledSampleOfFinset_eq_of_eq_on_supportDeclaration kindtheorem

    If two label functions agree on all points of Z, then the labeled samples they induce on Z.equivFin are equal.

    โˆ€ {X : Type u} [DecidableEq X] {โ„“โ‚ โ„“โ‚‚ : X โ†’ Bool} {Z : Finset X},
      (โˆ€ x โˆˆ Z, โ„“โ‚ x = โ„“โ‚‚ x) โ†’ labeledSampleOfFinset โ„“โ‚ Z = labeledSampleOfFinset โ„“โ‚‚ Z
    Used by
  18. DecldecodeWitnessXCoords_encode_eqDeclaration kindtheorem

    If every (x, c x) with x โˆˆ W lies in kernel, and kernel.card โ‰ค K, then decoding the encoded witness positions gives back exactly W.

    โˆ€ {X : Type u} [inst : DecidableEq X] (kernel : Finset (X ร— Bool)) (c : X โ†’ Bool) {K : โ„•} (W : Finset X),
      kernel.card โ‰ค K โ†’ (โˆ€ x โˆˆ W, (x, c x) โˆˆ kernel) โ†’ decodeWitnessXCoords kernel (encodeWitnessInfo kernel c K W) = W
    Used by
  19. DecldecodeWitnessLabel_eq_on_encodedDeclaration kindtheorem

    On the encoded witness support, the decoded label function agrees with the true label function c, provided every pair in the kernel has the correct second coordinate.

    โˆ€ {X : Type u} [inst : DecidableEq X] (kernel : Finset (X ร— Bool)) (c : X โ†’ Bool) (W : Finset X),
      (โˆ€ x โˆˆ W, (x, c x) โˆˆ kernel) โ†’ (โˆ€ p โˆˆ kernel, p.2 = c p.1) โ†’ โˆ€ x โˆˆ W, decodeWitnessLabel kernel x = c x
    Used by
  20. Declmwu_approx_minimaxDeclaration kindtheorem

    Genuine approximate minimax via MWU regret extraction. If every column mixture admits a pure row with expected payoff โ‰ฅ v, then there is a row mixture with payoff โ‰ฅ v - ฮต against every column.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [Nonempty R] [Nonempty C] [DecidableEq R]
      [DecidableEq C] (M : R โ†’ C โ†’ Bool) (v ฮต : โ„),
      0 < ฮต โ†’
        (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’
          โˆƒ p, โˆ€ (c : C), v - ฮต โ‰ค boolGamePayoff M p c
    Uses
    Used by
  21. Declweight_le_potentialDeclaration kindtheorem

    A single weight is bounded by the potential.

    โˆ€ {C : Type u_1} [inst : Fintype C] (cfg : MWUConfig C) (c : C), cfg.weights c โ‰ค cfg.potential
    Uses
    Used by
  22. Declmwu_weight_eq_pow_hitCountDeclaration kindtheorem

    Exact individual-weight tracking: the weight of column c after T rounds is (1-ฮท) to the number of rounds in which c was hit.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] (M : R โ†’ C โ†’ Bool) (ฮท : โ„)
      (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) (T : โ„•)
      (c : C), (mwuConfig M ฮท hฮท1 v hrow T).weights c = (1 - ฮท) ^ mwuHitCountโœ M ฮท hฮท1 v hrow T c
    Uses
    Used by
  23. DeclMWUConfig.mk.congr_simpDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] (weights weights_1 : C โ†’ โ„) (e_weights : weights = weights_1)
      (weights_pos : โˆ€ (c : C), 0 < weights c),
      { weights := weights, weights_pos := weights_pos } = { weights := weights_1, weights_pos := โ‹ฏ }
    Used by
  24. Declmwu_potential_T_boundDeclaration kindtheorem

    Potential bound after T steps: ฮฆ_T โ‰ค |C| ยท (1 - ฮทv)^T.

    This is the core MWU guarantee. Combined with individual weight lower bounds (w_T(c) = (1-ฮท)^{losses(c)}), it yields the regret bound.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] (M : R โ†’ C โ†’ Bool)
      (ฮท : โ„),
      0 โ‰ค ฮท โ†’
        โˆ€ (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0)
          (T : โ„•), (mwuConfig M ฮท hฮท1 v hrow T).potential โ‰ค โ†‘(Fintype.card C) * (1 - ฮท * v) ^ T
    Uses
    Used by
  25. Declpotential_one_step_boundDeclaration kindtheorem

    Potential bound after one step: ฮฆ' โ‰ค ฮฆ ยท (1 - ฮทยทv).

    โˆ€ {R : Type u_1} {C : Type u_2} [Fintype R] [inst : Fintype C] [inst_1 : Nonempty C] (M : R โ†’ C โ†’ Bool) (ฮท : โ„),
      0 โ‰ค ฮท โ†’
        โˆ€ (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0)
          (cfg : MWUConfig C), (mwuUpdateWeights M ฮท hฮท1 cfg โ‹ฏ.choose).potential โ‰ค cfg.potential * (1 - ฮท * v)
    Uses
    Used by
  26. Declbest_response_payoff_weightsDeclaration kindtheorem

    Best response payoff โ‰ฅ v ยท ฮฆ in terms of weights.

    โˆ€ {R : Type u_1} {C : Type u_2} [Fintype R] [inst : Fintype C] [inst_1 : Nonempty C] (M : R โ†’ C โ†’ Bool) (v : โ„)
      (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) (cfg : MWUConfig C),
      v * cfg.potential โ‰ค โˆ‘ c, cfg.weights c * if M โ‹ฏ.choose c = true then 1 else 0
    Uses
    Used by
  27. DeclMWUConfig.potential_posDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] [Nonempty C] (cfg : MWUConfig C), 0 < cfg.potential
    Uses
    Used by
  28. DeclMWUConfig.weights_posDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] (self : MWUConfig C) (c : C), 0 < self.weights c
    Used by
  29. DeclmwuUpdateWeights.congr_simpDeclaration kindtheorem
    โˆ€ {C : Type u_1} [inst : Fintype C] {R : Type u_2} (M M_1 : R โ†’ C โ†’ Bool),
      M = M_1 โ†’
        โˆ€ (ฮท ฮท_1 : โ„) (e_ฮท : ฮท = ฮท_1) (hฮท1 : ฮท < 1) (cfg cfg_1 : MWUConfig C),
          cfg = cfg_1 โ†’ โˆ€ (r r_1 : R), r = r_1 โ†’ mwuUpdateWeights M ฮท hฮท1 cfg r = mwuUpdateWeights M_1 ฮท_1 โ‹ฏ cfg_1 r_1
    Used by
  30. DeclmwuInit_potentialDeclaration kindtheorem
    โˆ€ (C : Type u_1) [inst : Fintype C], (mwuInit C).potential = โ†‘(Fintype.card C)
    Used by
  31. Declminimax_value_le_oneDeclaration kindtheorem

    The minimax value of a Boolean game is at most 1.

    โˆ€ {R : Type u_1} {C : Type u_2} [Fintype R] [inst : Fintype C] [Nonempty C] (M : R โ†’ C โ†’ Bool) (v : โ„),
      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ v โ‰ค 1
    Uses
    Used by
  32. DeclhitRate_from_potentialDeclaration kindtheorem

    Arithmetic core: from the potential bound and sufficiently small ฮท / large T, deduce a per-column hit-rate lower bound. Uses Real.log โ€” exactly 4 Mathlib lemmas.

    โˆ€ {N H T : โ„•} {ฮท v ฮต : โ„},
      0 < โ†‘N โ†’
        0 < ฮท โ†’
          ฮท < 1 โ†’
            v โ‰ค 1 โ†’
              0 < T โ†’ (1 - ฮท) ^ H โ‰ค โ†‘N * (1 - ฮท * v) ^ T โ†’ ฮท โ‰ค ฮต / 4 โ†’ Real.log โ†‘N / (ฮท * โ†‘T) โ‰ค ฮต / 4 โ†’ v - ฮต โ‰ค โ†‘H / โ†‘T
    Used by
  33. DeclboolGamePayoff_nonnegDeclaration kindtheorem
    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] (M : R โ†’ C โ†’ Bool) (p : FinitePMF R) (c : C),
      0 โ‰ค boolGamePayoff M p c
    Uses
    Used by
  34. DeclboolGamePayoff_empirical_eq_hitCountDeclaration kindtheorem

    Empirical payoff of the MWU row sequence equals the normalized hit count.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] [inst_3 : DecidableEq R]
      (M : R โ†’ C โ†’ Bool) (ฮท : โ„) (hฮท1 : ฮท < 1) (v : โ„)
      (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) {T : โ„•} (hT : 0 < T) (c : C),
      boolGamePayoff M (empiricalPMF hT (mwuRows M ฮท hฮท1 v hrow T)) c = โ†‘(mwuHitCountโœ M ฮท hฮท1 v hrow T c) / โ†‘T
    Uses
    Used by
  35. DeclmwuHitCount_eq_sum_indicatorDeclaration kindtheorem

    The recursive hit counter agrees with the sum of Boolean indicators over the emitted row sequence.

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : Fintype C] [inst_2 : Nonempty C] (M : R โ†’ C โ†’ Bool) (ฮท : โ„)
      (hฮท1 : ฮท < 1) (v : โ„) (hrow : โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) (T : โ„•)
      (c : C), โ†‘(mwuHitCountโœ M ฮท hฮท1 v hrow T c) = โˆ‘ t, if M (mwuRows M ฮท hฮท1 v hrow T t) c = true then 1 else 0
    Used by
  36. DeclboolGamePayoff_empirical_eq_avgDeclaration kindtheorem

    Specialized empirical-payoff identity for ApproxMinimax (avoids cyclic import with FiniteVCApprox).

    โˆ€ {R : Type u_1} {C : Type u_2} [inst : Fintype R] [inst_1 : DecidableEq R] {T : โ„•} (hT : 0 < T) (rs : Fin T โ†’ R)
      (M : R โ†’ C โ†’ Bool) (c : C), boolGamePayoff M (empiricalPMF hT rs) c = (โˆ‘ t, if M (rs t) c = true then 1 else 0) / โ†‘T
    Used by
  37. DeclhypothesisEnvelope_subDeclaration kindtheorem

    Every hypothesis in the envelope is in C.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (L : ProperFiniteSupportLearner X C) (c : X โ†’ Bool) (Y : Finset X),
      โˆ€ h โˆˆ hypothesisEnvelope L c Y, h โˆˆ C
    Uses
    Used by
  38. DeclProperFiniteSupportLearner.output_memDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} (self : ProperFiniteSupportLearner X C) {m : โ„•} (S : Fin m โ†’ X ร— Bool),
      self.learn S โˆˆ C
    Used by
  39. Declgood_on_support_gives_row_responseDeclaration kindtheorem

    For each C-realizable sample, the proper learner provides a row-response for the minimax game on the hypothesis envelope.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (L : ProperFiniteSupportLearner X C),
      โˆ€ c โˆˆ C,
        โˆ€ (Y : Finset X) [Nonempty โ†ฅY] (HY : Finset (X โ†’ Bool)),
          HY = hypothesisEnvelope L c Y โ†’
            โˆ€ (q : FinitePMF โ†ฅY), โˆƒ h, 2 / 3 โ‰ค โˆ‘ y, q.prob y * if decide (โ†‘h โ†‘y = c โ†‘y) = true then 1 else 0
    Uses
    Used by
  40. DeclsupportAgreement_eq_one_sub_supportErrorDeclaration kindtheorem

    Weighted agreement = 1 - supportError.

    โˆ€ {X : Type u} (Y : Finset X) (q : FinitePMF โ†ฅY) (h c : X โ†’ Bool),
      (โˆ‘ y, q.prob y * if h โ†‘y = c โ†‘y then 1 else 0) = 1 - supportError Y q h c
    Uses
    Used by
  41. DeclProperFiniteSupportLearner.good_on_supportDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} (self : ProperFiniteSupportLearner X C),
      โˆ€ c โˆˆ C,
        โˆ€ (Y : Finset X) (q : FinitePMF โ†ฅY),
          โˆƒ Z โІ Y, Z.card โ‰ค self.sampleBound โˆง supportError Y q (self.learn (labeledSampleOfFinset c Z)) c โ‰ค 1 / 3
    Used by
  42. Declfinite_support_vc_approxDeclaration kindtheorem

    Finite-support distributions uniformly approximate any distribution on a VC class. For a class of VC dimension at most d and any ฮต > 0, there exists T = T(d, ฮต) such that every finitely supported distribution ฮผ is within ฮต (uniformly over the class) of some empirical distribution on T points. A density-style reduction that lets the approximate minimax / MWU machinery, which lives in finite support, apply to general distributions.

    โˆ€ (d : โ„•) (ฮต : โ„),
      0 < ฮต โ†’
        โˆƒ T,
          โˆƒ (hT : 0 < T),
            โˆ€ {H : Type u_1} [inst : Fintype H] [inst_1 : DecidableEq H] (A : Finset (H โ†’ Bool)),
              A.boolVCDim โ‰ค d โ†’
                โˆ€ (ฮผ : FinitePMF H),
                  โˆƒ hs, โˆ€ a โˆˆ A, |boolTestExpectation ฮผ a - boolTestExpectation (empiricalPMF hT hs) a| โ‰ค ฮต
    Uses
    Used by
  43. DecltrueErrorReal_extend_falseDeclaration kindtheorem
    โˆ€ {H : Type u_1} [inst : Fintype H] [DecidableEq H] [inst_2 : MeasurableSpace H] [MeasurableSingletonClass H]
      (ฮผ : FinitePMF H) (a : H โ†’ Bool),
      TrueErrorReal (H โŠ• โ„•) (extendBoolโœ a) (fun x => false) (PMF.map Sum.inl (FinitePMF.toPMFโœ ฮผ)).toMeasure =
        boolTestExpectation ฮผ a
    Uses
    Used by
  44. DeclboolTestExpectation_nonnegDeclaration kindtheorem

    A convex combination of values in {0, 1} is nonnegative.

    โˆ€ {H : Type u_1} [inst : Fintype H] (ฮผ : FinitePMF H) (f : H โ†’ Bool), 0 โ‰ค boolTestExpectation ฮผ f
    Uses
    Used by
  45. DeclboolTestExpectation_le_oneDeclaration kindtheorem

    A convex combination of values in {0, 1} is at most 1.

    โˆ€ {H : Type u_1} [inst : Fintype H] (ฮผ : FinitePMF H) (f : H โ†’ Bool), boolTestExpectation ฮผ f โ‰ค 1
    Uses
    Used by
  46. DeclFinitePMF.prob_nonnegDeclaration kindtheorem
    โˆ€ {H : Type u_1} [inst : Fintype H] (self : FinitePMF H) (h : H), 0 โ‰ค self.prob h
    Used by
  47. DeclFinitePMF.prob_sum_oneDeclaration kindtheorem
    โˆ€ {H : Type u_1} [inst : Fintype H] (self : FinitePMF H), โˆ‘ h, self.prob h = 1
    Used by
  48. DeclfinalizeIncidenceSchemeDeclaration kindtheorem

    Final existential wrapper: closes the theorem in the exact form expected.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (T K : โ„•)
      (compressCore : {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ Finset (X ร— Bool) ร— IncidenceInfo T K)
      (blockHyp : Finset (X ร— Bool) โ†’ IncidenceInfo T K โ†’ Fin T โ†’ X โ†’ Bool)
      (rowHyp : {m : โ„•} โ†’ (S : Fin m โ†’ X ร— Bool) โ†’ (โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) โ†’ Fin T โ†’ X โ†’ Bool),
      0 < T โ†’
        (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), (compressCore S).1.card โ‰ค K) โ†’
          (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), โ†‘(compressCore S).1 โІ Set.range S) โ†’
            (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m) (t : Fin T),
                blockHyp (compressCore S).1 (compressCore S).2 t (S i).1 = rowHyp S hreal t (S i).1) โ†’
              (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m),
                  (โˆ‘ t, if rowHyp S hreal t (S i).1 = (S i).2 then 1 else 0) / โ†‘T > 1 / 2) โ†’
                โˆƒ k cs, CompressionSchemeWithInfo.size cs = k
    Used by
  49. DeclencodeWitnessInfo.congr_simpDeclaration kindtheorem
    โˆ€ {X : Type u} {inst : DecidableEq X} [inst_1 : DecidableEq X] (kernel kernel_1 : Finset (X ร— Bool)),
      kernel = kernel_1 โ†’
        โˆ€ (c c_1 : X โ†’ Bool),
          c = c_1 โ†’
            โˆ€ (K : โ„•) (W W_1 : Finset X), W = W_1 โ†’ encodeWitnessInfo kernel c K W = encodeWitnessInfo kernel_1 c_1 K W_1
    Used by
  50. DeclboolTestExpectation_empirical_eq_avgDeclaration kindtheorem

    Bridges the FinitePMF view and the sample-average view: the expectation of a Bool-valued test under the empirical PMF of a sample equals the sample average (1/T) โˆ‘_t f (s_t). This lets the MWU updates and the approximation transfer principle live in the same distributional framework.

    โˆ€ {H : Type u_1} [inst : Fintype H] [inst_1 : DecidableEq H] {T : โ„•} (hT : 0 < T) (hs : Fin T โ†’ H) (f : H โ†’ Bool),
      boolTestExpectation (empiricalPMF hT hs) f = (โˆ‘ t, if f (hs t) = true then 1 else 0) / โ†‘T
    Used by
  51. DeclboolGamePayoff_eq_boolTestExpectationDeclaration kindtheorem

    Identifies the game-theoretic payoff (a row distribution against a fixed column in the Bool game) with the corresponding test expectation. The translation that lets the MWU regret bound be applied directly to the compression problem.

    โˆ€ {R : Type u_1} [inst : Fintype R] [DecidableEq R] {C : Type u_2} (M : R โ†’ C โ†’ Bool) (p : FinitePMF R) (c : C),
      boolGamePayoff M p c = boolTestExpectation p fun r => M r c
    Used by
  52. DeclagreeTests_boolVCDim_leDeclaration kindtheorem

    VC dimension of the agreement-test family is bounded by 2^(d+1) - 1, where d bounds the VC dimension of the concept class C. Uses Assouad's coding argument directly: if a shattered set T in โ†ฅHY has |T| โ‰ฅ 2^(d+1), embed bitstrings into T, extract d+1 distinct points from Y via shattering, and show these points are shattered by C (using the XOR trick where b(j) = decide(g(x_j) = c(x_j)) absorbs the agree/disagree flip).

    โˆ€ {X : Type u} [DecidableEq X] (C : ConceptClass X Bool) (c : X โ†’ Bool) (Y : Finset X) (HY : Finset (X โ†’ Bool)),
      (โˆ€ h โˆˆ HY, h โˆˆ C) โ†’ โˆ€ {d : โ„•}, VCDim X C โ‰ค โ†‘d โ†’ (agreeTests c Y HY).boolVCDim โ‰ค 2 ^ (d + 1) - 1
    Used by
  53. Declcompression_with_info_imp_vcdim_finiteDeclaration kindtheorem

    Compression with side info implies finite VC dimension. Proof by pigeonhole: compress is injective on C-realizable labelings (by correctness), but compressed outputs form a bounded set.

    โˆ€ (X : Type u) (C : ConceptClass X Bool), (โˆƒ k cs, cs.size = k) โ†’ VCDim X C < โŠค
    Uses
    Used by
  54. Declshatters_subset_compressionDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} {S T : Finset X}, T โІ S โ†’ Shatters X C S โ†’ Shatters X C T
    Used by
  55. Declexp_beats_poly_compressionDeclaration kindtheorem

    Exponential beats polynomial for the compression pigeonhole argument.

    โˆ€ (s : โ„•), (s + 1) ^ 2 * (4 * (s + 1) ^ 2) ^ s < 2 ^ (2 * (s + 1) * (s + 1))
    Uses
    Used by
  56. Declsucc_le_two_pow_compressionDeclaration kindtheorem
    โˆ€ (k : โ„•), k + 1 โ‰ค 2 ^ k
    Used by
  57. Declcompress_with_info_injective_on_labelingsDeclaration kindtheorem

    Pigeonhole core: if two C-realizable samples over the same points with different labelings produce the same (kernel, info) pair, correctness forces the labelings to agree.

    โˆ€ {X : Type u} {n : โ„•} {C : ConceptClass X Bool} (cs : CompressionSchemeWithInfo X Bool C) (pts : Fin n โ†’ X),
      Function.Injective pts โ†’
        โˆ€ (f g : Fin n โ†’ Bool),
          (โˆƒ c โˆˆ C, โˆ€ (i : Fin n), c (pts i) = f i) โ†’
            (โˆƒ c โˆˆ C, โˆ€ (i : Fin n), c (pts i) = g i) โ†’
              ((cs.compress fun i => (pts i, f i)) = cs.compress fun i => (pts i, g i)) โ†’ f = g
    Uses
    Used by
  58. DeclCompressionSchemeWithInfo.correctDeclaration kindtheorem

    Correctness: reconstructed hypothesis agrees with every sample point, when the sample is C-realizable

    โˆ€ {X : Type u} {Y : Type v} {C : ConceptClass X Y} (self : CompressionSchemeWithInfo X Y C) {m : โ„•} (S : Fin m โ†’ X ร— Y),
      (โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) โ†’
        โˆ€ (i : Fin m), self.reconstruct (self.compress S).1 (self.compress S).2 (S i).1 = (S i).2
    Used by
  59. DeclCompressionSchemeWithInfo.compress_subDeclaration kindtheorem

    Compressed set is a subset of the sample

    โˆ€ {X : Type u} {Y : Type v} {C : ConceptClass X Y} (self : CompressionSchemeWithInfo X Y C) {m : โ„•} (S : Fin m โ†’ X ร— Y),
      โ†‘(self.compress S).1 โІ Set.range S
    Used by
  60. DeclCompressionSchemeWithInfo.compress_smallDeclaration kindtheorem

    Compressed set is small

    โˆ€ {X : Type u} {Y : Type v} {C : ConceptClass X Y} (self : CompressionSchemeWithInfo X Y C) {m : โ„•} (S : Fin m โ†’ X ร— Y),
      (self.compress S).1.card โ‰ค self.kernelSize
    Used by
  61. Declfundamental_rademacherDeclaration kindtheorem

    Fundamental theorem: Rademacher complexity characterization. BPโ‚…: two asymmetric directions crossing different paradigm joints. Uses uniform vanishing (โˆƒ mโ‚€ โˆ€ D), which is the textbook-standard form.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C],
      PACLearnable X C โ†”
        โˆ€ ฮต > 0,
          โˆƒ mโ‚€,
            โˆ€ (D : MeasureTheory.Measure X),
              MeasureTheory.IsProbabilityMeasure D โ†’ โˆ€ m โ‰ฅ mโ‚€, RademacherComplexity X C D m < ฮต
    Uses
    Used by
  62. Declvcdim_finite_imp_rademacher_vanishingDeclaration kindtheorem

    VCDim finite โ†’ Rademacher vanishes uniformly. The bound mโ‚€ depends only on d and ฮต, NOT on D.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’
        โˆ€ ฮต > 0,
          โˆƒ mโ‚€,
            โˆ€ (D : MeasureTheory.Measure X),
              MeasureTheory.IsProbabilityMeasure D โ†’ โˆ€ m โ‰ฅ mโ‚€, RademacherComplexity X C D m < ฮต
    Uses
    Used by
  63. Declvcdim_zero_rademacher_le_inv_sqrtDeclaration kindtheorem
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) (D : MeasureTheory.Measure X),
      VCDim X C = โ†‘0 โ†’
        โˆ€ (m : โ„•),
          0 < m โ†’
            โˆ€ [MeasureTheory.IsProbabilityMeasure (MeasureTheory.Measure.pi fun x => D)],
              RademacherComplexity X C D m โ‰ค 1 / โˆšโ†‘m
    Uses
    Used by
  64. Declvcdim_zero_concepts_agreeDeclaration kindtheorem

    When VCDim = 0, Rademacher complexity is bounded by 1/โˆšm.

    VCDim = 0 means no singleton is shattered, so the concept class acts as a single effective labeling. EmpRad โ‰ค 1/โˆšm by Khintchine's inequality / Jensen. This avoids the d > 0 hypothesis of vcdim_bounds_rademacher_quantitative.

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      VCDim X C = โ†‘0 โ†’ โˆ€ (hโ‚ hโ‚‚ : Concept X Bool), hโ‚ โˆˆ C โ†’ hโ‚‚ โˆˆ C โ†’ โˆ€ (x : X), hโ‚ x = hโ‚‚ x
    Used by
  65. Declvcdim_bounds_rademacher_quantitativeDeclaration kindtheorem

    VC dimension upper bounds Rademacher complexity: Rad โ‰ค โˆš(2dยทlog(em/d)/m).

    The proof decomposes into: (1) Pointwise: EmpRad(xs) โ‰ค B for all xs [Massart + Sauer-Shelah] (2) Integral: Rad = โˆซ EmpRad โ‰ค โˆซ B = B [probability measure]

    Step (2) is proved. Step (1) for B โ‰ฅ 1 follows from EmpRad โ‰ค 1. Step (1) for B < 1 requires Massart finite lemma + Sauer-Shelah growth bound.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) (D : MeasureTheory.Measure X) (m : โ„•),
      0 < m โ†’
        โˆ€ (d : โ„•),
          VCDim X C = โ†‘d โ†’
            0 < d โ†’
              d โ‰ค m โ†’
                โˆ€ [MeasureTheory.IsProbabilityMeasure (MeasureTheory.Measure.pi fun x => D)],
                  RademacherComplexity X C D m โ‰ค โˆš(2 * โ†‘d * Real.log (Real.exp 1 * โ†‘m / โ†‘d) / โ†‘m)
    Uses
    Used by
  66. Declncard_restrictions_le_sum_choose_setDeclaration kindtheorem

    For a Set-based concept class C with VCDim X C = d, the number of distinct restrictions of C to any finite set S is bounded by โˆ‘_{iโ‰คd} C(|S|, i).

    This bridges from our Set-based VCDim to Mathlib's Finset.vcDim on the restriction to S, using the fact that โ†ฅS is Fintype for any Finset S.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (S : Finset X) (d : โ„•),
      VCDim X C = โ†‘d โ†’ {f | โˆƒ c โˆˆ C, โˆ€ (x : โ†ฅS), c โ†‘x = f x}.ncard โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), S.card.choose i
    Used by
  67. Declfinite_massart_lemmaDeclaration kindtheorem

    Massart finite lemma: E_ฯƒ[max_{j โ‰ค N} Z_j] โ‰ค ฯƒโˆš(2 log N).

    โˆ€ {m : โ„•},
      0 < m โ†’
        โˆ€ {N : โ„•} (hN : 0 < N) (Z : Fin N โ†’ SignVector m โ†’ โ„) (ฯƒ_param : โ„),
          0 < ฯƒ_param โ†’
            (โˆ€ (j : Fin N) (t : โ„),
                0 โ‰ค t โ†’
                  1 / โ†‘(Fintype.card (SignVector m)) * โˆ‘ sv, Real.exp (t * Z j sv) โ‰ค Real.exp (t ^ 2 * ฯƒ_param ^ 2 / 2)) โ†’
              (1 / โ†‘(Fintype.card (SignVector m)) * โˆ‘ sv, Finset.univ.sup' โ‹ฏ fun j => Z j sv) โ‰ค ฯƒ_param * โˆš(2 * Real.log โ†‘N)
    Uses
    Used by
  68. Declexp_mul_sup'_le_sumDeclaration kindtheorem

    Soft-max bound: exp(t ยท Finset.sup') โ‰ค ฮฃ exp(t ยท f_i).

    โˆ€ {ฮน : Type u_1} [DecidableEq ฮน] (s : Finset ฮน) (hs : s.Nonempty) (f : ฮน โ†’ โ„) (t : โ„),
      0 โ‰ค t โ†’ Real.exp (t * s.sup' hs f) โ‰ค โˆ‘ i โˆˆ s, Real.exp (t * f i)
    Used by
  69. DeclrademacherComplexity_le_oneDeclaration kindtheorem
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) (D : MeasureTheory.Measure X) (m : โ„•),
      0 < m โ†’ โˆ€ [MeasureTheory.IsProbabilityMeasure (MeasureTheory.Measure.pi fun x => D)], RademacherComplexity X C D m โ‰ค 1
    Uses
    Used by
  70. Declanalytical_log_sqrt_boundDeclaration kindtheorem

    Analytical lemma: for d > 0, m โ‰ฅ โŒˆ32(d+1)/ฮตโดโŒ‰+1, ฮต โˆˆ (0,1], we have 2dยทlog(em/d)/m < ฮตยฒ.

    Uses Real.log_le_rpow_div with exponent 1/2: log(x) โ‰ค x^(1/2)/(1/2) = 2โˆšx. Then 2dยทlog(em/d)/m โ‰ค 2dยท2โˆš(em/d)/(m) โ‰ค ฮตยฒ.

    โˆ€ (d m : โ„•) (ฮต : โ„),
      0 < ฮต โ†’
        ฮต โ‰ค 1 โ†’ 0 < d โ†’ d โ‰ค m โ†’ โŒˆ32 * (โ†‘d + 1) / ฮต ^ 4โŒ‰โ‚Š + 1 โ‰ค m โ†’ 2 * โ†‘d * Real.log (Real.exp 1 * โ†‘m / โ†‘d) / โ†‘m < ฮต ^ 2
    Used by
  71. Declvcdim_finite_imp_pac_via_uc'Declaration kindtheorem

    VCDim < โŠค โ†’ PACLearnable via UC route.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’
        (โˆ€ h โˆˆ C, Measurable h) โ†’ (โˆ€ (c : Concept X Bool), Measurable c) โ†’ WellBehavedVC X C โ†’ PACLearnable X C
    Uses
    Used by
  72. Declvcdim_finite_imp_uc'Declaration kindtheorem

    Finite VCDim implies uniform convergence. Proof: VCDim < โˆž โ†’ UC.

    • Finite X: direct Hoeffding per-hypothesis + finite union bound.
    • Infinite X: Sauer-Shelah โ†’ symmetrization + growth function โ†’ UC.
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’
        (โˆ€ h โˆˆ C, Measurable h) โ†’ (โˆ€ (c : Concept X Bool), Measurable c) โ†’ WellBehavedVC X C โ†’ HasUniformConvergence X C
    Uses
    Used by
  73. Declvcdim_finite_imp_growth_boundedDeclaration kindtheorem

    VCDim < โŠค โ†’ growth function polynomially bounded by partial binomial sum. Forward direction of fundamental_theorem conjunct 5. Uses Sauer-Shelah: GrowthFunction(m) โ‰ค โˆ‘_{iโ‰คd} C(m,i) where d = VCDim.

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’ โˆƒ d, โˆ€ (m : โ„•), d โ‰ค m โ†’ GrowthFunction X C m โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), m.choose i
    Used by
  74. Decluc_bad_event_le_delta_provedDeclaration kindtheorem

    UC bad-event bound: for m โ‰ฅ mโ‚€(v,ฮต,ฮด), the probability of the bad event (โˆƒ h with |TrueErr-EmpErr| โ‰ฅ ฮต) is at most ฮด. Composes symmetrization_uc_bound with growth_exp_le_delta.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต ฮด : โ„),
                0 < ฮต โ†’
                  0 < ฮด โ†’
                    ฮด < 1 โ†’
                      โˆ€ (v : โ„•),
                        0 < v โ†’
                          (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                            (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                              MeasureTheory.NullMeasurableSet
                                  {p |
                                    โˆƒ h โˆˆ C,
                                      EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                          EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                        ฮต / 2}
                                  ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                                (MeasureTheory.Measure.pi fun x => D)
                                    {xs |
                                      โˆƒ h โˆˆ C,
                                        |TrueErrorReal X h c D -
                                              EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                          ฮต} โ‰ค
                                  ENNReal.ofReal ฮด
    Uses
    Used by
  75. Declsymmetrization_uc_boundDeclaration kindtheorem

    The symmetrization uniform convergence bound: two-sided version. P[โˆƒhโˆˆC: |TrueErr-EmpErr| โ‰ฅ ฮต] โ‰ค 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8).

    Proof strategy (4 steps):

    1. Decompose absolute value: |TrueErr - EmpErr| โ‰ฅ ฮต โ†” (TrueErr - EmpErr โ‰ฅ ฮต) โˆจ (EmpErr - TrueErr โ‰ฅ ฮต)

    have abs_decomp : โˆ€ (a b : โ„), |a - b| โ‰ฅ ฮต โ†” a - b โ‰ฅ ฮต โˆจ b - a โ‰ฅ ฮต := by intro a b; constructor ยท intro h; by_cases h' : a - b โ‰ฅ ฮต ยท exact Or.inl h' ยท exact Or.inr (by linarith [abs_sub_comm a b, le_abs_self (a - b)]) ยท intro h; cases h with | inl h => exact le_trans (le_of_eq (abs_of_nonneg (by linarith))) (by linarith) | inr h => exact le_trans (le_of_eq (abs_of_nonpos (by linarith) โ–ธ ...)) ...

    2. Upper tail: P[โˆƒhโˆˆC: TrueErr-EmpErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Direct application of symmetrization_step + double_sample_pattern_bound.

    3. Lower tail: P[โˆƒhโˆˆC: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Apply the symmetric argument: swap roles of S and S' in the double sample.
    • Equivalently, apply symmetrization_step to the event EmpErr-TrueErr โ‰ฅ ฮต and bound the double-sample event {EmpErr_S - EmpErr_{S'} โ‰ฅ ฮต/2}.
    • The bound is symmetric because D^m โŠ— D^m is symmetric under swapping factors. have swap_symmetry : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S) - EmpErr(S') โ‰ฅ ฮต/2} = DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S') - EmpErr(S) โ‰ฅ ฮต/2} := Measure.prod_swap ...

    4. Union bound: P[|gap| โ‰ฅ ฮต] โ‰ค P[gap โ‰ฅ ฮต] + P[gap โ‰ค -ฮต] โ‰ค 2ยทGFยทexp(...) + 2ยทGFยทexp(...) = 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    -- Uses: MeasureTheory.measure_union_le for the union of two events -- CAST: 2 * X + 2 * X = 4 * X in ENNReal (need ENNReal.add_mul or similar)

    References: SSBD Theorem 6.7, Kakade-Tewari Lecture 19

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    MeasureTheory.NullMeasurableSet
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2}
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                      (MeasureTheory.Measure.pi fun x => D)
                          {xs |
                            โˆƒ h โˆˆ C,
                              |TrueErrorReal X h c D -
                                    EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                ฮต} โ‰ค
                        ENNReal.ofReal (4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  76. Declsymmetrization_step_lowerDeclaration kindtheorem

    Symmetrization step for the lower tail: P[โˆƒh: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทP_{double}[โˆƒh: EmpErr_S-EmpErr_{S'} โ‰ฅ ฮต/2].

    Mirror of symmetrization_step for the opposite direction. Uses hoeffding_one_sided_upper instead of hoeffding_one_sided.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) - TrueErrorReal X h c D โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  77. Declsymmetrization_stepDeclaration kindtheorem

    Symmetrization: the probability of a large gap TrueErr-EmpErr is at most twice the probability of a large gap EmpErr'-EmpErr on the double sample.

    Proof strategy (6 steps):

    1. Witness selection: For S in the bad event, โˆƒh* โˆˆ C with TrueErr(h) - EmpErr_S(h) โ‰ฅ ฮต.

    -- In the bad event set, extract h* by classical choice have h_witness : โˆ€ xs โˆˆ bad_event, โˆƒ h* โˆˆ C, TrueErrorReal X h* c D - EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โ‰ฅ ฮต

    2. Ghost sample mean: E_{S'}[EmpErr_{S'}(h)] = TrueErr(h) โ‰ฅ EmpErr_S(h*) + ฮต.

    • Uses: MeasureTheory.integral_pi to compute E[EmpErr] over product measure.
    • KEY LEMMA: For fixed h, E_{D^m}[EmpiricalError(h,S)] = TrueErrorReal(h,c,D). This is because EmpErr = (1/m)โˆ‘ indicator(x_i), and E[indicator(x_i)] = TrueErrorReal. have expected_emp_err : โˆ€ h* : Concept X Bool, โˆซ xs, EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โˆ‚(Measure.pi (fun _ : Fin m => D)) = TrueErrorReal X h* c D := by ...

    3. Hoeffding on ghost sample: P_{S'}[EmpErr_{S'}(h) < TrueErr(h) - ฮต/2] โ‰ค exp(-mฮตยฒ/2).

    • Apply hoeffding_one_sided with t = ฮต/2.
    • The hm_large hypothesis ensures exp(-mฮตยฒ/2) < 1/2: 2ยทln2 โ‰ค mฮตยฒ โŸน mฮตยฒ/2 โ‰ฅ ln2 โŸน exp(-mฮตยฒ/2) โ‰ค 1/2. have hoeffding_ghost : โˆ€ h* โˆˆ C, Measure.pi (fun _ : Fin m => D) {xs' | EmpiricalError X Bool h* (sample xs') (zeroOneLoss Bool) < TrueErrorReal X h* c D - ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-m * (ฮต/2)^2 * 2)) := by intro h* _; exact hoeffding_one_sided D h* c m hm (ฮต/2) (by linarith) (by ...) (by ...)

    4. Complementary probability: P_{S'}[EmpErr_{S'}(h) - EmpErr_S(h) โ‰ฅ ฮต/2] โ‰ฅ 1/2.

    • From step 2: TrueErr(h) โ‰ฅ EmpErr_S(h) + ฮต
    • From step 3: P[EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2] โ‰ฅ 1/2
    • Chain: EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2 โ‰ฅ EmpErr_S + ฮต - ฮต/2 = EmpErr_S + ฮต/2

    5. Conditional to unconditional: The witness h* from step 1 also witnesses the double-sample event โˆƒhโˆˆC: EmpErr'-EmpErr โ‰ฅ ฮต/2. So: P_{S'}[double event | S bad] โ‰ฅ 1/2.

    have conditional_bound : โˆ€ xs โˆˆ bad_event, Measure.pi (fun _ : Fin m => D) {xs' | โˆƒ h โˆˆ C, EmpiricalError ... xs' - EmpiricalError ... xs โ‰ฅ ฮต/2} โ‰ฅ ENNReal.ofReal (1/2) := by ...

    6. Fubini integration: By Measure.prod_apply and Fubini: P_{S,S'}[double event] = โˆซ_S P_{S'}[double event | S] โ‰ฅ (1/2) ยท P_S[bad event] โŸน P_S[bad event] โ‰ค 2 ยท P_{S,S'}[double event].

    -- Uses: MeasureTheory.Measure.prod_apply or lintegral_prod -- MEASURABILITY: the double-sample event is measurable as a finite union -- of sets of the form {(xs,xs') | EmpErr'(h) - EmpErr(h) โ‰ฅ ฮต/2} for h โˆˆ C. -- Since C may be infinite, measurability requires care: the sup over h -- must be shown to be measurable. For finite restriction patterns (โ‰ค 2^m -- on Fin m โ†’ Bool), this is a finite union.

    MEASURABILITY CONCERNS:

    • {xs | โˆƒ h โˆˆ C, ...} is NOT obviously measurable for infinite C. Strategy: decompose via restriction patterns. On any fixed xs, the set of labelings {(h(xs 0), ..., h(xs(m-1))) | h โˆˆ C} has at most GF(C,m) โ‰ค 2^m elements. So the โˆƒh event is a finite union of measurable sets.
    • EmpiricalError is a finite sum of measurable functions, hence measurable.
    • The product ฯƒ-algebra on (Fin m โ†’ X) ร— (Fin m โ†’ X) is generated by cylinder sets, and our events are in this ฯƒ-algebra.

    References: SSBD Lemma 4.5, Kakade-Tewari Lecture 19 Lemma 1

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            TrueErrorReal X h c D - EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  78. Decldouble_sample_pattern_boundDeclaration kindtheorem

    On the double sample, the probability that any hypothesis has EmpErr' - EmpErr โ‰ฅ ฮต/2 is bounded by GF(C,2m) ยท exp(-mฮตยฒ/8).

    Proof strategy (Approach A โ€” standard exchangeability, 5 steps):

    1. EXCHANGEABILITY: Under D^m โŠ— D^m, the 2m draws zโ‚,...,z_{2m} are iid from D. The joint distribution is invariant under permutations of {1,...,2m}.

    Key lemma: P_{D^mโŠ—D^m}[event(S,S')] = E_z[P_{split}[event | z]] where z = merged sample and the split is uniformly random among all C(2m,m) ways to partition z into two groups of m.

    -- Measure.pi permutation invariance have pi_perm_invariant : โˆ€ (ฯƒ : Equiv.Perm (Fin (2*m))), (Measure.pi (fun _ : Fin (2*m) => D)).map (fun z i => z (ฯƒ i)) = Measure.pi (fun _ : Fin (2*m) => D) := by ... -- Consequence: the event probability equals the split-averaged probability have exchangeability : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, gap(p) โ‰ฅ ฮต/2} = โˆซ z, SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs) โ‰ฅ ฮต/2} โˆ‚(Measure.pi (fun _ : Fin (2*m) => D)) := by ...

    2. CONDITIONING: For fixed merged sample z of 2m points:

    • C restricts to at most GF(C,2m) distinct labeling patterns on z (deterministic).
    • For each pattern p, define: diff(p, split) = EmpErr_{S'}(p) - EmpErr_S(p) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i where a_i = 1[pattern(z_i) โ‰  c(z_i)] โˆˆ {0,1}.
    -- Number of distinct patterns have num_patterns : โˆ€ (z : MergedSample X m), Set.ncard {p : Fin (2*m) โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h (z i) โ‰  c (z i))} โ‰ค GrowthFunction X C (2*m) := by ...

    3. PER-PATTERN HOEFFDING ON SPLITS: For fixed z and fixed pattern p: Under uniformly random split (S,S') of z into two groups of m: diff(p, split) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i

    This is a function of the random partition. By Hoeffding's inequality for sampling without replacement (Serfling 1974): P_split[diff โ‰ฅ ฮต/2] โ‰ค exp(-mฮตยฒ/8)

    Alternative derivation: Hoeffding without replacement from Hoeffding with replacement (iid signs) via coupling. The without-replacement bound is actually TIGHTER (variance reduction), but the with-replacement bound suffices.

    -- Per-pattern concentration have per_pattern_bound : โˆ€ (z : MergedSample X m) (a : Fin (2*m) โ†’ โ„) (ha : โˆ€ i, a i โˆˆ Set.Icc 0 1), SplitMeasure m {vs | (1/m) * โˆ‘ i โˆˆ second_group vs, a i - (1/m) * โˆ‘ i โˆˆ first_group vs, a i โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-(m : โ„) * (ฮต/2)^2 / 2)) := by ... -- Note: m*(ฮต/2)^2/2 = mฮตยฒ/8

    4. UNION BOUND: P_split[โˆƒ pattern: diff โ‰ฅ ฮต/2 | z] โ‰ค (number of patterns) ยท max_pattern P_split[diff โ‰ฅ ฮต/2] โ‰ค GF(C,2m) ยท exp(-mฮตยฒ/8)

    have union_bound : โˆ€ (z : MergedSample X m), SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs, h) โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (GrowthFunction X C (2*m) * Real.exp (-(m : โ„) * ฮต^2 / 8)) := by ...

    5. INTEGRATE: P_{D^mโŠ—D^m}[event] = E_z[P_split[event|z]] (by step 1) โ‰ค E_z[GF(C,2m) ยท exp(-mฮตยฒ/8)] (by step 4, pointwise) = GF(C,2m) ยท exp(-mฮตยฒ/8) (bound is independent of z)

    -- The bound is a constant, so integrating gives the same constant -- (using IsProbabilityMeasure for the 2m-fold product)

    Infrastructure needed:

    • Fin.sumFinEquiv : Fin m โŠ• Fin n โ‰ƒ Fin (m + n) (available in Mathlib)
    • mergeSamples / splitMergedSample (defined above)
    • SplitMeasure and ValidSplit (defined above)
    • Measure.pi permutation invariance (to be proved or imported)
    • Hoeffding for sampling without replacement
    • GrowthFunction on 2m points + sauer_shelah_exp_bound from Rademacher.lean

    MEASURABILITY CONCERNS:

    • The merged sample z โ†ฆ P_split[event|z] must be measurable as a function of z. Since the event is a finite union over patterns, and each pattern's indicator is a measurable function of z (finite evaluation), this follows.
    • GrowthFunction X C (2*m) is a natural number (deterministic), no measurability issue.

    References: SSBD Theorem 6.7, Hoeffding (1963), Serfling (1974)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  MeasureTheory.NullMeasurableSet
                      {p |
                        โˆƒ h โˆˆ C,
                          EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                            ฮต / 2}
                      ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                    ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2} โ‰ค
                      ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  79. Declexchangeability_chain_boundDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  ฮต โ‰ค 2 โ†’
                    Set.Nonempty C โ†’
                      MeasureTheory.NullMeasurableSet
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
                          ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                        have ฮผ := MeasureTheory.Measure.pi fun x => D;
                        (ฮผ.prod ฮผ)
                            {p |
                              โˆƒ h โˆˆ C,
                                EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                    EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                  ฮต / 2} โ‰ค
                          ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  80. DeclzeroOneLoss.congr_simpDeclaration kindtheorem
    โˆ€ (Y : Type v) {inst : DecidableEq Y} [inst_1 : DecidableEq Y] (a a_1 : Y),
      a = a_1 โ†’ โˆ€ (a_2 a_3 : Y), a_2 = a_3 โ†’ zeroOneLoss Y a a_2 = zeroOneLoss Y a_1 a_3
    Used by
  81. Declrestriction_pattern_countDeclaration kindtheorem

    The number of distinct restriction patterns of C on any n points is at most GF(C,n). For z : Fin n โ†’ X, define patterns(z) = {p : Fin n โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h(z i) โ‰  c(z i))}. Then patterns(z).ncard โ‰ค GrowthFunction X C n by definition of GrowthFunction.

    โˆ€ {X : Type u} [MeasurableSpace X] [Infinite X] (C : ConceptClass X Bool) (c : Concept X Bool) (n : โ„•) (z : Fin n โ†’ X),
      {p | โˆƒ h โˆˆ C, โˆ€ (i : Fin n), p i = decide (h (z i) โ‰  c (z i))}.ncard โ‰ค GrowthFunction X C n
    Used by
  82. Declrademacher_mgf_boundDeclaration kindtheorem

    Rademacher MGF bound.

    โˆ€ {m : โ„•},
      0 < m โ†’
        โˆ€ (a : Fin m โ†’ โ„) (c : โ„),
          0 โ‰ค c โ†’
            (โˆ€ (i : Fin m), |a i| โ‰ค c) โ†’
              โˆ€ (t : โ„),
                0 โ‰ค t โ†’
                  1 / โ†‘(Fintype.card (SignVector m)) * โˆ‘ ฯƒ, Real.exp (t * (1 / โ†‘m * โˆ‘ i, a i * boolToSign (ฯƒ i))) โ‰ค
                    Real.exp (t ^ 2 * c ^ 2 / (2 * โ†‘m))
    Uses
    Used by
  83. Declcosh_le_exp_sq_halfDeclaration kindtheorem

    cosh(x) โ‰ค exp(xยฒ/2). Standard sub-Gaussian bound.

    โˆ€ (x : โ„), Real.cosh x โ‰ค Real.exp (x ^ 2 / 2)
    Used by
  84. Declfinite_exchangeability_boundDeclaration kindtheorem

    Generic finite exchangeability bound. Given a measure-preserving family of transformations on a probability space, a NullMeasurableSet S, and a pointwise bound on the sum of preimage indicators, conclude ฮฝ(S) โ‰ค B.

    โˆ€ {ฮฉ : Type u_1} {G : Type u_2} [inst : MeasurableSpace ฮฉ] [inst_1 : Fintype G] [Nonempty G]
      {ฮฝ : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure ฮฝ] (T : G โ†’ ฮฉ โ†’ ฮฉ) (S : Set ฮฉ),
      (โˆ€ (g : G), MeasureTheory.MeasurePreserving (T g) ฮฝ ฮฝ) โ†’
        MeasureTheory.NullMeasurableSet S ฮฝ โ†’
          โˆ€ (B : ENNReal), (โˆ€ (z : ฮฉ), โˆ‘ g, (T g โปยน' S).indicator 1 z โ‰ค B * โ†‘(Fintype.card G)) โ†’ ฮฝ S โ‰ค B
    Used by
  85. Declgrowth_exp_le_deltaDeclaration kindtheorem
    โˆ€ {X : Type u} [MeasurableSpace X] (C : ConceptClass X Bool) (v : โ„•),
      0 < v โ†’
        โˆ€ (m : โ„•),
          0 < m โ†’
            โˆ€ (ฮต ฮด : โ„),
              0 < ฮต โ†’
                0 < ฮด โ†’
                  ฮด < 1 โ†’
                    (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                      (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                        4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)) โ‰ค ฮด โˆง 2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2
    Uses
    Used by
  86. Declsum_choose_le_exp_powDeclaration kindtheorem

    Pure combinatorial inequality: โˆ‘_{i=0}^d C(m,i) โ‰ค (em/d)^d for d โ‰ค m, d โ‰ฅ 1.

    โˆ€ (d m : โ„•), 0 < d โ†’ d โ‰ค m โ†’ โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) โ‰ค (Real.exp 1 * โ†‘m / โ†‘d) ^ d
    Used by
  87. Declpow_mul_exp_neg_le_factorial_divDeclaration kindtheorem

    Key arithmetic lemma for PAC bound: for t > 0, t^d * exp(-t) โ‰ค (d+1)!/t. Follows from exp(t) โ‰ฅ t^(d+1)/(d+1)! (partial sum of Taylor series).

    โˆ€ {d : โ„•} {t : โ„}, 0 < t โ†’ t ^ d * Real.exp (-t) โ‰ค โ†‘(d + 1).factorial / t
    Used by
  88. Declgrowth_function_le_two_powDeclaration kindtheorem

    Trivial bound: GrowthFunction โ‰ค 2^n for all concept classes. Each restriction to an n-element set yields a function in S โ†’ Bool, and there are at most 2^n such functions.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (n : โ„•), GrowthFunction X C n โ‰ค 2 ^ n
    Used by
  89. Declhoeffding_one_sided_upperDeclaration kindtheorem

    Upper-tail Hoeffding: for iid Bernoulli(p) draws, the empirical average overshoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    This is the mirror of hoeffding_one_sided (which bounds the lower tail). The proof uses the same sub-Gaussian machinery with Z_i = indicator(x_i) - p (instead of p - indicator(x_i)).

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ TrueErrorReal X h c D + t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  90. Declhoeffding_one_sidedDeclaration kindtheorem

    One-sided Hoeffding: for iid Bernoulli(p) draws, the empirical average undershoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    Proof strategy (3 steps):

    1. MGF bound (Hoeffding's lemma): For X โˆˆ [0,1] with E[X] = p, E[exp(s(X-p))] โ‰ค exp(sยฒ/8).

    • Adapt from cosh_le_exp_sq_half infrastructure in Rademacher.lean.
    • Key: convexity of exp on [0,1] gives E[exp(sX)] โ‰ค pยทexp(s) + (1-p)ยทexp(0), then the sยฒ/8 bound follows from ln(1 + x) โ‰ค x and Taylor expansion. have mgf_bound : โˆ€ (s : โ„), โˆซ x, Real.exp (s * (indicator x - p)) โˆ‚D โ‰ค Real.exp (s^2 / 8) := by ...

    2. Product independence: E[exp(sยทโˆ‘(X_i-p))] = โˆ E[exp(s(X_i-p))] โ‰ค exp(msยฒ/8).

    • Uses MeasureTheory.Measure.pi independence structure.
    • Needs: Measure.pi integral factorization for product of functions.
    • MEASURABILITY: fun xs => Real.exp (s * โˆ‘ i, f (xs i)) is measurable (composition of measurable functions). have product_bound : โˆ€ (s : โ„), โˆซ xs, Real.exp (s * โˆ‘ i, (indicator (xs i) - p)) โˆ‚Measure.pi (fun _ => D) โ‰ค Real.exp (m * s^2 / 8) := by ...

    3. Exponential Markov + optimize: P[โˆ‘(X_i-p) โ‰ค -mt] = P[exp(-sยทโˆ‘(X_i-p)) โ‰ฅ exp(smt)] โ‰ค exp(-smt + msยฒ/8). Optimize over s: set s = 4t to get โ‰ค exp(-2mtยฒ).

    • Uses Markov's inequality in ENNReal form.
    • CAST ISSUE: Markov gives ENNReal bound, need to convert exp(-2mtยฒ) between ENNReal.ofReal and the measure value. have markov_step : โˆ€ (s : โ„) (hs : 0 < s), Measure.pi (fun _ => D) {xs | โˆ‘ i, (indicator (xs i) - p) โ‰ค -(m : โ„) * t} โ‰ค ENNReal.ofReal (Real.exp (-(s * m * t) + m * s^2 / 8)) := by ... have optimize : Real.exp (-(4*t * m * t) + m * (4*t)^2 / 8) = Real.exp (-2 * m * t^2) := by ring_nf

    CAST ISSUES to watch:

    • m : โ„• needs cast to โ„ in the exponent: (m : โ„)
    • EmpiricalError returns โ„, TrueErrorReal returns โ„, good โ€” no ENNReal gap
    • The measure value is ENNReal, the bound exp(-2mtยฒ) is โ„โ‰ฅ0โˆž via ENNReal.ofReal

    References: SSBD Lemma B.3, Hoeffding (1963)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ค TrueErrorReal X h c D - t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  91. Decluc_imp_pacDeclaration kindtheorem

    Uniform convergence implies PAC learnability via ERM. The ERM learner (which exists by ermLearn) achieves PAC learning when uniform convergence holds. This is the second half of vcdim_finite_imp_pac.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      Set.Nonempty C โ†’ HasUniformConvergence X C โ†’ PACLearnable X C
    Uses
    Used by
  92. DeclBatchLearner.output_in_HDeclaration kindtheorem

    Output is in the hypothesis space

    โˆ€ {X : Type u} {Y : Type v} (self : BatchLearner X Y) {m : โ„•} (S : Fin m โ†’ X ร— Y), self.learn S โˆˆ self.hypotheses
    Used by
  93. Declrademacher_lower_bound_on_shatteredDeclaration kindtheorem

    Adversarial Rademacher lower bound on shattered sets. For |T| >= 4m^2 + 1, exists D with Rad_m(C,D) >= 1/2.

    Proof: D = uniform on T. Product measure = uniform on T^m. On injective samples from T (shattered): EmpRad = 1 (by empRad_eq_one_of_injective_in_shattered). EmpRad โ‰ฅ 0 everywhere (by empRad_nonneg). Birthday bound: P[injective m draws from n โ‰ฅ 4mยฒ+1 points] โ‰ฅ 1 - m(m-1)/(2n) โ‰ฅ 7/8 โ‰ฅ 1/2. So โˆซ EmpRad โ‰ฅ P[injective] ยท 1 + P[ยฌinjective] ยท 0 โ‰ฅ 1/2.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool) (T : Finset X),
      Shatters X C T โ†’
        โˆ€ (m : โ„•),
          0 < m โ†’ 4 * m ^ 2 + 1 โ‰ค T.card โ†’ โˆƒ D, MeasureTheory.IsProbabilityMeasure D โˆง 1 / 2 โ‰ค RademacherComplexity X C D m
    Uses
    Used by
  94. DeclempiricalRademacherComplexity_le_oneDeclaration kindtheorem
    โˆ€ (X : Type u) (C : ConceptClass X Bool) {m : โ„•}, 0 < m โ†’ โˆ€ (xs : Fin m โ†’ X), EmpiricalRademacherComplexity X C xs โ‰ค 1
    Uses
    Used by
  95. DeclempRad_nonnegDeclaration kindtheorem
    โˆ€ {X : Type u} (C : ConceptClass X Bool) {m : โ„•}, m โ‰  0 โ†’ โˆ€ (xs : Fin m โ†’ X), 0 โ‰ค EmpiricalRademacherComplexity X C xs
    Uses
    Used by
  96. Declsum_boolToSign_cancelDeclaration kindtheorem

    Rademacher cancellation: ฮฃ_ฯƒ boolToSign(ฯƒ i) * f(ฯƒ) = 0 when f doesn't depend on coordinate i. Proof: the bit-flip involution at coordinate i pairs each ฯƒ with flipAt i ฯƒ, negating boolToSign(ฯƒ i) while preserving f.

    โˆ€ {m : โ„•} (i : Fin m) (f : SignVector m โ†’ โ„),
      (โˆ€ (ฯƒ ฯƒ' : SignVector m), (โˆ€ (k : Fin m), k โ‰  i โ†’ ฯƒ k = ฯƒ' k) โ†’ f ฯƒ = f ฯƒ') โ†’ โˆ‘ ฯƒ, boolToSign (ฯƒ i) * f ฯƒ = 0
    Uses
    Used by
  97. DeclflipAt_otherDeclaration kindtheorem
    โˆ€ {m : โ„•} (i : Fin m) (ฯƒ : SignVector m) (k : Fin m), k โ‰  i โ†’ flipAtโœ i ฯƒ k = ฯƒ k
    Used by
  98. DeclflipAt_involutiveDeclaration kindtheorem
    โˆ€ {m : โ„•} (i : Fin m), Function.Involutive (flipAtโœ i)
    Used by
  99. DeclflipAt_boolToSignDeclaration kindtheorem
    โˆ€ {m : โ„•} (i : Fin m) (ฯƒ : SignVector m), boolToSign (flipAtโœ i ฯƒ i) = -boolToSign (ฯƒ i)
    Used by
  100. DeclempRad_eq_one_of_injective_in_shatteredDeclaration kindtheorem

    Key combinatorial lemma: injective samples from a shattered set have EmpRad = 1.

    โˆ€ {X : Type u} [DecidableEq X] (C : ConceptClass X Bool) {m : โ„•},
      0 < m โ†’
        โˆ€ (T : Finset X),
          Shatters X C T โ†’
            โˆ€ (xs : Fin m โ†’ X), Function.Injective xs โ†’ (โˆ€ (i : Fin m), xs i โˆˆ T) โ†’ EmpiricalRademacherComplexity X C xs = 1
    Uses
    Used by
  101. Declshatters_subsetDeclaration kindtheorem

    Subset of a shattered set is shattered.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (T S : Finset X), S โІ T โ†’ Shatters X C T โ†’ Shatters X C S
    Used by
  102. DeclempRad_eq_one_of_all_labelingsDeclaration kindtheorem

    On samples where every labeling is realizable, EmpRad = 1.

    For each sign vector ฯƒ, the hypothesis provides h โˆˆ C with h(xs i) = ฯƒ i, giving corr(h,ฯƒ,xs) = 1. Since |corr| โ‰ค 1, the sSup is exactly 1. Averaging over all ฯƒ gives EmpRad = (1/2^m)ยท2^mยท1 = 1.

    This is the combinatorial core of the NFL Rademacher lower bound: when xs are distinct points from a shattered set, every labeling is realized, so this lemma applies.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) {m : โ„•},
      0 < m โ†’
        โˆ€ (xs : Fin m โ†’ X),
          (โˆ€ (ฯƒ : SignVector m), โˆƒ h โˆˆ C, โˆ€ (i : Fin m), h (xs i) = ฯƒ i) โ†’ EmpiricalRademacherComplexity X C xs = 1
    Uses
    Used by
  103. DeclrademacherCorrelation_abs_le_oneDeclaration kindtheorem
    โˆ€ {X : Type u} {m : โ„•},
      0 < m โ†’ โˆ€ (h : Concept X Bool) (ฯƒ : SignVector m) (xs : Fin m โ†’ X), |rademacherCorrelation h ฯƒ xs| โ‰ค 1
    Uses
    Used by
  104. DeclboolToSign_mul_abs_le_oneDeclaration kindtheorem
    โˆ€ (bโ‚ bโ‚‚ : Bool), |boolToSign bโ‚ * boolToSign bโ‚‚| โ‰ค 1
    Uses
    Used by
  105. DeclboolToSign_abs_le_oneDeclaration kindtheorem
    โˆ€ (b : Bool), |boolToSign b| โ‰ค 1
    Uses
    Used by
  106. DeclboolToSign_abs_eq_oneDeclaration kindtheorem
    โˆ€ (b : Bool), |boolToSign b| = 1
    Used by
  107. Declcorr_eq_one_of_agreeDeclaration kindtheorem

    When h agrees with ฯƒ on all sample points, correlation is exactly 1.

    โˆ€ {X : Type u} {m : โ„•},
      0 < m โ†’
        โˆ€ (h : Concept X Bool) (ฯƒ : SignVector m) (xs : Fin m โ†’ X),
          (โˆ€ (i : Fin m), h (xs i) = ฯƒ i) โ†’ rademacherCorrelation h ฯƒ xs = 1
    Used by
  108. Declpac_imp_vcdim_finiteDeclaration kindtheorem

    Direction โ†’: PAC learnability implies finite VCDim.

    PROOF ROUTE (via double-sample infrastructure in Generalization.lean): Step 1: Contrapositive โ€” assume VCDim = โˆž Step 2: For m = mf(ฮต,ฮด), extract S with |S| = 2m shattered by C (uses WithTop.eq_top_iff_forall_ge, same as vcdim_univ_infinite) Step 3: Construct D = uniform on S (Finset.uniformMeasure?) KUโ‚โ‚‰: Mathlib's uniform measure on a finite set โ€” does MeasureTheory.Measure.count / Finset.card give IsProbabilityMeasure? Step 4: Double-sample trick via GhostSample + symmetrization Step 5: Counting argument on restricted labelings

    HC at this joint: Step 3 requires constructing a specific probability measure from a combinatorial object (the shattered set). This is a Pโ‚โ†’Pโ‚‚ crossing. UKโ‚‰: The construction of the hard distribution is the only non-constructive step. Can it be made constructive? (Related to derandomization in learning.)

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool),
      PACLearnable X C โ†’ VCDim X C < โŠค
    Uses
    Used by
  109. Declvcdim_infinite_not_pacDeclaration kindtheorem

    If VCDim = โŠค, then C is not PAC learnable. Proof: for any learner L with sample function mf, pick ฮต = 1/4, ฮด = 1/4. Let m = mf(1/4, 1/4). Since VCDim = โŠค, โˆƒ shattered set S with |S| โ‰ฅ 2m. Put D = uniform on S. For random labeling, any m-sample learner has expected error โ‰ฅ 1/4 on unseen points. This is the core of pac_imp_vcdim_finite (contrapositive direction).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool),
      VCDim X C = โŠค โ†’ ยฌPACLearnable X C
    Uses
    Used by
  110. DecluniformMeasure_isProbabilityDeclaration kindtheorem

    The uniform measure is a probability measure when X is nonempty and finite.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [inst_1 : Fintype X] [MeasurableSingletonClass X] (hne : Nonempty X),
      0 < Fintype.card X โ†’ MeasureTheory.IsProbabilityMeasure (uniformMeasure X hne)
    Used by
  111. Declnfl_counting_coreDeclaration kindtheorem

    NFL counting core: for a shattered set T with |T| > 2m, there exists a labeling fโ‚€ : โ†ฅT โ†’ Bool and its shattering witness cโ‚€ โˆˆ C such that the number of samples xs : Fin m โ†’ โ†ฅT where the learner achieves low error (โ‰ค |T|/4) is at most half the total number of samples. Proof: double-counting + pigeonhole using per_sample_labeling_bound.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {T : Finset X},
      Shatters X C T โ†’
        โˆ€ {m : โ„•},
          2 * m < T.card โ†’
            โˆ€ (L : BatchLearner X Bool),
              โˆƒ fโ‚€,
                โˆƒ cโ‚€ โˆˆ C,
                  (โˆ€ (t : โ†ฅT), cโ‚€ โ†‘t = fโ‚€ t) โˆง
                    2 * {xs | {t | cโ‚€ โ†‘t โ‰  L.learn (fun i => (โ†‘(xs i), cโ‚€ โ†‘(xs i))) โ†‘t}.card * 4 โ‰ค T.card}.card โ‰ค
                      Fintype.card (Fin m โ†’ โ†ฅT)
    Uses
    Used by
  112. Declper_sample_labeling_boundDeclaration kindtheorem

    Per-sample labeling bound: for any fixed xs : Fin m โ†’ ฮฑ on a Fintype ฮฑ with 2m < |ฮฑ|, and any function output : (ฮฑ โ†’ Bool) โ†’ (ฮฑ โ†’ Bool) that only depends on the restriction of f to {xs i}, at most half the labelings f : ฮฑ โ†’ Bool have error(f, output(f)) * 4 โ‰ค |ฮฑ|.

    Proof: pair each f with flip_unseen(f). The pair has complementary disagreements on unseen points, and |unseen| > |ฮฑ|/2, so at most one can have low error.

    โˆ€ {ฮฑ : Type u_1} [inst : Fintype ฮฑ] [inst_1 : DecidableEq ฮฑ] (m : โ„•),
      2 * m < Fintype.card ฮฑ โ†’
        โˆ€ (xs : Fin m โ†’ ฮฑ) (output : (ฮฑ โ†’ Bool) โ†’ ฮฑ โ†’ Bool),
          (โˆ€ (f f' : ฮฑ โ†’ Bool), (โˆ€ (i : Fin m), f (xs i) = f' (xs i)) โ†’ output f = output f') โ†’
            2 * {f | {t | f t โ‰  output f t}.card * 4 โ‰ค Fintype.card ฮฑ}.card โ‰ค Fintype.card (ฮฑ โ†’ Bool)
    Used by
  113. DeclMeasurableConceptClass.hmeas_CDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C],
      โˆ€ c โˆˆ C, Measurable c
    Uses
    Used by
  114. DeclMeasurableConceptClass.mem_measurableDeclaration kindtheorem

    Every concept in C is measurable

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableConceptClass X C],
      โˆ€ h โˆˆ C, Measurable h
    Used by
  115. DeclMeasurableConceptClass.hc_measDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C]
      (c : Concept X Bool), Measurable c
    Uses
    Used by
  116. DeclMeasurableConceptClass.all_measurableDeclaration kindtheorem

    All concepts X โ†’ Bool are measurable (for disagreement sets)

    โˆ€ {X : Type u} {inst : MeasurableSpace X} (C : ConceptClass X Bool) [self : MeasurableConceptClass X C]
      (c : Concept X Bool), Measurable c
    Used by
  117. DeclMeasurableConceptClass.hWBDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C], WellBehavedVC X C
    Uses
    Used by
  118. DeclMeasurableConceptClass.wellBehavedDeclaration kindtheorem

    Uniform convergence bad event is NullMeasurableSet

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableConceptClass X C],
      WellBehavedVC X C
    Used by
  119. DefinitionBatchLearnerstructure

    A batch learner (PAC paradigm): takes a finite sample, returns a hypothesis.

    Type u โ†’ Type v โ†’ Type (max u v)
  120. DefinitionBatchLearner.hypothesesdef

    The learner's hypothesis space

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ HypothesisSpace X Y
  121. DefinitionBatchLearner.learndef

    The learning algorithm: given a sample, produce a hypothesis

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Concept X Y
  122. DefinitionCompressionSchemeWithInfostructure

    A labeled compression scheme with finite side information. This is the object proved to exist by Moran-Yehudayoff (2016, arXiv:1503.06960).

    The current CompressionScheme is strictly stronger: it requires reconstruction from the compressed Finset alone (no side information). See Open_NoInfoCompressionStrengthening for that conjecture.

    (X : Type u) โ†’ (Y : Type v) โ†’ ConceptClass X Y โ†’ Type (max (max u (u_1 + 1)) v)
  123. DefinitionCompressionSchemeWithInfo.Infodef

    The side information type

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ CompressionSchemeWithInfo X Y C โ†’ Type u_1
  124. DefinitionCompressionSchemeWithInfo.compressdef

    Compression: extract โ‰ค kernelSize labeled examples + side information

    {X : Type u} โ†’
      {Y : Type v} โ†’
        {C : ConceptClass X Y} โ†’
          (self : CompressionSchemeWithInfo X Y C) โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Finset (X ร— Y) ร— self.Info
  125. DefinitionCompressionSchemeWithInfo.info_finitedef

    Side information is finite

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ (self : CompressionSchemeWithInfo X Y C) โ†’ Fintype self.Info
  126. DefinitionCompressionSchemeWithInfo.kernelSizedef

    Kernel size bound

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ CompressionSchemeWithInfo X Y C โ†’ โ„•
  127. DefinitionCompressionSchemeWithInfo.reconstructdef

    Reconstruction: produce hypothesis from compressed subset AND side information

    {X : Type u} โ†’
      {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ (self : CompressionSchemeWithInfo X Y C) โ†’ Finset (X ร— Y) โ†’ self.Info โ†’ X โ†’ Y
  128. DefinitionCompressionSchemeWithInfo.sizedef

    Total size of a compression scheme with side information: kernel size + number of side information states. (The paper uses k + logโ‚‚(|I|+1); we use the simpler k + |I| which is an upper bound and avoids importing Real.log.)

    {X : Type u} โ†’ {Y : Type v} โ†’ {C : ConceptClass X Y} โ†’ CompressionSchemeWithInfo X Y C โ†’ โ„•
  129. DefinitionCompressionSchemeWithInfo0def

    Fix the hidden Info universe parameter of CompressionSchemeWithInfo to 0. This resolves the universe elaboration obstruction: Fin T โ†’ Finset (Fin K) is Type 0, while CompressionSchemeWithInfo X Bool C with X : Type u infers Info : Type u. Pinning to .{u, 0, 0} allows Type 0 Info directly.

    (X : Type u) โ†’ (Y : Type) โ†’ ConceptClass X Y โ†’ Type (max (max u 1) 0)
  130. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  131. DefinitionEmpiricalErrordef

    Empirical error: average loss on a finite sample.

    (X : Type u) โ†’ (Y : Type v) โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ LossFunction Y โ†’ โ„
  132. DefinitionEmpiricalRademacherComplexitydef
    (X : Type u) โ†’ ConceptClass X Bool โ†’ {m : โ„•} โ†’ (Fin m โ†’ X) โ†’ โ„
  133. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  134. DefinitionFinitePMFstructure

    A probability mass function over a finite type. Named FinitePMF to avoid conflict with Mathlib's PMF.

    (H : Type u_1) โ†’ [Fintype H] โ†’ Type u_1
  135. DefinitionFinitePMF.probdef
    {H : Type u_1} โ†’ [inst : Fintype H] โ†’ FinitePMF H โ†’ H โ†’ โ„
  136. DefinitionFinitePMF.toPMFdef
    {H : Type u_1} โ†’ [inst : Fintype H] โ†’ FinitePMF H โ†’ PMF H
  137. DefinitionFinset.boolVCDimdef

    VC dimension of a finite Bool-valued family, computed via the set-system image boolFamilyToFinsetFamily and Mathlib's Finset.vcDim. Declared noncomputable because the underlying vcDim is.

    {H : Type u_1} โ†’ [Fintype H] โ†’ [DecidableEq H] โ†’ Finset (H โ†’ Bool) โ†’ โ„•
  138. DefinitionGrowthFunctiondef

    Growth function (shattering coefficient): ฯ€_C(m) = max_{|S|=m} |{c|_S : c โˆˆ C}|. For each m-element set S, counts the number of distinct restrictions of C to S, then takes the supremum over all such S.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ โ„• โ†’ โ„•
  139. DefinitionHasUniformConvergencedef

    Uniform convergence of empirical error to true error over a hypothesis class. This is the property that makes finite VCDim โ†’ PAC learnability work. BPโ‚… connects here: this is ONE of the five characterizations.

    M-DefinitionRepair (ฮ“โ‚ƒโ‚… โ†’ ฮ“โ‚„โ‚): The mโ‚€ must be INDEPENDENT of D and c. That's what "uniform" means โ€” convergence is uniform over all distributions and all target concepts. The original definition had mโ‚€ depending on D and c, making uc_imp_pac unprovable (PACLearnable's mf must be independent of D, c). Repaired: โˆƒ mโ‚€ is now BEFORE โˆ€ D, โˆ€ c. This STRENGTHENS the definition (A5-valid: adds content, doesn't simplify).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ HypothesisSpace X Bool โ†’ Prop
  140. DefinitionHypothesisSpacedef

    A hypothesis space is a set of candidate concepts that the learner searches over. When H = C (the realizable case), every concept in the target class is available. When H โŠ‚ C or H โŠƒ C, we are in the improper/agnostic regime.

    Structurally identical to ConceptClass but semantically distinct: ConceptClass is the ground truth collection; HypothesisSpace is what the learner has access to.

    Type u โ†’ Type v โ†’ Type (max v u)
  141. DefinitionIncidenceInfodef

    Concrete side information for the MY construction: each of the T recovered blocks is represented by the set of kernel positions it uses.

    โ„• โ†’ โ„• โ†’ Type
  142. DefinitionIsConsistentWithdef

    A hypothesis h is consistent with labeled sample S.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Prop
  143. DefinitionMWUConfigstructure

    MWU config: weight vector with positivity proof.

    (C : Type u_1) โ†’ [Fintype C] โ†’ Type u_1
  144. DefinitionMWUConfig.potentialdef

    Potential = sum of weights.

    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ MWUConfig C โ†’ โ„
  145. DefinitionMWUConfig.toPMFdef

    Normalize config to PMF.

    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ [Nonempty C] โ†’ MWUConfig C โ†’ FinitePMF C
  146. DefinitionMWUConfig.weightsdef
    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ MWUConfig C โ†’ C โ†’ โ„
  147. DefinitionMeasurableConceptClassstructure

    A concept class with the measure-theoretic regularity needed for PAC theory.

    Bundles three conditions: 1. Every concept in C is measurable 2. All concepts are measurable (needed for disagreement set measurability) 3. The UC bad event satisfies NullMeasurableSet (WellBehavedVC)

    Condition 3 is the deep one: for uncountable C, the existential {โˆƒ h โˆˆ C, |TrueErr - EmpErr| โ‰ฅ ฮต} is NOT MeasurableSet in general. WellBehavedVC asserts it is NullMeasurableSet, which suffices for integration (lintegral_indicator_oneโ‚€).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  148. DefinitionPACLearnabledef

    PAC (Probably Approximately Correct) learning. The central definition of computational learning theory.

    Sample space: Fin m โ†’ X with i.i.d. product measure D^m. Labels: derived deterministically from target concept c (realizable case). Error: D-probability of disagreement between learner output and c.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  149. DefinitionProperFiniteSupportLearnerstructure

    A proper finite-support learner for a concept class C. This structure captures the existence of a bounded-support ERM with error at most 1/3 for any C-realizable finite distribution. CORRECTED: good_on_support returns Finset X (not Fin k โ†’ X).

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Type u
  150. DefinitionProperFiniteSupportLearner.learndef
    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ ProperFiniteSupportLearner X C โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ X โ†’ Bool
  151. DefinitionProperFiniteSupportLearner.sampleBounddef
    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ ProperFiniteSupportLearner X C โ†’ โ„•
  152. DefinitionRademacherComplexitydef
    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ MeasureTheory.Measure X โ†’ โ„• โ†’ โ„
  153. DefinitionSampleComplexitydef

    Sample complexity of PAC learning: the minimum number of samples needed to achieve (ฮต,ฮด)-PAC learning. m_C(ฮต,ฮด) = sInf{m | โˆƒ L, โˆ€ D prob, โˆ€ c โˆˆ C, D^m{S : error(L(S)) โ‰ค ฮต} โ‰ฅ 1-ฮด}.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ โ„ โ†’ โ„ โ†’ โ„•
  154. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  155. DefinitionSignVectordef
    โ„• โ†’ Type
  156. DefinitionTrueErrordef

    True error (0-1 loss, realizable case): D-probability of disagreement. This is what PACLearnable's success event measures.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ ENNReal
  157. DefinitionTrueErrorRealdef

    True error in โ„: for use in bounds involving subtraction/absolute value. COUNTER-1 of TrueError. The toReal bridge loses information when the measure is โŠค.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ โ„
  158. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  159. DefinitionWellBehavedVCdef

    A concept class is well-behaved if the ghost gap event is null-measurable. This is the minimal regularity assumption for the symmetrization proof.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  160. DefinitionagreeTestdef

    Per-point agreement test: for a fixed point x โˆˆ Y and concept c, maps hypothesis h to whether h(x) = c(x).

    {X : Type u} โ†’ (X โ†’ Bool) โ†’ X โ†’ (HY : Finset (X โ†’ Bool)) โ†’ โ†ฅHY โ†’ Bool
  161. DefinitionagreeTestsdef

    The family of agreement tests over all points in Y.

    {X : Type u} โ†’ (X โ†’ Bool) โ†’ Finset X โ†’ (HY : Finset (X โ†’ Bool)) โ†’ Finset (โ†ฅHY โ†’ Bool)
  162. DefinitionboolFamilyToFinsetFamilydef

    Maps a finite family of Bool-valued functions to its image as a family of accepting sets. The set-system view is what Mathlib's Finset.Shatters and Finset.vcDim consume, so this is the entry point from the function-class view to the combinatorial VC machinery.

    {H : Type u_1} โ†’ [Fintype H] โ†’ [DecidableEq H] โ†’ Finset (H โ†’ Bool) โ†’ Finset (Finset H)
  163. DefinitionboolGamePayoffdef

    Expected payoff of distribution p against column c in a Boolean game.

    {R : Type u_1} โ†’ {C : Type u_2} โ†’ [inst : Fintype R] โ†’ (R โ†’ C โ†’ Bool) โ†’ FinitePMF R โ†’ C โ†’ โ„
  164. DefinitionboolTestExpectationdef

    Expected value of a Bool-valued test under a finite distribution, via the indicator embedding if f h then 1 else 0. The central quantity of the finite-VC approximation layer: a TV bound on distributions translates to a uniform bound on test expectations via expectation_approx_of_tv.

    {H : Type u_1} โ†’ [inst : Fintype H] โ†’ FinitePMF H โ†’ (H โ†’ Bool) โ†’ โ„
  165. DefinitionboolToSigndef

    Convert Bool labels to ยฑ1 reals. true โ†ฆ 1, false โ†ฆ -1.

    Bool โ†’ โ„
  166. DefinitionboundedSubsamplesdef

    Bounded subsamples: all subsets of Y with cardinality โ‰ค s.

    {X : Type u} โ†’ Finset X โ†’ โ„• โ†’ Finset (Finset X)
  167. DefinitiondecodeWitnessLabeldef

    Decode labels from the kernel. This is exactly the current MY reconstruction convention in your file.

    {X : Type u} โ†’ [DecidableEq X] โ†’ Finset (X ร— Bool) โ†’ X โ†’ Bool
  168. DefinitiondecodeWitnessXCoordsdef

    Decode the X-coordinates of a block from kernel positions. This matches the current blockHyp shape.

    {X : Type u} โ†’ Finset (X ร— Bool) โ†’ {K : โ„•} โ†’ Finset (Fin K) โ†’ Finset X
  169. DefinitiondisagreementFamilydef

    The disagreement family: for each h โˆˆ C, the test y โ†ฆ decide(h(y) โ‰  c(y)) restricted to Y. Used for the VC approximation step in the proper learner proof.

    {X : Type u} โ†’ ConceptClass X Bool โ†’ (X โ†’ Bool) โ†’ (Y : Finset X) โ†’ Finset (โ†ฅY โ†’ Bool)
  170. DefinitionempiricalPMFdef

    Build FinitePMF from empirical frequencies of a finite sequence.

    {ฮฑ : Type u_1} โ†’ [inst : Fintype ฮฑ] โ†’ [DecidableEq ฮฑ] โ†’ {T : โ„•} โ†’ 0 < T โ†’ (Fin T โ†’ ฮฑ) โ†’ FinitePMF ฮฑ
  171. DefinitionencodeWitnessInfodef

    Encode a witness set W as the set of kernel positions of the pairs (x, c x). The bound kernel.card โ‰ค K is fed into the encoding through the if branch, so the result has the same shape as the current compressCore code.

    {X : Type u} โ†’ [DecidableEq X] โ†’ Finset (X ร— Bool) โ†’ (X โ†’ Bool) โ†’ (K : โ„•) โ†’ Finset X โ†’ Finset (Fin K)
  172. DefinitionextendBooldef
    {H : Type u_1} โ†’ (H โ†’ Bool) โ†’ H โŠ• โ„• โ†’ Bool
  173. DefinitionflipAtdef

    Bit-flip at coordinate i: ฯƒ โ†ฆ ฯƒ' where ฯƒ'(i) = !ฯƒ(i), ฯƒ'(k) = ฯƒ(k) for k โ‰  i.

    {m : โ„•} โ†’ Fin m โ†’ SignVector m โ†’ SignVector m
  174. DefinitionhypothesisEnvelopedef

    The hypothesis envelope: the finite set of all possible learner outputs on bounded subsamples of Y, labeled by concept c.

    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ ProperFiniteSupportLearner X C โ†’ (X โ†’ Bool) โ†’ Finset X โ†’ Finset (X โ†’ Bool)
  175. DefinitionlabeledSampleOfFinsetdef

    Build a labeled sample from a Finset of points and a concept.

    {X : Type u} โ†’ (X โ†’ Bool) โ†’ (Z : Finset X) โ†’ Fin Z.card โ†’ X ร— Bool
  176. DefinitionliftClassdef
    {H : Type u_1} โ†’ Finset (H โ†’ Bool) โ†’ ConceptClass (H โŠ• โ„•) Bool
  177. DefinitionmkIncidenceSchemeOfMajoritydef

    The actual final closure helper. Packages the majority-vote construction. If decoded hypotheses agree with reference hypotheses on sample points, and majority of reference hypotheses agree with each label, then majority-vote reconstruction is correct.

    {X : Type u} โ†’
      {C : ConceptClass X Bool} โ†’
        (T K : โ„•) โ†’
          (compressCore : {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ Finset (X ร— Bool) ร— IncidenceInfo T K) โ†’
            (blockHyp : Finset (X ร— Bool) โ†’ IncidenceInfo T K โ†’ Fin T โ†’ X โ†’ Bool) โ†’
              (rowHyp :
                  {m : โ„•} โ†’ (S : Fin m โ†’ X ร— Bool) โ†’ (โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) โ†’ Fin T โ†’ X โ†’ Bool) โ†’
                0 < T โ†’
                  (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), (compressCore S).1.card โ‰ค K) โ†’
                    (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool), โ†‘(compressCore S).1 โІ Set.range S) โ†’
                      (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m)
                          (t : Fin T),
                          blockHyp (compressCore S).1 (compressCore S).2 t (S i).1 = rowHyp S hreal t (S i).1) โ†’
                        (โˆ€ {m : โ„•} (S : Fin m โ†’ X ร— Bool) (hreal : โˆƒ c โˆˆ C, โˆ€ (i : Fin m), c (S i).1 = (S i).2) (i : Fin m),
                            (โˆ‘ t, if rowHyp S hreal t (S i).1 = (S i).2 then 1 else 0) / โ†‘T > 1 / 2) โ†’
                          CompressionSchemeWithInfo0 X Bool C
  178. DefinitionmwuConfigdef

    The MWU config after T steps.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’
                      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ โ„• โ†’ MWUConfig C
  179. DefinitionmwuHitCountdef

    Count how many rounds hit a fixed column, aligned to the recursion of mwuRun.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’ (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ โ„• โ†’ C โ†’ โ„•
  180. DefinitionmwuInitdef

    Initial config: all weights = 1.

    (C : Type u_1) โ†’ [inst : Fintype C] โ†’ MWUConfig C
  181. DefinitionmwuRowsdef

    The MWU row sequence after T steps.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’
                      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’ (T : โ„•) โ†’ Fin T โ†’ R
  182. DefinitionmwuRundef

    MWU run: iterate T steps, returning final config and row sequence.

    {R : Type u_1} โ†’
      {C : Type u_2} โ†’
        [Fintype R] โ†’
          [inst : Fintype C] โ†’
            [Nonempty C] โ†’
              (M : R โ†’ C โ†’ Bool) โ†’
                (ฮท : โ„) โ†’
                  ฮท < 1 โ†’
                    (v : โ„) โ†’
                      (โˆ€ (q : FinitePMF C), โˆƒ r, v โ‰ค โˆ‘ c, q.prob c * if M r c = true then 1 else 0) โ†’
                        (T : โ„•) โ†’ MWUConfig C ร— (Fin T โ†’ R)
  183. DefinitionmwuUpdateWeightsdef

    One MWU update step on weights.

    {C : Type u_1} โ†’ [inst : Fintype C] โ†’ {R : Type u_2} โ†’ (R โ†’ C โ†’ Bool) โ†’ (ฮท : โ„) โ†’ ฮท < 1 โ†’ MWUConfig C โ†’ R โ†’ MWUConfig C
  184. DefinitionpointSupportdef

    Extract the domain points from a labeled sample.

    {X : Type u} โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ Finset X
  185. DefinitionrademacherCorrelationdef
    {X : Type u} โ†’ {m : โ„•} โ†’ Concept X Bool โ†’ SignVector m โ†’ (Fin m โ†’ X) โ†’ โ„
  186. DefinitionsupportErrordef

    Weighted error of hypothesis h vs concept c over a FinitePMF on Y.

    {X : Type u} โ†’ (Y : Finset X) โ†’ FinitePMF โ†ฅY โ†’ (X โ†’ Bool) โ†’ (X โ†’ Bool) โ†’ โ„
  187. DefinitionuniformMeasuredef

    Uniform probability measure on a Fintype: (1/|X|) ยท count. This gives each point probability 1/|X|. Requires |X| > 0 (nonempty).

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ [Fintype X] โ†’ Nonempty X โ†’ MeasureTheory.Measure X
  188. DefinitionuniformPMFdef

    Uniform PMF over a nonempty Fintype.

    (C : Type u_1) โ†’ [inst : Fintype C] โ†’ [Nonempty C] โ†’ FinitePMF C
  189. DefinitionzeroOneLossdef

    The 0-1 loss for classification.

    (Y : Type v) โ†’ [DecidableEq Y] โ†’ LossFunction Y

The fundamental theorem of statistical learning. For a measurable concept class, finite VC dimension, eventually polynomial growth, and PAC learnability are mutually equivalent.

DeclvcDim_fundamental_theorem
โˆ€ {X : Type u} [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
  [MeasurableConceptClass X C],
  (VCDim X C < โŠค โ†” PACLearnable X C) โˆง
    (VCDim X C < โŠค โ†” โˆƒ K d, โˆ€แถ  (m : โ„•) in Filter.atTop, โ†‘(GrowthFunction X C m) โ‰ค K * โ†‘m ^ d)
Layout
ThesisStepDefinition
vcDim_fundamental_theoremtheoremvcDim_lt_top_iff_pacLearnโ€ฆtheoremvc_characterizationtheoremvcdim_finite_imp_pactheoremvcdim_finite_imp_uc'theoremuc_bad_event_le_delta_proโ€ฆtheoremsymmetrization_uc_boundtheoremsymmetrization_step_lowertheoremsymmetrization_steptheoremdouble_sample_pattern_bouโ€ฆtheoremexchangeability_chain_bouโ€ฆtheoremcongr_simptheoremrestriction_pattern_counttheoremrademacher_mgf_boundtheoremcosh_le_exp_sq_halftheoremfinite_exchangeability_boโ€ฆtheoremgrowth_exp_le_deltatheoremsum_choose_le_exp_powtheorempow_mul_exp_neg_le_factorโ€ฆtheoremgrowth_function_le_two_powtheoremhoeffding_one_sided_uppertheoremhoeffding_one_sidedtheoremuc_imp_pactheoremoutput_in_Htheoremhmeas_Ctheoremmem_measurabletheoremhc_meastheoremall_measurabletheoremhWBtheoremwellBehavedtheorempac_imp_vcdim_finitetheoremvcdim_infinite_not_pactheoremuniformMeasure_isProbabilโ€ฆtheoremnfl_counting_coretheoremper_sample_labeling_boundtheoremvcDim_lt_top_iff_growth_pโ€ฆtheoremvcDim_lt_top_of_growth_poโ€ฆtheoremtwo_pow_le_growthFunctionโ€ฆtheoremshatters_of_subsettheoremgrowthFunction_ge_two_powโ€ฆtheoremrestrictionSet_ncard_le_gโ€ฆtheoremrestrictionSet_ncard_le_tโ€ฆtheoremgrowthFunction_eqtheoremrestrictionSet_eq_univ_ofโ€ฆtheoremno_eventually_two_pow_le_โ€ฆtheoremvcDim_finite_imp_growth_pโ€ฆtheoremvcdim_finite_imp_growth_bโ€ฆtheoremBatchLearnerstructurehypothesesdeflearndefConceptClassdefEmpiricalErrordefConceptdefGrowthFunctiondefHasUniformConvergencedefHypothesisSpacedefIsConsistentWithdefMeasurableConceptClassstructurePACLearnabledefShattersdefSignVectordefTrueErrordefTrueErrorRealdefVCDimdefWellBehavedVCdefboolToSigndefrestrictionSetdefuniformMeasuredefzeroOneLossdef
  1. DeclvcDim_fundamental_theoremDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C],
      (VCDim X C < โŠค โ†” PACLearnable X C) โˆง
        (VCDim X C < โŠค โ†” โˆƒ K d, โˆ€แถ  (m : โ„•) in Filter.atTop, โ†‘(GrowthFunction X C m) โ‰ค K * โ†‘m ^ d)
    Uses
  2. DeclvcDim_lt_top_iff_pacLearnableDeclaration kindtheorem

    Finite VC dimension โŸบ PAC learnability. The measure-theoretic half: VCDim X C < โŠค exactly when C is PAC learnable. This is the kernel's vc_characterization, surfaced for the independent module; it requires the domain's measurability structure.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C], VCDim X C < โŠค โ†” PACLearnable X C
    Uses
    Used by
  3. Declvc_characterizationDeclaration kindtheorem

    VC characterization: C is PAC-learnable iff VCDim(C) < โˆž.

    PROOF DECOMPOSITION: This theorem factors through the two directions above: โ† : vcdim_finite_imp_uc + uc_imp_pac (in Generalization.lean) โ†’ : pac_imp_vcdim_finite (contrapositive via double-sample)

    HC at this joint: The โ† direction crosses from combinatorics (VCDim, GrowthFunction) to measure theory (Measure.pi, TrueError). The โ†’ direction crosses from measure theory back to combinatorics. Both crossings have HC > 0.

    UKโ‚ˆ: The โ†” hides an ASYMMETRY: the โ† proof is constructive (produces ERM), while the โ†’ proof is non-constructive (produces hard distribution).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool)
      [MeasurableConceptClass X C], PACLearnable X C โ†” VCDim X C < โŠค
    Uses
    Used by
  4. Declvcdim_finite_imp_pacDeclaration kindtheorem

    Direction โ†: finite VCDim implies PAC learnability.

    PROOF ROUTE (via new infrastructure in Generalization.lean): Step 1: VCDim < โˆž โ†’ HasUniformConvergence (vcdim_finite_imp_uc) Sub-step 1a: Sauer-Shelah gives GrowthFunction bound Sub-step 1b: Symmetrization reduces UC to growth function counting Sub-step 1c: Concentration inequality closes the bound Step 2: HasUniformConvergence โ†’ PACLearnable (uc_imp_pac) Sub-step 2a: Construct ERM learner Sub-step 2b: ERM is consistent in realizable case Sub-step 2c: Consistent + UC โ†’ low TrueError

    KUโ‚โ‚ˆ: C.Nonempty is needed for ERM but not stated as hypothesis. If C = โˆ…, then PACLearnable is vacuously true (โˆ€ c โˆˆ C, ... is vacuous). But ERM needs a fallback hypothesis from C. Is this a genuine gap or does the empty case work out vacuously?

    Counterdefinition (COUNTER-4): If the ERM approach fails for computational reasons (ERM is noncomputable, and we need a computable learner for computational learning theory), swap to the compression-based proof: VCDim < โˆž โ†’ finite compression scheme (Moran-Yehudayoff 2016) โ†’ compression scheme learner is PAC. Swap condition: When proving COMPUTATIONAL PAC learnability (polynomial time).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’ โˆ€ [MeasurableConceptClass X C], PACLearnable X C
    Uses
    Used by
  5. Declvcdim_finite_imp_uc'Declaration kindtheorem

    Finite VCDim implies uniform convergence. Proof: VCDim < โˆž โ†’ UC.

    • Finite X: direct Hoeffding per-hypothesis + finite union bound.
    • Infinite X: Sauer-Shelah โ†’ symmetrization + growth function โ†’ UC.
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’
        (โˆ€ h โˆˆ C, Measurable h) โ†’ (โˆ€ (c : Concept X Bool), Measurable c) โ†’ WellBehavedVC X C โ†’ HasUniformConvergence X C
    Uses
    Used by
  6. Decluc_bad_event_le_delta_provedDeclaration kindtheorem

    UC bad-event bound: for m โ‰ฅ mโ‚€(v,ฮต,ฮด), the probability of the bad event (โˆƒ h with |TrueErr-EmpErr| โ‰ฅ ฮต) is at most ฮด. Composes symmetrization_uc_bound with growth_exp_le_delta.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต ฮด : โ„),
                0 < ฮต โ†’
                  0 < ฮด โ†’
                    ฮด < 1 โ†’
                      โˆ€ (v : โ„•),
                        0 < v โ†’
                          (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                            (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                              MeasureTheory.NullMeasurableSet
                                  {p |
                                    โˆƒ h โˆˆ C,
                                      EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                          EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                        ฮต / 2}
                                  ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                                (MeasureTheory.Measure.pi fun x => D)
                                    {xs |
                                      โˆƒ h โˆˆ C,
                                        |TrueErrorReal X h c D -
                                              EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                          ฮต} โ‰ค
                                  ENNReal.ofReal ฮด
    Uses
    Used by
  7. Declsymmetrization_uc_boundDeclaration kindtheorem

    The symmetrization uniform convergence bound: two-sided version. P[โˆƒhโˆˆC: |TrueErr-EmpErr| โ‰ฅ ฮต] โ‰ค 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8).

    Proof strategy (4 steps):

    1. Decompose absolute value: |TrueErr - EmpErr| โ‰ฅ ฮต โ†” (TrueErr - EmpErr โ‰ฅ ฮต) โˆจ (EmpErr - TrueErr โ‰ฅ ฮต)

    have abs_decomp : โˆ€ (a b : โ„), |a - b| โ‰ฅ ฮต โ†” a - b โ‰ฅ ฮต โˆจ b - a โ‰ฅ ฮต := by intro a b; constructor ยท intro h; by_cases h' : a - b โ‰ฅ ฮต ยท exact Or.inl h' ยท exact Or.inr (by linarith [abs_sub_comm a b, le_abs_self (a - b)]) ยท intro h; cases h with | inl h => exact le_trans (le_of_eq (abs_of_nonneg (by linarith))) (by linarith) | inr h => exact le_trans (le_of_eq (abs_of_nonpos (by linarith) โ–ธ ...)) ...

    2. Upper tail: P[โˆƒhโˆˆC: TrueErr-EmpErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Direct application of symmetrization_step + double_sample_pattern_bound.

    3. Lower tail: P[โˆƒhโˆˆC: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Apply the symmetric argument: swap roles of S and S' in the double sample.
    • Equivalently, apply symmetrization_step to the event EmpErr-TrueErr โ‰ฅ ฮต and bound the double-sample event {EmpErr_S - EmpErr_{S'} โ‰ฅ ฮต/2}.
    • The bound is symmetric because D^m โŠ— D^m is symmetric under swapping factors. have swap_symmetry : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S) - EmpErr(S') โ‰ฅ ฮต/2} = DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S') - EmpErr(S) โ‰ฅ ฮต/2} := Measure.prod_swap ...

    4. Union bound: P[|gap| โ‰ฅ ฮต] โ‰ค P[gap โ‰ฅ ฮต] + P[gap โ‰ค -ฮต] โ‰ค 2ยทGFยทexp(...) + 2ยทGFยทexp(...) = 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    -- Uses: MeasureTheory.measure_union_le for the union of two events -- CAST: 2 * X + 2 * X = 4 * X in ENNReal (need ENNReal.add_mul or similar)

    References: SSBD Theorem 6.7, Kakade-Tewari Lecture 19

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    MeasureTheory.NullMeasurableSet
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2}
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                      (MeasureTheory.Measure.pi fun x => D)
                          {xs |
                            โˆƒ h โˆˆ C,
                              |TrueErrorReal X h c D -
                                    EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                ฮต} โ‰ค
                        ENNReal.ofReal (4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  8. Declsymmetrization_step_lowerDeclaration kindtheorem

    Symmetrization step for the lower tail: P[โˆƒh: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทP_{double}[โˆƒh: EmpErr_S-EmpErr_{S'} โ‰ฅ ฮต/2].

    Mirror of symmetrization_step for the opposite direction. Uses hoeffding_one_sided_upper instead of hoeffding_one_sided.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) - TrueErrorReal X h c D โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  9. Declsymmetrization_stepDeclaration kindtheorem

    Symmetrization: the probability of a large gap TrueErr-EmpErr is at most twice the probability of a large gap EmpErr'-EmpErr on the double sample.

    Proof strategy (6 steps):

    1. Witness selection: For S in the bad event, โˆƒh* โˆˆ C with TrueErr(h) - EmpErr_S(h) โ‰ฅ ฮต.

    -- In the bad event set, extract h* by classical choice have h_witness : โˆ€ xs โˆˆ bad_event, โˆƒ h* โˆˆ C, TrueErrorReal X h* c D - EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โ‰ฅ ฮต

    2. Ghost sample mean: E_{S'}[EmpErr_{S'}(h)] = TrueErr(h) โ‰ฅ EmpErr_S(h*) + ฮต.

    • Uses: MeasureTheory.integral_pi to compute E[EmpErr] over product measure.
    • KEY LEMMA: For fixed h, E_{D^m}[EmpiricalError(h,S)] = TrueErrorReal(h,c,D). This is because EmpErr = (1/m)โˆ‘ indicator(x_i), and E[indicator(x_i)] = TrueErrorReal. have expected_emp_err : โˆ€ h* : Concept X Bool, โˆซ xs, EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โˆ‚(Measure.pi (fun _ : Fin m => D)) = TrueErrorReal X h* c D := by ...

    3. Hoeffding on ghost sample: P_{S'}[EmpErr_{S'}(h) < TrueErr(h) - ฮต/2] โ‰ค exp(-mฮตยฒ/2).

    • Apply hoeffding_one_sided with t = ฮต/2.
    • The hm_large hypothesis ensures exp(-mฮตยฒ/2) < 1/2: 2ยทln2 โ‰ค mฮตยฒ โŸน mฮตยฒ/2 โ‰ฅ ln2 โŸน exp(-mฮตยฒ/2) โ‰ค 1/2. have hoeffding_ghost : โˆ€ h* โˆˆ C, Measure.pi (fun _ : Fin m => D) {xs' | EmpiricalError X Bool h* (sample xs') (zeroOneLoss Bool) < TrueErrorReal X h* c D - ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-m * (ฮต/2)^2 * 2)) := by intro h* _; exact hoeffding_one_sided D h* c m hm (ฮต/2) (by linarith) (by ...) (by ...)

    4. Complementary probability: P_{S'}[EmpErr_{S'}(h) - EmpErr_S(h) โ‰ฅ ฮต/2] โ‰ฅ 1/2.

    • From step 2: TrueErr(h) โ‰ฅ EmpErr_S(h) + ฮต
    • From step 3: P[EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2] โ‰ฅ 1/2
    • Chain: EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2 โ‰ฅ EmpErr_S + ฮต - ฮต/2 = EmpErr_S + ฮต/2

    5. Conditional to unconditional: The witness h* from step 1 also witnesses the double-sample event โˆƒhโˆˆC: EmpErr'-EmpErr โ‰ฅ ฮต/2. So: P_{S'}[double event | S bad] โ‰ฅ 1/2.

    have conditional_bound : โˆ€ xs โˆˆ bad_event, Measure.pi (fun _ : Fin m => D) {xs' | โˆƒ h โˆˆ C, EmpiricalError ... xs' - EmpiricalError ... xs โ‰ฅ ฮต/2} โ‰ฅ ENNReal.ofReal (1/2) := by ...

    6. Fubini integration: By Measure.prod_apply and Fubini: P_{S,S'}[double event] = โˆซ_S P_{S'}[double event | S] โ‰ฅ (1/2) ยท P_S[bad event] โŸน P_S[bad event] โ‰ค 2 ยท P_{S,S'}[double event].

    -- Uses: MeasureTheory.Measure.prod_apply or lintegral_prod -- MEASURABILITY: the double-sample event is measurable as a finite union -- of sets of the form {(xs,xs') | EmpErr'(h) - EmpErr(h) โ‰ฅ ฮต/2} for h โˆˆ C. -- Since C may be infinite, measurability requires care: the sup over h -- must be shown to be measurable. For finite restriction patterns (โ‰ค 2^m -- on Fin m โ†’ Bool), this is a finite union.

    MEASURABILITY CONCERNS:

    • {xs | โˆƒ h โˆˆ C, ...} is NOT obviously measurable for infinite C. Strategy: decompose via restriction patterns. On any fixed xs, the set of labelings {(h(xs 0), ..., h(xs(m-1))) | h โˆˆ C} has at most GF(C,m) โ‰ค 2^m elements. So the โˆƒh event is a finite union of measurable sets.
    • EmpiricalError is a finite sum of measurable functions, hence measurable.
    • The product ฯƒ-algebra on (Fin m โ†’ X) ร— (Fin m โ†’ X) is generated by cylinder sets, and our events are in this ฯƒ-algebra.

    References: SSBD Lemma 4.5, Kakade-Tewari Lecture 19 Lemma 1

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            TrueErrorReal X h c D - EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  10. Decldouble_sample_pattern_boundDeclaration kindtheorem

    On the double sample, the probability that any hypothesis has EmpErr' - EmpErr โ‰ฅ ฮต/2 is bounded by GF(C,2m) ยท exp(-mฮตยฒ/8).

    Proof strategy (Approach A โ€” standard exchangeability, 5 steps):

    1. EXCHANGEABILITY: Under D^m โŠ— D^m, the 2m draws zโ‚,...,z_{2m} are iid from D. The joint distribution is invariant under permutations of {1,...,2m}.

    Key lemma: P_{D^mโŠ—D^m}[event(S,S')] = E_z[P_{split}[event | z]] where z = merged sample and the split is uniformly random among all C(2m,m) ways to partition z into two groups of m.

    -- Measure.pi permutation invariance have pi_perm_invariant : โˆ€ (ฯƒ : Equiv.Perm (Fin (2*m))), (Measure.pi (fun _ : Fin (2*m) => D)).map (fun z i => z (ฯƒ i)) = Measure.pi (fun _ : Fin (2*m) => D) := by ... -- Consequence: the event probability equals the split-averaged probability have exchangeability : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, gap(p) โ‰ฅ ฮต/2} = โˆซ z, SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs) โ‰ฅ ฮต/2} โˆ‚(Measure.pi (fun _ : Fin (2*m) => D)) := by ...

    2. CONDITIONING: For fixed merged sample z of 2m points:

    • C restricts to at most GF(C,2m) distinct labeling patterns on z (deterministic).
    • For each pattern p, define: diff(p, split) = EmpErr_{S'}(p) - EmpErr_S(p) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i where a_i = 1[pattern(z_i) โ‰  c(z_i)] โˆˆ {0,1}.
    -- Number of distinct patterns have num_patterns : โˆ€ (z : MergedSample X m), Set.ncard {p : Fin (2*m) โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h (z i) โ‰  c (z i))} โ‰ค GrowthFunction X C (2*m) := by ...

    3. PER-PATTERN HOEFFDING ON SPLITS: For fixed z and fixed pattern p: Under uniformly random split (S,S') of z into two groups of m: diff(p, split) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i

    This is a function of the random partition. By Hoeffding's inequality for sampling without replacement (Serfling 1974): P_split[diff โ‰ฅ ฮต/2] โ‰ค exp(-mฮตยฒ/8)

    Alternative derivation: Hoeffding without replacement from Hoeffding with replacement (iid signs) via coupling. The without-replacement bound is actually TIGHTER (variance reduction), but the with-replacement bound suffices.

    -- Per-pattern concentration have per_pattern_bound : โˆ€ (z : MergedSample X m) (a : Fin (2*m) โ†’ โ„) (ha : โˆ€ i, a i โˆˆ Set.Icc 0 1), SplitMeasure m {vs | (1/m) * โˆ‘ i โˆˆ second_group vs, a i - (1/m) * โˆ‘ i โˆˆ first_group vs, a i โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-(m : โ„) * (ฮต/2)^2 / 2)) := by ... -- Note: m*(ฮต/2)^2/2 = mฮตยฒ/8

    4. UNION BOUND: P_split[โˆƒ pattern: diff โ‰ฅ ฮต/2 | z] โ‰ค (number of patterns) ยท max_pattern P_split[diff โ‰ฅ ฮต/2] โ‰ค GF(C,2m) ยท exp(-mฮตยฒ/8)

    have union_bound : โˆ€ (z : MergedSample X m), SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs, h) โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (GrowthFunction X C (2*m) * Real.exp (-(m : โ„) * ฮต^2 / 8)) := by ...

    5. INTEGRATE: P_{D^mโŠ—D^m}[event] = E_z[P_split[event|z]] (by step 1) โ‰ค E_z[GF(C,2m) ยท exp(-mฮตยฒ/8)] (by step 4, pointwise) = GF(C,2m) ยท exp(-mฮตยฒ/8) (bound is independent of z)

    -- The bound is a constant, so integrating gives the same constant -- (using IsProbabilityMeasure for the 2m-fold product)

    Infrastructure needed:

    • Fin.sumFinEquiv : Fin m โŠ• Fin n โ‰ƒ Fin (m + n) (available in Mathlib)
    • mergeSamples / splitMergedSample (defined above)
    • SplitMeasure and ValidSplit (defined above)
    • Measure.pi permutation invariance (to be proved or imported)
    • Hoeffding for sampling without replacement
    • GrowthFunction on 2m points + sauer_shelah_exp_bound from Rademacher.lean

    MEASURABILITY CONCERNS:

    • The merged sample z โ†ฆ P_split[event|z] must be measurable as a function of z. Since the event is a finite union over patterns, and each pattern's indicator is a measurable function of z (finite evaluation), this follows.
    • GrowthFunction X C (2*m) is a natural number (deterministic), no measurability issue.

    References: SSBD Theorem 6.7, Hoeffding (1963), Serfling (1974)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  MeasureTheory.NullMeasurableSet
                      {p |
                        โˆƒ h โˆˆ C,
                          EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                            ฮต / 2}
                      ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                    ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2} โ‰ค
                      ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  11. Declexchangeability_chain_boundDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  ฮต โ‰ค 2 โ†’
                    Set.Nonempty C โ†’
                      MeasureTheory.NullMeasurableSet
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
                          ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                        have ฮผ := MeasureTheory.Measure.pi fun x => D;
                        (ฮผ.prod ฮผ)
                            {p |
                              โˆƒ h โˆˆ C,
                                EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                    EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                  ฮต / 2} โ‰ค
                          ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  12. DeclzeroOneLoss.congr_simpDeclaration kindtheorem
    โˆ€ (Y : Type v) {inst : DecidableEq Y} [inst_1 : DecidableEq Y] (a a_1 : Y),
      a = a_1 โ†’ โˆ€ (a_2 a_3 : Y), a_2 = a_3 โ†’ zeroOneLoss Y a a_2 = zeroOneLoss Y a_1 a_3
    Used by
  13. Declrestriction_pattern_countDeclaration kindtheorem

    The number of distinct restriction patterns of C on any n points is at most GF(C,n). For z : Fin n โ†’ X, define patterns(z) = {p : Fin n โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h(z i) โ‰  c(z i))}. Then patterns(z).ncard โ‰ค GrowthFunction X C n by definition of GrowthFunction.

    โˆ€ {X : Type u} [MeasurableSpace X] [Infinite X] (C : ConceptClass X Bool) (c : Concept X Bool) (n : โ„•) (z : Fin n โ†’ X),
      {p | โˆƒ h โˆˆ C, โˆ€ (i : Fin n), p i = decide (h (z i) โ‰  c (z i))}.ncard โ‰ค GrowthFunction X C n
    Used by
  14. Declrademacher_mgf_boundDeclaration kindtheorem

    Rademacher MGF bound.

    โˆ€ {m : โ„•},
      0 < m โ†’
        โˆ€ (a : Fin m โ†’ โ„) (c : โ„),
          0 โ‰ค c โ†’
            (โˆ€ (i : Fin m), |a i| โ‰ค c) โ†’
              โˆ€ (t : โ„),
                0 โ‰ค t โ†’
                  1 / โ†‘(Fintype.card (SignVector m)) * โˆ‘ ฯƒ, Real.exp (t * (1 / โ†‘m * โˆ‘ i, a i * boolToSign (ฯƒ i))) โ‰ค
                    Real.exp (t ^ 2 * c ^ 2 / (2 * โ†‘m))
    Uses
    Used by
  15. Declcosh_le_exp_sq_halfDeclaration kindtheorem

    cosh(x) โ‰ค exp(xยฒ/2). Standard sub-Gaussian bound.

    โˆ€ (x : โ„), Real.cosh x โ‰ค Real.exp (x ^ 2 / 2)
    Used by
  16. Declfinite_exchangeability_boundDeclaration kindtheorem

    Generic finite exchangeability bound. Given a measure-preserving family of transformations on a probability space, a NullMeasurableSet S, and a pointwise bound on the sum of preimage indicators, conclude ฮฝ(S) โ‰ค B.

    โˆ€ {ฮฉ : Type u_1} {G : Type u_2} [inst : MeasurableSpace ฮฉ] [inst_1 : Fintype G] [Nonempty G]
      {ฮฝ : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure ฮฝ] (T : G โ†’ ฮฉ โ†’ ฮฉ) (S : Set ฮฉ),
      (โˆ€ (g : G), MeasureTheory.MeasurePreserving (T g) ฮฝ ฮฝ) โ†’
        MeasureTheory.NullMeasurableSet S ฮฝ โ†’
          โˆ€ (B : ENNReal), (โˆ€ (z : ฮฉ), โˆ‘ g, (T g โปยน' S).indicator 1 z โ‰ค B * โ†‘(Fintype.card G)) โ†’ ฮฝ S โ‰ค B
    Used by
  17. Declgrowth_exp_le_deltaDeclaration kindtheorem
    โˆ€ {X : Type u} [MeasurableSpace X] (C : ConceptClass X Bool) (v : โ„•),
      0 < v โ†’
        โˆ€ (m : โ„•),
          0 < m โ†’
            โˆ€ (ฮต ฮด : โ„),
              0 < ฮต โ†’
                0 < ฮด โ†’
                  ฮด < 1 โ†’
                    (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                      (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                        4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)) โ‰ค ฮด โˆง 2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2
    Uses
    Used by
  18. Declsum_choose_le_exp_powDeclaration kindtheorem

    Pure combinatorial inequality: โˆ‘_{i=0}^d C(m,i) โ‰ค (em/d)^d for d โ‰ค m, d โ‰ฅ 1.

    โˆ€ (d m : โ„•), 0 < d โ†’ d โ‰ค m โ†’ โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) โ‰ค (Real.exp 1 * โ†‘m / โ†‘d) ^ d
    Used by
  19. Declpow_mul_exp_neg_le_factorial_divDeclaration kindtheorem

    Key arithmetic lemma for PAC bound: for t > 0, t^d * exp(-t) โ‰ค (d+1)!/t. Follows from exp(t) โ‰ฅ t^(d+1)/(d+1)! (partial sum of Taylor series).

    โˆ€ {d : โ„•} {t : โ„}, 0 < t โ†’ t ^ d * Real.exp (-t) โ‰ค โ†‘(d + 1).factorial / t
    Used by
  20. Declgrowth_function_le_two_powDeclaration kindtheorem

    Trivial bound: GrowthFunction โ‰ค 2^n for all concept classes. Each restriction to an n-element set yields a function in S โ†’ Bool, and there are at most 2^n such functions.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (n : โ„•), GrowthFunction X C n โ‰ค 2 ^ n
    Used by
  21. Declhoeffding_one_sided_upperDeclaration kindtheorem

    Upper-tail Hoeffding: for iid Bernoulli(p) draws, the empirical average overshoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    This is the mirror of hoeffding_one_sided (which bounds the lower tail). The proof uses the same sub-Gaussian machinery with Z_i = indicator(x_i) - p (instead of p - indicator(x_i)).

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ TrueErrorReal X h c D + t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  22. Declhoeffding_one_sidedDeclaration kindtheorem

    One-sided Hoeffding: for iid Bernoulli(p) draws, the empirical average undershoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    Proof strategy (3 steps):

    1. MGF bound (Hoeffding's lemma): For X โˆˆ [0,1] with E[X] = p, E[exp(s(X-p))] โ‰ค exp(sยฒ/8).

    • Adapt from cosh_le_exp_sq_half infrastructure in Rademacher.lean.
    • Key: convexity of exp on [0,1] gives E[exp(sX)] โ‰ค pยทexp(s) + (1-p)ยทexp(0), then the sยฒ/8 bound follows from ln(1 + x) โ‰ค x and Taylor expansion. have mgf_bound : โˆ€ (s : โ„), โˆซ x, Real.exp (s * (indicator x - p)) โˆ‚D โ‰ค Real.exp (s^2 / 8) := by ...

    2. Product independence: E[exp(sยทโˆ‘(X_i-p))] = โˆ E[exp(s(X_i-p))] โ‰ค exp(msยฒ/8).

    • Uses MeasureTheory.Measure.pi independence structure.
    • Needs: Measure.pi integral factorization for product of functions.
    • MEASURABILITY: fun xs => Real.exp (s * โˆ‘ i, f (xs i)) is measurable (composition of measurable functions). have product_bound : โˆ€ (s : โ„), โˆซ xs, Real.exp (s * โˆ‘ i, (indicator (xs i) - p)) โˆ‚Measure.pi (fun _ => D) โ‰ค Real.exp (m * s^2 / 8) := by ...

    3. Exponential Markov + optimize: P[โˆ‘(X_i-p) โ‰ค -mt] = P[exp(-sยทโˆ‘(X_i-p)) โ‰ฅ exp(smt)] โ‰ค exp(-smt + msยฒ/8). Optimize over s: set s = 4t to get โ‰ค exp(-2mtยฒ).

    • Uses Markov's inequality in ENNReal form.
    • CAST ISSUE: Markov gives ENNReal bound, need to convert exp(-2mtยฒ) between ENNReal.ofReal and the measure value. have markov_step : โˆ€ (s : โ„) (hs : 0 < s), Measure.pi (fun _ => D) {xs | โˆ‘ i, (indicator (xs i) - p) โ‰ค -(m : โ„) * t} โ‰ค ENNReal.ofReal (Real.exp (-(s * m * t) + m * s^2 / 8)) := by ... have optimize : Real.exp (-(4*t * m * t) + m * (4*t)^2 / 8) = Real.exp (-2 * m * t^2) := by ring_nf

    CAST ISSUES to watch:

    • m : โ„• needs cast to โ„ in the exponent: (m : โ„)
    • EmpiricalError returns โ„, TrueErrorReal returns โ„, good โ€” no ENNReal gap
    • The measure value is ENNReal, the bound exp(-2mtยฒ) is โ„โ‰ฅ0โˆž via ENNReal.ofReal

    References: SSBD Lemma B.3, Hoeffding (1963)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ค TrueErrorReal X h c D - t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  23. Decluc_imp_pacDeclaration kindtheorem

    Uniform convergence implies PAC learnability via ERM. The ERM learner (which exists by ermLearn) achieves PAC learning when uniform convergence holds. This is the second half of vcdim_finite_imp_pac.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      Set.Nonempty C โ†’ HasUniformConvergence X C โ†’ PACLearnable X C
    Uses
    Used by
  24. DeclBatchLearner.output_in_HDeclaration kindtheorem

    Output is in the hypothesis space

    โˆ€ {X : Type u} {Y : Type v} (self : BatchLearner X Y) {m : โ„•} (S : Fin m โ†’ X ร— Y), self.learn S โˆˆ self.hypotheses
    Used by
  25. DeclMeasurableConceptClass.hmeas_CDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C],
      โˆ€ c โˆˆ C, Measurable c
    Uses
    Used by
  26. DeclMeasurableConceptClass.mem_measurableDeclaration kindtheorem

    Every concept in C is measurable

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableConceptClass X C],
      โˆ€ h โˆˆ C, Measurable h
    Used by
  27. DeclMeasurableConceptClass.hc_measDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C]
      (c : Concept X Bool), Measurable c
    Uses
    Used by
  28. DeclMeasurableConceptClass.all_measurableDeclaration kindtheorem

    All concepts X โ†’ Bool are measurable (for disagreement sets)

    โˆ€ {X : Type u} {inst : MeasurableSpace X} (C : ConceptClass X Bool) [self : MeasurableConceptClass X C]
      (c : Concept X Bool), Measurable c
    Used by
  29. DeclMeasurableConceptClass.hWBDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C], WellBehavedVC X C
    Uses
    Used by
  30. DeclMeasurableConceptClass.wellBehavedDeclaration kindtheorem

    Uniform convergence bad event is NullMeasurableSet

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableConceptClass X C],
      WellBehavedVC X C
    Used by
  31. Declpac_imp_vcdim_finiteDeclaration kindtheorem

    Direction โ†’: PAC learnability implies finite VCDim.

    PROOF ROUTE (via double-sample infrastructure in Generalization.lean): Step 1: Contrapositive โ€” assume VCDim = โˆž Step 2: For m = mf(ฮต,ฮด), extract S with |S| = 2m shattered by C (uses WithTop.eq_top_iff_forall_ge, same as vcdim_univ_infinite) Step 3: Construct D = uniform on S (Finset.uniformMeasure?) KUโ‚โ‚‰: Mathlib's uniform measure on a finite set โ€” does MeasureTheory.Measure.count / Finset.card give IsProbabilityMeasure? Step 4: Double-sample trick via GhostSample + symmetrization Step 5: Counting argument on restricted labelings

    HC at this joint: Step 3 requires constructing a specific probability measure from a combinatorial object (the shattered set). This is a Pโ‚โ†’Pโ‚‚ crossing. UKโ‚‰: The construction of the hard distribution is the only non-constructive step. Can it be made constructive? (Related to derandomization in learning.)

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool),
      PACLearnable X C โ†’ VCDim X C < โŠค
    Uses
    Used by
  32. Declvcdim_infinite_not_pacDeclaration kindtheorem

    If VCDim = โŠค, then C is not PAC learnable. Proof: for any learner L with sample function mf, pick ฮต = 1/4, ฮด = 1/4. Let m = mf(1/4, 1/4). Since VCDim = โŠค, โˆƒ shattered set S with |S| โ‰ฅ 2m. Put D = uniform on S. For random labeling, any m-sample learner has expected error โ‰ฅ 1/4 on unseen points. This is the core of pac_imp_vcdim_finite (contrapositive direction).

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [MeasurableSingletonClass X] (C : ConceptClass X Bool),
      VCDim X C = โŠค โ†’ ยฌPACLearnable X C
    Uses
    Used by
  33. DecluniformMeasure_isProbabilityDeclaration kindtheorem

    The uniform measure is a probability measure when X is nonempty and finite.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] [inst_1 : Fintype X] [MeasurableSingletonClass X] (hne : Nonempty X),
      0 < Fintype.card X โ†’ MeasureTheory.IsProbabilityMeasure (uniformMeasure X hne)
    Used by
  34. Declnfl_counting_coreDeclaration kindtheorem

    NFL counting core: for a shattered set T with |T| > 2m, there exists a labeling fโ‚€ : โ†ฅT โ†’ Bool and its shattering witness cโ‚€ โˆˆ C such that the number of samples xs : Fin m โ†’ โ†ฅT where the learner achieves low error (โ‰ค |T|/4) is at most half the total number of samples. Proof: double-counting + pigeonhole using per_sample_labeling_bound.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {T : Finset X},
      Shatters X C T โ†’
        โˆ€ {m : โ„•},
          2 * m < T.card โ†’
            โˆ€ (L : BatchLearner X Bool),
              โˆƒ fโ‚€,
                โˆƒ cโ‚€ โˆˆ C,
                  (โˆ€ (t : โ†ฅT), cโ‚€ โ†‘t = fโ‚€ t) โˆง
                    2 * {xs | {t | cโ‚€ โ†‘t โ‰  L.learn (fun i => (โ†‘(xs i), cโ‚€ โ†‘(xs i))) โ†‘t}.card * 4 โ‰ค T.card}.card โ‰ค
                      Fintype.card (Fin m โ†’ โ†ฅT)
    Uses
    Used by
  35. Declper_sample_labeling_boundDeclaration kindtheorem

    Per-sample labeling bound: for any fixed xs : Fin m โ†’ ฮฑ on a Fintype ฮฑ with 2m < |ฮฑ|, and any function output : (ฮฑ โ†’ Bool) โ†’ (ฮฑ โ†’ Bool) that only depends on the restriction of f to {xs i}, at most half the labelings f : ฮฑ โ†’ Bool have error(f, output(f)) * 4 โ‰ค |ฮฑ|.

    Proof: pair each f with flip_unseen(f). The pair has complementary disagreements on unseen points, and |unseen| > |ฮฑ|/2, so at most one can have low error.

    โˆ€ {ฮฑ : Type u_1} [inst : Fintype ฮฑ] [inst_1 : DecidableEq ฮฑ] (m : โ„•),
      2 * m < Fintype.card ฮฑ โ†’
        โˆ€ (xs : Fin m โ†’ ฮฑ) (output : (ฮฑ โ†’ Bool) โ†’ ฮฑ โ†’ Bool),
          (โˆ€ (f f' : ฮฑ โ†’ Bool), (โˆ€ (i : Fin m), f (xs i) = f' (xs i)) โ†’ output f = output f') โ†’
            2 * {f | {t | f t โ‰  output f t}.card * 4 โ‰ค Fintype.card ฮฑ}.card โ‰ค Fintype.card (ฮฑ โ†’ Bool)
    Used by
  36. DeclvcDim_lt_top_iff_growth_polyDeclaration kindtheorem

    Finite VC dimension โŸบ eventually polynomial growth. The purely combinatorial half of the fundamental theorem: VCDim X C < โŠค exactly when the growth function is eventually bounded by a polynomial.

    โˆ€ {X : Type u} {C : ConceptClass X Bool},
      VCDim X C < โŠค โ†” โˆƒ K d, โˆ€แถ  (m : โ„•) in Filter.atTop, โ†‘(GrowthFunction X C m) โ‰ค K * โ†‘m ^ d
    Uses
    Used by
  37. DeclvcDim_lt_top_of_growth_polyDeclaration kindtheorem

    Polynomial growth implies finite VC dimension. If GrowthFunction X C m โ‰ค K ยท m ^ d for all large m, then VCDim X C < โŠค: an infinite VC dimension produces shattered sets of every size, forcing 2 ^ m โ‰ค K ยท m ^ d for arbitrarily large m, which is impossible. The hypothesis is the eventually filter (the โˆ€ m form is unsatisfiable at m = 0); Sauer-Shelah supplies it for m โ‰ฅ d.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} (K : โ„) (d : โ„•),
      (โˆ€แถ  (m : โ„•) in Filter.atTop, โ†‘(GrowthFunction X C m) โ‰ค K * โ†‘m ^ d) โ†’ VCDim X C < โŠค
    Uses
    Used by
  38. Decltwo_pow_le_growthFunction_of_topDeclaration kindtheorem

    An infinite VC dimension forces the growth function to be at least 2 ^ m at every size: it shatters sets of every size, by iSupโ‚‚_eq_top and downward closure.

    โˆ€ {X : Type u} {C : ConceptClass X Bool}, VCDim X C = โŠค โ†’ โˆ€ (m : โ„•), 2 ^ m โ‰ค GrowthFunction X C m
    Uses
    Used by
  39. Declshatters_of_subsetDeclaration kindtheorem

    Shattering is closed under restriction of the sample: if C shatters S and T โІ S, then C shatters T. Any labelling of T extends to a labelling of S, which is realized.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {S T : Finset X}, Shatters X C S โ†’ T โІ S โ†’ Shatters X C T
    Used by
  40. DeclgrowthFunction_ge_two_pow_of_shattersDeclaration kindtheorem

    A shattered sample of size m forces the growth function at m to be at least 2 ^ m.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {S : Finset X}, Shatters X C S โ†’ 2 ^ S.card โ‰ค GrowthFunction X C S.card
    Uses
    Used by
  41. DeclrestrictionSet_ncard_le_growthFunctionDeclaration kindtheorem

    Each restriction count is at most the growth function at the matching sample size.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) {S : Finset X} {m : โ„•},
      S.card = m โ†’ (restrictionSet C S).ncard โ‰ค GrowthFunction X C m
    Uses
    Used by
  42. DeclrestrictionSet_ncard_le_two_powDeclaration kindtheorem
    โˆ€ {X : Type u} (C : ConceptClass X Bool) (S : Finset X), (restrictionSet C S).ncard โ‰ค 2 ^ S.card
    Used by
  43. DeclgrowthFunction_eqDeclaration kindtheorem
    โˆ€ {X : Type u} (C : ConceptClass X Bool) (m : โ„•),
      GrowthFunction X C m = sSup (Set.range fun S => (restrictionSet C โ†‘S).ncard)
    Used by
  44. DeclrestrictionSet_eq_univ_of_shattersDeclaration kindtheorem

    A shattered sample realizes every labelling, so its restriction-pattern set is everything.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {S : Finset X}, Shatters X C S โ†’ restrictionSet C S = Set.univ
    Used by
  45. Declno_eventually_two_pow_le_polyDeclaration kindtheorem

    The exponential-beats-polynomial crux. 2 ^ m โ‰ค K ยท m ^ d cannot hold for arbitrarily large m, since m ^ d = o(2 ^ m). Stated with the eventually filter so it is applicable (the โˆ€ m form is unsatisfiable at m = 0 for d โ‰ฅ 1).

    โˆ€ (K : โ„) (d : โ„•), (โˆ€แถ  (m : โ„•) in Filter.atTop, 2 ^ m โ‰ค K * โ†‘m ^ d) โ†’ False
    Used by
  46. DeclvcDim_finite_imp_growth_polyDeclaration kindtheorem

    Finite VC dimension implies eventual polynomial growth. If VCDim X C < โŠค then the growth function is eventually bounded by a polynomial K ยท m ^ d.

    โˆ€ {X : Type u} {C : ConceptClass X Bool},
      VCDim X C < โŠค โ†’ โˆƒ K d, โˆ€แถ  (m : โ„•) in Filter.atTop, โ†‘(GrowthFunction X C m) โ‰ค K * โ†‘m ^ d
    Uses
    Used by
  47. Declvcdim_finite_imp_growth_boundedDeclaration kindtheorem

    VCDim < โŠค โ†’ growth function polynomially bounded by partial binomial sum. Forward direction of fundamental_theorem conjunct 5. Uses Sauer-Shelah: GrowthFunction(m) โ‰ค โˆ‘_{iโ‰คd} C(m,i) where d = VCDim.

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’ โˆƒ d, โˆ€ (m : โ„•), d โ‰ค m โ†’ GrowthFunction X C m โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), m.choose i
    Used by
  48. DefinitionBatchLearnerstructure

    A batch learner (PAC paradigm): takes a finite sample, returns a hypothesis.

    Type u โ†’ Type v โ†’ Type (max u v)
  49. DefinitionBatchLearner.hypothesesdef

    The learner's hypothesis space

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ HypothesisSpace X Y
  50. DefinitionBatchLearner.learndef

    The learning algorithm: given a sample, produce a hypothesis

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Concept X Y
  51. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  52. DefinitionEmpiricalErrordef

    Empirical error: average loss on a finite sample.

    (X : Type u) โ†’ (Y : Type v) โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ LossFunction Y โ†’ โ„
  53. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  54. DefinitionGrowthFunctiondef

    Growth function (shattering coefficient): ฯ€_C(m) = max_{|S|=m} |{c|_S : c โˆˆ C}|. For each m-element set S, counts the number of distinct restrictions of C to S, then takes the supremum over all such S.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ โ„• โ†’ โ„•
  55. DefinitionHasUniformConvergencedef

    Uniform convergence of empirical error to true error over a hypothesis class. This is the property that makes finite VCDim โ†’ PAC learnability work. BPโ‚… connects here: this is ONE of the five characterizations.

    M-DefinitionRepair (ฮ“โ‚ƒโ‚… โ†’ ฮ“โ‚„โ‚): The mโ‚€ must be INDEPENDENT of D and c. That's what "uniform" means โ€” convergence is uniform over all distributions and all target concepts. The original definition had mโ‚€ depending on D and c, making uc_imp_pac unprovable (PACLearnable's mf must be independent of D, c). Repaired: โˆƒ mโ‚€ is now BEFORE โˆ€ D, โˆ€ c. This STRENGTHENS the definition (A5-valid: adds content, doesn't simplify).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ HypothesisSpace X Bool โ†’ Prop
  56. DefinitionHypothesisSpacedef

    A hypothesis space is a set of candidate concepts that the learner searches over. When H = C (the realizable case), every concept in the target class is available. When H โŠ‚ C or H โŠƒ C, we are in the improper/agnostic regime.

    Structurally identical to ConceptClass but semantically distinct: ConceptClass is the ground truth collection; HypothesisSpace is what the learner has access to.

    Type u โ†’ Type v โ†’ Type (max v u)
  57. DefinitionIsConsistentWithdef

    A hypothesis h is consistent with labeled sample S.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Prop
  58. DefinitionMeasurableConceptClassstructure

    A concept class with the measure-theoretic regularity needed for PAC theory.

    Bundles three conditions: 1. Every concept in C is measurable 2. All concepts are measurable (needed for disagreement set measurability) 3. The UC bad event satisfies NullMeasurableSet (WellBehavedVC)

    Condition 3 is the deep one: for uncountable C, the existential {โˆƒ h โˆˆ C, |TrueErr - EmpErr| โ‰ฅ ฮต} is NOT MeasurableSet in general. WellBehavedVC asserts it is NullMeasurableSet, which suffices for integration (lintegral_indicator_oneโ‚€).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  59. DefinitionPACLearnabledef

    PAC (Probably Approximately Correct) learning. The central definition of computational learning theory.

    Sample space: Fin m โ†’ X with i.i.d. product measure D^m. Labels: derived deterministically from target concept c (realizable case). Error: D-probability of disagreement between learner output and c.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  60. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  61. DefinitionSignVectordef
    โ„• โ†’ Type
  62. DefinitionTrueErrordef

    True error (0-1 loss, realizable case): D-probability of disagreement. This is what PACLearnable's success event measures.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ ENNReal
  63. DefinitionTrueErrorRealdef

    True error in โ„: for use in bounds involving subtraction/absolute value. COUNTER-1 of TrueError. The toReal bridge loses information when the measure is โŠค.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ โ„
  64. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  65. DefinitionWellBehavedVCdef

    A concept class is well-behaved if the ghost gap event is null-measurable. This is the minimal regularity assumption for the symmetrization proof.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  66. DefinitionboolToSigndef

    Convert Bool labels to ยฑ1 reals. true โ†ฆ 1, false โ†ฆ -1.

    Bool โ†’ โ„
  67. DefinitionrestrictionSetdef

    The set of labelling patterns that C realizes on a finite sample S.

    {X : Type u} โ†’ ConceptClass X Bool โ†’ (S : Finset X) โ†’ Set (โ†ฅS โ†’ Bool)
  68. DefinitionuniformMeasuredef

    Uniform probability measure on a Fintype: (1/|X|) ยท count. This gives each point probability 1/|X|. Requires |X| > 0 (nonempty).

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ [Fintype X] โ†’ Nonempty X โ†’ MeasureTheory.Measure X
  69. DefinitionzeroOneLossdef

    The 0-1 loss for classification.

    (Y : Type v) โ†’ [DecidableEq Y] โ†’ LossFunction Y

Online learning is strictly stronger than PAC learning.

Declonline_strictly_stronger_pac
(โˆ€ (X : Type) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableConceptClass X C],
    OnlineLearnable X Bool C โ†’ PACLearnable X C) โˆง
  โˆƒ X x C, PACLearnable X C โˆง ยฌOnlineLearnable X Bool C
Layout
ThesisStepDefinition
online_strictly_stronger_โ€ฆtheorempac_not_implies_onlinetheoremvcdim_threshold_finitetheoremthreshold_not_shatter_pairtheoremldim_threshold_toptheoremthreshold_shattered_all_dโ€ฆtheoremthresholdTree_shatteredtheoremforward_directiontheoremmistakesFrom_init_eqtheoremadversary_coretheoremnonempty_of_isShatteredtheoremonline_imp_pactheoremvcdim_le_of_mistake_boundโ€ฆtheoremmistakesFromU_init_eqtheoremadversary_from_shatterstheoremshatters_restricttheoremvcdim_finite_imp_pac_via_โ€ฆtheoremvcdim_finite_imp_uc'theoremvcdim_finite_imp_growth_bโ€ฆtheoremuc_bad_event_le_delta_proโ€ฆtheoremsymmetrization_uc_boundtheoremsymmetrization_step_lowertheoremsymmetrization_steptheoremdouble_sample_pattern_bouโ€ฆtheoremexchangeability_chain_bouโ€ฆtheoremcongr_simptheoremrestriction_pattern_counttheoremrademacher_mgf_boundtheoremcosh_le_exp_sq_halftheoremfinite_exchangeability_boโ€ฆtheoremgrowth_exp_le_deltatheoremsum_choose_le_exp_powtheorempow_mul_exp_neg_le_factorโ€ฆtheoremgrowth_function_le_two_powtheoremhoeffding_one_sided_uppertheoremhoeffding_one_sidedtheoremuc_imp_pactheoremoutput_in_Htheoremhmeas_Ctheoremmem_measurabletheoremhc_meastheoremall_measurabletheoremhWBtheoremwellBehavedtheoremBatchLearnerstructurehypothesesdeflearndefConceptClassdefEmpiricalErrordefConceptdefGrowthFunctiondefHasUniformConvergencedefHypothesisSpacedefIsConsistentWithdefLTreeinductiveisShattereddefLittlestoneDimdefMeasurableConceptClassstructureMistakeBoundeddefOnlineLearnabledefOnlineLearnerstructureStatedefinitdefmistakesdefgodefmistakesFromdefpredictdefupdatedefPACLearnabledefShattersdefSignVectordefTrueErrordefTrueErrorRealdefVCDimdefWellBehavedVCdefboolToSigndefmistakesFromUdefthresholdClassdefthresholdTreedefzeroOneLossdef
  1. Declonline_strictly_stronger_pacDeclaration kindtheorem
    (โˆ€ (X : Type) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableConceptClass X C],
        OnlineLearnable X Bool C โ†’ PACLearnable X C) โˆง
      โˆƒ X x C, PACLearnable X C โˆง ยฌOnlineLearnable X Bool C
    Uses
  2. Declpac_not_implies_onlineDeclaration kindtheorem
    โˆƒ X x C, PACLearnable X C โˆง ยฌOnlineLearnable X Bool C
    Uses
    Used by
  3. Declvcdim_threshold_finiteDeclaration kindtheorem

    VCDim of threshold class on โ„• is finite (โ‰ค 1).

    VCDim โ„• thresholdClassโœ < โŠค
    Uses
    Used by
  4. Declthreshold_not_shatter_pairDeclaration kindtheorem

    No 2-element subset of โ„• is shattered by the threshold class. Key: the labeling (smaller โ†’ false, larger โ†’ true) is impossible by monotonicity.

    โˆ€ {S : Finset โ„•}, 2 โ‰ค S.card โ†’ ยฌShatters โ„• thresholdClassโœ S
    Used by
  5. Declldim_threshold_topDeclaration kindtheorem

    LittlestoneDim of threshold class = โŠค.

    LittlestoneDim โ„• thresholdClassโœ = โŠค
    Uses
    Used by
  6. Declthreshold_shattered_all_depthsDeclaration kindtheorem
    โˆ€ (d : โ„•), โˆƒ T, LTree.isShattered thresholdClassโœ T
    Uses
    Used by
  7. DeclthresholdTree_shatteredDeclaration kindtheorem

    The threshold tree is shattered by any concept class containing all thresholds with indices in [lo, lo + 2^d - 1].

    โˆ€ (lo d : โ„•) (C : ConceptClass โ„• Bool),
      (โˆ€ (n : โ„•), lo โ‰ค n โ†’ n < lo + 2 ^ d โ†’ (fun x => decide (x โ‰ค n)) โˆˆ C) โ†’ LTree.isShattered C (thresholdTreeโœ lo d)
    Used by
  8. Declforward_directionDeclaration kindtheorem

    Forward direction: OnlineLearnable โ†’ LittlestoneDim < โŠค

    โˆ€ (X : Type) (C : ConceptClass X Bool), OnlineLearnable X Bool C โ†’ LittlestoneDim X C < โŠค
    Uses
    Used by
  9. DeclmistakesFrom_init_eqDeclaration kindtheorem

    Relate mistakesFrom to the original mistakes function.

    โˆ€ {X : Type} (L : OnlineLearner X Bool) (c : X โ†’ Bool) (seq : List X), L.mistakesFrom L.init c seq = L.mistakes c seq
    Used by
  10. Decladversary_coreDeclaration kindtheorem

    Core adversary lemma.

    โˆ€ {X : Type} (L : OnlineLearner X Bool) (s : L.State) {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n),
      LTree.isShattered C T โ†’ Set.Nonempty C โ†’ โˆƒ seq, โˆƒ c โˆˆ C, L.mistakesFrom s c seq = n
    Used by
  11. DeclLTree.nonempty_of_isShatteredDeclaration kindtheorem

    Helper: shattering implies the concept class is nonempty.

    โˆ€ {X : Type} {C : ConceptClass X Bool} {n : โ„•} (T : LTree X n), LTree.isShattered C T โ†’ Set.Nonempty C
    Used by
  12. Declonline_imp_pacDeclaration kindtheorem

    Online learnable โ†’ PAC learnable. ฮ“โ‚„โ‚ˆ: requires LittlestoneDim โ†’ VCDim bridge or online-to-batch conversion.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      OnlineLearnable X Bool C โ†’ โˆ€ [MeasurableConceptClass X C], PACLearnable X C
    Uses
    Used by
  13. Declvcdim_le_of_mistake_boundedDeclaration kindtheorem

    Mistake-bounded learner โ†’ VCDim โ‰ค M (universe-polymorphic).

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {M : โ„•}, MistakeBounded X Bool C M โ†’ VCDim X C โ‰ค โ†‘M
    Uses
    Used by
  14. DeclmistakesFromU_init_eqDeclaration kindtheorem

    Relate mistakesFromU to the original mistakes function.

    โˆ€ {X : Type u} (L : OnlineLearner X Bool) (c : X โ†’ Bool) (seq : List X),
      mistakesFromUโœ L L.init c seq = L.mistakes c seq
    Used by
  15. Decladversary_from_shattersDeclaration kindtheorem

    Adversary argument directly from shattering (universe-polymorphic). Given a shattered set S and any online learner L starting from state s, there exists a sequence and target concept where L makes |S| mistakes.

    โˆ€ {X : Type u} (L : OnlineLearner X Bool) (s : L.State) {C : ConceptClass X Bool} {S : Finset X},
      Shatters X C S โ†’ โˆƒ seq, โˆƒ c โˆˆ C, mistakesFromUโœ L s c seq = S.card
    Uses
    Used by
  16. Declshatters_restrictDeclaration kindtheorem

    Restricted shattering: if C shatters S and we restrict to {c โˆˆ C | c x = b}, then S \ {x} is shattered by the restricted class (when x โˆˆ S).

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {S : Finset X},
      Shatters X C S โ†’ โˆ€ {x : X}, x โˆˆ S โ†’ โˆ€ (b : Bool), Shatters X {c | c โˆˆ C โˆง c x = b} (S.erase x)
    Used by
  17. Declvcdim_finite_imp_pac_via_uc'Declaration kindtheorem

    VCDim < โŠค โ†’ PACLearnable via UC route.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’
        (โˆ€ h โˆˆ C, Measurable h) โ†’ (โˆ€ (c : Concept X Bool), Measurable c) โ†’ WellBehavedVC X C โ†’ PACLearnable X C
    Uses
    Used by
  18. Declvcdim_finite_imp_uc'Declaration kindtheorem

    Finite VCDim implies uniform convergence. Proof: VCDim < โˆž โ†’ UC.

    • Finite X: direct Hoeffding per-hypothesis + finite union bound.
    • Infinite X: Sauer-Shelah โ†’ symmetrization + growth function โ†’ UC.
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’
        (โˆ€ h โˆˆ C, Measurable h) โ†’ (โˆ€ (c : Concept X Bool), Measurable c) โ†’ WellBehavedVC X C โ†’ HasUniformConvergence X C
    Uses
    Used by
  19. Declvcdim_finite_imp_growth_boundedDeclaration kindtheorem

    VCDim < โŠค โ†’ growth function polynomially bounded by partial binomial sum. Forward direction of fundamental_theorem conjunct 5. Uses Sauer-Shelah: GrowthFunction(m) โ‰ค โˆ‘_{iโ‰คd} C(m,i) where d = VCDim.

    โˆ€ (X : Type u) (C : ConceptClass X Bool),
      VCDim X C < โŠค โ†’ โˆƒ d, โˆ€ (m : โ„•), d โ‰ค m โ†’ GrowthFunction X C m โ‰ค โˆ‘ i โˆˆ Finset.range (d + 1), m.choose i
    Used by
  20. Decluc_bad_event_le_delta_provedDeclaration kindtheorem

    UC bad-event bound: for m โ‰ฅ mโ‚€(v,ฮต,ฮด), the probability of the bad event (โˆƒ h with |TrueErr-EmpErr| โ‰ฅ ฮต) is at most ฮด. Composes symmetrization_uc_bound with growth_exp_le_delta.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต ฮด : โ„),
                0 < ฮต โ†’
                  0 < ฮด โ†’
                    ฮด < 1 โ†’
                      โˆ€ (v : โ„•),
                        0 < v โ†’
                          (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                            (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                              MeasureTheory.NullMeasurableSet
                                  {p |
                                    โˆƒ h โˆˆ C,
                                      EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                          EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                        ฮต / 2}
                                  ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                                (MeasureTheory.Measure.pi fun x => D)
                                    {xs |
                                      โˆƒ h โˆˆ C,
                                        |TrueErrorReal X h c D -
                                              EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                          ฮต} โ‰ค
                                  ENNReal.ofReal ฮด
    Uses
    Used by
  21. Declsymmetrization_uc_boundDeclaration kindtheorem

    The symmetrization uniform convergence bound: two-sided version. P[โˆƒhโˆˆC: |TrueErr-EmpErr| โ‰ฅ ฮต] โ‰ค 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8).

    Proof strategy (4 steps):

    1. Decompose absolute value: |TrueErr - EmpErr| โ‰ฅ ฮต โ†” (TrueErr - EmpErr โ‰ฅ ฮต) โˆจ (EmpErr - TrueErr โ‰ฅ ฮต)

    have abs_decomp : โˆ€ (a b : โ„), |a - b| โ‰ฅ ฮต โ†” a - b โ‰ฅ ฮต โˆจ b - a โ‰ฅ ฮต := by intro a b; constructor ยท intro h; by_cases h' : a - b โ‰ฅ ฮต ยท exact Or.inl h' ยท exact Or.inr (by linarith [abs_sub_comm a b, le_abs_self (a - b)]) ยท intro h; cases h with | inl h => exact le_trans (le_of_eq (abs_of_nonneg (by linarith))) (by linarith) | inr h => exact le_trans (le_of_eq (abs_of_nonpos (by linarith) โ–ธ ...)) ...

    2. Upper tail: P[โˆƒhโˆˆC: TrueErr-EmpErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Direct application of symmetrization_step + double_sample_pattern_bound.

    3. Lower tail: P[โˆƒhโˆˆC: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    • Apply the symmetric argument: swap roles of S and S' in the double sample.
    • Equivalently, apply symmetrization_step to the event EmpErr-TrueErr โ‰ฅ ฮต and bound the double-sample event {EmpErr_S - EmpErr_{S'} โ‰ฅ ฮต/2}.
    • The bound is symmetric because D^m โŠ— D^m is symmetric under swapping factors. have swap_symmetry : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S) - EmpErr(S') โ‰ฅ ฮต/2} = DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, EmpErr(S') - EmpErr(S) โ‰ฅ ฮต/2} := Measure.prod_swap ...

    4. Union bound: P[|gap| โ‰ฅ ฮต] โ‰ค P[gap โ‰ฅ ฮต] + P[gap โ‰ค -ฮต] โ‰ค 2ยทGFยทexp(...) + 2ยทGFยทexp(...) = 4ยทGF(C,2m)ยทexp(-mฮตยฒ/8)

    -- Uses: MeasureTheory.measure_union_le for the union of two events -- CAST: 2 * X + 2 * X = 4 * X in ENNReal (need ENNReal.add_mul or similar)

    References: SSBD Theorem 6.7, Kakade-Tewari Lecture 19

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    MeasureTheory.NullMeasurableSet
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2}
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                      (MeasureTheory.Measure.pi fun x => D)
                          {xs |
                            โˆƒ h โˆˆ C,
                              |TrueErrorReal X h c D -
                                    EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                ฮต} โ‰ค
                        ENNReal.ofReal (4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  22. Declsymmetrization_step_lowerDeclaration kindtheorem

    Symmetrization step for the lower tail: P[โˆƒh: EmpErr-TrueErr โ‰ฅ ฮต] โ‰ค 2ยทP_{double}[โˆƒh: EmpErr_S-EmpErr_{S'} โ‰ฅ ฮต/2].

    Mirror of symmetrization_step for the opposite direction. Uses hoeffding_one_sided_upper instead of hoeffding_one_sided.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) - TrueErrorReal X h c D โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  23. Declsymmetrization_stepDeclaration kindtheorem

    Symmetrization: the probability of a large gap TrueErr-EmpErr is at most twice the probability of a large gap EmpErr'-EmpErr on the double sample.

    Proof strategy (6 steps):

    1. Witness selection: For S in the bad event, โˆƒh* โˆˆ C with TrueErr(h) - EmpErr_S(h) โ‰ฅ ฮต.

    -- In the bad event set, extract h* by classical choice have h_witness : โˆ€ xs โˆˆ bad_event, โˆƒ h* โˆˆ C, TrueErrorReal X h* c D - EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โ‰ฅ ฮต

    2. Ghost sample mean: E_{S'}[EmpErr_{S'}(h)] = TrueErr(h) โ‰ฅ EmpErr_S(h*) + ฮต.

    • Uses: MeasureTheory.integral_pi to compute E[EmpErr] over product measure.
    • KEY LEMMA: For fixed h, E_{D^m}[EmpiricalError(h,S)] = TrueErrorReal(h,c,D). This is because EmpErr = (1/m)โˆ‘ indicator(x_i), and E[indicator(x_i)] = TrueErrorReal. have expected_emp_err : โˆ€ h* : Concept X Bool, โˆซ xs, EmpiricalError X Bool h* (sample xs) (zeroOneLoss Bool) โˆ‚(Measure.pi (fun _ : Fin m => D)) = TrueErrorReal X h* c D := by ...

    3. Hoeffding on ghost sample: P_{S'}[EmpErr_{S'}(h) < TrueErr(h) - ฮต/2] โ‰ค exp(-mฮตยฒ/2).

    • Apply hoeffding_one_sided with t = ฮต/2.
    • The hm_large hypothesis ensures exp(-mฮตยฒ/2) < 1/2: 2ยทln2 โ‰ค mฮตยฒ โŸน mฮตยฒ/2 โ‰ฅ ln2 โŸน exp(-mฮตยฒ/2) โ‰ค 1/2. have hoeffding_ghost : โˆ€ h* โˆˆ C, Measure.pi (fun _ : Fin m => D) {xs' | EmpiricalError X Bool h* (sample xs') (zeroOneLoss Bool) < TrueErrorReal X h* c D - ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-m * (ฮต/2)^2 * 2)) := by intro h* _; exact hoeffding_one_sided D h* c m hm (ฮต/2) (by linarith) (by ...) (by ...)

    4. Complementary probability: P_{S'}[EmpErr_{S'}(h) - EmpErr_S(h) โ‰ฅ ฮต/2] โ‰ฅ 1/2.

    • From step 2: TrueErr(h) โ‰ฅ EmpErr_S(h) + ฮต
    • From step 3: P[EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2] โ‰ฅ 1/2
    • Chain: EmpErr_{S'} โ‰ฅ TrueErr - ฮต/2 โ‰ฅ EmpErr_S + ฮต - ฮต/2 = EmpErr_S + ฮต/2

    5. Conditional to unconditional: The witness h* from step 1 also witnesses the double-sample event โˆƒhโˆˆC: EmpErr'-EmpErr โ‰ฅ ฮต/2. So: P_{S'}[double event | S bad] โ‰ฅ 1/2.

    have conditional_bound : โˆ€ xs โˆˆ bad_event, Measure.pi (fun _ : Fin m => D) {xs' | โˆƒ h โˆˆ C, EmpiricalError ... xs' - EmpiricalError ... xs โ‰ฅ ฮต/2} โ‰ฅ ENNReal.ofReal (1/2) := by ...

    6. Fubini integration: By Measure.prod_apply and Fubini: P_{S,S'}[double event] = โˆซ_S P_{S'}[double event | S] โ‰ฅ (1/2) ยท P_S[bad event] โŸน P_S[bad event] โ‰ค 2 ยท P_{S,S'}[double event].

    -- Uses: MeasureTheory.Measure.prod_apply or lintegral_prod -- MEASURABILITY: the double-sample event is measurable as a finite union -- of sets of the form {(xs,xs') | EmpErr'(h) - EmpErr(h) โ‰ฅ ฮต/2} for h โˆˆ C. -- Since C may be infinite, measurability requires care: the sup over h -- must be shown to be measurable. For finite restriction patterns (โ‰ค 2^m -- on Fin m โ†’ Bool), this is a finite union.

    MEASURABILITY CONCERNS:

    • {xs | โˆƒ h โˆˆ C, ...} is NOT obviously measurable for infinite C. Strategy: decompose via restriction patterns. On any fixed xs, the set of labelings {(h(xs 0), ..., h(xs(m-1))) | h โˆˆ C} has at most GF(C,m) โ‰ค 2^m elements. So the โˆƒh event is a finite union of measurable sets.
    • EmpiricalError is a finite sum of measurable functions, hence measurable.
    • The product ฯƒ-algebra on (Fin m โ†’ X) ร— (Fin m โ†’ X) is generated by cylinder sets, and our events are in this ฯƒ-algebra.

    References: SSBD Lemma 4.5, Kakade-Tewari Lecture 19 Lemma 1

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2 โ†’
                    (MeasureTheory.Measure.pi fun x => D)
                        {xs |
                          โˆƒ h โˆˆ C,
                            TrueErrorReal X h c D - EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต} โ‰ค
                      2 *
                        ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
    Uses
    Used by
  24. Decldouble_sample_pattern_boundDeclaration kindtheorem

    On the double sample, the probability that any hypothesis has EmpErr' - EmpErr โ‰ฅ ฮต/2 is bounded by GF(C,2m) ยท exp(-mฮตยฒ/8).

    Proof strategy (Approach A โ€” standard exchangeability, 5 steps):

    1. EXCHANGEABILITY: Under D^m โŠ— D^m, the 2m draws zโ‚,...,z_{2m} are iid from D. The joint distribution is invariant under permutations of {1,...,2m}.

    Key lemma: P_{D^mโŠ—D^m}[event(S,S')] = E_z[P_{split}[event | z]] where z = merged sample and the split is uniformly random among all C(2m,m) ways to partition z into two groups of m.

    -- Measure.pi permutation invariance have pi_perm_invariant : โˆ€ (ฯƒ : Equiv.Perm (Fin (2*m))), (Measure.pi (fun _ : Fin (2*m) => D)).map (fun z i => z (ฯƒ i)) = Measure.pi (fun _ : Fin (2*m) => D) := by ... -- Consequence: the event probability equals the split-averaged probability have exchangeability : DoubleSampleMeasure D m {p | โˆƒ h โˆˆ C, gap(p) โ‰ฅ ฮต/2} = โˆซ z, SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs) โ‰ฅ ฮต/2} โˆ‚(Measure.pi (fun _ : Fin (2*m) => D)) := by ...

    2. CONDITIONING: For fixed merged sample z of 2m points:

    • C restricts to at most GF(C,2m) distinct labeling patterns on z (deterministic).
    • For each pattern p, define: diff(p, split) = EmpErr_{S'}(p) - EmpErr_S(p) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i where a_i = 1[pattern(z_i) โ‰  c(z_i)] โˆˆ {0,1}.
    -- Number of distinct patterns have num_patterns : โˆ€ (z : MergedSample X m), Set.ncard {p : Fin (2*m) โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h (z i) โ‰  c (z i))} โ‰ค GrowthFunction X C (2*m) := by ...

    3. PER-PATTERN HOEFFDING ON SPLITS: For fixed z and fixed pattern p: Under uniformly random split (S,S') of z into two groups of m: diff(p, split) = (1/m) โˆ‘_{iโˆˆS'} a_i - (1/m) โˆ‘_{iโˆˆS} a_i

    This is a function of the random partition. By Hoeffding's inequality for sampling without replacement (Serfling 1974): P_split[diff โ‰ฅ ฮต/2] โ‰ค exp(-mฮตยฒ/8)

    Alternative derivation: Hoeffding without replacement from Hoeffding with replacement (iid signs) via coupling. The without-replacement bound is actually TIGHTER (variance reduction), but the with-replacement bound suffices.

    -- Per-pattern concentration have per_pattern_bound : โˆ€ (z : MergedSample X m) (a : Fin (2*m) โ†’ โ„) (ha : โˆ€ i, a i โˆˆ Set.Icc 0 1), SplitMeasure m {vs | (1/m) * โˆ‘ i โˆˆ second_group vs, a i - (1/m) * โˆ‘ i โˆˆ first_group vs, a i โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (Real.exp (-(m : โ„) * (ฮต/2)^2 / 2)) := by ... -- Note: m*(ฮต/2)^2/2 = mฮตยฒ/8

    4. UNION BOUND: P_split[โˆƒ pattern: diff โ‰ฅ ฮต/2 | z] โ‰ค (number of patterns) ยท max_pattern P_split[diff โ‰ฅ ฮต/2] โ‰ค GF(C,2m) ยท exp(-mฮตยฒ/8)

    have union_bound : โˆ€ (z : MergedSample X m), SplitMeasure m {vs | โˆƒ h โˆˆ C, gap(split z vs, h) โ‰ฅ ฮต/2} โ‰ค ENNReal.ofReal (GrowthFunction X C (2*m) * Real.exp (-(m : โ„) * ฮต^2 / 8)) := by ...

    5. INTEGRATE: P_{D^mโŠ—D^m}[event] = E_z[P_split[event|z]] (by step 1) โ‰ค E_z[GF(C,2m) ยท exp(-mฮตยฒ/8)] (by step 4, pointwise) = GF(C,2m) ยท exp(-mฮตยฒ/8) (bound is independent of z)

    -- The bound is a constant, so integrating gives the same constant -- (using IsProbabilityMeasure for the 2m-fold product)

    Infrastructure needed:

    • Fin.sumFinEquiv : Fin m โŠ• Fin n โ‰ƒ Fin (m + n) (available in Mathlib)
    • mergeSamples / splitMergedSample (defined above)
    • SplitMeasure and ValidSplit (defined above)
    • Measure.pi permutation invariance (to be proved or imported)
    • Hoeffding for sampling without replacement
    • GrowthFunction on 2m points + sauer_shelah_exp_bound from Rademacher.lean

    MEASURABILITY CONCERNS:

    • The merged sample z โ†ฆ P_split[event|z] must be measurable as a function of z. Since the event is a finite union over patterns, and each pattern's indicator is a measurable function of z (finite evaluation), this follows.
    • GrowthFunction X C (2*m) is a natural number (deterministic), no measurability issue.

    References: SSBD Theorem 6.7, Hoeffding (1963), Serfling (1974)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  MeasureTheory.NullMeasurableSet
                      {p |
                        โˆƒ h โˆˆ C,
                          EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                              EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                            ฮต / 2}
                      ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                    ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D))
                        {p |
                          โˆƒ h โˆˆ C,
                            EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                              ฮต / 2} โ‰ค
                      ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  25. Declexchangeability_chain_boundDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] [Infinite X] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (C : ConceptClass X Bool) (c : Concept X Bool),
      (โˆ€ h โˆˆ C, Measurable h) โ†’
        Measurable c โ†’
          โˆ€ (m : โ„•),
            0 < m โ†’
              โˆ€ (ฮต : โ„),
                0 < ฮต โ†’
                  ฮต โ‰ค 2 โ†’
                    Set.Nonempty C โ†’
                      MeasureTheory.NullMeasurableSet
                          {p |
                            โˆƒ h โˆˆ C,
                              EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                  EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                ฮต / 2}
                          ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) โ†’
                        have ฮผ := MeasureTheory.Measure.pi fun x => D;
                        (ฮผ.prod ฮผ)
                            {p |
                              โˆƒ h โˆˆ C,
                                EmpiricalError X Bool h (fun i => (p.2 i, c (p.2 i))) (zeroOneLoss Bool) -
                                    EmpiricalError X Bool h (fun i => (p.1 i, c (p.1 i))) (zeroOneLoss Bool) โ‰ฅ
                                  ฮต / 2} โ‰ค
                          ENNReal.ofReal (โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)))
    Uses
    Used by
  26. DeclzeroOneLoss.congr_simpDeclaration kindtheorem
    โˆ€ (Y : Type v) {inst : DecidableEq Y} [inst_1 : DecidableEq Y] (a a_1 : Y),
      a = a_1 โ†’ โˆ€ (a_2 a_3 : Y), a_2 = a_3 โ†’ zeroOneLoss Y a a_2 = zeroOneLoss Y a_1 a_3
    Used by
  27. Declrestriction_pattern_countDeclaration kindtheorem

    The number of distinct restriction patterns of C on any n points is at most GF(C,n). For z : Fin n โ†’ X, define patterns(z) = {p : Fin n โ†’ Bool | โˆƒ h โˆˆ C, โˆ€ i, p i = (h(z i) โ‰  c(z i))}. Then patterns(z).ncard โ‰ค GrowthFunction X C n by definition of GrowthFunction.

    โˆ€ {X : Type u} [MeasurableSpace X] [Infinite X] (C : ConceptClass X Bool) (c : Concept X Bool) (n : โ„•) (z : Fin n โ†’ X),
      {p | โˆƒ h โˆˆ C, โˆ€ (i : Fin n), p i = decide (h (z i) โ‰  c (z i))}.ncard โ‰ค GrowthFunction X C n
    Used by
  28. Declrademacher_mgf_boundDeclaration kindtheorem

    Rademacher MGF bound.

    โˆ€ {m : โ„•},
      0 < m โ†’
        โˆ€ (a : Fin m โ†’ โ„) (c : โ„),
          0 โ‰ค c โ†’
            (โˆ€ (i : Fin m), |a i| โ‰ค c) โ†’
              โˆ€ (t : โ„),
                0 โ‰ค t โ†’
                  1 / โ†‘(Fintype.card (SignVector m)) * โˆ‘ ฯƒ, Real.exp (t * (1 / โ†‘m * โˆ‘ i, a i * boolToSign (ฯƒ i))) โ‰ค
                    Real.exp (t ^ 2 * c ^ 2 / (2 * โ†‘m))
    Uses
    Used by
  29. Declcosh_le_exp_sq_halfDeclaration kindtheorem

    cosh(x) โ‰ค exp(xยฒ/2). Standard sub-Gaussian bound.

    โˆ€ (x : โ„), Real.cosh x โ‰ค Real.exp (x ^ 2 / 2)
    Used by
  30. Declfinite_exchangeability_boundDeclaration kindtheorem

    Generic finite exchangeability bound. Given a measure-preserving family of transformations on a probability space, a NullMeasurableSet S, and a pointwise bound on the sum of preimage indicators, conclude ฮฝ(S) โ‰ค B.

    โˆ€ {ฮฉ : Type u_1} {G : Type u_2} [inst : MeasurableSpace ฮฉ] [inst_1 : Fintype G] [Nonempty G]
      {ฮฝ : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure ฮฝ] (T : G โ†’ ฮฉ โ†’ ฮฉ) (S : Set ฮฉ),
      (โˆ€ (g : G), MeasureTheory.MeasurePreserving (T g) ฮฝ ฮฝ) โ†’
        MeasureTheory.NullMeasurableSet S ฮฝ โ†’
          โˆ€ (B : ENNReal), (โˆ€ (z : ฮฉ), โˆ‘ g, (T g โปยน' S).indicator 1 z โ‰ค B * โ†‘(Fintype.card G)) โ†’ ฮฝ S โ‰ค B
    Used by
  31. Declgrowth_exp_le_deltaDeclaration kindtheorem
    โˆ€ {X : Type u} [MeasurableSpace X] (C : ConceptClass X Bool) (v : โ„•),
      0 < v โ†’
        โˆ€ (m : โ„•),
          0 < m โ†’
            โˆ€ (ฮต ฮด : โ„),
              0 < ฮต โ†’
                0 < ฮด โ†’
                  ฮด < 1 โ†’
                    (โˆ€ (n : โ„•), v โ‰ค n โ†’ GrowthFunction X C n โ‰ค โˆ‘ i โˆˆ Finset.range (v + 1), n.choose i) โ†’
                      (16 * Real.exp 1 * (โ†‘v + 1) / ฮต ^ 2) ^ (v + 1) / ฮด โ‰ค โ†‘m โ†’
                        4 * โ†‘(GrowthFunction X C (2 * m)) * Real.exp (-(โ†‘m * ฮต ^ 2 / 8)) โ‰ค ฮด โˆง 2 * Real.log 2 โ‰ค โ†‘m * ฮต ^ 2
    Uses
    Used by
  32. Declsum_choose_le_exp_powDeclaration kindtheorem

    Pure combinatorial inequality: โˆ‘_{i=0}^d C(m,i) โ‰ค (em/d)^d for d โ‰ค m, d โ‰ฅ 1.

    โˆ€ (d m : โ„•), 0 < d โ†’ d โ‰ค m โ†’ โˆ‘ i โˆˆ Finset.range (d + 1), โ†‘(m.choose i) โ‰ค (Real.exp 1 * โ†‘m / โ†‘d) ^ d
    Used by
  33. Declpow_mul_exp_neg_le_factorial_divDeclaration kindtheorem

    Key arithmetic lemma for PAC bound: for t > 0, t^d * exp(-t) โ‰ค (d+1)!/t. Follows from exp(t) โ‰ฅ t^(d+1)/(d+1)! (partial sum of Taylor series).

    โˆ€ {d : โ„•} {t : โ„}, 0 < t โ†’ t ^ d * Real.exp (-t) โ‰ค โ†‘(d + 1).factorial / t
    Used by
  34. Declgrowth_function_le_two_powDeclaration kindtheorem

    Trivial bound: GrowthFunction โ‰ค 2^n for all concept classes. Each restriction to an n-element set yields a function in S โ†’ Bool, and there are at most 2^n such functions.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (n : โ„•), GrowthFunction X C n โ‰ค 2 ^ n
    Used by
  35. Declhoeffding_one_sided_upperDeclaration kindtheorem

    Upper-tail Hoeffding: for iid Bernoulli(p) draws, the empirical average overshoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    This is the mirror of hoeffding_one_sided (which bounds the lower tail). The proof uses the same sub-Gaussian machinery with Z_i = indicator(x_i) - p (instead of p - indicator(x_i)).

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ TrueErrorReal X h c D + t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  36. Declhoeffding_one_sidedDeclaration kindtheorem

    One-sided Hoeffding: for iid Bernoulli(p) draws, the empirical average undershoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    Proof strategy (3 steps):

    1. MGF bound (Hoeffding's lemma): For X โˆˆ [0,1] with E[X] = p, E[exp(s(X-p))] โ‰ค exp(sยฒ/8).

    • Adapt from cosh_le_exp_sq_half infrastructure in Rademacher.lean.
    • Key: convexity of exp on [0,1] gives E[exp(sX)] โ‰ค pยทexp(s) + (1-p)ยทexp(0), then the sยฒ/8 bound follows from ln(1 + x) โ‰ค x and Taylor expansion. have mgf_bound : โˆ€ (s : โ„), โˆซ x, Real.exp (s * (indicator x - p)) โˆ‚D โ‰ค Real.exp (s^2 / 8) := by ...

    2. Product independence: E[exp(sยทโˆ‘(X_i-p))] = โˆ E[exp(s(X_i-p))] โ‰ค exp(msยฒ/8).

    • Uses MeasureTheory.Measure.pi independence structure.
    • Needs: Measure.pi integral factorization for product of functions.
    • MEASURABILITY: fun xs => Real.exp (s * โˆ‘ i, f (xs i)) is measurable (composition of measurable functions). have product_bound : โˆ€ (s : โ„), โˆซ xs, Real.exp (s * โˆ‘ i, (indicator (xs i) - p)) โˆ‚Measure.pi (fun _ => D) โ‰ค Real.exp (m * s^2 / 8) := by ...

    3. Exponential Markov + optimize: P[โˆ‘(X_i-p) โ‰ค -mt] = P[exp(-sยทโˆ‘(X_i-p)) โ‰ฅ exp(smt)] โ‰ค exp(-smt + msยฒ/8). Optimize over s: set s = 4t to get โ‰ค exp(-2mtยฒ).

    • Uses Markov's inequality in ENNReal form.
    • CAST ISSUE: Markov gives ENNReal bound, need to convert exp(-2mtยฒ) between ENNReal.ofReal and the measure value. have markov_step : โˆ€ (s : โ„) (hs : 0 < s), Measure.pi (fun _ => D) {xs | โˆ‘ i, (indicator (xs i) - p) โ‰ค -(m : โ„) * t} โ‰ค ENNReal.ofReal (Real.exp (-(s * m * t) + m * s^2 / 8)) := by ... have optimize : Real.exp (-(4*t * m * t) + m * (4*t)^2 / 8) = Real.exp (-2 * m * t^2) := by ring_nf

    CAST ISSUES to watch:

    • m : โ„• needs cast to โ„ in the exponent: (m : โ„)
    • EmpiricalError returns โ„, TrueErrorReal returns โ„, good โ€” no ENNReal gap
    • The measure value is ENNReal, the bound exp(-2mtยฒ) is โ„โ‰ฅ0โˆž via ENNReal.ofReal

    References: SSBD Lemma B.3, Hoeffding (1963)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ค TrueErrorReal X h c D - t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  37. Decluc_imp_pacDeclaration kindtheorem

    Uniform convergence implies PAC learnability via ERM. The ERM learner (which exists by ermLearn) achieves PAC learning when uniform convergence holds. This is the second half of vcdim_finite_imp_pac.

    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool),
      Set.Nonempty C โ†’ HasUniformConvergence X C โ†’ PACLearnable X C
    Uses
    Used by
  38. DeclBatchLearner.output_in_HDeclaration kindtheorem

    Output is in the hypothesis space

    โˆ€ {X : Type u} {Y : Type v} (self : BatchLearner X Y) {m : โ„•} (S : Fin m โ†’ X ร— Y), self.learn S โˆˆ self.hypotheses
    Used by
  39. DeclMeasurableConceptClass.hmeas_CDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C],
      โˆ€ c โˆˆ C, Measurable c
    Uses
    Used by
  40. DeclMeasurableConceptClass.mem_measurableDeclaration kindtheorem

    Every concept in C is measurable

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableConceptClass X C],
      โˆ€ h โˆˆ C, Measurable h
    Used by
  41. DeclMeasurableConceptClass.hc_measDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C]
      (c : Concept X Bool), Measurable c
    Uses
    Used by
  42. DeclMeasurableConceptClass.all_measurableDeclaration kindtheorem

    All concepts X โ†’ Bool are measurable (for disagreement sets)

    โˆ€ {X : Type u} {inst : MeasurableSpace X} (C : ConceptClass X Bool) [self : MeasurableConceptClass X C]
      (c : Concept X Bool), Measurable c
    Used by
  43. DeclMeasurableConceptClass.hWBDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] (C : ConceptClass X Bool) [h : MeasurableConceptClass X C], WellBehavedVC X C
    Uses
    Used by
  44. DeclMeasurableConceptClass.wellBehavedDeclaration kindtheorem

    Uniform convergence bad event is NullMeasurableSet

    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableConceptClass X C],
      WellBehavedVC X C
    Used by
  45. DefinitionBatchLearnerstructure

    A batch learner (PAC paradigm): takes a finite sample, returns a hypothesis.

    Type u โ†’ Type v โ†’ Type (max u v)
  46. DefinitionBatchLearner.hypothesesdef

    The learner's hypothesis space

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ HypothesisSpace X Y
  47. DefinitionBatchLearner.learndef

    The learning algorithm: given a sample, produce a hypothesis

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Concept X Y
  48. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  49. DefinitionEmpiricalErrordef

    Empirical error: average loss on a finite sample.

    (X : Type u) โ†’ (Y : Type v) โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ LossFunction Y โ†’ โ„
  50. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  51. DefinitionGrowthFunctiondef

    Growth function (shattering coefficient): ฯ€_C(m) = max_{|S|=m} |{c|_S : c โˆˆ C}|. For each m-element set S, counts the number of distinct restrictions of C to S, then takes the supremum over all such S.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ โ„• โ†’ โ„•
  52. DefinitionHasUniformConvergencedef

    Uniform convergence of empirical error to true error over a hypothesis class. This is the property that makes finite VCDim โ†’ PAC learnability work. BPโ‚… connects here: this is ONE of the five characterizations.

    M-DefinitionRepair (ฮ“โ‚ƒโ‚… โ†’ ฮ“โ‚„โ‚): The mโ‚€ must be INDEPENDENT of D and c. That's what "uniform" means โ€” convergence is uniform over all distributions and all target concepts. The original definition had mโ‚€ depending on D and c, making uc_imp_pac unprovable (PACLearnable's mf must be independent of D, c). Repaired: โˆƒ mโ‚€ is now BEFORE โˆ€ D, โˆ€ c. This STRENGTHENS the definition (A5-valid: adds content, doesn't simplify).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ HypothesisSpace X Bool โ†’ Prop
  53. DefinitionHypothesisSpacedef

    A hypothesis space is a set of candidate concepts that the learner searches over. When H = C (the realizable case), every concept in the target class is available. When H โŠ‚ C or H โŠƒ C, we are in the improper/agnostic regime.

    Structurally identical to ConceptClass but semantically distinct: ConceptClass is the ground truth collection; HypothesisSpace is what the learner has access to.

    Type u โ†’ Type v โ†’ Type (max v u)
  54. DefinitionIsConsistentWithdef

    A hypothesis h is consistent with labeled sample S.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Prop
  55. DefinitionLTreeinductive

    A complete binary Littlestone tree of depth n.

    Type โ†’ โ„• โ†’ Type
  56. DefinitionLTree.isShattereddef

    Path-wise shattering for complete trees. Path B: leaf case requires C.Nonempty (NAโ‚โ‚€).

    {X : Type} โ†’ {n : โ„•} โ†’ ConceptClass X Bool โ†’ LTree X n โ†’ Prop
  57. DefinitionLittlestoneDimdef

    Littlestone dimension: the maximum depth of a complete shattered tree. Path B: returns WithBot (WithTop โ„•) so Ldim(โˆ…) = โŠฅ (NAโ‚โ‚€).

    (X : Type) โ†’ ConceptClass X Bool โ†’ WithBot (WithTop โ„•)
  58. DefinitionMeasurableConceptClassstructure

    A concept class with the measure-theoretic regularity needed for PAC theory.

    Bundles three conditions: 1. Every concept in C is measurable 2. All concepts are measurable (needed for disagreement set measurability) 3. The UC bad event satisfies NullMeasurableSet (WellBehavedVC)

    Condition 3 is the deep one: for uncountable C, the existential {โˆƒ h โˆˆ C, |TrueErr - EmpErr| โ‰ฅ ฮต} is NOT MeasurableSet in general. WellBehavedVC asserts it is NullMeasurableSet, which suffices for integration (lintegral_indicator_oneโ‚€).

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  59. DefinitionMistakeBoundeddef

    Mistake-bounded learning: the learner makes at most M mistakes on ANY sequence. No distribution assumption. Characterized by Littlestone dimension.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ ConceptClass X Y โ†’ โ„• โ†’ Prop
  60. DefinitionOnlineLearnabledef

    Online learnable: there exists a finite mistake bound.

    (X : Type u) โ†’ (Y : Type v) โ†’ [DecidableEq Y] โ†’ ConceptClass X Y โ†’ Prop
  61. DefinitionOnlineLearnerstructure

    An online learner: receives instances one at a time, makes predictions sequentially.

    Type u โ†’ Type v โ†’ Type (max (max 1 u) v)
  62. DefinitionOnlineLearner.Statedef

    Internal state type

    {X : Type u} โ†’ {Y : Type v} โ†’ OnlineLearner X Y โ†’ Type
  63. DefinitionOnlineLearner.initdef

    Initial state

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State
  64. DefinitionOnlineLearner.mistakesdef

    Helper: run an online learner on a sequence, counting mistakes.

    {X : Type u} โ†’ {Y : Type v} โ†’ [DecidableEq Y] โ†’ OnlineLearner X Y โ†’ Concept X Y โ†’ List X โ†’ โ„•
  65. DefinitionOnlineLearner.mistakes.godef
    {X : Type u} โ†’ {Y : Type v} โ†’ [DecidableEq Y] โ†’ (L : OnlineLearner X Y) โ†’ Concept X Y โ†’ L.State โ†’ List X โ†’ โ„• โ†’ โ„•
  66. DefinitionOnlineLearner.mistakesFromdef

    Count mistakes starting from state s.

    {X : Type} โ†’ (L : OnlineLearner X Bool) โ†’ L.State โ†’ (X โ†’ Bool) โ†’ List X โ†’ โ„•
  67. DefinitionOnlineLearner.predictdef

    Predict: given current state and new instance, output a prediction

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State โ†’ X โ†’ Y
  68. DefinitionOnlineLearner.updatedef

    Update: given current state, instance, and revealed true label, update state

    {X : Type u} โ†’ {Y : Type v} โ†’ (self : OnlineLearner X Y) โ†’ self.State โ†’ X โ†’ Y โ†’ self.State
  69. DefinitionPACLearnabledef

    PAC (Probably Approximately Correct) learning. The central definition of computational learning theory.

    Sample space: Fin m โ†’ X with i.i.d. product measure D^m. Labels: derived deterministically from target concept c (realizable case). Error: D-probability of disagreement between learner output and c.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  70. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  71. DefinitionSignVectordef
    โ„• โ†’ Type
  72. DefinitionTrueErrordef

    True error (0-1 loss, realizable case): D-probability of disagreement. This is what PACLearnable's success event measures.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ ENNReal
  73. DefinitionTrueErrorRealdef

    True error in โ„: for use in bounds involving subtraction/absolute value. COUNTER-1 of TrueError. The toReal bridge loses information when the measure is โŠค.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ โ„
  74. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  75. DefinitionWellBehavedVCdef

    A concept class is well-behaved if the ghost gap event is null-measurable. This is the minimal regularity assumption for the symmetrization proof.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  76. DefinitionboolToSigndef

    Convert Bool labels to ยฑ1 reals. true โ†ฆ 1, false โ†ฆ -1.

    Bool โ†’ โ„
  77. DefinitionmistakesFromUdef

    Count mistakes starting from state s (universe-polymorphic version).

    {X : Type u} โ†’ (L : OnlineLearner X Bool) โ†’ L.State โ†’ (X โ†’ Bool) โ†’ List X โ†’ โ„•
  78. DefinitionthresholdClassdef

    Threshold concept class on โ„•: { (ยท โ‰ค n) | n : โ„• }. VCDim = 1 (PAC-learnable), LittlestoneDim = โˆž (not online-learnable).

    ConceptClass โ„• Bool
  79. DefinitionthresholdTreedef

    Build a shattered Littlestone tree of depth d for the threshold class restricted to thresholds in interval [lo, lo + 2^d - 1]. The concept class parameter C should contain all thresholds (ยท โ‰ค n) for lo โ‰ค n โ‰ค lo + 2^d - 1. We show the tree is shattered by C when C โЇ these thresholds.

    โ„• โ†’ (d : โ„•) โ†’ LTree โ„• d
  80. DefinitionzeroOneLossdef

    The 0-1 loss for classification.

    (Y : Type v) โ†’ [DecidableEq Y] โ†’ LossFunction Y

Advice elimination (Ben-David & Dichterman 1998): If C is PAC-learnable with concept-dependent advice from a FINITE set A (with measurability regularity), then C is PAC-learnable without advice.

Proof strategy: run the advice-augmented learner with each a โˆˆ A on a training portion of the sample, producing |A| candidate hypotheses. Use a validation portion to select the candidate with lowest empirical error. Union bound over |A| advice values + Hoeffding on validation controls total failure probability. Sample complexity: O(m_orig(ฮต/2, ฮด/(2|A|)) + log(|A|/ฮด)/ฮตยฒ).

The [Fintype A] constraint is essential: for infinite A, the theorem is false (no finite union bound). [Nonempty A] ensures the advice space is inhabited.

Decladvice_elimination
โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableHypotheses X C] (A : Type u_1)
  [inst_2 : Fintype A] [inst_3 : Nonempty A], PACLearnableWithAdviceRegular X C A โ†’ PACLearnable X C
Layout
ThesisStepHypothesisDefinition
advice_eliminationtheoremPACLearnableWithAdviceRegโ€ฆaused_sample_split_measuretheoremtrueErrorReal_le_of_bestAโ€ฆtheoremprob_ge_one_sub_compltheoremnat_pair_sample_marginaltheorempi_cylinder_set_eqtheoremlearnWithAdvice_measurablโ€ฆtheoremfinite_validation_family_โ€ฆtheoremhoeffding_one_sided_uppertheoremhoeffding_one_sidedtheoremcongr_simptheoremmem_measurabletheoremAdviceEvalMeasurabledefBatchLearnerstructurelearndefConceptClassdefEmpiricalErrordefConceptdefLearnerWithAdvicestructurelearnWithAdvicedefMeasurableHypothesesstructurePACLearnabledefPACLearnableWithAdviceRegโ€ฆdefTrueErrordefTrueErrorRealdefbestAdvicedefsplitUsedEquivdefusedPrefixdefzeroOneLossdef
  1. Decladvice_eliminationDeclaration kindtheorem
    โˆ€ (X : Type u) [inst : MeasurableSpace X] (C : ConceptClass X Bool) [MeasurableHypotheses X C] (A : Type u_1)
      [inst_2 : Fintype A] [inst_3 : Nonempty A], PACLearnableWithAdviceRegular X C A โ†’ PACLearnable X C
    Uses
  2. Declused_sample_split_measureDeclaration kindtheorem

    Split D^{mโ‚+mโ‚‚} into D^{mโ‚} ร— D^{mโ‚‚} via splitUsedEquiv.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (mโ‚ mโ‚‚ : โ„•) (Success : Set ((Fin mโ‚ โ†’ X) ร— (Fin mโ‚‚ โ†’ X))),
      MeasurableSet Success โ†’
        (MeasureTheory.Measure.pi fun x => D) (โ‡‘(splitUsedEquivโœ mโ‚ mโ‚‚) โปยน' Success) =
          ((MeasureTheory.Measure.pi fun x => D).prod (MeasureTheory.Measure.pi fun x => D)) Success
    Used by
  3. DecltrueErrorReal_le_of_bestAdviceDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] {A : Type u_1} [inst_1 : Fintype A] [inst_2 : Nonempty A]
      (cand : A โ†’ Concept X Bool) (c : Concept X Bool) (D : MeasureTheory.Measure X) {m : โ„•} (Sval : Fin m โ†’ X ร— Bool)
      (ฮท ฯ„ : โ„),
      0 โ‰ค ฮท โ†’
        (โˆ€ (a : A), |TrueErrorReal X (cand a) c D - EmpiricalError X Bool (cand a) Sval (zeroOneLoss Bool)| โ‰ค ฮท) โ†’
          โˆ€ (aStar : A),
            TrueErrorReal X (cand aStar) c D โ‰ค ฯ„ โ†’ TrueErrorReal X (cand (bestAdvice cand Sval)) c D โ‰ค ฯ„ + 2 * ฮท
    Used by
  4. Declprob_ge_one_sub_complDeclaration kindtheorem

    For a probability measure, ฮผ(S) โ‰ฅ 1 - ฮผ(Sแถœ), and hence ฮผ(S) โ‰ฅ 1 - ฮด if ฮผ(Sแถœ) โ‰ค ฮด.

    โˆ€ {ฮฉ : Type u_1} [inst : MeasurableSpace ฮฉ] (ฮผ : MeasureTheory.Measure ฮฉ) [MeasureTheory.IsProbabilityMeasure ฮผ]
      (S : Set ฮฉ) (ฮด : ENNReal), ฮผ Sแถœ โ‰ค ฮด โ†’ ฮผ S โ‰ฅ 1 - ฮด
    Used by
  5. Declnat_pair_sample_marginalDeclaration kindtheorem

    Sampling Nat.pair mโ‚ mโ‚‚ coordinates and taking the first mโ‚+mโ‚‚ gives the same measure as sampling mโ‚+mโ‚‚ coordinates directly. The extra junk coordinates integrate out via pi_cylinder_set_eq.

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      [MeasureTheory.SigmaFinite D] (mโ‚ mโ‚‚ : โ„•) (Success : Set (Fin (mโ‚ + mโ‚‚) โ†’ X)),
      MeasurableSet Success โ†’
        (MeasureTheory.Measure.pi fun x => D) (usedPrefixโœ mโ‚ mโ‚‚ โปยน' Success) =
          (MeasureTheory.Measure.pi fun x => D) Success
    Uses
    Used by
  6. Declpi_cylinder_set_eqDeclaration kindtheorem

    Cylinder set measure on product: if an event depends only on the first coordinates (those satisfying predicate p), then its measure under D^ฮน equals D^{p}(event). Uses piEquivPiSubtypeProd: D^ฮน โ‰ƒ D^{p} ร— D^{ยฌp}, and (D^{p} ร— D^{ยฌp})(A ร— univ) = D^{p}(A) ยท D^{ยฌp}(univ) = D^{p}(A).

    โˆ€ {ฮน : Type u_1} [inst : Fintype ฮน] [DecidableEq ฮน] {X : Type u} [inst_2 : MeasurableSpace X]
      (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D] [MeasureTheory.SigmaFinite D] (p : ฮน โ†’ Prop)
      [inst_5 : DecidablePred p] (S : Set ({ i // p i } โ†’ X)),
      MeasurableSet S โ†’
        (MeasureTheory.Measure.pi fun x => D) {xs | (fun i => xs โ†‘i) โˆˆ S} = (MeasureTheory.Measure.pi fun x => D) S
    Used by
  7. DecllearnWithAdvice_measurable_fixedDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] {A : Type u_1} (LA : LearnerWithAdvice X Bool A),
      AdviceEvalMeasurable LA โ†’ โˆ€ (a : A) {m : โ„•} (S : Fin m โ†’ X ร— Bool), Measurable (LA.learnWithAdvice a S)
    Used by
  8. Declfinite_validation_family_boundDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] {A : Type u_1} [inst_1 : Fintype A] (D : MeasureTheory.Measure X)
      [MeasureTheory.IsProbabilityMeasure D] (c : Concept X Bool),
      Measurable c โ†’
        โˆ€ (cand : A โ†’ Concept X Bool),
          (โˆ€ (a : A), Measurable (cand a)) โ†’
            โˆ€ (m : โ„•),
              0 < m โ†’
                โˆ€ (ฮท : โ„),
                  0 < ฮท โ†’
                    ฮท โ‰ค 1 โ†’
                      (MeasureTheory.Measure.pi fun x => D)
                          {xs |
                            โˆƒ a,
                              |TrueErrorReal X (cand a) c D -
                                    EmpiricalError X Bool (cand a) (fun i => (xs i, c (xs i))) (zeroOneLoss Bool)| โ‰ฅ
                                ฮท} โ‰ค
                        ENNReal.ofReal (โ†‘(Fintype.card A) * 2 * Real.exp (-2 * โ†‘m * ฮท ^ 2))
    Uses
    Used by
  9. Declhoeffding_one_sided_upperDeclaration kindtheorem

    Upper-tail Hoeffding: for iid Bernoulli(p) draws, the empirical average overshoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    This is the mirror of hoeffding_one_sided (which bounds the lower tail). The proof uses the same sub-Gaussian machinery with Z_i = indicator(x_i) - p (instead of p - indicator(x_i)).

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ฅ TrueErrorReal X h c D + t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  10. Declhoeffding_one_sidedDeclaration kindtheorem

    One-sided Hoeffding: for iid Bernoulli(p) draws, the empirical average undershoots the mean by โ‰ฅ t with probability โ‰ค exp(-2mtยฒ).

    Proof strategy (3 steps):

    1. MGF bound (Hoeffding's lemma): For X โˆˆ [0,1] with E[X] = p, E[exp(s(X-p))] โ‰ค exp(sยฒ/8).

    • Adapt from cosh_le_exp_sq_half infrastructure in Rademacher.lean.
    • Key: convexity of exp on [0,1] gives E[exp(sX)] โ‰ค pยทexp(s) + (1-p)ยทexp(0), then the sยฒ/8 bound follows from ln(1 + x) โ‰ค x and Taylor expansion. have mgf_bound : โˆ€ (s : โ„), โˆซ x, Real.exp (s * (indicator x - p)) โˆ‚D โ‰ค Real.exp (s^2 / 8) := by ...

    2. Product independence: E[exp(sยทโˆ‘(X_i-p))] = โˆ E[exp(s(X_i-p))] โ‰ค exp(msยฒ/8).

    • Uses MeasureTheory.Measure.pi independence structure.
    • Needs: Measure.pi integral factorization for product of functions.
    • MEASURABILITY: fun xs => Real.exp (s * โˆ‘ i, f (xs i)) is measurable (composition of measurable functions). have product_bound : โˆ€ (s : โ„), โˆซ xs, Real.exp (s * โˆ‘ i, (indicator (xs i) - p)) โˆ‚Measure.pi (fun _ => D) โ‰ค Real.exp (m * s^2 / 8) := by ...

    3. Exponential Markov + optimize: P[โˆ‘(X_i-p) โ‰ค -mt] = P[exp(-sยทโˆ‘(X_i-p)) โ‰ฅ exp(smt)] โ‰ค exp(-smt + msยฒ/8). Optimize over s: set s = 4t to get โ‰ค exp(-2mtยฒ).

    • Uses Markov's inequality in ENNReal form.
    • CAST ISSUE: Markov gives ENNReal bound, need to convert exp(-2mtยฒ) between ENNReal.ofReal and the measure value. have markov_step : โˆ€ (s : โ„) (hs : 0 < s), Measure.pi (fun _ => D) {xs | โˆ‘ i, (indicator (xs i) - p) โ‰ค -(m : โ„) * t} โ‰ค ENNReal.ofReal (Real.exp (-(s * m * t) + m * s^2 / 8)) := by ... have optimize : Real.exp (-(4*t * m * t) + m * (4*t)^2 / 8) = Real.exp (-2 * m * t^2) := by ring_nf

    CAST ISSUES to watch:

    • m : โ„• needs cast to โ„ in the exponent: (m : โ„)
    • EmpiricalError returns โ„, TrueErrorReal returns โ„, good โ€” no ENNReal gap
    • The measure value is ENNReal, the bound exp(-2mtยฒ) is โ„โ‰ฅ0โˆž via ENNReal.ofReal

    References: SSBD Lemma B.3, Hoeffding (1963)

    โˆ€ {X : Type u} [inst : MeasurableSpace X] (D : MeasureTheory.Measure X) [MeasureTheory.IsProbabilityMeasure D]
      (h c : Concept X Bool) (m : โ„•),
      0 < m โ†’
        โˆ€ (t : โ„),
          0 < t โ†’
            t โ‰ค 1 โ†’
              MeasurableSet {x | h x โ‰  c x} โ†’
                (MeasureTheory.Measure.pi fun x => D)
                    {xs |
                      EmpiricalError X Bool h (fun i => (xs i, c (xs i))) (zeroOneLoss Bool) โ‰ค TrueErrorReal X h c D - t} โ‰ค
                  ENNReal.ofReal (Real.exp (-2 * โ†‘m * t ^ 2))
    Used by
  11. DeclbestAdvice.congr_simpDeclaration kindtheorem
    โˆ€ {X : Type u} [inst : MeasurableSpace X] {A : Type u_1} [inst_1 : Fintype A] [inst_2 : Nonempty A]
      (cand cand_1 : A โ†’ Concept X Bool),
      cand = cand_1 โ†’
        โˆ€ {m : โ„•} (Sval Sval_1 : Fin m โ†’ X ร— Bool), Sval = Sval_1 โ†’ bestAdvice cand Sval = bestAdvice cand_1 Sval_1
    Used by
  12. DeclMeasurableHypotheses.mem_measurableDeclaration kindtheorem
    โˆ€ {X : Type u} {inst : MeasurableSpace X} {C : ConceptClass X Bool} [self : MeasurableHypotheses X C],
      โˆ€ h โˆˆ C, Measurable h
    Used by
  13. Hypothesisa
    PACLearnableWithAdviceRegular X C A
  14. DefinitionAdviceEvalMeasurabledef

    Joint measurability of a sample-dependent advice learner's evaluation map.

    {X : Type u} โ†’ [MeasurableSpace X] โ†’ {A : Type u_1} โ†’ LearnerWithAdvice X Bool A โ†’ Prop
  15. DefinitionBatchLearnerstructure

    A batch learner (PAC paradigm): takes a finite sample, returns a hypothesis.

    Type u โ†’ Type v โ†’ Type (max u v)
  16. DefinitionBatchLearner.learndef

    The learning algorithm: given a sample, produce a hypothesis

    {X : Type u} โ†’ {Y : Type v} โ†’ BatchLearner X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Concept X Y
  17. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  18. DefinitionEmpiricalErrordef

    Empirical error: average loss on a finite sample.

    (X : Type u) โ†’ (Y : Type v) โ†’ Concept X Y โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ LossFunction Y โ†’ โ„
  19. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  20. DefinitionLearnerWithAdvicestructure

    A learner augmented with advice.

    Type u โ†’ Type v โ†’ Type u_1 โ†’ Type (max (max u u_1) v)
  21. DefinitionLearnerWithAdvice.learnWithAdvicedef

    Advice-augmented learning: advice โ†’ sample โ†’ hypothesis

    {X : Type u} โ†’ {Y : Type v} โ†’ {A : Type u_1} โ†’ LearnerWithAdvice X Y A โ†’ A โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Y) โ†’ Concept X Y
  22. DefinitionMeasurableHypothesesstructure

    Every concept in C is a measurable function. Krapp-Wirth precondition: ฮ“(h) โˆˆ ฮฃ_Z for all h โˆˆ H.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  23. DefinitionPACLearnabledef

    PAC (Probably Approximately Correct) learning. The central definition of computational learning theory.

    Sample space: Fin m โ†’ X with i.i.d. product measure D^m. Labels: derived deterministically from target concept c (realizable case). Error: D-probability of disagreement between learner output and c.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ Prop
  24. DefinitionPACLearnableWithAdviceRegulardef

    PAC learnability with finite advice, plus measurability for holdout validation.

    (X : Type u) โ†’ [MeasurableSpace X] โ†’ ConceptClass X Bool โ†’ (A : Type u_1) โ†’ [Fintype A] โ†’ [Nonempty A] โ†’ Prop
  25. DefinitionTrueErrordef

    True error (0-1 loss, realizable case): D-probability of disagreement. This is what PACLearnable's success event measures.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ ENNReal
  26. DefinitionTrueErrorRealdef

    True error in โ„: for use in bounds involving subtraction/absolute value. COUNTER-1 of TrueError. The toReal bridge loses information when the measure is โŠค.

    (X : Type u) โ†’ [inst : MeasurableSpace X] โ†’ Concept X Bool โ†’ Concept X Bool โ†’ MeasureTheory.Measure X โ†’ โ„
  27. DefinitionbestAdvicedef

    Choose the advice value with minimum validation empirical error.

    {X : Type u} โ†’
      [MeasurableSpace X] โ†’
        {A : Type u_1} โ†’ [Fintype A] โ†’ [Nonempty A] โ†’ (A โ†’ Concept X Bool) โ†’ {m : โ„•} โ†’ (Fin m โ†’ X ร— Bool) โ†’ A
  28. DefinitionsplitUsedEquivdef

    Split Fin (mโ‚ + mโ‚‚) โ†’ X into (Fin mโ‚ โ†’ X) ร— (Fin mโ‚‚ โ†’ X) measurably.

    {X : Type u} โ†’ [inst : MeasurableSpace X] โ†’ (mโ‚ mโ‚‚ : โ„•) โ†’ (Fin (mโ‚ + mโ‚‚) โ†’ X) โ‰ƒแต (Fin mโ‚ โ†’ X) ร— (Fin mโ‚‚ โ†’ X)
  29. DefinitionusedPrefixdef

    Extract the first mโ‚ + mโ‚‚ coordinates from a sample of size Nat.pair mโ‚ mโ‚‚.

    {X : Type u} โ†’ [MeasurableSpace X] โ†’ (mโ‚ mโ‚‚ : โ„•) โ†’ (Fin (Nat.pair mโ‚ mโ‚‚) โ†’ X) โ†’ Fin (mโ‚ + mโ‚‚) โ†’ X
  30. DefinitionzeroOneLossdef

    The 0-1 loss for classification.

    (Y : Type v) โ†’ [DecidableEq Y] โ†’ LossFunction Y

VC dimension of homogeneous linear halfspaces is exactly n (Cover 1965; Vapnikโ€“Chervonenkis). The class signClass (coordSpace n) of homogeneous linear halfspaces of โ„โฟ has VC dimension equal to the ambient dimension n: the Dudley bound gives โ‰ค n, and the n standard basis points are shattered, giving โ‰ฅ n.

DeclFLT.Halfspace.vcDim_halfspace_eq
โˆ€ (n : โ„•), VCDim (Fin n โ†’ โ„) (signClass (FLT.Halfspace.coordSpace n)) = โ†‘n
Layout
ThesisStepDefinition
vcDim_halfspace_eqtheoremvcDim_halfspace_letheoremvcDim_signClass_letheoremfinrank_coordSpacetheoremlinearIndependent_coordtheoremcoord_singletheoremfiniteDimensional_coordSpโ€ฆtheoremvcDim_halfspace_getheoremshatters_basisPointstheoremweighted_singletheoremweighted_mem_coordSpacetheoremsingle_mem_basisPointstheoremcard_basisPointstheoremsingle_injectivetheoremConceptClassdefConceptdefbasisPointsdefcoorddefcoordSpacedefShattersdefVCDimdefevalAtdefsignClassdef
  1. DeclFLT.Halfspace.vcDim_halfspace_eqDeclaration kindtheorem
    โˆ€ (n : โ„•), VCDim (Fin n โ†’ โ„) (signClass (FLT.Halfspace.coordSpace n)) = โ†‘n
    Uses
  2. DeclFLT.Halfspace.vcDim_halfspace_leDeclaration kindtheorem

    VC dimension of homogeneous linear halfspaces: the Dudley upper bound.

    The class of homogeneous linear halfspaces x โ†ฆ (0 < โŸจw, xโŸฉ) in โ„โฟ has VC dimension at most n. This is the canonical instance of Dudley's bound (vcDim_signClass_le): the underlying function space is coordSpace n, of dimension n. (Cover 1965; Vapnikโ€“Chervonenkis.)

    โˆ€ (n : โ„•), VCDim (Fin n โ†’ โ„) (signClass (FLT.Halfspace.coordSpace n)) โ‰ค โ†‘n
    Uses
    Used by
  3. DeclvcDim_signClass_leDeclaration kindtheorem

    Dudley's bound. The VC dimension of the linear sign class of a finite-dimensional subspace V โ‰ค (X โ†’ โ„) is at most dim V.

    โˆ€ {X : Type u} (V : Submodule โ„ (X โ†’ โ„)) [FiniteDimensional โ„ โ†ฅV], VCDim X (signClass V) โ‰ค โ†‘(Module.finrank โ„ โ†ฅV)
    Used by
  4. DeclFLT.Halfspace.finrank_coordSpaceDeclaration kindtheorem

    The dimension of the coordinate space is n. The coordinate functionals form the dual basis of โ„โฟ, so their span has dimension n.

    โˆ€ (n : โ„•), Module.finrank โ„ โ†ฅ(FLT.Halfspace.coordSpace n) = n
    Uses
    Used by
  5. DeclFLT.Halfspace.linearIndependent_coordDeclaration kindtheorem

    The coordinate functionals are linearly independent. They are the dual basis of the standard basis; concretely, evaluating a vanishing combination at each standard basis point Pi.single j 1 isolates the j-th coefficient.

    โˆ€ (n : โ„•), LinearIndependent โ„ (FLT.Halfspace.coord n)
    Uses
    Used by
  6. DeclFLT.Halfspace.coord_singleDeclaration kindtheorem

    Evaluating the i-th coordinate functional at the j-th standard basis point gives the identity matrix: coord n i (Pi.single j 1) = if i = j then 1 else 0.

    โˆ€ (n : โ„•) (i j : Fin n), FLT.Halfspace.coord n i (Pi.single j 1) = if i = j then 1 else 0
    Used by
  7. DeclFLT.Halfspace.finiteDimensional_coordSpaceDeclaration kindtheorem

    The coordinate space is finite-dimensional (it is the span of a finite family).

    โˆ€ (n : โ„•), FiniteDimensional โ„ โ†ฅ(FLT.Halfspace.coordSpace n)
    Used by
  8. DeclFLT.Halfspace.vcDim_halfspace_geDeclaration kindtheorem

    VC dimension of homogeneous linear halfspaces: the lower bound. The n standard basis points are shattered, so the VC dimension is at least n.

    โˆ€ (n : โ„•), โ†‘n โ‰ค VCDim (Fin n โ†’ โ„) (signClass (FLT.Halfspace.coordSpace n))
    Uses
    Used by
  9. DeclFLT.Halfspace.shatters_basisPointsDeclaration kindtheorem

    The standard basis points are shattered by homogeneous halfspaces. Given any labelling, the ยฑ1-weighted functional g x = โˆ‘ i, w i * x i with w i = ยฑ1 selected by the label realises it: g (Pi.single j 1) = w j, and 0 < w j iff the label is true.

    โˆ€ (n : โ„•), Shatters (Fin n โ†’ โ„) (signClass (FLT.Halfspace.coordSpace n)) (FLT.Halfspace.basisPoints n)
    Uses
    Used by
  10. DeclFLT.Halfspace.weighted_singleDeclaration kindtheorem

    A weighted functional evaluated at a standard basis point returns that point's weight: (โˆ‘ i, w i * (Pi.single j 1) i) = w j.

    โˆ€ (n : โ„•) (w : Fin n โ†’ โ„) (j : Fin n), โˆ‘ i, w i * Pi.single j 1 i = w j
    Used by
  11. DeclFLT.Halfspace.weighted_mem_coordSpaceDeclaration kindtheorem

    A ยฑ1-weighted coordinate functional belongs to the coordinate space. Concretely, for any weights w : Fin n โ†’ โ„, the functional x โ†ฆ โˆ‘ i, w i * x i is a member of coordSpace n.

    โˆ€ (n : โ„•) (w : Fin n โ†’ โ„), (fun x => โˆ‘ i, w i * x i) โˆˆ FLT.Halfspace.coordSpace n
    Used by
  12. DeclFLT.Halfspace.single_mem_basisPointsDeclaration kindtheorem

    Each standard basis point lies in basisPoints n.

    โˆ€ (n : โ„•) (i : Fin n), Pi.single i 1 โˆˆ FLT.Halfspace.basisPoints n
    Used by
  13. DeclFLT.Halfspace.card_basisPointsDeclaration kindtheorem

    There are exactly n standard basis points.

    โˆ€ (n : โ„•), (FLT.Halfspace.basisPoints n).card = n
    Uses
    Used by
  14. DeclFLT.Halfspace.single_injectiveDeclaration kindtheorem

    The map i โ†ฆ Pi.single i 1 is injective (the basis points are distinct).

    โˆ€ (n : โ„•), Function.Injective fun i => Pi.single i 1
    Used by
  15. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  16. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  17. DefinitionFLT.Halfspace.basisPointsdef

    The n standard basis points {Pi.single i 1 | i : Fin n} of โ„โฟ. These are the witnesses for the VC-dimension lower bound.

    (n : โ„•) โ†’ Finset (Fin n โ†’ โ„)
  18. DefinitionFLT.Halfspace.coorddef

    The i-th coordinate functional x โ†ฆ x i on Fin n โ†’ โ„, viewed as an element of the function space (Fin n โ†’ โ„) โ†’ โ„.

    (n : โ„•) โ†’ Fin n โ†’ (Fin n โ†’ โ„) โ†’ โ„
  19. DefinitionFLT.Halfspace.coordSpacedef

    The coordinate space: the span of the n coordinate functionals (fun x => x i) inside (Fin n โ†’ โ„) โ†’ โ„. This is the (dual) space of homogeneous linear functionals on โ„โฟ; its sign class is exactly the family of homogeneous linear halfspaces.

    (n : โ„•) โ†’ Submodule โ„ ((Fin n โ†’ โ„) โ†’ โ„)
  20. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  21. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  22. DefinitionevalAtdef

    Evaluation at a point x : X as a linear functional on V: g โ†ฆ (g : X โ†’ โ„) x.

    {X : Type u} โ†’ (V : Submodule โ„ (X โ†’ โ„)) โ†’ X โ†’ โ†ฅV โ†’โ‚—[โ„] โ„
  23. DefinitionsignClassdef

    The sign-pattern concept class of a subspace V โ‰ค (X โ†’ โ„): all concepts of the form x โ†ฆ decide (0 < g x) for some g โˆˆ V.

    {X : Type u} โ†’ Submodule โ„ (X โ†’ โ„) โ†’ ConceptClass X Bool

Assouad's dual VC bound. If VCDim X C โ‰ค d, then VCDim(dualClass C) โ‰ค 2^(d+1) โˆ’ 1.

DeclvcDim_dualClass_le
โˆ€ {X : Type u} {C : ConceptClass X Bool} {d : โ„•}, VCDim X C โ‰ค โ†‘d โ†’ VCDim (โ†‘C) (dualClass C) โ‰ค โ†‘(2 ^ (d + 1) - 1)
Layout
ThesisStepHypothesisDefinition
vcDim_dualClass_letheoremVCDim X C โ‰ค โ†‘dhddualClass_shatters_imp_shโ€ฆtheoremmem_cubeBitSlice_ifftheoremConceptClassdefConceptdefShattersdefVCDimdefcubeBitSlicedefcubeEmbeddingdefdualClassdef
  1. DeclvcDim_dualClass_leDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} {d : โ„•}, VCDim X C โ‰ค โ†‘d โ†’ VCDim (โ†‘C) (dualClass C) โ‰ค โ†‘(2 ^ (d + 1) - 1)
    Uses
  2. DecldualClass_shatters_imp_shattersDeclaration kindtheorem

    Assouad's coding lemma. If the dual class shatters a set S of concepts with 2^(d+1) โ‰ค S.card, then C shatters some set of d + 1 points.

    Index 2^(d+1) of the shattered concepts by bitstrings; for each coordinate k, dual shattering realizes the labelling "is this codeword in the k-th bit slice", which supplies a point x k reading off exactly that bit. These d + 1 points are then shattered by C.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {d : โ„•} (S : Finset โ†‘C),
      Shatters (โ†‘C) (dualClass C) S โ†’ 2 ^ (d + 1) โ‰ค S.card โ†’ โˆƒ T, T.card = d + 1 โˆง Shatters X C T
    Uses
    Used by
  3. Declmem_cubeBitSlice_iffDeclaration kindtheorem

    Codeword (cube b).val is in cubeBitSlice cube k iff b k = true.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {n : โ„•} {S : Finset โ†‘C} (cube : (Fin n โ†’ Bool) โ†ช โ†ฅS) (b : Fin n โ†’ Bool)
      (k : Fin n), โ†‘(cube b) โˆˆ cubeBitSliceโœ cube k โ†” b k = true
    Used by
  4. Hypothesishd
    VCDim X C โ‰ค โ†‘d
  5. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  6. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  7. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  8. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  9. DefinitioncubeBitSlicedef

    The image of {b : Fin n โ†’ Bool | b k = true} under a cube embedding: the codewords whose k-th bit is set.

    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ {n : โ„•} โ†’ {S : Finset โ†‘C} โ†’ ((Fin n โ†’ Bool) โ†ช โ†ฅS) โ†’ Fin n โ†’ Finset โ†‘C
  10. DefinitioncubeEmbeddingdef

    Embedding (Fin n โ†’ Bool) โ†ช โ†ฅS when 2 ^ n โ‰ค S.card, via (Fin n โ†’ Bool) โ‰ƒ Fin (2 ^ n) โ†ช Fin S.card โ‰ƒ โ†ฅS.

    {X : Type u} โ†’ {C : ConceptClass X Bool} โ†’ {n : โ„•} โ†’ (S : Finset โ†‘C) โ†’ 2 ^ n โ‰ค S.card โ†’ (Fin n โ†’ Bool) โ†ช โ†ฅS
  11. DefinitiondualClassdef

    The dual concept class: each point x : X gives the evaluation concept c โ†ฆ c x on the new domain โ†ฅC. The dual class collects these over all points.

    {X : Type u} โ†’ (C : ConceptClass X Bool) โ†’ ConceptClass (โ†‘C) Bool

Assouad's lower bound. For a finite-VC class, โŒŠlogโ‚‚ VCDimโŒ‹ โ‰ค VCDim(dualClass): the exponential blow-up under dualization is necessary, not merely permitted. Together with the proven upper bound vcDim_dualClass_le (VCDim(dual) โ‰ค 2^(VCDim+1) โˆ’ 1) this sandwiches the dual VC dimension between โŒŠlogโ‚‚ dโŒ‹ and 2^(d+1) โˆ’ 1.

Stated with d := VCDim C extracted as a natural number (finite by hypothesis). The proof picks a shattered set T with 2^(logโ‚‚ d) โ‰ค |T| (which exists because 2^(logโ‚‚ d) โ‰ค d โ‰ค |T| for the supremal shattered set) and applies pow_le_vcDim_imp_le_vcDim_dualClass.

Decllogโ‚‚_vcDim_le_vcDim_dualClass
โˆ€ {X : Type u} {C : ConceptClass X Bool} {d : โ„•}, VCDim X C = โ†‘d โ†’ 0 < d โ†’ โ†‘(Nat.log 2 d) โ‰ค VCDim (โ†‘C) (dualClass C)
Layout
ThesisStepHypothesisDefinition
logโ‚‚_vcDim_le_vcDim_dualCโ€ฆtheoremVCDim X C = โ†‘dhd0 < dhd0pow_le_vcDim_imp_le_vcDimโ€ฆtheoremevalConcept_memtheoremConceptClassdefConceptdefShattersdefVCDimdefdualClassdefevalConceptdef
  1. Decllogโ‚‚_vcDim_le_vcDim_dualClassDeclaration kindtheorem
    โˆ€ {X : Type u} {C : ConceptClass X Bool} {d : โ„•}, VCDim X C = โ†‘d โ†’ 0 < d โ†’ โ†‘(Nat.log 2 d) โ‰ค VCDim (โ†‘C) (dualClass C)
    Uses
  2. Declpow_le_vcDim_imp_le_vcDim_dualClassDeclaration kindtheorem

    Assouad's lower construction. If C shatters a set T of at least 2^k points, then dualClass C shatters a set of k evaluation concepts, so k โ‰ค VCDim(dualClass C).

    Bitstrings index a 2^k-subset of T; coordinate j is realized by a concept c_j โˆˆ C reading off the j-th bit, and the dual class shatters {c_j} because the evaluation point indexed by a bitstring ฯƒ realizes exactly the labelling ฯƒ of the c_j.

    โˆ€ {X : Type u} {C : ConceptClass X Bool} {k : โ„•} (T : Finset X),
      Shatters X C T โ†’ 2 ^ k โ‰ค T.card โ†’ โ†‘k โ‰ค VCDim (โ†‘C) (dualClass C)
    Uses
    Used by
  3. DeclevalConcept_memDeclaration kindtheorem

    Each evaluation concept belongs to the dual class.

    โˆ€ {X : Type u} (C : ConceptClass X Bool) (x : X), evalConcept C x โˆˆ dualClass C
    Used by
  4. Hypothesishd
    VCDim X C = โ†‘d
  5. Hypothesishd0
    0 < d
  6. DefinitionConceptClassdef

    A concept class is a set of concepts. Used by every paradigm, complexity measure, and criterion.

    Primary definition: Set of functions. Used for PAC/agnostic PAC where concept classes are sets over which VC dimension, Rademacher complexity, covering numbers, etc. are measured. Alternative definitions below for contexts requiring decidability, enumerability, or measurability.

    Type u โ†’ Type v โ†’ Type (max v u)
  7. DefinitionFLT.Conceptdef

    A concept is a function from domain to label. This is the atomic unit that concept classes collect and learners try to approximate.

    Type u โ†’ Type v โ†’ Type (max u v)
  8. DefinitionShattersdefYaรซl Dillies

    A set S โІ X is shattered by concept class C if every labeling of S is realized by some concept in C.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ Finset X โ†’ Prop
  9. DefinitionVCDimdef

    VC dimension of a concept class: the size of the largest shattered set. Returns โ„•โˆž = WithTop โ„•.

    (X : Type u) โ†’ ConceptClass X Bool โ†’ WithTop โ„•
  10. DefinitiondualClassdef

    The dual concept class: each point x : X gives the evaluation concept c โ†ฆ c x on the new domain โ†ฅC. The dual class collects these over all points.

    {X : Type u} โ†’ (C : ConceptClass X Bool) โ†’ ConceptClass (โ†‘C) Bool
  11. DefinitionevalConceptdef

    The evaluation concept at a point x: the map c โ†ฆ c x on โ†ฅC.

    {X : Type u} โ†’ (C : ConceptClass X Bool) โ†’ X โ†’ โ†‘C โ†’ Bool