proofs
Provedchi-squareproposaltemperingfirst-principles

Temperature-tilt proposals: for scores of range ≤ R and θ ∈ [0,1], the proposal softmax(θ s) has cost factor ≤ cosh²((1−θ)R/2) and envelope max π/r ≤ e^{(1−θ)R}

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}}, s:Fin⁡ n→R\htmlData{mx=5}{s : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}} and R,θ∈R\htmlData{mx=1}{R, \theta \in \htmlData{mx=0}{\mathbb{R}}}, if 0<n0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{n}, ∀i,j, s(i)−s(j)≤R\htmlData{mx=9}{\forall i, j,\ \htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{s}(\htmlData{mx=1}{i})} - \htmlData{mx=5}{\htmlData{mx=3}{s}(\htmlData{mx=4}{j})}} \mathrel{\htmlData{mx=8}{\leq}} \htmlData{mx=7}{R}}, 0≤θ0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{\theta} and θ≤1\htmlData{mx=0}{\theta} \mathrel{\htmlData{mx=1}{\leq}} 1, then

(∑j(es(j)∑kes(k))2eθ⋅s(j)∑keθ⋅s(k)≤cosh⁡((1−θ)⋅R2)2)∧(∀j,es(j)∑kes(k)eθ⋅s(j)∑keθ⋅s(k)≤e(1−θ)⋅R)\begin{aligned} & \left(\right. \htmlData{mx=28}{\sum_{j} \htmlData{mx=27}{\frac{\htmlData{mx=12}{\left(\htmlData{mx=11}{\frac{\htmlData{mx=5}{e^{\htmlData{mx=4}{\htmlData{mx=2}{s}(\htmlData{mx=3}{j})}}}}{\htmlData{mx=10}{\sum_{k} \htmlData{mx=9}{e^{\htmlData{mx=8}{\htmlData{mx=6}{s}(\htmlData{mx=7}{k})}}}}}}\right)^{2}}}{\htmlData{mx=26}{\frac{\htmlData{mx=18}{e^{\htmlData{mx=17}{\htmlData{mx=13}{\theta} \cdot \htmlData{mx=16}{\htmlData{mx=14}{s}(\htmlData{mx=15}{j})}}}}}{\htmlData{mx=25}{\sum_{k} \htmlData{mx=24}{e^{\htmlData{mx=23}{\htmlData{mx=19}{\theta} \cdot \htmlData{mx=22}{\htmlData{mx=20}{s}(\htmlData{mx=21}{k})}}}}}}}}}} \\ & \quad \htmlData{mx=1}{\leq} \htmlData{mx=35}{\htmlData{mx=34}{\cosh \left(\htmlData{mx=33}{\frac{\htmlData{mx=32}{(\htmlData{mx=30}{1 - \htmlData{mx=29}{\theta}}) \cdot \htmlData{mx=31}{R}}}{2}}\right)}^{2}} \left.\right) \\ & \htmlData{mx=0}{\land} \left(\right. \htmlData{mx=36}{\forall} j, \\ & \quad \htmlData{mx=62}{\frac{\htmlData{mx=47}{\frac{\htmlData{mx=41}{e^{\htmlData{mx=40}{\htmlData{mx=38}{s}(\htmlData{mx=39}{j})}}}}{\htmlData{mx=46}{\sum_{k} \htmlData{mx=45}{e^{\htmlData{mx=44}{\htmlData{mx=42}{s}(\htmlData{mx=43}{k})}}}}}}}{\htmlData{mx=61}{\frac{\htmlData{mx=53}{e^{\htmlData{mx=52}{\htmlData{mx=48}{\theta} \cdot \htmlData{mx=51}{\htmlData{mx=49}{s}(\htmlData{mx=50}{j})}}}}}{\htmlData{mx=60}{\sum_{k} \htmlData{mx=59}{e^{\htmlData{mx=58}{\htmlData{mx=54}{\theta} \cdot \htmlData{mx=57}{\htmlData{mx=55}{s}(\htmlData{mx=56}{k})}}}}}}}}} \\ & \quad \quad \htmlData{mx=37}{\leq} \htmlData{mx=67}{e^{\htmlData{mx=66}{(\htmlData{mx=64}{1 - \htmlData{mx=63}{\theta}}) \cdot \htmlData{mx=65}{R}}}} \left.\right) \end{aligned}
What the notation means · or point at any symbol
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
<Less than
0 is strictly smaller than n. (0 < n)
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 n. Lean writes f x; papers write f(x). (Fin n)
⟹Implies
If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin n → ℝ)
x ∈ TVariables
R, θ range over real numbers: the statement must hold for every choice. ((R θ : ℝ))
∀For all
The statement after the comma holds for every i, j. (∀ i j, s i - s j ≤ R)
∧And
Both hold: (∑ j, (exp(s(j))/(∑ k, exp(s(k))))^2/(exp(θ · s(j))/(∑ k, …, and ∀ j, exp(s(j))/(∑ k, exp(s(k)))/(exp(θ · s(j))/(∑ k, exp(θ…. ((∑ j, (Real.exp (s j) / ∑ k, Real.exp (…)
aᵇPower
exp(s(j))/(∑ k, exp(s(k))) raised to the power 2. ((Real.exp (s j) / ∑ k, Real.exp (s k)) …)
-Subtraction
s(i) minus s(j). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (s i - s j)
≤At most
s(i) − s(j) is less than or equal to R. (s i - s j ≤ R)
eˣExponential function
e raised to the power s(j), where e ≈ 2.718. (Real.exp (s j))
a/bDivision
exp(s(j)) divided by ∑ k, exp(s(k)). In Lean, dividing by 0 gives 0. (Real.exp (s j) / ∑ k, Real.exp (s k))
RReal numbers
The real numbers: every point on the number line. (ℝ)
∑Summation
Add up exp(s(k)) for every k. (∑ k, Real.exp (s k))
·Multiplication
θ times s(j). (θ * s j)
coshHyperbolic cosine
(eˣ + e⁻ˣ)/2 at (1 − θ) · R/2. (Real.cosh ((1 - θ) * R / 2))

A proposal at reduced temperature θ. θ = 0 is uniform (cosh²(R/2)), θ = 1 is the row itself (1), and θ = 1/2 is the half-temperature proposal with cost ≤ cosh²(R/4) ≈ e^{R/2}/4: tempering halves the exponent. Hashing-based estimators realise sampling from the half-temperature tilt for hashable kernels, which is why they beat blind sampling by a square root. Proof: the Kantorovich range inequality with weights e^{θ s} and values e^{(1−θ)s}. First-principles reformulation, 2026-10-05.

How it was proved

Proved
5 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
92 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements