Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.finite-state-controller

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/finite_state_controller.clj2 definitions, 3 theorems

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?

DefinitionSource, line 40

fsc/prefers-action-zero? :
  (x₁ x₂ : ℚ≥0)
  → data/Bool

ℚ≥0 = nnrat/NonnegativeRational

fsc/node-value

DefinitionSource, line 45

fsc/node-value :
  (x₁ x₂ : ℚ≥0)
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

fsc/prefers-example

TheoremWorked exampleNo axiomsSource, line 54

fsc/prefers-example :
  → bo/is-safe 3/4 1/2 = data/true

= = equality/Eq

fsc/selected-value

TheoremWorked exampleNo axiomsSource, line 60

fsc/selected-value :
  → fsc/node-value 3/4 1/2 = 3/4

= = equality/Eq

fsc/switches

TheoremWorked exampleNo axiomsSource, line 66

fsc/switches :
  → bo/is-safe 1/2 3/4 = data/false

= = equality/Eq