146 research outputs found
Category theoretic structure of setoids
A setoid is a set together with a constructive representation of an equivalence relation on it. Here, we give category theoretic support to the notion. We first define a category Setoid and prove it is cartesian closed with coproducts. We then enrich it in the cartesian closed category Equiv of sets and classical equivalence relations, extend the above results, and prove that Setoid as an Equiv-enriched category has a relaxed form of equalisers. We then recall the definition of E-category, generalising that of Equiv-enriched category, and show that Setoid as an E-category has a relaxed form of coequalisers. In doing all this, we carefully compare our category theoretic constructs with Agda code for type-theoretic constructs on setoids
Constructing categories and setoids of setoids in type theory
In this paper we consider the problem of building rich categories of setoids,
in standard intensional Martin-L\"of type theory (MLTT), and in particular how
to handle the problem of equality on objects in this context. Any
(proof-irrelevant) family F of setoids over a setoid A gives rise to a category
C(A, F) of setoids with objects A. We may regard the family F as a setoid of
setoids, and a crucial issue in this article is to construct rich or large
enough such families. Depending on closure conditions of F, the category C(A,
F) has corresponding categorical constructions. We exemplify this with finite
limits. A very large family F may be obtained from Aczel's model construction
of CZF in type theory. It is proved that the category so obtained is isomorphic
to the internal category of sets in this model. Set theory can thus establish
(categorical) properties of C(A, F) which may be used in type theory. We also
show that Aczel's model construction may be extended to include the elements of
any setoid as atoms or urelements. As a byproduct we obtain a natural extension
of CZF, adding atoms. This extension, CZFU, is validated by the extended model.
The main theorems of the paper have been checked in the proof assistant Coq
which is based on MLTT. A possible application of this development is to
integrate set-theoretic and type-theoretic reasoning in proof assistants.Comment: 14 page
W-types in setoids
W-types and their categorical analogue, initial algebras for polynomial
endofunctors, are an important tool in predicative systems to replace
transfinite recursion on well-orderings. Current arguments to obtain W-types in
quotient completions rely on assumptions, like Uniqueness of Identity Proofs,
or on constructions that involve recursion into a universe, that limit their
applicability to a specific setting. We present an argument, verified in Coq,
that instead uses dependent W-types in the underlying type theory to construct
W-types in the setoid model. The immediate advantage is to have a proof more
type-theoretic in flavour, which directly uses recursion on the underlying
W-type to prove initiality. Furthermore, taking place in intensional type
theory and not requiring any recursion into a universe, it may be generalised
to various categorical quotient completions, with the aim of finding a uniform
construction of extensional W-types.Comment: 17 pages, formalised in Coq; v2: added reference to formalisatio
Terminal semantics for codata types in intensional Martin-L\"of type theory
In this work, we study the notions of relative comonad and comodule over a
relative comonad, and use these notions to give a terminal coalgebra semantics
for the coinductive type families of streams and of infinite triangular
matrices, respectively, in intensional Martin-L\"of type theory. Our results
are mechanized in the proof assistant Coq.Comment: 14 pages, ancillary files contain formalized proof in the proof
assistant Coq; v2: 20 pages, title and abstract changed, give a terminal
semantics for streams as well as for matrices, Coq proof files updated
accordingl
Quotient completion for the foundation of constructive mathematics
We apply some tools developed in categorical logic to give an abstract
description of constructions used to formalize constructive mathematics in
foundations based on intensional type theory. The key concept we employ is that
of a Lawvere hyperdoctrine for which we describe a notion of quotient
completion. That notion includes the exact completion on a category with weak
finite limits as an instance as well as examples from type theory that fall
apart from this.Comment: 32 page
Experience Implementing a Performant Category-Theory Library in Coq
We describe our experience implementing a broad category-theory library in
Coq. Category theory and computational performance are not usually mentioned in
the same breath, but we have needed substantial engineering effort to teach Coq
to cope with large categorical constructions without slowing proof script
processing unacceptably. In this paper, we share the lessons we have learned
about how to represent very abstract mathematical objects and arguments in Coq
and how future proof assistants might be designed to better support such
reasoning. One particular encoding trick to which we draw attention allows
category-theoretic arguments involving duality to be internalized in Coq's
logic with definitional equality. Ours may be the largest Coq development to
date that uses the relatively new Coq version developed by homotopy type
theorists, and we reflect on which new features were especially helpful.Comment: The final publication will be available at link.springer.com. This
version includes a full bibliography which does not fit in the Springer
version; other than the more complete references, this is the version
submitted as a final copy to ITP 201
Constructing a universe for the setoid model
The setoid model is a model of intensional type theory that validates certain extensionality principles, like function extensionality and propositional extensionality, the latter being a limited form of univalence that equates logically equivalent propositions. The appeal of this model construction is that it can be constructed in a small, intensional, type theoretic metatheory, therefore giving a method to boostrap extensionality. The setoid model has been recently adapted into a formal system, namely Setoid Type Theory (SeTT). SeTT is an extension of intensional Martin-L\uf6f type theory with constructs that give full access to the extensionality principles that hold in the setoid model. Although already a rich theory as currently defined, SeTT currently lacks a way to internalize the notion of type beyond propositions, hence we want to extend SeTT with a universe of setoids. To this aim, we present the construction of a (non-univalent) universe of setoids within the setoid model, first as an inductive-recursive definition, which is then translated to an inductive-inductive definition and finally to an inductive family. These translations from more powerful definition schemas to simpler ones ensure that our construction can still be defined in a relatively small metatheory which includes a proof-irrelevant identity type with a strong transport rule
Formalizing of Category Theory in Agda
The generality and pervasiness of category theory in modern mathematics makes
it a frequent and useful target of formalization. It is however quite
challenging to formalize, for a variety of reasons. Agda currently (i.e. in
2020) does not have a standard, working formalization of category theory. We
document our work on solving this dilemma. The formalization revealed a number
of potential design choices, and we present, motivate and explain the ones we
picked. In particular, we find that alternative definitions or alternative
proofs from those found in standard textbooks can be advantageous, as well as
"fit" Agda's type theory more smoothly. Some definitions regarded as equivalent
in standard textbooks turn out to make different "universe level" assumptions,
with some being more polymorphic than others. We also pay close attention to
engineering issues so that the library integrates well with Agda's own standard
library, as well as being compatible with as many of supported type theories in
Agda as possible
- âŠ