Proofs of randomized algorithms in CoQ

  • Authors:
  • Philippe Audebaud;Christine Paulin-Mohring

  • Affiliations:
  • ENS Lyon and INRIA Sophia-Antipolis, Sophia Antipolis, France;LRI, Université Paris Sud and INRIA Futurs, Bât. 490, Université Paris Sud, Orsay, France

  • Venue:
  • MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Randomized algorithms are widely used either for finding efficiently approximated solutions to complex problems, for instance primality testing, or for obtaining good average behavior, for instance in distributed computing. Proving properties of such algorithms requires subtle reasoning both on algorithmic and probabilistic aspects of the programs. Providing tools for the mechanization of reasoning is consequently an important issue. Our paper presents a new method for proving properties of randomized algorithms in a proof assistant based on higher-order logic. It is based on the monadic interpretation of randomized programs as probabilistic distribution [1]. It does not require the definition of an operational semantics for the language nor the development of a complex formalization of measure theory, but only use functionals and algebraic properties of the unit interval. Using this model, we show the validity of general rules for estimating the probability for a randomized algorithm to satisfy certain properties, in particular in the case of general recursive functions. We apply this theory for formally proving a program implementing a Bernoulli distribution from a coin flip and the termination of a random walk. All the theories and results presented in this paper have been fully formalized and proved in the Coq proof assistant [2].