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