• Stars
    star
    203
  • Rank 186,818 (Top 4 %)
  • Language
    OCaml
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

"Between the darkness and the dawn, a red cube rises!": a proof assistant for cartesian cubical type theory

redtt is a core language for cartesian cubical type theory with extension types. We plan to build an extensible interactive proof assistant around it, using ideas from proof assistants like RedPRL, Epigram, and Idris.

Related work: yacctt, RedPRL and cubicaltt.

Feature Summary

redtt is not yet documented; we have the following interesting features:

  • path types definable in terms of more general extension types, which specify the boundary of an n-cube all at once

  • source language with implicit arguments based on a cubical version of higher-order unification

  • predicative hierarchy of cumulative, univalent universes

  • level "polymorphic" definitions achieved using McBride's "Crude But Effective Stratification" (in which each thing is defined at the lowest level possible, and then hoisted upward when needed)

  • two-level type theory in the style of RedPRL: currently we have only pretypes and (kan) types. Once we design a suitable account of exact equality types in the cubical setting, we will add these, and they will live side-by-side with path types as they did in RedPRL.

  • user-defined (parametric) higher inductive types (indexed HITs not yet supported) based on the work of Evan Cavallo and Bob Harper.

  • RedML, a (very) rudimentary tactic language

Features we intend to add in the near future:

  • namespacing

  • indexed higher inductive types

  • a type system for RedML

  • algebraic effects and handlers for RedML

The redtt mathematical library

See library/README.md.

Contributing Guidelines

Help is welcome and desired! Please see the open tickets and especially our Roadmap. Currently, we are trying to limit the dependencies of this code; when something is available as a package, but can easily be coded locally, we prefer the latter.

We also want to avoid using things like syntax extensions/ppxs, though we may end up using one of these for the lexer at one point.

Installing

Prerequisites

prerequisite version how to install
OPAM >= 2.0.5 manually or via package manager

If this is your first time configuring OPAM, please run opam init; this will automatically install OCaml. If you are using a version of OCaml other than 4.09.0, you must run opam switch 4.09.0.

Other recommended packages

We recommend installing merlin and ocp-indent using opam; the easiest way to edit OCaml code out of the box is to install Visual Studio Code along with the OCaml and Reason IDE package by Darin Morrison.

Installing Dependencies

$ git clone https://github.com/RedPRL/redtt
$ cd redtt
$ opam update
$ opam pin add -y redtt . # the first time you build
$ opam upgrade            # after packages change

If you have previously built redtt but some of our dependencies have changed in the meanwhile, opam upgrade might fail. In this case, please first run opam uninstall redtt and then run opam upgrade.

Building

$ make

Toplevel

Requires utop (see prerequisites).

$ make top

Library

$ make library

What's the relationship to RedPRL?

The goal of the RedPRL Development Team is to study implementation techniques for higher dimensional type theory, and determine which ideas lead to the most convenient and ergonomic system for developing both higher dimensional mathematics and higher dimensional programming. To this end, our first experiment was the RedPRL Proof Assistant; our second experiment is the redtt proof assistant, which synthesizes what we learned from the experience of building RedPRL and using it to formalize mathematics.

Acknowledgments

This research was sponsored by the Air Force Office of Scientific Research under grant number FA9550-15-1-0053 and the National Science Foundation under grant number DMS-1638352. We also thank the Logic and Semantics Group at Aarhus University for their hospitality in during the summer of 2018, during which part of this work was undertaken. The views and conclusions contained here are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of any sponsoring institution, government or any other entity.

More Repositories

1

sml-redprl

The People's Refinement Logic
Standard ML
226
star
2

cooltt

๐Ÿ˜ŽTT
OCaml
210
star
3

algaeff

๐Ÿฆ  Reusable components based on algebraic effects
OCaml
44
star
4

stagedtt

๐Ÿช† A Staged Type Theory
OCaml
34
star
5

asai

๐Ÿฉบ A library for compiler diagnostics
OCaml
32
star
6

sml-typed-abts

second-order abstract syntax
Standard ML
31
star
7

algaett

๐Ÿฆ  An experimental elaborator for dependent type theory using effects and handlers
OCaml
30
star
8

mugen

โ™พ๏ธ A library for universe levels and universe polymorphism
OCaml
24
star
9

yuujinchou

๐Ÿ‘น A library for hierarchical names and lexical scoping
OCaml
23
star
10

ocaml-bwd

๐Ÿ”™ Backward lists for OCaml
OCaml
19
star
11

kado

๐ŸงŠ kado ใ‚ซใƒ‰: Cofibrations in Cartesian Cubical Type Theory
OCaml
18
star
12

bantorra

๐Ÿ“š A library for managing libraries and resolving unit paths
OCaml
17
star
13

sml-dependent-lcf

A library for the next generation of LCF refiners, with support for dependent refinementโ€”Long Live the Anti-Realist Struggle!
Standard ML
16
star
14

agda-mugen

A formalization of the theory behind the mugen library
Agda
15
star
15

sml-final-pretty-printer

A Standard ML port of Christiansen, Darais and Ma's Final Pretty Printer
Standard ML
10
star
16

sml-cats

Some basic categorical & algebraic structures for Standard ML
Standard ML
9
star
17

sml-lcf

A general purpose library for writing Classic LCF-with-validations-style refiners. Deprecated in favor of https://github.com/RedPRL/sml-dependent-lcf
Standard ML
5
star
18

sml-telescopes

an abstract data type for telescopes
Standard ML
1
star