Lean module · Foundations
BanditRLProof.LowerBounds.HuffmanConstruction
Generated source map for this Lean module.
Module map
Imports
BanditRLProof.LowerBounds.HuffmanAlphabet
Imported by
BanditRLProof, BanditRLProof.LowerBounds.ArithmeticZeroExtension
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
theorem
BanditRLProof.LowerBounds.oneBitCode_optimal
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.oneBitCode_optimalReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem oneBitCode_optimal {α : Type*} [Fintype α] (p : α → ℝ) (hp : ∀ i, 0 ≤ p i) (code : BinaryPrefixCode α) (hlen : ∀ i, (code.encode i).length = 1) : IsOptimalPrefixCode p code
def
BanditRLProof.LowerBounds.emptyRemainderRoot
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.emptyRemainderRootReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def emptyRemainderRoot {α : Type*} [IsEmpty α] : BinaryPrefixCode (α ⊕ Bool) where
def
BanditRLProof.LowerBounds.huffmanOptimalCode
Compiled
Huffman's recursive merge-two-least construction, with its correctness proof. Real-weight choices are classical; the code itself is assembled recursively.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.huffmanOptimalCodeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def huffmanOptimalCode {α : Type*} [Fintype α] (p : α → ℝ) (hp : ∀ i, 0 ≤ p i) : {code : BinaryPrefixCode α // IsOptimalPrefixCode p code}
def
BanditRLProof.LowerBounds.huffmanCode
Compiled
The prefix code produced by recursive Huffman merging.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.huffmanCodeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def huffmanCode {α : Type*} [Fintype α] (p : α → ℝ) (hp : ∀ i, 0 ≤ p i) : BinaryPrefixCode α
theorem
BanditRLProof.LowerBounds.huffmanCode_optimal
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret · Chapter 14: Foundations of Information Theory
Canonical node identity
declaration:BanditRLProof.LowerBounds.huffmanCode_optimalReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem huffmanCode_optimal {α : Type*} [Fintype α] (p : α → ℝ) (hp : ∀ i, 0 ≤ p i) : IsOptimalPrefixCode p (huffmanCode p hp)
theorem
BanditRLProof.LowerBounds.huffmanCode_entropy_sandwich
Compiled
Chapter 14, Eq. (14.2), for the recursively constructed Huffman code.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret · Chapter 14: Foundations of Information Theory
Canonical node identity
declaration:BanditRLProof.LowerBounds.huffmanCode_entropy_sandwichReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem huffmanCode_entropy_sandwich {α : Type*} [Fintype α] (p : α → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : discreteEntropyBaseTwo Finset.univ p ≤ expectedCodeLength p (huffmanCode p hp) ∧ expectedCodeLength p (huffmanCode p hp) ≤ discreteEntropyBaseTwo Finset.univ p + 1