Catalog/VC/DualShatterFunction/Full.lean
1import Mathlib.Combinatorics.SetFamily.Shatter
2
3namespace Catalog.VC.DualShatterFunction
4
5variable {ฮฑ : Type*} [DecidableEq ฮฑ]
6
7/-- The atom map of a subfamily `๐’ด` at point `x`: the set of members
8 of `๐’ด` that contain `x`. Two points `x, y` have the same atom map
9 iff they belong to exactly the same sets of `๐’ด`. -/
10def atomMap (๐’ด : Finset (Finset ฮฑ)) (x : ฮฑ) : Finset (Finset ฮฑ) :=
11 ๐’ด.filter (x โˆˆ ยท)
12
13/-- The dual shatter function `ฯ€*_๐’œ(m)`: the maximum number of distinct
14 atom types induced by any `m`-element subfamily of `๐’œ`.
15 Equivalently, the maximum number of nonempty cells in the Venn diagram
16 of `m` sets chosen from `๐’œ`. (Def 5.2) -/
17def dualShatterFun [Fintype ฮฑ] (๐’œ : Finset (Finset ฮฑ)) (m : โ„•) : โ„• :=
18 (๐’œ.powerset.filter (fun ๐’ด => ๐’ด.card = m)).sup
19 (fun ๐’ด => (Finset.univ.image (atomMap ๐’ด)).card)
20
21end Catalog.VC.DualShatterFunction
22