sigmoid_sub_ge_of_le
For any real numbers 0 ≤ u ≤ v ≤ 1, the difference sigmoid(v) - sigmoid(u) is at least (1/6) * (v - u).
Statement
theorem sigmoid_sub_ge_of_le (u v : ℝ) (hu : 0 ≤ u) (huv : u ≤ v) (hv : v ≤ 1) :
(1 / 6 : ℝ) * (v - u) ≤ Real.sigmoid v - Real.sigmoid u- Source
- scout/2611-21910-new-gate-weight-and-wire-complexity-bounds-for-sigmoid-neur.md:897
- Verified
- 19 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- ProbabilisticTheory.OrderedVectorSpaceAn ordered real vector space.
- ProbabilisticTheory.instArchimedeanOrderUnitSpaceRealThe real numbers form an Archimedean order-unit space.
- ProbabilisticTheory.OrderUnitSpaceAn ordered real vector space whose distinguished element
1is an order unit: it is nonnegative, and every element is bounded above by a… - ProbabilisticTheory.ArchimedeanOrderUnitSpaceAn order-unit space whose distinguished order unit is Archimedean.
- Used by 1
- symmetric_boolean_func_depth3_sigmoid_circuitFor every symmetric Boolean function f on n ≥ 1 variables, there exists a depth-3 sigmoidal circuit C on n inputs with at most 3n wires…
Read back from the Lean
For any real numbers $u$ and $v$, if $0 \le u$, $u \le v$, and $v \le 1$, then $\frac{1}{6}(v - u) \le \operatorname{Real.sigmoid}(v) - \operatorname{Real.sigmoid}(u)$.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The proof applies the mean value inequality on the convex interval [0, 1] to bound the difference sigmoid(v) - sigmoid(u) from below by the infimum of the derivative times (v - u). Because the derivative is σ'(x) = σ(x)(1 - σ(x)) and σ increases from σ(0) = 1/2 to σ(1) on [0, 1], the quadratic y(1 - y) decreases on [1/2, σ(1)], attaining its minimum at x = 1. A numerical verification confirms σ'(x) ≥ σ(1)(1 - σ(1)) ≥ 1/6 on (0, 1), yielding the desired inequality.
The interval [0, 1] is convex, and the sigmoid function is continuous on [0, 1] and differentiable on its interior (0, 1).
We verify the regularity conditions needed for the mean value inequality. The closed interval [0, 1] is convex by convex_Icc. Since the sigmoid function is globally continuous and differentiable on all of ℝ, its restriction is continuous on [0, 1] (via continuous_sigmoid.continuousOn) and differentiable on the interior (0, 1) (via differentiable_sigmoid.differentiableOn).
uses
convex_Icc,continuous_sigmoid.continuousOn,differentiable_sigmoid.differentiableOnopen Set Real in have hcvx : Convex ℝ (Icc (0:ℝ) 1) := convex_Icc 0 1 have hcont : ContinuousOn sigmoid (Icc 0 1) := continuous_sigmoid.continuousOn have hdiff : DifferentiableOn ℝ sigmoid (interior (Icc 0 1)) := differentiable_sigmoid.differentiableOn
At the right endpoint x = 1, the product σ(1)(1 - σ(1)) is bounded below by 1/6. automation
By definition, σ(1) = (1 + exp(-1))⁻¹. The tactic `num_ineq` evaluates the transcendental constants and automatically verifies the numerical inequality 1/6 ≤ (1 + exp(-1))⁻¹ * (1 - (1 + exp(-1))⁻¹), which numerically is approximately 0.1667 ≤ 0.1966.
have h_one : (1 / 6 : ℝ) ≤ sigmoid 1 * (1 - sigmoid 1) := by unfold sigmoid num_ineq
For every x in the interior of [0, 1], the derivative of the sigmoid satisfies σ'(x) ≥ 1/6.
Let x be in the interior of [0, 1]. By interior_subset, 0 ≤ x ≤ 1. Monotonicity of the sigmoid (sigmoid_le) and sigmoid_zero give 1/2 = σ(0) ≤ σ(x) ≤ σ(1). Because the quadratic polynomial y ↦ y(1 - y) is decreasing on [1/2, 1], non-linear arithmetic (`nlinarith`) deduces σ(1)(1 - σ(1)) ≤ σ(x)(1 - σ(x)). Using the identity σ'(x) = σ(x)(1 - σ(x)) from deriv_sigmoid and chaining with the numerical bound σ(1)(1 - σ(1)) ≥ 1/6 from the previous step, linear arithmetic (`linarith`) concludes σ'(x) ≥ 1/6.
uses
interior_subset,sigmoid_le,sigmoid_zero,deriv_sigmoidhave hderiv : ∀ x ∈ interior (Icc (0:ℝ) 1), (1 / 6 : ℝ) ≤ deriv sigmoid x := by intro x hx have hx_icc : x ∈ Icc (0:ℝ) 1 := interior_subset hx have h0x : (0:ℝ) ≤ x := hx_icc.1 have hx1 : x ≤ 1 := hx_icc.2 have hsig0 : sigmoid 0 ≤ sigmoid x := sigmoid_le h0x have hsig1 : sigmoid x ≤ sigmoid 1 := sigmoid_le hx1 rw [sigmoid_zero] at hsig0 have h_quad : sigmoid 1 * (1 - sigmoid 1) ≤ sigmoid x * (1 - sigmoid x) := by have : (1 / 2 : ℝ) ≤ sigmoid x := by linarith [hsig0] nlinarith have hd : deriv sigmoid x = sigmoid x * (1 - sigmoid x) := by rw [deriv_sigmoid] rw [hd] linarith
Both u and v lie in [0, 1], and the mean value inequality yields (1/6) * (v - u) ≤ σ(v) - σ(u).
From the hypotheses 0 ≤ u ≤ v ≤ 1, transitivity implies 0 ≤ u ≤ 1 and 0 ≤ v ≤ 1, so u, v ∈ [0, 1]. Applying the mean value inequality for convex sets (mul_sub_le_image_sub_of_le_deriv) with the convexity of [0, 1], the continuity and interior differentiability of σ, and the derivative lower bound 1/6 on (0, 1) completes the proof.
uses
mul_sub_le_image_sub_of_le_derivhave hu_mem : u ∈ Icc (0:ℝ) 1 := ⟨hu, huv.trans hv⟩ have hv_mem : v ∈ Icc (0:ℝ) 1 := ⟨hu.trans huv, hv⟩ exact hcvx.mul_sub_le_image_sub_of_le_deriv hcont hdiff hderiv u hu_mem v hv_mem huv
convex_Icc- The closed interval [a, b] is a convex set.
continuous_sigmoid.continuousOn- The sigmoid function is continuous on any set.
differentiable_sigmoid.differentiableOn- The sigmoid function is differentiable on any set.
interior_subset- The interior of a set is contained in the set itself.
sigmoid_le- The sigmoid function is monotone: if a ≤ b, then sigmoid(a) ≤ sigmoid(b).
sigmoid_zero- The value of the sigmoid function at 0 is 1/2.
deriv_sigmoid- The derivative of the sigmoid function is sigmoid'(x) = sigmoid(x) * (1 - sigmoid(x)).
mul_sub_le_image_sub_of_le_deriv- If a function f is continuous on a convex set D and differentiable on its interior with deriv f ≥ C everywhere on the interior, then C * (y - x) ≤ f(y) - f(x) for all x ≤ y in D.
- The step on lines 9–11 relies on the automated decision procedure `num_ineq` to verify the numerical inequality 1/6 ≤ σ(1)(1 - σ(1)) = (1 + exp(-1))⁻¹ * (1 - (1 + exp(-1))⁻¹).
- The quadratic inequality σ(1)(1 - σ(1)) ≤ σ(x)(1 - σ(x)) on line 22 is discharged by non-linear arithmetic automation (`nlinarith`).
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- Mean value lower bound for the standard sigmoid function on the interval [0, 1]. -/theorem sigmoid_sub_ge_of_le (u v : ℝ) (hu : 0 ≤ u) (huv : u ≤ v) (hv : v ≤ 1) : (1 / 6 : ℝ) * (v - u) ≤ Real.sigmoid v - Real.sigmoid u := by open Set Real in have hcvx : Convex ℝ (Icc (0:ℝ) 1) := convex_Icc 0 1 have hcont : ContinuousOn sigmoid (Icc 0 1) := continuous_sigmoid.continuousOn have hdiff : DifferentiableOn ℝ sigmoid (interior (Icc 0 1)) := differentiable_sigmoid.differentiableOn have h_one : (1 / 6 : ℝ) ≤ sigmoid 1 * (1 - sigmoid 1) := by unfold sigmoid num_ineq have hderiv : ∀ x ∈ interior (Icc (0:ℝ) 1), (1 / 6 : ℝ) ≤ deriv sigmoid x := by intro x hx have hx_icc : x ∈ Icc (0:ℝ) 1 := interior_subset hx have h0x : (0:ℝ) ≤ x := hx_icc.1 have hx1 : x ≤ 1 := hx_icc.2 have hsig0 : sigmoid 0 ≤ sigmoid x := sigmoid_le h0x have hsig1 : sigmoid x ≤ sigmoid 1 := sigmoid_le hx1 rw [sigmoid_zero] at hsig0 have h_quad : sigmoid 1 * (1 - sigmoid 1) ≤ sigmoid x * (1 - sigmoid x) := by have : (1 / 2 : ℝ) ≤ sigmoid x := by linarith [hsig0] nlinarith have hd : deriv sigmoid x = sigmoid x * (1 - sigmoid x) := by rw [deriv_sigmoid] rw [hd] linarith have hu_mem : u ∈ Icc (0:ℝ) 1 := ⟨hu, huv.trans hv⟩ have hv_mem : v ∈ Icc (0:ℝ) 1 := ⟨hu.trans huv, hv⟩ exact hcvx.mul_sub_le_image_sub_of_le_deriv hcont hdiff hderiv u hu_mem v hv_mem huv