Derivative rules on local domains #
Logarithms and square roots need not be smooth everywhere. Their jet laws use smoothness near the evaluation point and a nonzero denominator or argument there. Continuity gives the same domain condition nearby, where mathlib's derivative rules identify the remaining jet coefficients.
The quotient law in NN.Proofs.Autograd.Dual supplies their division prerequisite and follows the
runtime's arithmetic safeguards. These theorems concern exact-real coefficients, not native
floating-point execution.
The principal angle is the imaginary part of the complex logarithm. Its dual tangent agrees with the classical derivative on the slit plane, away from the origin and negative real axis. Constant powers use the polynomial rule instead of an unused logarithm, including at zero when the exponent permits a derivative there.
The runtime logarithm preserves mixed derivatives at nonzero inputs. This uses mathlib's real logarithm, which is smooth for negative as well as positive inputs.
The runtime square root preserves mixed derivatives at nonzero inputs. For negative exact-real inputs, both the runtime and mathlib use the locally constant zero branch. No derivative claim at zero or about native floating-point square roots is made.
The actual constant-exponent dual rule agrees with mathlib's real-power derivative.
At zero, the exponent must be zero or at least one. Positive integer powers therefore include zero and negative inputs without passing through a logarithm. This concerns exact-real coefficients; it does not assert an error bound for floating-point powers.
The actual dual power rule differentiates a positive base and a varying exponent together.
Both input curves may vary. Positivity is the domain of the logarithmic formula; the selected constant-exponent branch agrees with the same derivative when the exponent direction is zero. This is an exact-real statement, not a rounding theorem for a floating-point implementation.
The actual dual angle rule differentiates two real curves away from the branch cut.
The slit-plane hypothesis excludes the origin and negative real axis. This is an exact-real result, not an accuracy theorem for floating-point execution.