Saved in:
Bibliographic Details
Main Authors: de Medeiros, Markus, Liu, Puming, Li, Kwing Hei, Aguirre, Alejandro, Birkedal, Lars, Tassarotti, Joseph
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2605.13526
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918502830440448
author de Medeiros, Markus
Liu, Puming
Li, Kwing Hei
Aguirre, Alejandro
Birkedal, Lars
Tassarotti, Joseph
author_facet de Medeiros, Markus
Liu, Puming
Li, Kwing Hei
Aguirre, Alejandro
Birkedal, Lars
Tassarotti, Joseph
contents Most implementations of sampling algorithms for continuous distributions use floating-point numbers, which introduce round-off errors and approximations. These errors can be difficult to analyze, and can cause security issues when used in algorithms for differential privacy. An alternative is to use exact sampling algorithms based on computable reals, which can lazily generate the digits of a continuous sample to arbitrary precision. However, these algorithms are intricate, and implementing and using them involves a combination of semantically challenging language features, such as probabilistic choice, higher-order functions, and dynamically-allocated mutable state. In this paper we present Continuous-Eris, a higher-order separation logic for verifying the correctness of exact sampling algorithms for computable distributions. To demonstrate Continuous-Eris, we verify the correctness of computable samplers for the uniform, Gaussian, and Laplace distributions, as well as a library for exact real arithmetic for working with generated samples. All of the results in this paper have been verified in the Rocq proof assistant.
format Preprint
id arxiv_https___arxiv_org_abs_2605_13526
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Verifying Exact Samplers for Continuous Distributions with a Discrete Program Logic
de Medeiros, Markus
Liu, Puming
Li, Kwing Hei
Aguirre, Alejandro
Birkedal, Lars
Tassarotti, Joseph
Logic in Computer Science
Most implementations of sampling algorithms for continuous distributions use floating-point numbers, which introduce round-off errors and approximations. These errors can be difficult to analyze, and can cause security issues when used in algorithms for differential privacy. An alternative is to use exact sampling algorithms based on computable reals, which can lazily generate the digits of a continuous sample to arbitrary precision. However, these algorithms are intricate, and implementing and using them involves a combination of semantically challenging language features, such as probabilistic choice, higher-order functions, and dynamically-allocated mutable state. In this paper we present Continuous-Eris, a higher-order separation logic for verifying the correctness of exact sampling algorithms for computable distributions. To demonstrate Continuous-Eris, we verify the correctness of computable samplers for the uniform, Gaussian, and Laplace distributions, as well as a library for exact real arithmetic for working with generated samples. All of the results in this paper have been verified in the Rocq proof assistant.
title Verifying Exact Samplers for Continuous Distributions with a Discrete Program Logic
topic Logic in Computer Science
url https://arxiv.org/abs/2605.13526