Prove2Me
Navigate
MissionsFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The tanh contraction lemma

Proved
MarkovMixing.ising_tanh_lemma

by Shuze Chen · Aug 22, 2026 · Mathlib c5ea003 (Lean v4.30.0)

markov-chainsmixing-timesprobability

Fix an inverse temperature β>0\beta>0β>0 and consider the function

g(x)  =  tanh⁡(β(x+1))−tanh⁡(β(x−1)),g(x)\;=\;\tanh\bigl(\beta(x+1)\bigr)-\tanh\bigl(\beta(x-1)\bigr),g(x)=tanh(β(x+1))−tanh(β(x−1)),

which measures how much the conditional probability of a +++ spin under the Ising Glauber dynamics moves when the neighbourhood field increases from x−1x-1x−1 to x+1x+1x+1 (the heat-bath update at a site with neighbouring spin sum SSS chooses +++ with probability (1+tanh⁡(βS))/2(1+\tanh(\beta S))/2(1+tanh(βS))/2).

The theorem (Lemma 15.2 of Levin–Peres–Wilmer) asserts four elementary properties:

  1. ggg is even: g(−x)=g(x)g(-x)=g(x)g(−x)=g(x) for every real xxx;
  2. ggg is non-increasing on [0,∞)[0,\infty)[0,∞): 0≤x≤y0\le x\le y0≤x≤y implies g(y)≤g(x)g(y)\le g(x)g(y)≤g(x);
  3. g(x)≤2tanh⁡βg(x)\le 2\tanh\betag(x)≤2tanhβ for every real xxx — the value at x=0x=0x=0 is the global maximum;
  4. over odd integers the sharper bound holds: g(k)≤tanh⁡(2β)g(k)\le\tanh(2\beta)g(k)≤tanh(2β) for every odd k∈Zk\in\mathbb Zk∈Z — the value at k=±1k=\pm1k=±1 is the maximum among odd integers.

These four inequalities are the entire analytic content of the high-temperature theorem: in the one-site coupling of two adjacent configurations, the probability that the updated site disagrees is controlled by ggg evaluated at the neighbouring spin sum, which for a graph with all degrees even is an odd integer — whence the two conditions Δtanh⁡β<1\Delta\tanh\beta<1Δtanhβ<1 and (Δ/2)tanh⁡(2β)<1(\Delta/2)\tanh(2\beta)<1(Δ/2)tanh(2β)<1 of the goal theorem.

Preamble
import Definitions.Def_mm_ising
Formal statement
namespace MarkovMixing

/-- **Lemma 15.2** (LPW): the function
`ϕ(x) = tanh(β(x+1)) − tanh(β(x−1))` is even, is decreasing on `[0,∞)`,
is bounded by `ϕ(0) = 2 tanh β`, and on odd integers is bounded by
`ϕ(1) = tanh 2β`. -/
theorem ising_tanh_lemma (β : ℝ) (hβ : 0 < β) :
    (∀ x : ℝ, Real.tanh (β * (-x + 1)) - Real.tanh (β * (-x - 1)) =
      Real.tanh (β * (x + 1)) - Real.tanh (β * (x - 1))) ∧
    (∀ x y : ℝ, 0 ≤ x → x ≤ y →
      Real.tanh (β * (y + 1)) - Real.tanh (β * (y - 1)) ≤
        Real.tanh (β * (x + 1)) - Real.tanh (β * (x - 1))) ∧
    (∀ x : ℝ, Real.tanh (β * (x + 1)) - Real.tanh (β * (x - 1)) ≤
      2 * Real.tanh β) ∧
    ∀ k : ℤ, Odd k →
      Real.tanh (β * (k + 1)) - Real.tanh (β * (k - 1)) ≤
        Real.tanh (2 * β) := by
  sorry

end MarkovMixing
Source
D. A. Levin, Y. Peres, E. L. Wilmer, Markov Chains and Mixing Times, AMS 2009, https://documents.epfl.ch/groups/i/ip/ipg/www/2013-2014/Random_Walks/markovmixing.pdf, Section 15.1, Lemma 15.2, Eqs. (15.3)-(15.4), p. 202
Read-back

What the Lean code literally says, in plain math · claude-fable-5

Read-back: ising_tanh_lemma

Fix a real number β\betaβ with the single hypothesis β>0\beta > 0β>0. Writing g(x)=tanh⁡(β(x+1))−tanh⁡(β(x−1))g(x) = \tanh(\beta(x+1)) - \tanh(\beta(x-1))g(x)=tanh(β(x+1))−tanh(β(x−1)) (the hyperbolic tangent is the standard real tanh⁡\tanhtanh), the theorem asserts the conjunction of four claims:

  1. Evenness. For every real xxx,
tanh⁡(β(−x+1))−tanh⁡(β(−x−1))  =  tanh⁡(β(x+1))−tanh⁡(β(x−1)),\tanh(\beta(-x+1)) - \tanh(\beta(-x-1)) \;=\; \tanh(\beta(x+1)) - \tanh(\beta(x-1)),tanh(β(−x+1))−tanh(β(−x−1))=tanh(β(x+1))−tanh(β(x−1)),

i.e. g(−x)=g(x)g(-x) = g(x)g(−x)=g(x).

  1. Monotone decrease on [0,∞)[0,\infty)[0,∞). For all reals x,yx, yx,y with 0≤x0 \le x0≤x and x≤yx \le yx≤y,
tanh⁡(β(y+1))−tanh⁡(β(y−1))  ≤  tanh⁡(β(x+1))−tanh⁡(β(x−1)),\tanh(\beta(y+1)) - \tanh(\beta(y-1)) \;\le\; \tanh(\beta(x+1)) - \tanh(\beta(x-1)),tanh(β(y+1))−tanh(β(y−1))≤tanh(β(x+1))−tanh(β(x−1)),

i.e. g(y)≤g(x)g(y) \le g(x)g(y)≤g(x) — a non-strict inequality, so ggg is (weakly) decreasing on the nonnegative reals.

  1. Global bound. For every real xxx (of either sign),
tanh⁡(β(x+1))−tanh⁡(β(x−1))  ≤  2tanh⁡β,\tanh(\beta(x+1)) - \tanh(\beta(x-1)) \;\le\; 2\tanh\beta,tanh(β(x+1))−tanh(β(x−1))≤2tanhβ,

i.e. g(x)≤2tanh⁡βg(x) \le 2\tanh\betag(x)≤2tanhβ. (Only an upper bound; no lower bound is asserted.)

  1. Bound at odd integers. For every integer kkk that is odd (odd in Z\mathbb{Z}Z, so kkk ranges over …,−3,−1,1,3,…\dots,-3,-1,1,3,\dots…,−3,−1,1,3,…, negatives included), with kkk coerced to a real number,
tanh⁡(β(k+1))−tanh⁡(β(k−1))  ≤  tanh⁡(2β),\tanh(\beta(k+1)) - \tanh(\beta(k-1)) \;\le\; \tanh(2\beta),tanh(β(k+1))−tanh(β(k−1))≤tanh(2β),

i.e. g(k)≤tanh⁡(2β)g(k) \le \tanh(2\beta)g(k)≤tanh(2β) at every odd integer.

All four parts are stated for the same fixed β>0\beta > 0β>0; no other hypotheses appear, and no claim is made for β≤0\beta \le 0β≤0. The inequalities in parts 2–4 are all non-strict (≤\le≤), and parts 3 and 4 have different right-hand sides (2tanh⁡β2\tanh\beta2tanhβ for all reals versus tanh⁡(2β)\tanh(2\beta)tanh(2β) for odd integers).

Human review
  • Endorsed by Community (Bot) · Aug 22, 2026

  • Endorsed by Shuze Chen · Aug 22, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me