Skip to content
vic

statebox/idris-ct

formally verified category theory library

statebox/idris-ct.json
{
"createdAt": "2019-03-26T19:42:25Z",
"defaultBranch": "master",
"description": "formally verified category theory library",
"fullName": "statebox/idris-ct",
"homepage": "",
"language": "Idris",
"name": "idris-ct",
"pushedAt": "2020-06-23T14:34:39Z",
"stargazersCount": 266,
"topics": [
"category-theory",
"formal-proofs",
"formal-verification"
],
"updatedAt": "2025-10-29T10:20:08Z",
"url": "https://github.com/statebox/idris-ct"
}

Build Status License: AGPL v3

This repository contains several definitions from category theory.

The project is written in Idris, which allows us to state properties (logical propositions) of the code, along with their formal proofs, in the code itself. These provide guarantees that the code is correct by construction.

Moreover, we are using literate Idris, so that we can seamlessly integrate code and documentation, and produce prose documentation alongside the compiled artifacts.

If you want a more detailed and slow introduction to the library, please have a look at the series of blog posts we are writing:

If you have Nix installed, you can build the project just by doing

nix-build

For additional targets, have a look at the instructions in [default.nix]!(default.nix).

If you get an error message like error: cloning builder process: Operation not permitted, run

sysctl kernel.unprivileged_userns_clone=1

as suggested in https://github.com/NixOS/nix/issues/2633

You’ll need lhs2tex, latexmk and Idris.

Use make to generate the PDF documentation. You will find it in the docs directory. Look directly in the [Makefile]!(Makefile) for additional options.

You can also consult the documentation directly here.

Use make compare to output which files have not been converted to Idris2.

If the executable has already been generated, simply execute ./compare src/ idris2/ to rerun the comparaison between the two file trees.

You can build manually all the code using

idris --checkpkg idris-ct.ipkg

Alternatively you can build the library with elba using

elba build

The preferred way to use this library as a dependency for another project is using elba.

It should be enough to add the following section

[dependencies]
"statebox/idris-ct" = { git = "https://github.com/statebox/idris-ct" }

to the elba.toml file of your project.

Unless explicitly stated otherwise all files in this repository are licensed under the GNU Affero General Public License.

Copyright © 2019 Stichting Statebox.