Quasi-Borel Spaces in Rocq

Introduction

Quasi-Borel spaces solve a fundamental problem: the category of measurable spaces is not cartesian closed, which prevents giving semantics to higher-order probabilistic programs. QBS replaces measurable sets with “random elements” (morphisms from \(\mathbb {R}\)), yielding a cartesian-closed category with a well-behaved probability monad.

This formalization follows: