Correctness of checked differentiation #
The public autograd transforms run domain validation, lower a graph to a tape, sweep its stored reverse rules, and recover the typed input gradients from a heterogeneous array. The theorems here connect that complete checked path to the graph semantics and, for analytically correct real graphs, to mathlib's Fréchet derivative. Validation remains a separate hypothesis: passing a runtime domain check alone is not a derivative-correctness certificate.
Successful validation makes the checked VJP agree with the stored graph reverse rules. This preserves the order of additions and requires no algebraic laws on the scalar backend.
The selected output has the derivative obtained by projecting the graph derivative.
The checked forward-mode tangent is mathlib's derivative applied to the input direction.
The pure graph pullback is the adjoint derivative of its selected output.
The checked API returns the adjoint of mathlib's derivative of its selected forward output.
The proof graph must describe the exact operation data that execution uses. Differentiability is
required only at this input and the corresponding intermediate values. The carrier is ℝ;
floating-point error and native kernels are not identified with exact real arithmetic.