joewatt95 / lambdacplus

A proof assistant based on the Calculus of Constructions

Home Page:https://joewatt95.github.io/lambdacplus/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

λC+

Introduction

λC+ is a proof assistant implementing a typed lambda calculus that brings the Curry-Howard correspondence to life. At its core is an extension of the Calculus of Constructions.

Try it out here!

Here's an example formalizing the reflexivity of implication in λC+.

theorem A_implies_A :
-- For any proposition A, A implies A itself.
forall (A : Type), A -> A :=
-- A proof of this proposition is a function which takes a proposition A and
-- a proof of `A` and then returns a proof of `A`.
  fun (A : Type) (a : A) => a

Notice that the proof of this theorem looks a lot like the polymorphic identity function.

Syntactically, λC+ looks and feels a lot like the Lean theorem prover, which in turn resembles Coq and Ocaml.

For those who are more comfortable with traditional pen and paper proofs, rather than proofs written as programs, the above theorem can be rewritten using some lightweight syntactic sugar:

theorem A_implies_A :
forall (A : Prop), A -> A :=
-- Assume that `A` is a type (which we can think of as a proposition), and that
-- `a` is a proof of `A`.
  assume (A : Prop) (a : A),
    -- We may conclude `A` because `a` is a proof of it.
    show A, from a

where

  • Prop is a synonym for Type. Writing Prop emphasizes the role of A as a proposition.

  • assume ... and show ..., from ... are syntactic sugar inspired by Lean's structured proofs terms.

We hope that this helps improve the readability of proofs for those who are more used to traditional pen and paper proofs.

Documentation

To learn more about the project, head over to our wiki.

About

A proof assistant based on the Calculus of Constructions

https://joewatt95.github.io/lambdacplus/


Languages

Language:JavaScript 99.2%Language:OCaml 0.7%Language:Lean 0.0%Language:HTML 0.0%Language:Shell 0.0%