`BookProof.ChapterAttentionCoarseGrain.observableExpectation_merge` (f : Fin m → Fin r) (p : Fin m → ℝ) (v : Fin r → E) : observableExpectation (mergeWeights f p) v = observableExp
ProvedBookProof.ChapterAttentionCoarseGrain.observableExpectation_mergetheoremstimepiece
Prove the following Lean 4 theorem from ChapterAttentionCoarseGrain.
BookProof.ChapterAttentionCoarseGrain.observableExpectation_merge (f : Fin m → Fin r) (p : Fin m → ℝ) (v : Fin r → E) : observableExpectation (mergeWeights f p) v = observableExpectation p (fun x => v (f x))
Formalization note: Lean 4 identifier BookProof.ChapterAttentionCoarseGrain.observableExpectation_merge.
Preamble
-- Generated from ChapterAttentionCoarseGrain.lean — theorem BookProof.ChapterAttentionCoarseGrain.observableExpectation_merge
import Definitions.Def_ChapterSoftmaxSharpness
import Mathlib
import Definitions.Def_ChapterAttentionCoarseGrain
import Definitions.Def_ChapterObservableExpectation
open BookProof.ChapterObservableExpectation
open BookProof.ChapterAttentionCoarseGrain
open scoped BigOperators
noncomputable section
open BookProof.ChapterObservableExpectation BookProof.ChapterSoftmaxSharpness
variable {m r : ℕ} {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]Formal statement
theorem BookProof.ChapterAttentionCoarseGrain.observableExpectation_merge (f : Fin m → Fin r) (p : Fin m → ℝ) (v : Fin r → E) :
observableExpectation (mergeWeights f p) v
= observableExpectation p (fun x => v (f x)) := by sorry