Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.prob-programming
AHoF V25 Probabilistic Programming: an observe/factor statement reweights the trace by the observation likelihood; the trace score combines two factors multiplicatively score a b = a * b. Proved native and axiom-free (worked scores by cross-product equivalence). 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.prob-programming` prints this classification.
prob-prog/score
prob-prog/score : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
prob-prog/likely-trace
prob-prog/likely-trace : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
prob-prog/unlikely-trace
prob-prog/unlikely-trace : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
prob-prog/score-unfold
prob-prog/score-unfold : (a b : ℚ≥0) → prob-prog/score a b = a · b
= = equality/Eq· = nnrat/multiplyℚ≥0 = nnrat/NonnegativeRational
prob-prog/likely-trace-is-one-eighth
prob-prog/likely-trace-is-one-eighth : → model-est/good-model = 1/8
= = nnrat/equivalent: equality of rational values
prob-prog/unlikely-trace-is-one-sixteenth
prob-prog/unlikely-trace-is-one-sixteenth : → model-est/poor-model = 1/16
= = nnrat/equivalent: equality of rational values
prob-prog/combined
prob-prog/combined : → proposition/conjunction (model-est/good-model = 1/8) (model-est/poor-model = 1/16)
= = nnrat/equivalent: equality of rational values