https://github.com/forked-from-1kasper/anders
Anders: Cubical Type Checker
https://github.com/forked-from-1kasper/anders
ctt cubical-type-theory dependent-type-theory dependent-types homotopy-type-theory hott mltt proof-assistant theorem-prover type-checker type-system
Last synced: 29 days ago
JSON representation
Anders: Cubical Type Checker
- Host: GitHub
- URL: https://github.com/forked-from-1kasper/anders
- Owner: forked-from-1kasper
- License: isc
- Created: 2022-02-28T12:25:34.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-23T16:26:40.000Z (over 1 year ago)
- Last Synced: 2025-04-02T21:51:25.005Z (about 2 months ago)
- Topics: ctt, cubical-type-theory, dependent-type-theory, dependent-types, homotopy-type-theory, hott, mltt, proof-assistant, theorem-prover, type-checker, type-system
- Language: OCaml
- Homepage:
- Size: 4.02 MB
- Stars: 24
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Anders
======```OCaml
type exp =
| EPre of Z.t | EKan of Z.t (* cosmos *)
| EVar of ident | EHole (* variables *)
| EPi of exp * (ident * exp) | ELam of exp * (ident * exp) | EApp of exp * exp (* pi *)
| ESig of exp * (ident * exp) | EPair of tag * exp * exp (* sigma *)
| EFst of exp | ESnd of exp | EField of exp * string (* simga elims/records *)
| EId of exp | ERef of exp | EJ of exp (* strict equality *)
| EPathP of exp | EPLam of exp | EAppFormula of exp * exp (* path equality *)
| EI | EDir of dir | EAnd of exp * exp | EOr of exp * exp | ENeg of exp (* CCHM interval *)
| ETransp of exp * exp | EHComp of exp * exp * exp * exp (* Kan operations *)
| EPartial of exp | EPartialP of exp * exp | ESystem of exp System.t (* partial functions *)
| ESub of exp * exp * exp | EInc of exp * exp | EOuc of exp (* cubical subtypes *)
| EGlue of exp | EGlueElem of exp * exp * exp | EUnglue of exp * exp * exp (* glueing *)
| EEmpty | EIndEmpty of exp (* đ *)
| EUnit | EStar | EIndUnit of exp (* đ *)
| EBool | EFalse | ETrue | EIndBool of exp (* đ *)
| EW of exp * (ident * exp) | ESup of exp * exp | EIndW of exp * exp * exp (* W *)
| EIm of exp | EInf of exp | EIndIm of exp * exp | EJoin of exp (* Infinitesimal Modality *)
```Anders is a HoTT proof assistant based on [CCHM](https://arxiv.org/pdf/1611.02108.pdf)
in flavour of [Cubical Agda](https://agda.readthedocs.io/en/v2.6.2.1/language/cubical.html)
plus strict equality for 2LTT and â modality for synthetic differential geometry.Features
--------* đ, đ, đ, W.
* Pretypes & strict equality.
* Generalized Transport and Homogeneous Composition as primitive Kan operations.
* Cubical subtypes.
* Glue types.
* Coequalizer.
* â modality.
* UTF-8 support including universe levels (i.e. `Uâââ`).
* Lean syntax for Î ÎŁW.
* Poor manâs records as ÎŁ with named accessors to telescope variables.
* 1D syntax with top-level declarations.Setup
-----```shell
$ make
$ dune exec anders help
```Samples
-------You can find some examples in [`library/`](https://github.com/forked-from-1kasper/anders/tree/master/library).
```Lean
def invâČ (A : U) (a b : A) (p : Path A a b) : Path A b a :=
hcomp A (â i) (λ (j : I), [(i = 0) â p @ j, (i = 1) â a]) adef kan (A : U) (a b c d : A) (p : Path A a c) (q : Path A b d) (r : Path A a b) : Path A c d :=
hcomp A (â i) (λ (j : I), [(i = 0) â p @ j, (i = 1) â q @ j]) (r @ i)def comp (A : I â U) (r : I) (u : Î (i : I), Partial (A i) r) (uâ : (A 0)[r ⊠u 0]) : A 1 :=
hcomp (A 1) r (λ (i : I), [(r = 1) â transp ( A (i âš j)) i (u i 1=1)]) (transp ( A i) 0 (ouc uâ))def ghcomp (A : U) (r : I) (u : I â Partial A r) (uâ : A[r ⊠u 0]) : A :=
hcomp A (â r) (λ (j : I), [(r = 1) â u j 1=1, (r = 0) â ouc uâ]) (ouc uâ)
``````shell
$ anders check library/everything.anders
```## Related publications
### MLTT
Type Checker is based on classical MLTT-80 with 0, 1, 2 and W-types.
* Intuitionistic Type Theory [Martin-Löf]
### CCHM
* CTT: a constructive interpretation of the univalence axiom [Cohen, Coquand, Huber, Mörtberg]
* On Higher Inductive Types in Cubical Type Theory [Coquand, Huber, Mörtberg]
* Canonicity for Cubical Type Theory [Huber]
* Canonicity and homotopy canonicity for cubical type theory [Coquand, Huber, Sattler]
* Cubical Synthetic Homotopy Theory [Mörtberg, Pujet]
* Unifying Cubical Models of Univalent Type Theory [Cavallo, Mörtberg, Swan]
* Cubical Agda: A Dependently Typed PL with Univalence and HITs [Vezzosi, Mörtberg, Abel]
* A Cubical Type Theory for Higher Inductive Types [Huber]
* Gluing for type theory [Kaposi, Huber, Sattler]
* Cubical Methods in HoTT/UF [Mörtberg]### HTS
* A simple type system with two identity types [Voevodsky]
* Two-level type theory and applications [Annenkov, Capriotti, Kraus, Sattler]
* Syntax for two-level type theory [Bonacina, Ahrens]### Modalities
Infinitesimal Modality was added for direct support of Synthetic Differential Geometry.
* Differential cohomology in a cohesive â-topos [Schreiber]
* Cartan Geometry in Modal Homotopy Type Theory [Cherubini]
* Differential Cohesive Type Theory [Gross, Licata, New, Paykin, Riley, Shulman, Cherubini]
* Brouwer's fixed-point theorem in real-cohesive homotopy type theory [Shulman]Acknowledgements
----------------* Univalent People
Authors
-------* @siegment
* @tonpaguru