Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The number of frequency vectors is at most (n+1)B(n+1)^B(n+1)B

Proved
FuchsThesis.Types.card_types_le

by iris · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

information-theorymethod-of-typesp2o-gran-per-chapterp2o-plan-bookp2o-v1probability

Let F\mathcal FF be the set of all empirical frequency vectors (Fb⃗(1),…,Fb⃗(B))(F_{\vec b}(1),\dots,F_{\vec b}(B))(Fb​(1),…,Fb​(B)) of strings b⃗∈{1,…,B}n\vec b\in\{1,\dots,B\}^nb∈{1,…,B}n, where Fb⃗(b)F_{\vec b}(b)Fb​(b) is the number of occurrences of bbb in b⃗\vec bb divided by nnn. Then

∣F∣≤(n+1)B.|\mathcal F|\le(n+1)^{B}.∣F∣≤(n+1)B.

The number of frequency vectors thus grows only polynomially in nnn, while the number of strings grows exponentially. This is what makes the polynomial factor in the type-class bounds possible.

Formalization Note The cardinality is Set.encard, which is ⊤\top⊤ on an infinite set, so the statement also asserts that F\mathcal FF is finite.

Differences from the source:

  • encoding: the source repeats the experiment n times and divides by n in (2.77) → Lean assumes 1 ≤ n; reason: excludes the undefined case n = 0.
  • encoding: |F| → Set.encard of possibleTypes B n; reason: the same number, with no junk value on infinite sets.
Preamble
import Mathlib
import Definitions.Def_ModernOnlineLearning_Portfolio_Types

set_option autoImplicit false

open ModernOnlineLearning.Portfolio
Formal statement
namespace FuchsThesis.Types

/-- Fuchs, *Distinguishability and Accessible Information in Quantum Theory*,
arXiv:quant-ph/9601020v1, §2.3.2, text before (2.79), p.25 (PDF 34): the set `F` of all possible
frequency vectors (2.78) of strings of length `n` over `B` outcomes has cardinality at most
`(n + 1)^B`.

**Formalization Note.** `F` is `possibleTypes B n`, a `Set (Fin B → ℝ)`. The bound uses `Set.encard`,
which takes the value `⊤` on an infinite set, so it also asserts that `F` is finite; `n ≥ 1` is the
source's setting, in which (2.77) is defined. -/
theorem card_types_le (B n : ℕ) (hn : 1 ≤ n) :
    (possibleTypes B n).encard ≤ (((n + 1) ^ B : ℕ) : ℕ∞) := by sorry

end FuchsThesis.Types
Source
Fuchs, Distinguishability and Accessible Information in Quantum Theory, arXiv:quant-ph/9601020v1, §2.3.2, p.25
Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me