Code Monkey home page Code Monkey logo

cedille-core's Introduction

Cedille-Core

A minimal (1k LOC) programming language capable of proving theorems about its own terms.

What that means?

There are big and small programming languages out there. C++ and Haskell are big languages. Other languages, such as Brainfuck, are so simple they could be implemented in 317 Python characters. The Lambda Calculus is popular for being a simple language that serves as the foundation of many functional programming languages.

Despite being turing-complete, there is one thing those languages can't do: expressing and proving mathematical theorems about its own terms. The few languages that can do that are rather big: Idris, Agda, Coq and Isabelle are examples. Some languages like the Calculus of Constructions (such as implemented on Haskell-Morte-Library) are small and capable of expressing and proving mathematical theorems about its own terms, but, since their expressivity is very limited, they're not useful for proving useful properties about everyday programs and applications. Until recently, we had no language that was both small and featured practical theorem proving.

Cedille is a language developed by Aaron Stump, aiming to solve that problem, among others. It is capable of proving useful theorems about its own terms, yet can be implemented in a very small amount of code. Cedille-Core is a compressed version of Cedille with less type inference and smaller code size.

Syntax

name syntax description
type of types Type the type of types
kind Kind the type of type of types
lambda [var : type] body a function
-lambda [var : type] body a computationally irrelevant function
forall {var : type} body the type of a function
-forall {var : type} body the type of a computationally irrelevant function
application (f x) application of lambda f to argument x
-application (f -x) application of lambda f to erased argument x
intersection <x : A> B type of a term t that has type A and [t/x]B
both @x B a b intersection of terms a : A and b : B[a/x]
first .a first, erased view of a dependent intersection
second +a second, full view of a dependent intersection
equality |a = b| proposition that terms a and b of possibly different types are equal
reflexivity $a b proof that |a = a|, erasing to b
symmetry ~a if a proves |a = b|, then a proves |b = a|
rewrite %x A e a if e proves |x = y|, replaces x by y on the type A of term a
cast ^e a b if e proves |a = b|, then cast term b to the type of term a
definition def x t u replaces ocurrences of x in u by t

Technical specification

Please check the specification repository.

rules.png

cedille-core's People

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.