Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.spsa
AHoF O7 SPSA (Simultaneous Perturbation Stochastic Approximation): estimate the gradient from the two-sided perturbation difference (f(x+cD) - f(x-cD))/(2cD); with 2cD=1 the numerator is perturbation-difference f-plus f-minus = f-plus - f-minus. Worked: 3-1=2. Values proved by signed cross-product equivalence. Proved native and axiom-free. Requires signed/subtract, signed/from-nnrat, signed/equivalent (all in the D63 checkpoint). Scope (measured by the kernel): this module has 2 worked instances (statements about specific values) and 1 definitional unfoldings (true by unfolding a definition). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.spsa` prints this classification.
spsa/perturbation-difference
spsa/perturbation-difference : (x₁ x₂ : ℚ) → ℚ
ℚ = signed/SignedRational
spsa/difference-example
spsa/difference-example : → ℚ
ℚ = signed/SignedRational
spsa/flat-example
spsa/flat-example : → ℚ
ℚ = signed/SignedRational
spsa/perturbation-difference-unfold
spsa/perturbation-difference-unfold : (a b : ℚ) → nat-grad/update a b = a - b
- = signed/subtract= = equality/Eqℚ = signed/SignedRational
spsa/difference-example-is-2
spsa/difference-example-is-2 : → dfp/step-example = signed/from-nnrat 2
= = signed/equivalent: equality of rational values
spsa/flat-example-is-0
spsa/flat-example-is-0 : → dfp/no-step = signed/from-nnrat 0
= = signed/equivalent: equality of rational values