BanditRLlib
Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.

Lean module · Foundations

BanditRLProof.LowerBounds.PrefixCodeSiblings

Generated source map for this Lean module.

Module map

Declarations
12
Placeholders
0

Imports

BanditRLProof.LowerBounds.PrefixCodeExchange

Imported by

BanditRLProof, BanditRLProof.LowerBounds.PrefixCodePruning

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 identitydeclaration:BanditRLProof.LowerBounds.BinaryPrefixCode.extended_prefix_parent_eq

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.siblingExpandedWord

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.siblingExpandedWord_prefixFree

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.BinaryPrefixCode.expandSibling

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.expectedCodeLength_expandSibling

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.sibling_parent_not_prefix_other

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.siblingContractedWord

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.siblingContractedWord_prefixFree

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.BinaryPrefixCode.contractSibling

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.expectedCodeLength_contractSibling

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.binaryRootPrefixCode

Reading 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 identitydeclaration:BanditRLProof.LowerBounds.binaryRootPrefixCode_optimal

Reading 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