All Projects → mortberg → Cubicaltt

mortberg / Cubicaltt

Licence: mit
Experimental implementation of Cubical Type Theory

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Cubicaltt

minitt-rs
Dependently-typed lambda calculus, Mini-TT, extended and implemented in Rust
Stars: ✭ 101 (-78.09%)
Mutual labels:  type-theory
cicada
Cicada Language
Stars: ✭ 9 (-98.05%)
Mutual labels:  type-theory
types-and-programming-languages
Exercises from Benjamin Pierce's "Types and Programming Languages" textbook + extras!
Stars: ✭ 92 (-80.04%)
Mutual labels:  type-theory
shapesafe
SHAPE/S∀F∃: static prover/type-checker for N-D array programming in Scala, a use case of intuitionistic type theory
Stars: ✭ 17 (-96.31%)
Mutual labels:  type-theory
Idris-HoTT
Homotopy Type Theory proofs in Idris
Stars: ✭ 19 (-95.88%)
Mutual labels:  type-theory
variant
Variant types in TypeScript
Stars: ✭ 147 (-68.11%)
Mutual labels:  type-theory
reading-material
Reading schedule and our library of pdfs
Stars: ✭ 19 (-95.88%)
Mutual labels:  type-theory
Datafun
Research on integrating datalog & lambda calculus via monotonicity types
Stars: ✭ 287 (-37.74%)
Mutual labels:  type-theory
tt-in-cubical
Type Theory in Type Theory using Cubical Agda
Stars: ✭ 12 (-97.4%)
Mutual labels:  type-theory
Type-Theory
Lecture note on Lambda Calculus and Types for FLOLAC
Stars: ✭ 26 (-94.36%)
Mutual labels:  type-theory
SymmetryBookFormalization
Univalent mathematics in Agda
Stars: ✭ 117 (-74.62%)
Mutual labels:  type-theory
TypeTopology
Logical manifestations of topological concepts, and other things. This version adopts the univalent point of view.
Stars: ✭ 132 (-71.37%)
Mutual labels:  type-theory
Isabelle-HoTT
An experimental implementation of homotopy type theory in the interactive proof assistant Isabelle
Stars: ✭ 30 (-93.49%)
Mutual labels:  type-theory
voile-rs
Dependently-typed row-polymorphic programming language, evolved from minitt-rs
Stars: ✭ 89 (-80.69%)
Mutual labels:  type-theory
lplzoo
Fine-grain implementations of common lambda calculi in Haskell, tested with QuickCheck
Stars: ✭ 32 (-93.06%)
Mutual labels:  type-theory
gidti
Book: Gentle Introduction to Dependent Types with Idris
Stars: ✭ 70 (-84.82%)
Mutual labels:  type-theory
path semantics
A research project in path semantics, a re-interpretation of functions for expressing mathematics
Stars: ✭ 136 (-70.5%)
Mutual labels:  type-theory
Typedefs
Programming language agnostic type construction language based on polynomials.
Stars: ✭ 337 (-26.9%)
Mutual labels:  type-theory
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+564.64%)
Mutual labels:  type-theory
MLPolyR
The MLPolyR programming language, revived
Stars: ✭ 21 (-95.44%)
Mutual labels:  type-theory

Cubical Type Theory

Experimental implementation of Cubical Type Theory in which the user can directly manipulate n-dimensional cubes. The language extends type theory with:

  • Path abstraction and application
  • Composition and transport
  • Equivalences can be transformed into equalities (and univalence can be proved, see "examples/univalence.ctt")
  • Identity types (see "examples/idtypes.ctt")
  • Some higher inductive types (see "examples/circle.ctt" and "examples/integer.ctt")

Because of this it is not necessary to have a special file of primitives (like in cubical), for instance function extensionality is directly provable in the system:

funExt (A : U) (B : A -> U) (f g : (x : A) -> B x)
       (p : (x : A) -> Id (B x) (f x) (g x)) :
       Id ((y : A) -> B y) f g = <i> \(a : A) -> (p a) @ i

For examples, including a demo ("examples/demo.ctt"), see the examples folder. For a summary of where to find the main results of the cubical type theory paper in the examples folder see "examples/summary.ctt".

The following keywords are reserved:

module, where, let, in, split, with, mutual, import, data, hdata,
undefined, PathP, comp, transport, fill, Glue, glue, unglue, U,
opaque, transparent, transparent_all, Id, idC, idJ

Install

You can compile the project using either cabal, make, or stack.

Cabal

To compile the project using cabal, first install the build-time dependencies (either globally or in a cabal sandbox):

cabal install alex happy bnfc

Then the project can be built (and installed):

cabal install

Make

Alternatively, a Makefile is provided:

    make

This assumes that the following Haskell packages are installed using cabal:

  mtl, haskeline, directory, BNFC, alex, happy, QuickCheck

To build the TAGS file, run:

    make TAGS

This assumes that hasktags has been installed.

To clean up, run:

    make clean

Stack

To compile and install the project using stack, run:

    stack setup
    stack install

Usage

To run the system type

cubical <filename>

To see a list of options add the --help flag. In the interaction loop type :h to get a list of available commands. Note that the current directory will be taken as the search path for the imports.

When using cabal sandboxes, cubical can be invoked using

cabal exec cubical <filename>

To enable emacs to edit *.ctt files in cubicaltt-mode, add the following line to your .emacs file:

(autoload 'cubicaltt-mode "cubicaltt" "cubical editing mode" t)
(setq auto-mode-alist (append auto-mode-alist '(("\\.ctt$" . cubicaltt-mode))))

and ensure that the file cubicaltt.el is visible in one of the diretories on emacs' load-path, or else load it in advance, either manually with M-x load-file, or with something like the following line in .emacs:

(load-file "cubicaltt.el")

When using cubicaltt-mode in Emacs, the command cubicaltt-load will launch the interactive toplevel in an Emacs buffer and load the current file. It is bound to C-c C-l by default. If cubical is not on Emacs's exec-path, then set the variable cubicaltt-command to the command that runs it.

References and notes

Authors

Cyril Cohen, Thierry Coquand, Simon Huber, Anders Mörtberg

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].