GithubHelp home page GithubHelp logo

silky / latte Goto Github PK

View Code? Open in Web Editor NEW

This project forked from latte-central/latte

0.0 1.0 0.0 306 KB

LaTTe : a Laboratory for Type Theory experiments (in clojure)

Home Page: http://latte-central.github.io/LaTTe/

License: MIT License

Clojure 100.00%

latte's Introduction

LaTTe

http://latte-central.github.io/LaTTe/

             ((((
            ((((
             ))))
          _ .---.
         ( |`---'|
          \|     |
          : .___, :
           `-----'  -Karl

LaTTe : a Laboratory for Type Theory experiments (in clojure)

Clojars Project

What?

LaTTe is a proof assistant library based on type theory (a variant of λD as described in the book Type theory and formal proof: an introduction).

The specific feature of LaTTe is its design as a library (unlike most proof assistant, generally designed as tools) tightly integrated with the Clojure language. It is of course fully implemented in Clojure, but most importantly all the definitional aspects of the assistant (definitions, theorem and axioms) are handled using Clojure namespaces, definitions and macros.

For example, the fact that logical implication is reflexive can be stated directly as a Clojure top-level form:

(defthm impl-refl
  "Implication is reflexive."
  [[A :type]]
  (==> A A))

in plain text:

assuming a type A, then A implies A.

The proof of the theorem can be also constructed as a Clojure form:

  • either giving a lambda-term as a direct proof (exploiting the proposition-as-type, proof-as-term correspondance) :
(proof impl-refl
  :term (lambda [x A] x))

(i.e. the identity function is a proof of reflexivity for implication)

  • or using a declarative proof script:
(proof impl-refl
       :script
       (assume [x A]
         (have concl A :by x)
         (qed concl)))

... which, with some training, can be read as a "standard" mathematical proof:

assuming A holds, as an hypothesis named x we can deduce A by x hence A implies A as stated (QED).

Of course, all the proofs are checked for correctness. Without the introduction of an inconsistent axiom (and assuming the correctness of the implementation of the LaTTe kernel), no mathematical inconsistency can be introduced by the proof form.

Yes, but what?

LaTTe helps you formalize mathematic concepts and construct formal proofs of theorems (propositions) about such concepts. Given the tight integration with the Clojure language, existing Clojure development environments (e.g. Cider) can be used as an interactive proof assistant.

How?

There will be a tutorial at some point ...

The reference documentation is at: http://fredokun.github.io/LaTTe/

Who?

LaTTe may be of some interest for you:

  • obviously if you are interested in type theory and the way it can be implemented on a Computer. LaTTe has been implemented with readability and simplicify in mind (more so than efficiency or correctness),
  • probably if you are interested in the "mechanical" formalization of mathematics, intuitionistic logic, etc. (although you might not learn much, you may be interested in contributing definitions, theorems and proofs),
  • maybe if you are curious about the lambda-calculus (the underlying theory of your favorite programming language) and dependent types (a current trend) and what you can do with these besides programming.

When?

LaTTe is, at least for now, an experiment more than a finalized product, but it is already usable.

A few non-trivial formalizations have been conducted using LaTTe:

Contributions such as mathematical content or enhancement/correction of the underlying machinery are very much welcomed.


Copyright (C) 2015-2016 Frederic Peschanski (MIT license, cf. LICENSE)

latte's People

Contributors

fredokun avatar

Watchers

 avatar

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.