First condition: derivative in B(k+1)
ProvedLeCun1988.lagrangian_deriv_BFor , the derivative of the Lagrange function in the multiplier is .
import Definitions.Def_LeCun1988_Defs import Mathlib
namespace LeCun1988
theorem lagrangian_deriv_B {E Θ : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup Θ] [NormedSpace ℝ Θ]
{C : E → ℝ} {F : ℕ → E → Θ → E} {N : ℕ} {X : ℕ → E}
{W : ℕ → Θ} {B : ℕ → E →L[ℝ] ℝ} {k : ℕ} (hk : k < N) :
HasFDerivAt (fun b => lagrangian C F N X W (Function.update B (k + 1) b))
(ContinuousLinearMap.apply ℝ ℝ (X (k + 1) - F k (X k) (W k))) (B (k + 1)) := by sorry
end LeCun1988Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
With L(X,W,B) = C(X N) + Σ_{m<N} B(m+1)(X(m+1) - F m (X m)(W m)) (each B(m+1) a continuous linear functional E → ℝ), and k < N: the map b ↦ L(X, W, B with entry k+1 replaced by b) has Fréchet derivative (on the dual space E →L ℝ) equal to evaluation at the residual r_k = X(k+1) - F k (X k)(W k), i.e. ContinuousLinearMap.apply ℝ ℝ r_k : b ↦ b r_k.
Auditor concerns: none. L is affine in B(k+1) (only the m = k term uses it, since B 0 never appears and the update index k+1 ≤ N), so the statement is the easy but correct partial derivative. It gives the derivative, not stationarity itself; stationarity is that this derivative vanishes, which is linked to the forward pass by first_condition_iff.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.