Second condition, output layer
ProvedLeCun1988.lagrangian_deriv_XNbackpropagationlagrange-multipliersneural-networks
For , if has derivative at , then ; its vanishing is the boundary condition (eq. 5).
Preamble
import Definitions.Def_LeCun1988_Defs import Mathlib
Formal statement
namespace LeCun1988
theorem lagrangian_deriv_XN {E Θ : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup Θ] [NormedSpace ℝ Θ]
{C : E → ℝ} {F : ℕ → E → Θ → E} {N : ℕ} {X : ℕ → E}
{W : ℕ → Θ} {B : ℕ → E →L[ℝ] ℝ} (hN : 1 ≤ N) {g : E →L[ℝ] ℝ} (hC : HasFDerivAt C g (X N)) :
HasFDerivAt (fun x => lagrangian C F N (Function.update X N x) W B) (g + B N) (X N) := by sorry
end LeCun1988Source
Y. LeCun, A Theoretical Framework for Back-Propagation, Proc. 1988 Connectionist Models Summer School (Morgan Kaufmann), pp. 21-28, http://yann.lecun.com/exdb/publis/pdf/lecun-88.pdf Section 2.2.2, eq. (5)
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
For N ≥ 1, if C has derivative g at X N, then x ↦ L(X with entry N replaced by x, W, B) has derivative g + B N at X N (from C(X N) and from term m = N-1, B N (X N - ...); no term m = N exists). Setting it to zero gives B N = -g = -∇C(X(N)), LeCun's terminal condition.
Auditor concerns: none. N ≥ 1 needed and present (for N = 0, X 0 would only appear in C). Sign convention matches B(N) = -∇C.
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.