Documentation

CslibFrontier.Foundations.Analysis.SpecialFunctions.Softplus

Softplus and the logistic transport cost #

The softplus softplus s = log (1 + e^s) has derivative the logistic function Real.sigmoid. Its perspective transportCost r t = r softplus (t / r) is the cost of supplying a site with bias t from distance r in the weighted spectral prices of [OpenAI2026HamiltonianPermanent, §11]. At r = 1 its derivative in r is softplusEntropy t = softplus t - t σ(t), the binary entropy in nats of σ(t).

The main estimate is a second-order expansion in the distance: for 1/2 ≤ r ≤ 2, transportCost r t ≤ softplus t + (r - 1) softplusEntropy t + 4 (r - 1)² ψ(t) with the envelope ψ(t) = (1 + t²) e^{-|t|/2} (Real.transportCost_le). The entropy is between 1/4 and 1 near zero and at most 2 ψ(t) everywhere.

Main definitions #

Main results #

References #

noncomputable def Real.softplus (s : ℝ) :

The softplus log (1 + e^s).

noncomputable def Real.transportCost (r t : ℝ) :

The logistic transport cost r softplus (t / r).

noncomputable def Real.softplusEntropy (t : ℝ) :

The derivative of the transport cost in the distance at r = 1: softplus t - t σ(t).

noncomputable def Real.logisticEnvelope (t : ℝ) :

The envelope (1 + t²) e^{-|t|/2}.

softplus s ≤ e^s.

σ(s) (1 - σ(s)) ≤ e^{-|s|}.

The entropy #

The entropy is even.

The entropy is at most one.

The entropy is at most twice the envelope.

theorem Real.quarter_le_softplusEntropy {t : ℝ} (ht : |t| ≤ 1) :

The entropy is at least 1/4 on [-1, 1].

The second-order expansion #

theorem Real.transportCost_le (t : ℝ) {r : ℝ} (hr : 1 / 2 ≤ r) (hr2 : r ≤ 2) :

Second-order expansion of the transport cost. For distances 1/2 ≤ r ≤ 2, transportCost r t ≤ softplus t + (r - 1) softplusEntropy t + 4 (r - 1)² ψ(t). The proof is Taylor's theorem with the Lagrange remainder on the interval between 1 and r.