Elementwise #
Elementwise (map) Fréchet-derivative facts for Euclidean vectors.
This is the missing bridge for turning the scalar calculus lemmas in
NN/Proofs/Gradients/Activation.lean into OpSpecFDerivCorrect instances for
vector-valued ops (sigmoid/tanh/softplus/…).
If f is differentiable everywhere with derivative f', then elemwiseVec f is Fréchet
differentiable everywhere with derivative elemwiseDerivCLM f'.
Pointwise (at x) version of hasFDerivAt_elemwiseVec.
This is useful when the scalar HasDerivAt facts are only available at the coordinates of x.
Vectorized form of the previous lemma: mapping f over a tensor is elemwiseVec f on vectors.
This is the statement that lets an elementwise operation's derivative be proved once on
EuclideanSpace and then transported to every tensor of vector shape.
square as an OpSpecFDerivCorrect instance (elementwise x ↦ x^2).
Instances For
sinh as an OpSpecFDerivCorrect instance (elementwise).
Instances For
cosh as an OpSpecFDerivCorrect instance (elementwise).
Instances For
tanh as an OpSpecFDerivCorrect instance (elementwise).
Instances For
sigmoid as an OpSpecFDerivCorrect instance (elementwise).
Instances For
softplus as an OpSpecFDerivCorrect instance (elementwise).
Instances For
SiLU as an OpSpecFDerivCorrect instance (elementwise).
Instances For
Tanh-approximate GELU as an OpSpecFDerivCorrect instance (elementwise).
Instances For
safeLog as an OpSpecFDerivCorrect instance (elementwise), assuming ε > 0.
This is the differentiable calculus fact; the corresponding dot-level VJP correctness lives in
NN.Proofs.Autograd.Core.RealCorrectness.