Lean module · Foundations
BanditRLProof.LowerBounds.PrefixCodeSiblings
Generated source map for this Lean module.
Module map
Imports
BanditRLProof.LowerBounds.PrefixCodeExchange
Imported by
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
theorem
BanditRLProof.LowerBounds.BinaryPrefixCode.extended_prefix_parent_eq
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.BinaryPrefixCode.extended_prefix_parent_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem BinaryPrefixCode.extended_prefix_parent_eq {α : Type*} (code : BinaryPrefixCode α) (a b : α) (u v : List Bool) (h : code.encode a ++ u <+: code.encode b ++ v) : a = b
def
BanditRLProof.LowerBounds.siblingExpandedWord
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.siblingExpandedWordReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def siblingExpandedWord {α : Type*} (code : BinaryPrefixCode (Option α)) : α ⊕ Bool → List Bool | .inl a => code.encode (some a) | .inr b => code.encode none ++ [b] theorem siblingExpandedWord_prefixFree {α : Type*} (code : BinaryPrefixCode (Option α)) {a b : α ⊕ Bool} (h : siblingExpandedWord code a <+: siblingExpandedWord code b) : a = b
theorem
BanditRLProof.LowerBounds.siblingExpandedWord_prefixFree
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.siblingExpandedWord_prefixFreeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem siblingExpandedWord_prefixFree {α : Type*} (code : BinaryPrefixCode (Option α)) {a b : α ⊕ Bool} (h : siblingExpandedWord code a <+: siblingExpandedWord code b) : a = b
def
BanditRLProof.LowerBounds.BinaryPrefixCode.expandSibling
Compiled
Split a designated merged leaf into two siblings.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.BinaryPrefixCode.expandSiblingReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def BinaryPrefixCode.expandSibling {α : Type*} (code : BinaryPrefixCode (Option α)) : BinaryPrefixCode (α ⊕ Bool) where
theorem
BanditRLProof.LowerBounds.expectedCodeLength_expandSibling
Compiled
Exact cost recurrence of splitting a merged symbol.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.expectedCodeLength_expandSiblingReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem expectedCodeLength_expandSibling {α : Type*} [Fintype α] (code : BinaryPrefixCode (Option α)) (p : α → ℝ) (q r : ℝ) : expectedCodeLength (Sum.elim p (fun b => if b then r else q)) code.expandSibling = expectedCodeLength (fun a => a.elim (q + r) p) code + q + r
theorem
BanditRLProof.LowerBounds.sibling_parent_not_prefix_other
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.sibling_parent_not_prefix_otherReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sibling_parent_not_prefix_other {α : Type*} (code : BinaryPrefixCode (α ⊕ Bool)) (w : List Bool) (hs : ∀ b, code.encode (.inr b) = w ++ [b]) (a : α) : ¬ w <+: code.encode (.inl a)
def
BanditRLProof.LowerBounds.siblingContractedWord
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.siblingContractedWordReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def siblingContractedWord {α : Type*} (code : BinaryPrefixCode (α ⊕ Bool)) (w : List Bool) : Option α → List Bool | none => w | some a => code.encode (.inl a) theorem siblingContractedWord_prefixFree {α : Type*} (code : BinaryPrefixCode (α ⊕ Bool)) (w : List Bool) (hs : ∀ b, code.encode (.inr b) = w ++ [b]) {a b : Option α} (h : siblingContractedWord code w a <+: siblingContractedWord code w b) : a = b
theorem
BanditRLProof.LowerBounds.siblingContractedWord_prefixFree
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.siblingContractedWord_prefixFreeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem siblingContractedWord_prefixFree {α : Type*} (code : BinaryPrefixCode (α ⊕ Bool)) (w : List Bool) (hs : ∀ b, code.encode (.inr b) = w ++ [b]) {a b : Option α} (h : siblingContractedWord code w a <+: siblingContractedWord code w b) : a = b
def
BanditRLProof.LowerBounds.BinaryPrefixCode.contractSibling
Compiled
Merge two actual sibling leaves whose parent is nonempty.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.BinaryPrefixCode.contractSiblingReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def BinaryPrefixCode.contractSibling {α : Type*} (code : BinaryPrefixCode (α ⊕ Bool)) (w : List Bool) (hw : w ≠ []) (hs : ∀ b, code.encode (.inr b) = w ++ [b]) : BinaryPrefixCode (Option α) where
theorem
BanditRLProof.LowerBounds.expectedCodeLength_contractSibling
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.expectedCodeLength_contractSiblingReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem expectedCodeLength_contractSibling {α : Type*} [Fintype α] (code : BinaryPrefixCode (α ⊕ Bool)) (w : List Bool) (hw : w ≠ []) (hs : ∀ b, code.encode (.inr b) = w ++ [b]) (p : α → ℝ) (q r : ℝ) : expectedCodeLength (fun a => a.elim (q + r) p) (code.contractSibling w hw hs) + q + r = expectedCodeLength (Sum.elim p (fun b => if b then r else q)) code
def
BanditRLProof.LowerBounds.binaryRootPrefixCode
Compiled
The two-symbol root code, avoiding an invalid empty parent codeword.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.LowerBounds.binaryRootPrefixCodeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def binaryRootPrefixCode : BinaryPrefixCode Bool where
theorem
BanditRLProof.LowerBounds.binaryRootPrefixCode_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.binaryRootPrefixCode_optimalReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem binaryRootPrefixCode_optimal (p : Bool → ℝ) (hp : ∀ b, 0 ≤ p b) (hs : ∑ b, p b = 1) : IsOptimalPrefixCode p binaryRootPrefixCode