Certifying expressive power and algorithms of reversible primitive permutations with Lean
Reversible primitive permutations (RPP) is a class of recursive functions that models reversible computation. We present a proof, which has been verified using the proof-assistant Lean, that demonstrates RPP can encode every primitive recursive function (PRF-completeness) and that each RPP can be en...
Saved in:
Published in | Journal of logical and algebraic methods in programming Vol. 136; p. 100923 |
---|---|
Main Authors | , |
Format | Journal Article |
Language | English |
Published |
Elsevier Inc
01.01.2024
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | Reversible primitive permutations (RPP) is a class of recursive functions that models reversible computation. We present a proof, which has been verified using the proof-assistant Lean, that demonstrates RPP can encode every primitive recursive function (PRF-completeness) and that each RPP can be encoded as a primitive recursive function (PRF-soundness). Our proof of PRF-completeness is simpler and fixes some errors in the original proof, while also introducing a new reversible iteration scheme for RPP. By keeping the formalization and semi-automatic proofs simple, we are able to identify a single programming pattern that can generate a set of reversible algorithms within RPP: Cantor pairing, integer division quotient/remainder, and truncated square root. Finally, Lean source code is available for experiments on reversible computation whose properties can be certified. |
---|---|
ISSN: | 2352-2208 |
DOI: | 10.1016/j.jlamp.2023.100923 |