Catalog.VC.EasyEpsilonNetLemma
Lemma
Let \(X\) be a set, \(\mu\) a probability measure on \(X\), and \(\mathcal{S}\) a finite system of \(\mu\)-measurable subsets of \(X\) with \(|\mathcal{S}| \ge 2\). Then for every real number \(r > 1\), there exists a \(\frac{1}{r}\)-net (Definition EpsilonNet) \(N\) for \((X, \mathcal{S})\) with respect to \(\mu\) satisfying \[|N| \le r \ln |\mathcal{S}| + 1.\]
Review notes
Matoušek Lemma 5.11: the “easy” \(\varepsilon\)-net bound.
The statement uses Real.log (natural logarithm) to match the
source’s \(\ln |\mathcal{S}|\). The Lean contract uses
\(|N| \le r \ln |\mathcal{A}| + 1\), where \(|\mathcal{A}|\) is the number of
sets in the family.
The source states the cleaner inequality \(|N| \le r \ln |\mathcal{S}|\), but its proof immediately chooses an integer sample size \(s = \lceil r \ln |\mathcal{S}| \rceil\). In Lean, the net is a finite set, so the honest conclusion from that argument is \(|N| \le s \le r \ln |\mathcal{A}| + 1\). The stronger contract without the additive \(1\) is false on small finite examples; for instance, on a two-point ground set with family \(\{\{x\}, \{y\}\}\) and \(r = 2\), every \(\frac{1}{2}\)-net has size \(2 > 2 \ln 2\).
The hypothesis \(|\mathcal{A}| \ge 2\) is added because \(r \ln 1 = 0\) would force the net to be empty, which fails when the single set is heavy. The source omits this edge case. Downstream usage (Theorem 5.12) always applies this lemma to families with \(|\mathcal{A}| \ge 2\).
The proof is a probabilistic (union bound) argument: sample \(\lceil r \ln |\mathcal{A}| \rceil\) points independently from the uniform distribution, and show via \((1 - 1/r)^s < e^{-s/r}\) that some sample hits every heavy set.
The bound depends on \(|\mathcal{A}|\) (number of sets), not on the
VC-dimension. The VC-dimension enters only in
Catalog.VC.EpsilonNetTheorem, which improves the bound to \(O(r \ln r)\).
Catalog/VC/EasyEpsilonNetLemma/Contract.lean (full)
| 1 | import Catalog.VC.EpsilonNet.Contract |
| 2 | import Mathlib.Analysis.SpecialFunctions.Log.Basic |
| 3 | |
| 4 | namespace Catalog.VC.EasyEpsilonNetLemma |
| 5 | |
| 6 | /-- For any finite set family and `r > 1`, there exists a `(1/r)`-net of size |
| 7 | at most `r · ln |𝒜| + 1`. (Lemma 5.11) -/ |
| 8 | axiom easyEpsilonNetLemma {α : Type*} [DecidableEq α] [Fintype α] |
| 9 | (𝒜 : Finset (Finset α)) (h𝒜 : 2 ≤ 𝒜.card) {r : ℝ} (hr : 1 < r) : |
| 10 | ∃ N : Finset α, Catalog.VC.EpsilonNet.IsEpsilonNet 𝒜 (1 / r) N ∧ |
| 11 | (N.card : ℝ) ≤ r * Real.log (𝒜.card : ℝ) + 1 |
| 12 | |
| 13 | end Catalog.VC.EasyEpsilonNetLemma |
| 14 |