How to do Proofs: Practically Proving Properties about Effectful Programs' Results (Functional Pearl)
Koen Jacobs, Andreas Nuyts, and Dominique Devriese
(KU Leuven, Belgium; Vrije Universiteit Brussel, Belgium)
Dependently-typed languages are great for stating and proving properties of pure functions.
We can reason about them modularly (state and prove their properties independently of other functions) and non-intrusively (without modifying their implementation).
But what if we are interested in properties about the results of effectful computations?
Ideally, we could keep on stating and proving them just as nicely.
This pearl shows we can.
We formalise a way to lift a property about values to a property about effectful computations producing such values, and we demonstrate that we need not make any sacrifices when reasoning about them.
In addition to this modular and non-intrusive reasoning, our approach offers independence of the underlying monad and allows for readable proofs whose structure follows that of the code.
@InProceedings{TyDe19p1,
author = {Koen Jacobs and Andreas Nuyts and Dominique Devriese},
title = {How to do Proofs: Practically Proving Properties about Effectful Programs' Results (Functional Pearl)},
booktitle = {Proc.\ TyDe},
publisher = {ACM},
pages = {1--13},
doi = {10.1145/3331554.3342603},
year = {2019},
}
Publisher's Version