English

Functional Pearl: Theorem Proving for All (Equational Reasoning in Liquid Haskell)

Programming Languages 2018-06-12 v1

Abstract

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).

Keywords

Cite

@article{arxiv.1806.03541,
  title  = {Functional Pearl: Theorem Proving for All (Equational Reasoning in Liquid Haskell)},
  author = {Niki Vazou and Joachim Breitner and Will Kunkel and David Van Horn and Graham Hutton},
  journal= {arXiv preprint arXiv:1806.03541},
  year   = {2018}
}

Comments

Submitted to Haskell'18

R2 v1 2026-06-23T02:24:41.760Z