GithubHelp home page GithubHelp logo

joewatt95 / lambdacplus Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 34.49 MB

A proof assistant based on the Calculus of Constructions

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

OCaml 0.73% Shell 0.01% HTML 0.04% JavaScript 99.18% Lean 0.05%
dependent-types type-theory theorem-proving proof-assistant

lambdacplus's Introduction

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

lambdacplus's People

Contributors

ahaliq avatar joewatt95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chuabingquan

lambdacplus's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.