`BookProof.ChapterAttentionOutputVariance.observableExpectation_minimizes` {p : Fin m → ℝ} (hp : ∑ j, p j = 1) (v : Fin m → E) (c : E) : ∑ j, p j * ‖v j - observableExpectation p v
ProvedBookProof.ChapterAttentionOutputVariance.observableExpectation_minimizestheoremstimepiece
Prove the following Lean 4 theorem from ChapterAttentionOutputVariance.
BookProof.ChapterAttentionOutputVariance.observableExpectation_minimizes {p : Fin m → ℝ} (hp : ∑ j, p j = 1) (v : Fin m → E) (c : E) : ∑ j, p j * ‖v j - observableExpectation p v‖ ^ 2 ≤ ∑ j, p j * ‖v j - c‖ ^ 2
Formalization note: Lean 4 identifier BookProof.ChapterAttentionOutputVariance.observableExpectation_minimizes.
Preamble
-- Generated from ChapterAttentionOutputVariance.lean — theorem BookProof.ChapterAttentionOutputVariance.observableExpectation_minimizes
import Definitions.Def_ChapterSoftmaxSharpness
import Mathlib
import Definitions.Def_ChapterAttentionOutputVariance
import Definitions.Def_ChapterObservableExpectation
open BookProof.ChapterObservableExpectation
open BookProof.ChapterAttentionOutputVariance
open scoped BigOperators RealInnerProductSpace
noncomputable section
open BookProof.ChapterObservableExpectation BookProof.ChapterSoftmaxSharpness
variable {m : ℕ} {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]Formal statement
theorem BookProof.ChapterAttentionOutputVariance.observableExpectation_minimizes {p : Fin m → ℝ} (hp : ∑ j, p j = 1) (v : Fin m → E)
(c : E) :
∑ j, p j * ‖v j - observableExpectation p v‖ ^ 2 ≤ ∑ j, p j * ‖v j - c‖ ^ 2 := by sorry