Theorem proving for all: equational reasoning in liquid Haskell (functional pearl)

Niki Vazou, Joachim Breitner, Rose Kunkel, David Van Horn, G. Hutton
{"title":"Theorem proving for all: equational reasoning in liquid Haskell (functional pearl)","authors":"Niki Vazou, Joachim Breitner, Rose Kunkel, David Van Horn, G. Hutton","doi":"10.1145/3242744.3242756","DOIUrl":null,"url":null,"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).","PeriodicalId":318201,"journal":{"name":"Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell","volume":"10 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-09-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"20","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3242744.3242756","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 20

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).
对所有人的定理证明:液体Haskell(泛函珍珠)中的等式推理
等式推理是纯函数式语言(如Haskell)的关键特性之一。然而,到目前为止,这样的推理总是在Haskell外部进行,要么是在纸上手动进行,要么是在定理证明器中机械化进行。本文展示了如何在Haskell内部直接无缝地执行等式推理,并使用Liquid Haskell进行检查。特别是,语言学习者——外部定理证明者是遥不可及的——可以从他们的证明被机械地检查中受益。具体地说,我们展示了Graham教科书中的等式证明和推导如何被改写为Haskell中的证明(剧透:它们看起来本质上是一样的)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信