Skip to content
Rainbow docs menu

Reference · Algorithm guarantees

rainbow.algorithms.proofs.general-descent

Algorithm guaranteessrc/rainbow/algorithms/proofs/general_descent.clj2 definitions, 3 theorems

The general descent skeleton over signed rationals: the parent of the whole descent family. A step delegates to three pluggable functions -- a direction `direction(point)`, a step length `step-size(point)`, and an update rule `update(point, step, direction)` -- and composes them into the next point. Every concrete descent method (gradient descent, momentum, Newton, ...) is this skeleton with particular plug-ins (AHoF O13). The skeleton is proved once; instances reuse its unfold and iterate recurrence.

optimization/general-descent-step

DefinitionSource, line 39

optimization/general-descent-step :
  (direction : ℚ → ℚ) (step-size : ℚ → ℚ≥0) (update : ℚ → ℚ≥0 → ℚ → ℚ) (point : ℚ)
  → ℚ

ℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational

optimization/general-descent-iterate

DefinitionSource, line 54

optimization/general-descent-iterate :
  (direction : ℚ → ℚ) (step-size : ℚ → ℚ≥0) (update : ℚ → ℚ≥0 → ℚ → ℚ) (x₁ : ℕ) (x₂ : ℚ)
  → ℚ

ℕ = data/Natℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational

optimization/general-descent-step-unfold

TheoremHolds by unfolding a definitionNo axiomsSource, line 78

optimization/general-descent-step-unfold :
  (direction : ℚ → ℚ) (step-size : ℚ → ℚ≥0) (update : ℚ → ℚ≥0 → ℚ → ℚ) (point : ℚ)
  → optimization/general-descent-step direction step-size update point = update point (step-size point) (direction point)

= = equality/Eqℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational

optimization/general-descent-iterate-zero

TheoremHolds by unfolding a definitionNo axiomsSource, line 100

optimization/general-descent-iterate-zero :
  (direction : ℚ → ℚ) (step-size : ℚ → ℚ≥0) (update : ℚ → ℚ≥0 → ℚ → ℚ) (initial : ℚ)
  → optimization/general-descent-iterate direction step-size update 0 initial = initial

= = equality/Eqℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational

optimization/general-descent-iterate-successor

TheoremFor all inputsNo axiomsSource, line 128

optimization/general-descent-iterate-successor :
  (direction : ℚ → ℚ) (step-size : ℚ → ℚ≥0) (update : ℚ → ℚ≥0 → ℚ → ℚ) (steps : ℕ)
  (initial : ℚ)
  → iterate (data/succ steps) initial = (fun x₁ => fun previous => optimization/general-descent-step direction step-size update previous) steps (iterate steps initial)
  where iterate := optimization/general-descent-iterate direction step-size update

= = equality/Eqℕ = data/Natℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational