Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.finite-state-controller
AHoF D76 Finite State Controller: a POMDP policy as a finite-state machine; at a controller node it selects the higher-value action; it keeps the larger value: prefers-action-zero? a b = decide ('b 'a) node-value a b = if ('b 'a) then 'a else 'b over exact rationals. Proved native and axiom-free: the preference decision, the selected value, and the switch. Requires audit/decide-nnrat-at-most, logic/if-data (both in the D63 checkpoint). Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.finite-state-controller` prints this classification.
fsc/prefers-action-zero?
fsc/prefers-action-zero? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
fsc/node-value
fsc/node-value : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
fsc/prefers-example
fsc/prefers-example : → bo/is-safe 3/4 1/2 = data/true
= = equality/Eq
fsc/selected-value
fsc/selected-value : → fsc/node-value 3/4 1/2 = 3/4
= = equality/Eq
fsc/switches
fsc/switches : → bo/is-safe 1/2 3/4 = data/false
= = equality/Eq