Logistic sigmoid case
ProvedLeCun1988.lecun_sigmoidThe previous item for with .
import Definitions.Def_LeCun1988_Defs import Mathlib
namespace LeCun1988
theorem lecun_sigmoid {n : ℕ} (D x0 : Fin n → ℝ)
(W : ℕ → (Fin n → ℝ) →L[ℝ] (Fin n → ℝ)) {N k : ℕ} (hk : k < N) :
HasFDerivAt (fun V => sqerr D (forward (netF Real.sigmoid) x0 (Function.update W k V) N))
(-((cov (yvec (fun t => Real.sigmoid t * (1 - Real.sigmoid t)) D
(forward (netF Real.sigmoid) x0 W) W N k)).comp
(ContinuousLinearMap.apply ℝ (Fin n → ℝ) (forward (netF Real.sigmoid) x0 W k)))) (W k) := by sorry
end LeCun1988Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Instance of lecun_net with σ = Real.sigmoid (Mathlib: x ↦ (1 + exp(-x))⁻¹) and σ'(t) = sigmoid t * (1 - sigmoid t), with no differentiability hypothesis (it holds; Mathlib has Real.hasDerivAt_sigmoid, which I confirmed). Conclusion: for k < N the gradient of the squared error in W(k) is Δ ↦ -⟨y_k, Δ X(k)⟩ with y_k i = s_i(1 - s_i) * b(k+1) i, s = sigmoid(W k X k) = X(k+1), b(N) = 2(D - X(N)), b(j) = W jᵀ y_j, i.e. gradient -y_k X(k)ᵀ.
Auditor concerns: same specialisation as lecun_net (equal widths, no biases). Note σ' is written in terms of the pre-activation (sigmoid t (1 - sigmoid t)), equivalent to LeCun's X(k+1)(1 - X(k+1)) form. Otherwise none.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.