based on plain type theory/set theory:
based on dependent type theory/homotopy type theory:
based on cubical type theory:
1lab (cross-linked reference resource)
based on modal type theory:
based on simplicial type theory:
For monoidal category theory:
projects for formalization of mathematics with proof assistants:
Archive of Formal Proofs (using Isabelle)
ForMath project (using Coq)
UniMath project (using Coq and Agda)
Xena project (using Lean)
Other proof assistants
Historical projects that died out:
With braiding
With duals for objects
category with duals (list of them)
dualizable object (what they have)
ribbon category, a.k.a. tortile category
With duals for morphisms
monoidal dagger-category?
With traces
Closed structure
Special sorts of products
Semisimplicity
Morphisms
Internal monoids
Examples
Theorems
In higher category theory
DisCoPy is a toolbox for computing with string diagrams, monoidal categories and strong monoidal functors in Python. It is available on GitHub.
The name stands for Distributional Compositional Python, indeed the package was first intended as an implementation of the DisCoCat models of natural language.
The core data structure is Diagram
, an implementation of string diagrams in the free premonoidal category.
Fix a monoidal signature for a set of boxes , a set of objects and its free monoid , we write for whenever and . Let , a layer is a triple , where we define and . It is depicted, in string diagram-notation, as:
The set of diagrams is the set of arrows in the free category generated by the layers , considered as a directed graph. Concretely, is given by a length , a domain and a list of layers such that and for each . The codomain of a diagram is the codomain of its last layer .
Note that in order to define a diagram uniquely, its layers have more data than necessary. It is enough to specify a list of generators together with a list : the number of wires on the left of each box. This is the definition used in Delpeuch and Vicary (2018), Globular, homotopy.io as well as DisCoPy.
We can define identity, composition and tensor of diagrams in terms of this combinatorial encoding:
d0 >> d1
or d1 << d0
.d0 @ d1 == d0 @ Id(d1.dom) >> Id(d0.cod) @ d1
.Diagrams in the free monoidal category can be seen as premonoidal diagrams quotiented by the interchanger, i.e. the naturality equation for the monoidal product: for all and . Diagrams in the free rigid monoidal category can be seen as monoidal diagrams with generators for cups and caps quotiented by the snake equations. In practice, these quotients are computed by calling Diagram.normal_form
.
Diagrams are equipped with an involution Diagram.dagger
that implements dagger categories. Furthermore, formal sums of diagrams can also be composed and tensored, making all the diagams enriched in monoids. Although their normal form is not yet implemented, DisCoPy also implements the syntax for diagrams in:
DisCoPy also implements diagrams in hypergraph categories in two different ways:
Diagrams can be evaluated in concrete monoidal categories by applying Functor
instances to them.
Let be the functor that sends a monoidal signature to its free monoidal category, and its right adjoint the forgetful functor. From the free-forgetful adjunction, we get that monoidal functor from a free monoidal category generated by a signature into some monoidal category is uniquely defined by a morphism of signature . That is, in order to define a functor , it’s enough to define two mappings and which commute with and .
Concretely, a DisCoPy functor is defined by F = Functor(ob, ar)
where ob
and ar
are mappings from generating object to types and from box to diagram respectively. These mappings can be either given as Python dictionaries if they have finite domains or as Python functions otherwise. Once its image for each generating object and each box is given, F
can be applied to arbitrary diagrams. An optional argument cod
can be used to define functors with arbitrary categories as codomain. The domain of the functor is given implicitly by the domain of the ob
and ar
maps. By default DisCoPy functors are endofunctors from the free category to itself, i.e. they send diagrams to diagrams.
Currently, DisCoPy implements strong monoidal functors into:
the category of Python functions,
the category of matrices in arbitrary semirings, including finite dimensional vector spaces and finite relations, with either the direct sum or the tensor product as monoidal product,
the category of quantum channels, i.e. finite dimensional Hilbert spaces and completely positive trace preserving (CPTP) maps,
the category of quantum circuits, i.e. with generating objects for classical and quantum digits and generating arrows for quantum gates and measurements.
Thus, DisCoPy can be used as an implementation of categorical quantum mechanics: it can encode any quantum process as a diagram and evaluate it either on quantum hardware or as a classical simulation using monoidal functors.
Diagrams can be used to encode derivations in a formal grammar. Indeed, the first use case of DisCoPy was to apply monoidal diagrams to these grammar diagrams in order to compute their semantics. Currently, DisCoPy can handle the following frameworks:
Giovanni de Felice, Alexis Toumi, Bob Coecke. DisCoPy: Monoidal Categories in Python. Applied Category Theory, 2020. (arXiv:2005.02975)
Konstantinos Meichanetzidis, Stefano Gogioso, Giovanni De Felice, Nicolò Chiappori, Alexis Toumi, Bob Coecke. Quantum Natural Language Processing on Near-Term Quantum Computers. Quantum physics & logic, 2020. (arXiv:2005.04147)
Delpeuch, Antonin, and Jamie Vicary, Normalization for planar string diagrams and a quadratic equivalence algorithm. arXiv preprint arXiv:1804.07832 (2018).
Filippo Bonchi, Fabio Gadducci, Aleks Kissinger, Pawel Sobocinski, Fabio Zanasi, String Diagram Rewrite Theory I: Rewriting with Frobenius Structure. DOI:10.1145/3502719 (2022).
DisCoPy’s documentation. discopy.readthedocs.io
DisCoPy’s repository. github.com/discopy/discopy
Last revised on January 22, 2023 at 16:42:36. See the history of this page for a list of all contributions to it.