VC-dimensions of nondeterministic finite automata for words of equal length #
Definition 10, Lemma 11, and Lemma 12 from the paper.
(Bonus material for ac-exercises)
To make this computable, restrict A ⊆ ⋃ 𝓕
Instances For
instance
instDecidableEqFinsetInter_acmoi
{V : Type u_1}
[DecidableEq V]
(A : Finset V)
(B : Finset V)
(C : Finset V)
:
Equations
- instDecidableEqFinsetInter_acmoi A B C = decEq (A ∩ C) B
instance
instDecidableEqFinset_acmoi
{V : Type u_1}
[DecidableEq V]
(𝓕 : Finset (Finset V))
(𝓖 : Finset (Finset V))
:
Equations
- instDecidableEqFinset_acmoi 𝓕 𝓖 = decEq 𝓕 𝓖
instance
instDecidableExistsFinsetAndMemEqInter_acmoi
{V : Type u_1}
[DecidableEq V]
(A : Finset V)
(B : Finset V)
(𝓕 : Finset (Finset V))
:
Equations
- instDecidableExistsFinsetAndMemEqInter_acmoi A B 𝓕 = Multiset.decidableExistsMultiset
instance
instDecidableForallForallSubsetFinsetExistsAndMemEqInter_acmoi
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(A : Finset V)
(𝓕 : Finset (Finset V))
:
Equations
- instDecidableForallForallSubsetFinsetExistsAndMemEqInter_acmoi A 𝓕 = Fintype.decidableForallFintype
instance
instDecidableAndEqNatCardForallForallSubsetFinsetExistsMemInter_acmoi
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(A : Finset V)
(𝓕 : Finset (Finset V))
(d : ℕ)
:
Equations
- instDecidableAndEqNatCardForallForallSubsetFinsetExistsMemInter_acmoi A 𝓕 d = instDecidableAnd
instance
instDecidableShatters_card
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(𝓕 : Finset (Finset V))
(d : ℕ)
:
Decidable (shatters_card 𝓕 d)
Equations
- instDecidableShatters_card 𝓕 d = id Fintype.decidableExistsFintype
theorem
nonempty_shatters
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(𝓕 : Finset (Finset V))
{A : Finset V}
(hA : A ∈ 𝓕)
:
shatters_card 𝓕 0
theorem
filter_condition
{V : Type u_1}
(𝓕 : Finset (Finset V))
(condition : Finset (Finset V) → ℕ → Prop)
[DecidablePred (condition 𝓕)]
(h₀ : 0 < 𝓕.card)
(h₁ : condition 𝓕 0)
:
0 ∈ Finset.filter (fun (k : ℕ) => condition 𝓕 k) (Finset.range 𝓕.card)
theorem
equivVC
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(F : Finset (Finset V))
:
0 < F.card ↔ shatters_card F 0
theorem
VC_filter
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(F : Finset (Finset V))
(h₀ : 0 < F.card)
:
0 ∈ Finset.filter (fun (k : ℕ) => shatters_card F k) (Finset.range F.card)
TODO: Simplify since the two assumptions are equivalent.
def
dimVC
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(𝓕 : { 𝓕 : Finset (Finset V) // ∃ (f : Finset V), f ∈ 𝓕 })
:
The VC dimension of a finite set family.
Equations
- dimVC 𝓕 = (Finset.filter (shatters_card ↑𝓕) (Finset.range (↑𝓕).card)).max' ⋯
Instances For
theorem
shatters_monotone
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(𝓕 : { 𝓕 : Finset (Finset V) // ∃ (f : Finset V), f ∈ 𝓕 })
(k : ℕ)
(l : ℕ)
(h : k ≤ l)
(h₀ : shatters_card (↑𝓕) l)
:
shatters_card (↑𝓕) k
theorem
card_of_injective
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(F : Finset (Finset V))
(A : Finset V)
(φ : { B : Finset V // B ⊆ A } → { C : Finset V // C ∈ F })
(h : Function.Injective φ)
:
A.powerset.card ≤ F.card
Lean 3 version thanks to Adam Topaz.
theorem
pow_le_of_shatters
{V : Type u_1}
[DecidableEq V]
[Fintype V]
(F : Finset (Finset V))
(k : ℕ)
(h : shatters_card F k)
:
Equations
- hammingBits n = (List.map Bool.toNat n.bits).sum