equational-reasoning: Proof assistant for Haskell using DataKinds & PolyKinds

[ bsd3, library, math ] [ Propose Tags ] [ Report a vulnerability ]

A simple convenient library to write equational / preorder proof as in Agda. Since 0.6.0.0, this no longer depends on singletons package, and the Proof.Induction module goes to equational-reasoning-induction package.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1.0, 0.0.3.0, 0.0.4.0, 0.0.4.1, 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.5, 0.2.0.6, 0.2.0.7, 0.3.0.0, 0.4.0.0, 0.4.1.0, 0.4.1.1, 0.5.0.0, 0.5.1.0, 0.5.1.1, 0.6.0.0, 0.6.0.1, 0.6.0.2, 0.6.0.3, 0.6.0.4, 0.7.0.0, 0.7.0.1, 0.7.0.2, 0.7.0.3, 0.7.1.0 (info)
Change log Changelog.md
Dependencies base (>=4.13 && <5), containers (>=0.5 && <0.8), template-haskell (>=2.11 && <2.24), th-desugar (>=1.13 && <1.19), void (>=0.6 && <0.8) [details]
Tested with ghc ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.4 || ==9.10.1 || ==9.12.1
License BSD-3-Clause
Copyright (c) Hiromi ISHII 2013-2020
Author Hiromi ISHII
Maintainer konn.jinro_at_gmail.com
Category Math
Source repo head: git clone git://github.com/konn/equational-reasoning-in-haskell.git
Uploaded by HiromiIshii at 2025-01-02T06:49:25Z
Distributions LTSHaskell:0.7.1.0, NixOS:0.7.0.3, Stackage:0.7.1.0
Reverse Dependencies 9 direct, 14 indirect [details]
Downloads 19569 total (49 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2025-01-02 [all 1 reports]

Readme for equational-reasoning-0.7.1.0

[back to package description]

Agda-style Equational Reasoning in Haskell by Data Kinds

Build Status Hackage

What is this?

This library provides means to prove equations in Haskell. You can prove equations in Agda's EqReasoning like style.

See blow for an example:

plusZeroL :: SNat m -> Zero :+: m :=: m
plusZeroL SZero = Refl
plusZeroL (SSucc m) =
  start (SZero %+ (SSucc m))
    === SSucc (SZero %+ m)    `because`   plusSuccR SZero m
    === SSucc m               `because`   succCongEq (plusZeroL m)

It also provides some utility functions to use an induction.

For more detail, please read source codes!

TODOs

  • Automatic generation for induction schema for any inductive types.