`BookProof.ChapterAttentionSparse.l1dist_maskedSoftmax_le_of_mass` (beta : ℝ) (s : Fin m → ℝ) {S : Finset (Fin m)} (hS : S.Nonempty) (i : Fin m) {eps : ℝ} (h : 1 - eps ≤ attendedMa
ProvedBookProof.ChapterAttentionSparse.l1dist_maskedSoftmax_le_of_masstheoremstimepiece
Prove the following Lean 4 theorem from ChapterAttentionSparse.
BookProof.ChapterAttentionSparse.l1dist_maskedSoftmax_le_of_mass (beta : ℝ) (s : Fin m → ℝ) {S : Finset (Fin m)} (hS : S.Nonempty) (i : Fin m) {eps : ℝ} (h : 1 - eps ≤ attendedMass beta s S) : l1dist (maskedSoftmax beta s S) (scoreSoftmax beta s) ≤ 2 * eps
Formalization note: Lean 4 identifier BookProof.ChapterAttentionSparse.l1dist_maskedSoftmax_le_of_mass.
Preamble
-- Generated from ChapterAttentionSparse.lean — theorem BookProof.ChapterAttentionSparse.l1dist_maskedSoftmax_le_of_mass
import Definitions.Def_ChapterSoftmaxOrder
import Mathlib
import Definitions.Def_ChapterAttentionSparse
import Definitions.Def_ChapterSoftmaxSharpness
import Definitions.Def_ChapterAttentionMarkov
import Definitions.Def_ChapterAttentionMasking
open BookProof.ChapterSoftmaxSharpness
open BookProof.ChapterAttentionSparse
open scoped BigOperators
noncomputable section
open BookProof.ChapterSoftmaxSharpness BookProof.ChapterSoftmaxOrder
open BookProof.ChapterAttentionMarkov
open BookProof.ChapterAttentionMasking
variable {m : ℕ} {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]Formal statement
theorem BookProof.ChapterAttentionSparse.l1dist_maskedSoftmax_le_of_mass (beta : ℝ) (s : Fin m → ℝ) {S : Finset (Fin m)}
(hS : S.Nonempty) (i : Fin m) {eps : ℝ} (h : 1 - eps ≤ attendedMass beta s S) :
l1dist (maskedSoftmax beta s S) (scoreSoftmax beta s) ≤ 2 * eps := by sorry