The algebra and the calculus of the inverse hyperbolic tangent #
Mathlib's Analysis/SpecialFunctions/Artanh.lean introduces Real.artanh and proves that it
inverts Real.tanh on (-1, 1), that it is strictly monotone there, and the closed forms
Real.sinh_artanh, Real.cosh_artanh. It records neither the additive law of Real.artanh
nor any of its analytic properties: no addition formula, no oddness, and no continuity or
differentiability statement appears anywhere in the pinned Mathlib.
This file supplies both. The analytic half follows from the logarithmic formula
Real.artanh_eq_half_log, artanh x = (1 / 2) * log ((1 + x) / (1 - x)), which is valid on
the open interval (-1, 1); since that interval is open, the formula may be differentiated at
each of its points and the result transported back to Real.artanh itself. The algebraic half
follows from the inversion Real.tanh_artanh together with the addition formula for
Real.tanh, which the pinned Mathlib does not state either and which is proved in
TauCeti/Analysis/SpecialFunctions/Hyperbolic.lean.
Main declarations #
The additive law #
Real.artanh_addandReal.artanh_sub—artanh a ± artanh b = artanh ((a ± b) / (1 ± a * b))foraandbin(-1, 1):Real.artanhis an isomorphism from the Möbius addition of(-1, 1)onto(ℝ, +).Real.add_div_one_add_mul_mem_IooandReal.sub_div_one_sub_mul_mem_Ioo— that Möbius addition and Möbius subtraction are closed on(-1, 1), which is what lets the two formulae be applied again to their own right-hand sides.Real.artanh_neg_eq_neg_artanhandReal.artanh_abs—artanh (-x) = -artanh xandartanh |x| = |artanh x|, both for every realx, the values outside(-1, 1)being handled by Mathlib'sReal.artanh_eq_zero_iff.
The calculus #
Real.hasDerivAt_artanh—Real.artanhhas derivative(1 - x ^ 2)⁻¹at eachxof(-1, 1), withReal.deriv_artanh,Real.differentiableAt_artanh,Real.differentiableOn_artanh,Real.continuousAt_artanhandReal.continuousOn_artanhas companions, andHasDerivAt.artanhas the chain-rule form.Real.tendsto_artanh_div_nhdsNE_zero—artanh t / ttends to1asttends to0through nonzero values: the derivative at the origin, read as a limit of slopes. This is what turns a closed-form hyperbolic distance into an infinitesimal one.Real.integral_one_sub_sq_inv_eq_artanh—artanhis the primitive of the density(1 - t ^ 2)⁻¹:∫ t in (0)..r, (1 - t ^ 2)⁻¹ = artanh rforr ∈ (-1, 1).Real.self_le_artanhandReal.artanh_le_self_div_one_sub_sq— the two-sided comparisonx ≤ artanh x ≤ x / (1 - x ^ 2)on[0, 1), obtained by bounding that integrand between its values at the two endpoints.
The motivation is the conformal-mapping roadmap (TauCetiRoadmap/ConformalMapping/README.md),
whose layer L2 asks for the hyperbolic (Poincaré) metric on the unit disc. Tau Ceti's
TauCeti.hyperbolicDist is Real.artanh of the pseudo-hyperbolic expression, so the additive
law below is what makes it satisfy the triangle inequality
(TauCeti.hyperbolicDist_triangle, in Conformal/Hyperbolic/Triangle.lean) and what measures
hyperbolic arclength along a Euclidean diameter
(TauCeti.hyperbolicDist_mul_ofReal_of_norm_eq_one, in Conformal/Poincare/Geodesic.lean),
while its infinitesimal form — proved in
TauCeti/Analysis/Complex/Conformal/Hyperbolic/Density.lean — is the derivative of
Real.artanh at the origin transported along that expression. Nothing here is
complex-analytic, so it is all stated for Real.artanh alone, at the natural generality of a
real special function, rather than being buried in the disc files.
The additive law #
Real.artanh is odd, at every real number: artanh (-x) = -artanh x.
No hypothesis is needed. On (-1, 1) this is the logarithmic formula
Real.artanh_eq_half_log read through Real.log_inv, and outside it both sides vanish by
Real.artanh_eq_zero_iff — the junk value forced by the defining formula
artanh x = log √((1 + x) / (1 - x)), whose argument is there nonpositive, or, at x = 1, the
value 2 / 0 = 0 of Lean's division convention.
The name Real.artanh_neg, which the Mathlib convention for oddness would suggest (compare
Real.arsinh_neg, Real.arctan_neg), is taken in Mathlib by the sign lemma
artanh x < 0; the _eq_ form follows the precedent of Real.log_neg_eq_log, whose name is
displaced by Real.log_neg for the same reason.
The absolute value passes through Real.artanh, at every real number:
artanh |x| = |artanh x|. Both sides are artanh of the larger of x and -x, by oddness and
the sign lemmas Real.artanh_nonneg, Real.artanh_nonpos.
Not a simp lemma: neither side is a normal form for the other, and rewriting in either
direction merely moves the absolute value across Real.artanh.
Addition formula for the inverse hyperbolic tangent. For a, b ∈ (-1, 1),
artanh a + artanh b = artanh ((a + b) / (1 + a * b)): Real.artanh carries the Möbius
addition of (-1, 1) — the one-dimensional relativistic velocity addition — to the addition of
ℝ.
Both hypotheses are needed: outside (-1, 1) the left-hand side is a junk value while the
right-hand side need not be. The proof applies Real.artanh_tanh to the sum, whose Real.tanh
is computed by Real.tanh_add.
Möbius addition preserves the interval (-1, 1): for a, b ∈ (-1, 1) the Möbius sum
(a + b) / (1 + a * b) again lies in (-1, 1), so that Real.artanh_add may be applied to it.
Elementary as the statement is, it is Real.tanh_add read backwards: the Möbius sum is
tanh (artanh a + artanh b), and Real.tanh takes its values in (-1, 1).
Subtraction formula for the inverse hyperbolic tangent. For a, b ∈ (-1, 1),
artanh a - artanh b = artanh ((a - b) / (1 - a * b)): the addition formula
Real.artanh_add with b negated, Real.artanh being odd.
Möbius subtraction preserves the interval (-1, 1): for a, b ∈ (-1, 1) the Möbius
difference (a - b) / (1 - a * b) again lies in (-1, 1).
This is the closure statement that Real.artanh_sub needs, exactly as
Real.add_div_one_add_mul_mem_Ioo is the one that Real.artanh_add needs: without it a
consumer of the subtraction formula could not feed its right-hand side back into the
interval-only Real.artanh API. It is the addition statement at -b.
Differentiability #
The derivative of the inverse hyperbolic tangent. On the interval (-1, 1) where
Real.artanh inverts Real.tanh, it has derivative (1 - x ^ 2)⁻¹.
Mathlib records no differentiability statement for Real.artanh; this is proved from the
logarithmic formula Real.artanh_eq_half_log, which holds on all of (-1, 1) and hence on a
neighbourhood of each of its points.
Real.artanh is differentiable at each point of (-1, 1).
Real.artanh is differentiable on (-1, 1).
Real.artanh is continuous at each point of (-1, 1).
Real.artanh is continuous on the interval (-1, 1) on which it inverts Real.tanh.
The chain rule for Real.artanh: composing with a function that is differentiable at x
and takes a value in (-1, 1) there multiplies the derivative by (1 - f x ^ 2)⁻¹.
The derivative at the origin, as a limit of slopes #
The infinitesimal form of Real.artanh at the origin. Since artanh 0 = 0 and the
derivative of Real.artanh at 0 is 1, the quotient artanh t / t tends to 1 as t
tends to 0 through nonzero values.
This is the one-variable input to the infinitesimal Poincaré density: on the unit disc the
hyperbolic distance is Real.artanh of the pseudo-hyperbolic expression, and near the diagonal
the latter is small, so this limit converts the closed form into a density.
Real.artanh as the primitive of the Poincaré density #
Real.artanh is the primitive of (1 - t ^ 2)⁻¹. For r in (-1, 1),
∫ t in (0)..r, (1 - t ^ 2)⁻¹ = artanh r.
On the unit disc this says that the hyperbolic distance from the origin out to a point at
Euclidean radius r is the length of that radius measured in the Poincaré density
|dz| / (1 - |z| ^ 2).