Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.discrete-filter

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/discrete_filter.clj3 definitions, 4 theorems

AHoF D66 Discrete State Filter (recursive Bayesian filtering over a finite state space): each step multiplies the prior belief in a state by the measurement likelihood to get the unnormalized posterior weight, then renormalizes: posterior-weight likelihood prior = likelihood * prior. A state with likelihood 1/2 and prior 1/4 gets weight 1/8; a less-likely state (likelihood 1/4, prior 1/4) gets the smaller weight 1/16, so the update concentrates belief on better-explained states. Weights are proved by cross-product equivalence. Proved native and axiom-free. Scope (measured by the kernel): this module has 3 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.discrete-filter` prints this classification.

discrete-filter/posterior-weight

DefinitionSource, line 51

discrete-filter/posterior-weight :
  (x₁ x₂ : ℚ≥0)
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

discrete-filter/high-state

DefinitionSource, line 57

discrete-filter/high-state :
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

discrete-filter/low-state

DefinitionSource, line 60

discrete-filter/low-state :
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

discrete-filter/posterior-weight-unfold

TheoremHolds by unfolding a definitionNo axiomsSource, line 66

discrete-filter/posterior-weight-unfold :
  (likelihood prior : ℚ≥0)
  → baseline/contribution likelihood prior = likelihood · prior

= = equality/Eq· = nnrat/multiplyℚ≥0 = nnrat/NonnegativeRational

discrete-filter/high-weight-is-one-eighth

TheoremWorked exampleNo axiomsSource, line 76

discrete-filter/high-weight-is-one-eighth :
  → model-est/good-model = 1/8

= = nnrat/equivalent: equality of rational values

discrete-filter/low-weight-is-one-sixteenth

TheoremWorked exampleNo axiomsSource, line 82

discrete-filter/low-weight-is-one-sixteenth :
  → model-est/poor-model = 1/16

= = nnrat/equivalent: equality of rational values

discrete-filter/discrete-filter

TheoremWorked exampleNo axiomsSource, line 88

discrete-filter/discrete-filter :
  → proposition/conjunction (model-est/good-model = 1/8) (model-est/poor-model = 1/16)

= = nnrat/equivalent: equality of rational values