Lean module · Foundations
BanditRLProof.LowerBounds.ArithmeticBlockCoding
Generated source map for this Lean module.
Module map
Imports
BanditRLProof.LowerBounds.ArithmeticZeroExtension
Imported by
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
def
BanditRLProof.LowerBounds.sourceBlockList
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.sourceBlockListReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def sourceBlockList {α : Type*} : (n : ℕ) → SourceBlock α n → List α | 0, _ => [] | n + 1, x => x.1 :: sourceBlockList n x.2 theorem sourceBlockList_length {α : Type*} (n : ℕ) (x : SourceBlock α n) : (sourceBlockList n x).length = n
theorem
BanditRLProof.LowerBounds.sourceBlockList_length
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.sourceBlockList_lengthReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sourceBlockList_length {α : Type*} (n : ℕ) (x : SourceBlock α n) : (sourceBlockList n x).length = n
theorem
BanditRLProof.LowerBounds.sourceBlockList_injective
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.sourceBlockList_injectiveReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sourceBlockList_injective {α : Type*} (n : ℕ) : Function.Injective (sourceBlockList (α := α) n)
theorem
BanditRLProof.LowerBounds.sourceBlockList_mass
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.sourceBlockList_massReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sourceBlockList_mass {α : Type*} (p : α → ℝ) (n : ℕ) (x : SourceBlock α n) : ((sourceBlockList n x).map p).prod = sourceBlockMass p n x
theorem
BanditRLProof.LowerBounds.exists_arithmeticBlockSupport
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.exists_arithmeticBlockSupportReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem exists_arithmeticBlockSupport {k : ℕ} (p : Fin k → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) (n : ℕ) : ∃ positive : BinaryPrefixCode {x : SourceBlock.{0,0} (Fin k) n // 0 < sourceBlockMass p n x}, (∀ x, (positive.encode x).length = arithmeticLength (sourceBlockMass p n x.val)) ∧ (∀ x, (arithmeticInterval p (sourceBlockList n x.val)).1 ≤ dyadicAddressLower (positive.encode x) ∧ dyadicAddressUpper (positive.encode x) < (arithmeticInterval p (sourceBlockList n x.val)).2) ∧ expectedCodeLength (sourceBlockMass p n) (positive.extendZeroMass (sourceBlockMass p n) (huffmanCode (sourceBlockMass p n) (sourceBlockMass_nonneg p hp n))) ≤ n * discreteEntropyBaseTwo Finset.univ p + 3
def
BanditRLProof.LowerBounds.arithmeticBlockCode
Compiled
The named arithmetic block code: interval addresses on positive blocks, with the one-bit tagged fallback on zero-mass blocks.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.arithmeticBlockCodeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def arithmeticBlockCode {k : ℕ} (p : Fin k → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) (n : ℕ) : BinaryPrefixCode (SourceBlock.{0,0} (Fin k) n)
theorem
BanditRLProof.LowerBounds.arithmeticBlockCode_expected_length_le
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.arithmeticBlockCode_expected_length_leReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem arithmeticBlockCode_expected_length_le {k : ℕ} (p : Fin k → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) (n : ℕ) : expectedCodeLength (sourceBlockMass p n) (arithmeticBlockCode p hp hs n) ≤ n * discreteEntropyBaseTwo Finset.univ p + 3
theorem
BanditRLProof.LowerBounds.arithmeticBlockCode_payload_interval
Compiled
Removing the support tag from a positive block yields an address inside its actual arithmetic interval. This property belongs to the named code, not merely to an unrelated witness with the same length.
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.arithmeticBlockCode_payload_intervalReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem arithmeticBlockCode_payload_interval {k : ℕ} (p : Fin k → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) (n : ℕ) (x : SourceBlock.{0,0} (Fin k) n) (hx : 0 < sourceBlockMass p n x) : (arithmeticInterval p (sourceBlockList n x)).1 ≤ dyadicAddressLower ((arithmeticBlockCode p hp hs n).encode x).tail ∧ dyadicAddressUpper ((arithmeticBlockCode p hp hs n).encode x).tail < (arithmeticInterval p (sourceBlockList n x)).2
theorem
BanditRLProof.LowerBounds.arithmeticBlockCode_rate_sandwich
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.arithmeticBlockCode_rate_sandwichReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem arithmeticBlockCode_rate_sandwich {k : ℕ} (p : Fin k → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) (n : ℕ) (hn : 0 < n) : discreteEntropyBaseTwo Finset.univ p ≤ expectedCodeLength (sourceBlockMass p n) (arithmeticBlockCode p hp hs n) / n ∧ expectedCodeLength (sourceBlockMass p n) (arithmeticBlockCode p hp hs n) / n ≤ discreteEntropyBaseTwo Finset.univ p + 3 / n
theorem
BanditRLProof.LowerBounds.arithmeticBlockCode_rate_tendsto_entropy
Compiled
The constructed arithmetic code's expected bits per symbol tend to entropy, including sources with zero-probability symbols.
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.arithmeticBlockCode_rate_tendsto_entropyReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem arithmeticBlockCode_rate_tendsto_entropy {k : ℕ} (p : Fin k → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : Filter.Tendsto (fun n : ℕ => expectedCodeLength (sourceBlockMass p (n + 1)) (arithmeticBlockCode p hp hs (n + 1)) / (n + 1)) Filter.atTop (nhds (discreteEntropyBaseTwo Finset.univ p))