Documentation

LeanPool.ArithmeticTriangleRemovalInVectorSpaces.Construction.TypeClass

The size of a type class #

The type class of a : Fin n → ℕ is the set of the vectors a ∘ σ obtained by permuting its entries. If the value k appears D k times in a, the type class has n.factorial / ∏ k, (D k).factorial elements. This file bounds the logarithm of this number from below by ∑ k, D k * log (ψ k)⁻¹, up to an error controlled by ∑ k, (D k - n * ψ k) ^ 2 / (n * ψ k), for every positive probability vector ψ. This is Lemma 3.1 of Kleinberg, Sawin and Speyer, together with the comparison between entropy and cross entropy.

Main definitions #

Main statements #

The type class of a: the vectors a ∘ σ obtained by permuting the entries of a.

Equations
Instances For
    theorem ArithmeticTriangleRemovalInVectorSpaces.exists_eq_comp_of_mem_typeClass {n : ℕ} {a b b' : Fin n → ℕ} (hb : b ∈ typeClass a) (hb' : b' ∈ typeClass a) :
    ∃ (σ : Equiv.Perm (Fin n)), b' = b ∘ ⇑σ
    theorem ArithmeticTriangleRemovalInVectorSpaces.sum_eq_of_mem_typeClass {n : ℕ} {a b : Fin n → ℕ} (hb : b ∈ typeClass a) :
    ∑ r : Fin n, b r = ∑ r : Fin n, a r
    theorem ArithmeticTriangleRemovalInVectorSpaces.card_typeClass_le {n : ℕ} {a : Fin n → ℕ} {p : ℕ} (ha : ∀ (r : Fin n), a r < p) :
    theorem ArithmeticTriangleRemovalInVectorSpaces.sum_card_filter_eq {n N : ℕ} {a : Fin n → ℕ} (ha : ∀ (r : Fin n), a r ≤ N) :
    ∑ k ∈ Finset.range (N + 1), {r : Fin n | a r = k}.card = n

    The values k ≤ N of a appear n times in total.

    theorem ArithmeticTriangleRemovalInVectorSpaces.le_log_card_typeClass {n N : ℕ} (a : Fin n → ℕ) (ha : ∀ (r : Fin n), a r ≤ N) {ψ : ℕ → ℝ} (hψ : ∀ k ∈ Finset.range (N + 1), 0 < ψ k) (hψ₁ : ∑ k ∈ Finset.range (N + 1), ψ k = 1) :
    ∑ k ∈ Finset.range (N + 1), ↑{r : Fin n | a r = k}.card * Real.log (ψ k)⁻¹ - ∑ k ∈ Finset.range (N + 1), (↑{r : Fin n | a r = k}.card - ↑n * ψ k) ^ 2 / (↑n * ψ k) - (↑N + 1) * (1 + Real.log (↑n + 1)) ≤ Real.log ↑(typeClass a).card

    Lower bound for the size of a type class. If the value k ≤ N appears D k times in a : Fin n → ℕ and ψ is a positive probability vector on range (N + 1), then log #(typeClass a) is at least ∑ k, D k * log (ψ k)⁻¹ - ∑ k, (D k - n * ψ k) ^ 2 / (n * ψ k) - (N + 1) * (1 + log (n + 1)).