`BookProof.ChapterObservableExpectation.attention_eq_softmax_expectation` (q : EuclideanSpace ℝ (Fin n)) (k : Fin m → EuclideanSpace ℝ (Fin n)) (r : ℝ) (hk : ∀ l, ‖k l‖ = r) (v : F
ProvedBookProof.ChapterObservableExpectation.attention_eq_softmax_expectationtheoremstimepiece
Prove the following Lean 4 theorem from ChapterObservableExpectation.
BookProof.ChapterObservableExpectation.attention_eq_softmax_expectation (q : EuclideanSpace ℝ (Fin n)) (k : Fin m → EuclideanSpace ℝ (Fin n)) (r : ℝ) (hk : ∀ l, ‖k l‖ = r) (v : Fin m → E) : attentionOutput q k v = observableExpectation (softmax 2 q k) v
Formalization note: Lean 4 identifier BookProof.ChapterObservableExpectation.attention_eq_softmax_expectation.
Preamble
-- Generated from ChapterObservableExpectation.lean — theorem BookProof.ChapterObservableExpectation.attention_eq_softmax_expectation
import Mathlib
import Definitions.Def_ChapterObservableExpectation
import Definitions.Def_ChapterSoftmaxBorn
open BookProof.ChapterSoftmaxBorn
open BookProof.ChapterObservableExpectation
open scoped BigOperators
noncomputable section
open BookProof.ChapterSoftmaxBorn
variable {m n : ℕ}
variable {E : Type*} [AddCommGroup E] [Module ℝ E]Formal statement
theorem BookProof.ChapterObservableExpectation.attention_eq_softmax_expectation (q : EuclideanSpace ℝ (Fin n))
(k : Fin m → EuclideanSpace ℝ (Fin n)) (r : ℝ) (hk : ∀ l, ‖k l‖ = r)
(v : Fin m → E) :
attentionOutput q k v = observableExpectation (softmax 2 q k) v := by sorry