Finset Shatters to Set Shatters
Finset.Shatters.toSetShatters
Plain-language statement
If a finite set family 𝒜 shatters a finite set s in the sense of Mathlib's Finset.Shatters, then the concept class of characteristic functions of sets in 𝒜 shatters ↑s in the sense of SetShatters. This bridges Mathlib's finset-based shattering to the predicate used by the PAC learning lower bounds.
Exact Lean statement
theorem _root_.Finset.Shatters.toSetShatters {𝒜 : Finset (Finset α)} {s : Finset α}
(h : 𝒜.Shatters s) :
SetShatters
{c : α → Bool | ∃ t ∈ 𝒜, ∀ x, c x = decide (x ∈ t)} ↑sFormal artifact
Lean source
theorem _root_.Finset.Shatters.toSetShatters {𝒜 : Finset (Finset α)} {s : Finset α} (h : 𝒜.Shatters s) : SetShatters {c : α → Bool | ∃ t ∈ 𝒜, ∀ x, c x = decide (x ∈ t)} ↑s := by intro W' hW' have hfin : Set.Finite W' := s.finite_toSet.subset hW' set t := hfin.toFinset have ht_eq : (↑t : Set α) = W' := hfin.coe_toFinset have ht_sub : t ⊆ s := Finset.coe_subset.mp (ht_eq ▸ hW') obtain ⟨u, hu, hsu⟩ := h ht_sub have hut : u ∩ s = t := by rwa [Finset.inter_comm] at hsu refine ⟨fun x => decide (x ∈ u), ⟨u, hu, fun _ => rfl⟩, ?_⟩ rw [← ht_eq] ext x simp only [mem_inter_iff, mem_preimage, mem_singleton_iff, decide_eq_true_eq, Finset.mem_coe] exact ⟨fun ⟨h1, h2⟩ => hut ▸ Finset.mem_inter.mpr ⟨h1, h2⟩, fun h => Finset.mem_inter.mp (hut.symm ▸ h)⟩- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/MachineLearning/PACLearning/VCDimension.lean:86-103
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Unique minimal
Cslib.Automata.DA.FinAcc.unique_minimal
Plain-language statement
The minimal DFA M accepting the language l is unique up to unique isomorphism.
Source project: Lean Computer Science Library
Person-level attribution pending.
Buchi Family cover
Cslib.Automata.NA.Buchi.buchiFamily_cover
Project documentation
na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.
Source project: Lean Computer Science Library
Person-level attribution pending.
Buchi Family saturation
Cslib.Automata.NA.Buchi.buchiFamily_saturation
Plain-language statement
na.buchiFamily saturates the ω-language accepted by na.
Source project: Lean Computer Science Library
Person-level attribution pending.