`BookProof.ChapterAttentionTopK.sum_le_sum_of_isTop` {p : Fin m → ℝ} (hp : ∀ x, 0 ≤ p x) {S T : Finset (Fin m)} (hS : IsTop p S) (hcard : T.card ≤ S.card) : ∑ x ∈ T, p x ≤ ∑ x ∈ S,
ProvedBookProof.ChapterAttentionTopK.sum_le_sum_of_isToptheoremstimepiece
Prove the following Lean 4 theorem from ChapterAttentionTopK.
BookProof.ChapterAttentionTopK.sum_le_sum_of_isTop {p : Fin m → ℝ} (hp : ∀ x, 0 ≤ p x) {S T : Finset (Fin m)} (hS : IsTop p S) (hcard : T.card ≤ S.card) : ∑ x ∈ T, p x ≤ ∑ x ∈ S, p x
Formalization note: Lean 4 identifier BookProof.ChapterAttentionTopK.sum_le_sum_of_isTop.
Preamble
-- Generated from ChapterAttentionTopK.lean — theorem BookProof.ChapterAttentionTopK.sum_le_sum_of_isTop
import Definitions.Def_ChapterSoftmaxSharpness
import Definitions.Def_ChapterSoftmaxOrder
import Mathlib
import Definitions.Def_ChapterAttentionTopK
open BookProof.ChapterAttentionTopK
open scoped BigOperators
noncomputable section
open BookProof.ChapterSoftmaxSharpness BookProof.ChapterSoftmaxOrder
variable {m : ℕ} {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]Formal statement
theorem BookProof.ChapterAttentionTopK.sum_le_sum_of_isTop {p : Fin m → ℝ} (hp : ∀ x, 0 ≤ p x) {S T : Finset (Fin m)}
(hS : IsTop p S) (hcard : T.card ≤ S.card) :
∑ x ∈ T, p x ≤ ∑ x ∈ S, p x := by sorry