# A domain-theoretic framework for conditional probability and Bayesian updating in programming

arXiv: https://arxiv.org/abs/2502.00949 · HTML: https://mlsanity.com/paper/2502.00949/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 2 Feb 2025.

## Built on by (most cited first, 1 of 1)

- [Your Group-Relative Advantage Is Biased](https://mlsanity.com/paper/2601.08521/) (2026)

## Abstract (arXiv)

We present a domain-theoretic framework for probabilistic programming that provides a constructive definition of conditional probability and addresses computability challenges previously identified in the literature. We introduce a novel approach based on an observable notion of events that enables computability. We examine two methods for computing conditional probabilities -- one using conditional density functions and another using trace sampling with rejection -- and prove they yield consistent results within our framework. We implement these ideas in a simple probabilistic functional language with primitives for sampling and evaluation, providing both operational and denotational semantics and proving their consistency. Our work provides a rigorous foundation for implementing conditional probability in probabilistic programming languages.
