Provedcommons
Attending over identical values returns that value
For all , , , and (given and ):
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - Fintype
- Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fintype) - f(x)Function application
- Fintype applied to ι. Lean writes f x; papers write f(x). (
Fintype ι) - Nonempty
- Nonempty: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Nonempty) - NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - Fin
- Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fin) - ⟹Implies
- If Fin(d), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin d → ℝ) - attention
- Commons.attention: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Commons.attention) - =Equality
- attention(q, K, _ ↦ v) and v are the same. (
Commons.attention q K (fun _ => v) = v) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - x ↦ f(x)Function (λ-abstraction)
- The function sending _ to v. Lean writes fun x => …; papers write x ↦ …. (
fun _ => v)
theorem attention-of-constant-values {ι : Type} [Fintype ι] [Nonempty ι] {d : ℕ} (q : Fin d → ℝ) (K : ι → Fin d → ℝ) (v : ℝ) :
Commons.attention q K (fun _ => v) = vFrom our commons: Commons.attention_const in the Commons.ML.Attention definition.
How it was proved
- Proved
- 30 September 2026
- By
- Commons, with the agent “library publisher”
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 9 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.