LeanMachineLearning

Bandits.ArrayModel.truncRow🔗

Definition

From the authors

Modification of ω in which the rewards of action a are read only up to index m - 1: in row a of the reward array, the entry at index i is kept if i < m and replaced by the entry at index m + 1 + i otherwise. The result does not depend on the coordinate (m, a) of the array.

Types
  • 𝓐 : Type u_1DecidableEq 𝓐
  • 𝓡 : Type u_2
Given
Result
probSpace 𝓐 𝓡
Body
(ω.1, fun i b => if b = a then ω.2 (if i < m then i else m + 1 + i) b else ω.2 i b)
Code
def truncRow [DecidableEq 𝓐] (a : 𝓐) (m : ℕ) (ω : probSpace 𝓐 𝓡) : probSpace 𝓐 𝓡 :=
  (ω.1, fun i b ↦ if b = a then ω.2 (if i < m then i else m + 1 + i) b else ω.2 i b)

Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), the 2th recorded change.

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file · open it in the Lean web editor.

Dependency graph

Audit surface: 1 project declarations, 19 external constants

✓ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.