Supermartingales, Ranking Functions and Probabilistic Lambda Calculus
Andrew Kenyon-Roberts, C.-H. Luke Ong
Abstract
We introduce a method for proving almost sure termination in the context of lambda calculus with continuous random sampling and explicit recursion, based on ranking supermartingales. This result is extended in three ways. Antitone ranking functions have weaker restrictions on how fast they must decrease, and are applicable to a wider range of programs. Sparse ranking functions take values only at a subset of the program's reachable states, so they are simpler to define and more flexible. Ranking functions with respect to alternative reduction strategies give yet more flexibility, and significantly increase the applicability of the ranking supermartingale approach to proving almost sure termination, thanks to a novel (restricted) confluence result which is of independent interest. The notion of antitone ranking function was inspired by similar work by McIver, Morgan, Kaminski and Katoen in the setting of a first-order imperative language, but adapted to a higher-order functional language. The sparse ranking function and confluent semantics extensions are unique to the higher-order setting. Our methods can be used to prove almost sure termination of programs that are beyond the reach of methods in the literature, including higher-order and non-affine recursion.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 276fd063-d5d7-46f2-93e7-9151b135ce2dCited by top-tier papers5
- Guaranteed bounds for posterior inference in universal probabilistic programmingRaven Beutner, C.-H. Luke Ong, Fabian ZaiserPLDI 2022 · 18 citations
- Quantitative Bounds on Resource Usage of Probabilistic ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Dorde ZikelicOOPSLA 2024 · 16 citations
- On probabilistic termination of functional programs with continuous distributionsRaven Beutner, Luke OngPLDI 2021 · 12 citations
- A Hierarchy of Supermartingales for ω-Regular VerificationSatoshi Kura, Hiroshi UnnoPLDI 2026 · 1 citation
- Supermartingales for Unique Fixed Points: A Unified Approach to Lower Bound VerificationSatoshi Kura, Hiroshi Unno, Takeshi TsukadaPLDI 2026
Builds on2
Related papers
- On Lexicographic Proof Rules for Probabilistic TerminationKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Jiri Zárevúcky et al.FM 2021 · 11 citations
- Lexicographic Ranking Supermartingales with Lazy Lower BoundsToru Takisaka, Libo Zhang, Changjiang Wang, Jiamou LiuCAV 2024 · 7 citations
- Learning Probabilistic Termination ProofsAlessandro Abate, Mirco Giacobbe, Diptarko RoyCAV 2021 · 26 citations
- Sound and Complete Proof Rules for Probabilistic TerminationRupak Majumdar, V. R. SathiyanarayanaPOPL 2025 · 16 citations
- On Higher-Order Probabilistic Verification via the Weighted Relational Model of Linear LogicUgo Dal Lago, Guido Fiorillo, Paolo PistoneLICS 2026
