Documentation

LeanPool.AutoconvolutionSharpness.Digits

Heights and mass of the maximal - height blocks #

The arguments follow Crmarić, Kovač, and Rupčić, §2. The collision estimate is proved by the falling - factorial recurrence, so no probability space is needed.

Mathlib supplies the multinomial formula and the relation between falling factorials and binomial coefficients. See the individual proofs for the declarations used.

theorem Autoconvolutions.Digits.multinomial_le_fact {ι : Type u_1} (I : Finset ι) (a : ι → ℕ) :
Nat.multinomial I a ≤ (∑ i ∈ I, a i).factorial

A bound independent of the multiplicities, including repeated choices.

theorem Autoconvolutions.Digits.multinomial_of_distinct {ι : Type u_1} (I : Finset ι) (a : ι → ℕ) (ha : ∀ i ∈ I, a i ≤ 1) :
Nat.multinomial I a = (∑ i ∈ I, a i).factorial

If every occupied digit was chosen only once, the bound is attained.

Proportion of ordered strings with no repeated letter.

Equations
Instances For
    theorem Autoconvolutions.Digits.distinctFraction_recurrence {r : ℕ} (hr : 0 < r) (k : ℕ) :
    ↑r * distinctFraction r k = ↑r * distinctFraction r (k + 1) + ↑k * distinctFraction r k

    Extending a distinct string of length k has exactly r - k available choices. The equality also holds when k exceeds the alphabet size.

    theorem Autoconvolutions.Digits.collision_bound {r : ℕ} (hr : 0 < r) (k : ℕ) :
    2 * ↑r * (1 - distinctFraction r k) ≤ ↑k ^ 2

    Twice the alphabet size times the collision probability is at most k². The sharp intermediate bound k(k - 1) is unnecessary for the final constant.

    theorem Autoconvolutions.Digits.good_fraction {r b n u v : ℕ} (hn : 0 < n) (hb : 8 * n ^ 3 ≤ b) (hbr : b ≤ r) (huv : u + v = 4 * n) :

    The paper's good - block estimate, with the numbers of draws named u,v. At level s use u=2n - s, v=2n + s.

    theorem Autoconvolutions.Digits.good_mass {r b n u v : ℕ} (hn : 0 < n) (hb : 8 * n ^ 3 ≤ b) (hbr : b ≤ r) (huv : u + v = 4 * n) :
    (1 - 1 / ↑n) * (↑r ^ u * ↑b ^ v) ≤ ↑(r.choose u) * ↑(b.choose v) * ↑u.factorial * ↑v.factorial

    Algebraic form of equation (mass), including its factorial and binomial factors. Neither side involves floating - point arithmetic.