Code Monkey home page Code Monkey logo

iotatt's Introduction

Iota Type Theory

This is a simple prototype implementation of a pure type system with dependent intersections, a heterogeneous equality, and implicit products. This allows one to have a pure-type-system capable of expressing dependent elimination principals.

Right now, the language only supports adding declarations and type checking them. All files must begin with a module declaration;

module Nat where

After that, a declaration of the form <NAME> : <TYPE> = <TERM> can be declared;

cNat : U[0] = (a : U[0]) -> (a -> a) -> a -> a

cZ : cNat = \ a s z . z

U[0] is a universe. For each natural number i, there is a corresponding type universe U[i], with U[i] : U[i+1], etc.

Implicit products are denoted with curly braces;

{<NAME> : <TYPE>} -> <TYPE>

And implicit lambda binders are denoted with a forward slash

/ <NAME> . <TERM>

To issue an implicit argument, use <TERM> - <TERM>

Lambda terms are denoted with a back-slash. Type annotations are optional, but are sometimes necessary for type inference.

Dependent intersections are denoted

i (<NAME> : <TYPE>) . <TYPE>

Square braces are used for constructing dependent intersections;

[ <TERM> | <TERM> ]

Any term c of a dependent intersection i (x : A) . B x can then be typed as A via c.1, and typed as B c.1 with c.2.

Heterogeneous identity is denoted a ~ b.

Elimination is denoted r(<NAME> . <TYPE>) <EQUATION> . <TERM>.

This is one of the main differences between this implementation and the Stump paper. Here, r binds a variable, and one must provide a type which acts as any possible intermediate substitution. For example, say we had a proof that e : t1 ~ t2, and we knew that p : P t1, and we want to obtain P t2. We have, as an intermediate form, x . P x. We use this in the full elimination

r(x . P x) e . p

Which will be of type P t2. Note that x is only bound in the intermediate type-form, not in anything else. Additionally, reflexive proofs are denoted B.

Install

  • Navigate to directory and run cabal install
  • The iotatt.exe will appear in .\dist\build\iotatt\
  • Load a program with iotatt.exe Nat.itt

References

Authors

Anthony Hart

iotatt's People

Contributors

ahartntkn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

helvm

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.