`BookProof.ChapterSoftmaxDivergence.klDiv_scoreSoftmax` (beta gamma : ℝ) (s : Fin m → ℝ) (i : Fin m) : klDiv (scoreSoftmax beta s) (scoreSoftmax gamma s) = logPartition gamma s - l
ProvedBookProof.ChapterSoftmaxDivergence.klDiv_scoreSoftmaxtheoremstimepiece
Prove the following Lean 4 theorem from ChapterSoftmaxDivergence.
BookProof.ChapterSoftmaxDivergence.klDiv_scoreSoftmax (beta gamma : ℝ) (s : Fin m → ℝ) (i : Fin m) : klDiv (scoreSoftmax beta s) (scoreSoftmax gamma s) = logPartition gamma s - logPartition beta s - (gamma - beta) * meanScore beta s
Formalization note: Lean 4 identifier BookProof.ChapterSoftmaxDivergence.klDiv_scoreSoftmax.
Preamble
-- Generated from ChapterSoftmaxDivergence.lean — theorem BookProof.ChapterSoftmaxDivergence.klDiv_scoreSoftmax
import Definitions.Def_ChapterAttentionEntropy
import Mathlib
import Definitions.Def_ChapterSoftmaxDivergence
import Definitions.Def_ChapterSoftmaxSharpness
import Definitions.Def_ChapterSoftmaxFluctuation
open BookProof.ChapterSoftmaxSharpness
open BookProof.ChapterSoftmaxDivergence
open scoped BigOperators
noncomputable section
open BookProof.ChapterAttentionEntropy BookProof.ChapterSoftmaxSharpness
open BookProof.ChapterSoftmaxFluctuation
variable {m : ℕ}Formal statement
theorem BookProof.ChapterSoftmaxDivergence.klDiv_scoreSoftmax (beta gamma : ℝ) (s : Fin m → ℝ) (i : Fin m) :
klDiv (scoreSoftmax beta s) (scoreSoftmax gamma s)
= logPartition gamma s - logPartition beta s
- (gamma - beta) * meanScore beta s := by sorry