Relational Reasoning via Probabilistic Coupling

  • Gilles Barthe
  • Thomas Espitau
  • Benjamin Grégoire
  • Justin HsuEmail author
  • Léo Stefanesco
  • Pierre-Yves Strub
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9450)


Probabilistic coupling is a powerful tool for analyzing pairs of probabilistic processes. Roughly, coupling two processes requires finding an appropriate witness process that models both processes in the same probability space. Couplings are powerful tools proving properties about the relation between two processes, include reasoning about convergence of distributions and stochastic dominance—a probabilistic version of a monotonicity property.

While the mathematical definition of coupling looks rather complex and cumbersome to manipulate, we show that the relational program logic pRHL—the logic underlying the EasyCrypt cryptographic proof assistant—already internalizes a generalization of probabilistic coupling. With this insight, constructing couplings is no harder than constructing logical proofs. We demonstrate how to express and verify classic examples of couplings in pRHL, and we mechanically verify several couplings in EasyCrypt.


Stochastic Dominance Proof Assistant Loop Body Fair Coin Program Verification 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



We thank Arthur Azevedo de Amorim and the anonymous reviewers for their close reading and useful suggestions. This work was partially supported by a grant from the Simons Foundation (#360368 to Justin Hsu), NSF grant CNS-1065060, Madrid regional project S2009TIC-1465 PROMETIDOS, Spanish national projects TIN2009-14599 DESAFIOS 10 and TIN2012-39391-C04-01 Strongsoft, and a grant from the Cofund Action AMAROUT II (#291803).


  1. 1.
    Barthe, G., Grégoire, B., Zanella-Béguelin, S.: Formal certification of code-based cryptographic proofs. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Savannah, Georgia, pp. 90–101, New York (2009)Google Scholar
  2. 2.
    Barthe, G., Crespo, J.M., Kunz, C.: Relational verification using product programs. In: International Symposium on Formal Methods (FM), Limerick, Ireland, pp. 200–214 (2011a)Google Scholar
  3. 3.
    Barthe, G., D’Argenio, P.R., Rezk, T.: Secure information flow by self-composition. Math. Struct. Comput. Sci. 21(06), 1207–1252 (2011b)zbMATHMathSciNetCrossRefGoogle Scholar
  4. 4.
    Barthe, G., Grégoire, B., Heraud, S., Béguelin, S.Z.: Computer-aided security proofs for the working cryptographer. In: Rogaway, P. (ed.) CRYPTO 2011. LNCS, vol. 6841, pp. 71–90. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  5. 5.
    Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Venice, Italy, pp. 14–25 (2004)Google Scholar
  6. 6.
    Deng, Y., Du, W.: Logical, metric, and algorithmic characterisations of probabilistic bisimulation. Technical report CMU-CS-11-110, Carnegie Mellon University, March 2011Google Scholar
  7. 7.
    Lindvall, T.: Lectures on the coupling method. Courier Corporation, Mineola (2002)zbMATHGoogle Scholar
  8. 8.
    Mufa, C.: Optimal markovian couplings and applications. Acta Mathematica Sinica 10(3), 260–275 (1994)zbMATHMathSciNetCrossRefGoogle Scholar
  9. 9.
    Thorisson, H.: Coupling, Stationarity, and Regeneration. Springer, New York (2000)zbMATHCrossRefGoogle Scholar
  10. 10.
    Villani, C.: Optimal Transport: Old and New. Springer Science, Heidelberg (2008)Google Scholar
  11. 11.
    Yang, H.: Relational separation logic. Theor. Comput. Sci. 375(1–3), 308–334 (2007)zbMATHCrossRefGoogle Scholar
  12. 12.
    Zaks, A., Pnueli, A.: CoVaC: compiler validation by program analysis of the cross-product. In: Cuellar, J., Sere, K. (eds.) FM 2008. LNCS, vol. 5014, pp. 35–51. Springer, Heidelberg (2008) CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Gilles Barthe
    • 1
  • Thomas Espitau
    • 1
    • 2
  • Benjamin Grégoire
    • 3
  • Justin Hsu
    • 4
    Email author
  • Léo Stefanesco
    • 1
    • 5
  • Pierre-Yves Strub
    • 1
  1. 1.IMDEA SoftwareMadridSpain
  2. 2.ENS CachanCachanFrance
  3. 3.InriaSophia AntipolisFrance
  4. 4.University of PennsylvaniaPhiladelphiaUSA
  5. 5.ENS LyonLyonFrance

Personalised recommendations