Provedalphabaguettealgorithm-ideab5
Every logit ⟨h,e⟩ of an embedding in a ball (c, ρ) is at most ⟨h,c⟩ + ‖h‖·ρ
For all , and , if , then
What the notation means · or point at any symbol
- 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) - f(x)Function application
- Fin applied to d. Lean writes f x; papers write f(x). (
Fin d) - ⟹Implies
- If Fin(d), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin d → ℝ) - x : TVariables
- h, e, c range over Fin d → ℝ: the statement must hold for every choice. (
(h e c : Fin d → ℝ)) - √Square root
- The non-negative number whose square is ∑ j, (e(j) − c(j))^2. (
Real.sqrt (∑ j, (e j - c j) ^ 2)) - ≤At most
- √(∑ j, (e(j) − c(j))^2) is less than or equal to ρ. (
Real.sqrt (∑ j, (e j - c j) ^ 2) ≤ ρ) - ·Multiplication
- h(j) times e(j). (
h j * e j) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - ∑Summation
- Add up (e(j) − c(j))^2 for every j. (
∑ j, (e j - c j) ^ 2) - aᵇPower
- e(j) − c(j) raised to the power 2. (
(e j - c j) ^ 2) - -Subtraction
- e(j) minus c(j). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
e j - c j) - +Addition
- ∑ j, h(j) · c(j) plus √(∑ j, h(j)^2) · ρ. (
∑ j, h j * c j + Real.sqrt (∑ j, h j ^ …)
theorem vocab-ball-logit-bound {d : ℕ} (h e c : Fin d → ℝ) (ρ : ℝ) (he : Real.sqrt (∑ j, (e j - c j) ^ 2) ≤ ρ) :
∑ j, h j * e j ≤ ∑ j, h j * c j + Real.sqrt (∑ j, h j ^ 2) * ρIdea B5 (certified vocabulary skipping in the tied output head). Cluster embedding rows into Euclidean balls; one dot product with the centre plus ‖h‖·ρ bounds every logit in the ball (Cauchy–Schwarz).
How it was proved
- Proved
- 3 October 2026
- By
- Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
- 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
- 22 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.