Theorem proving for all: equational reasoning in liquid Haskell (functional pearl)
Theorem proving for all: equational reasoning in liquid Haskell (functional pearl)
复制标题
所有人的定理证明:液体 Haskell 中的等式推理(功能性珍珠)
DOI:
10.1145/3242744.3242756
复制
发表时间:
2018
期刊:
影响因子:
--
通讯作者:
G. Hutton
中科院分区:
文献类型:
--
作者:
Niki Vazou;Joachim Breitner;Rose Kunkel;David Van Horn;G. Hutton
Equational reasoning is one of the key features of pure functional languages such as Haskell. To date, however, such reasoning always took place externally to Haskell, either manually on paper, or mechanised in a theorem prover. This article shows how equational reasoning can be performed directly and seamlessly within Haskell itself, and be checked using Liquid Haskell. In particular, language learners --- to whom external theorem provers are out of reach --- can benefit from having their proofs mechanically checked. Concretely, we show how the equational proofs and derivations from Graham's textbook can be recast as proofs in Haskell (spoiler: they look essentially the same).