[Paper Review] A Trustful Monad for Axiomatic Reasoning with Probability and Nondeterminism
This paper presents the first formalization in Coq of the geometrically convex monad, a trustful model combining probabilistic and nondeterministic choice with idempotent probabilistic choice. It constructs the monad via adjoint functors using formalized convex spaces, semicomplete semilattices, and concrete categories, enabling equational reasoning and verifying consistency of Gibbons and Hinze's axioms without the flawed right-distributivity.
The algebraic properties of the combination of probabilistic choice and nondeterministic choice have long been a research topic in program semantics. This paper explains a formalization in the Coq proof assistant of a monad equipped with both choices: the geometrically convex monad. This formalization has an immediate application: it provides a model for a monad that implements a non-trivial interface which allows for proofs by equational reasoning using probabilistic and nondeterministic effects. We explain the technical choices we made to go from the literature to a complete Coq formalization, from which we identify reusable theories about mathematical structures such as convex spaces and concrete categories, and that we integrate in a framework for monadic equational reasoning.
Motivation & Objective
- To provide a formal, consistent model for monadic equational reasoning combining probabilistic and nondeterministic choices.
- To resolve the inconsistency in Gibbons and Hinze's original axiomatization by removing right-distributivity of bind over probabilistic choice.
- To formalize a monad that supports idempotent probabilistic choice and infinite nondeterministic choice, ensuring algebraic consistency.
- To extend the Monae framework by completing its missing model for combined probabilistic and nondeterministic effects.
- To develop reusable formal mathematical theories (convex spaces, concrete categories, semicomplete semilattices) for future formalizations in program semantics.
Proposed method
- Formalize convex spaces and affine functions to model probabilistic choice and convex combinations.
- Introduce a formalization of the non-empty convex powerset functor to represent nondeterministic choice.
- Define semicomplete semilattice structures to model infinitary nondeterministic choice using Beaulieu's operator.
- Construct concrete categories as a foundation for monad construction via adjoint functors.
- Use adjunctions between convex spaces and semilattices to derive the geometrically convex monad through composition.
- Leverage Coq's packed classes and modular design to ensure reusability and integration with existing formalizations like Monae.
Experimental results
Research questions
- RQ1Can a monad be formally constructed that combines probabilistic and nondeterministic choice while preserving idempotence of probabilistic choice?
- RQ2How can the inconsistency arising from right-distributivity in Gibbons and Hinze's original axiomatization be avoided in a formal model?
- RQ3What formal mathematical structures are needed to support the construction of such a monad in a proof assistant like Coq?
- RQ4Can the geometrically convex monad be built via adjoint functors using reusable, modular components?
- RQ5How can this formalization be integrated into existing frameworks for monadic equational reasoning, such as Monae?
Key findings
- The geometrically convex monad is formally constructed in Coq as the composition of adjoint functors between convex spaces and semicomplete semilattices.
- The formalization successfully avoids the inconsistency of Gibbons and Hinze's original axiomatization by omitting the problematic right-distributivity property.
- The monad supports both idempotent probabilistic choice and infinitary nondeterministic choice, with the latter modeled via Beaulieu's operator.
- The formalization includes reusable theories for convex spaces, convex powersets, semicomplete semilattices, and concrete categories, all integrated into a modular framework.
- The monad is successfully used to mechanize the Monty Hall problem, demonstrating its utility in monadic equational reasoning.
- The work completes the Monae framework by adding a trusted model for the combined probabilistic and nondeterministic interface.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.