Setoids in type theory

Formalising mathematics in dependent type theory often requires to represent sets as setoids, i.e. types with an explicit equality relation. This paper surveys some possible definitions of setoids and assesses their suitability as a basis for developing mathematics. According to whether the equality relation is required to be reflexive or not we have total or partial setoid, respectively. There is only one definition of total setoid, but four different definitions of partial setoid, depending on four different notions of setoid function. We prove that one approach to partial setoids in unsuitable, and that the other approaches can be divided in two classes of equivalence. One class contains definitions of partial setoids that are equivalent to total setoids; the other class contains an inherently different definition, that has been useful in the modeling of type systems. We also provide some elements of discussion on the merits of each approach from the viewpoint of formalizing mathematics. In particular, we exhibit a difficulty with the common definition of subsetoids in the partial setoid approach.

[1]  Anne Salvesen,et al.  The strength of the subset type in Martin-Lof's type theory , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[2]  Peter Aczel,et al.  The Type Theoretic Interpretation of Constructive Set Theory: Inductive Definitions , 1986 .

[3]  Stefano Berardi,et al.  Proof-irrelevance out of excluded-middle and choice in the calculus of constructions , 1996, Journal of Functional Programming.

[4]  Bengt Nordström,et al.  Programming in Martin-Lo¨f's type theory: an introduction , 1990 .

[5]  A. Heyting,et al.  Intuitionism: An introduction , 1956 .

[6]  Jawahar Chirimar,et al.  Implementing Constructive Real Analysis: Preliminary Report , 1992, Constructivity in Computer Science.

[7]  Maria Emilia Maietti,et al.  About Effective Quotients in Constructive Type Theory , 1998, TYPES.

[8]  M. Hofmann Extensional concepts in intensional type theory , 1995 .

[9]  T. Coquand,et al.  Metamathematical investigations of a calculus of constructions , 1989 .

[10]  J. Lambek,et al.  Introduction to higher order categorical logic , 1986 .

[11]  Claire Jones Completing the rationals and metric spaces in LEGO , 1993 .

[12]  Rp Rob Nederpelt,et al.  Selected papers on Automath , 1994 .

[13]  Herman Geuvers,et al.  The algebraic hierarchy of the FTA project , 2002 .

[14]  Bengt Nordström,et al.  Programming in Martin-Löf's Type Theory , 1990 .

[15]  Alberto Ciaffaglione,et al.  A Co-inductive Approach to Real Numbers , 1999, TYPES.

[16]  Peter Aczel,et al.  On Relating Type Theories and Set Theories , 1998, TYPES.

[17]  J. Paris,et al.  The Type Theoretic Interpretation of Constructive Set Theory , 1978 .

[18]  Bart Jacobs,et al.  Categorical Logic and Type Theory , 2001, Studies in logic and the foundations of mathematics.

[19]  Peter Dybjer,et al.  Normalization and the Yoneda Embedding , 1998, Math. Struct. Comput. Sci..

[20]  Martin Hofmann,et al.  Elimination of Extensionality in Martin-Löf Type Theory , 1994, TYPES.

[21]  J. G. Cederquist,et al.  A Pointfree Approach to Constructive Analysis in Type Theory , 1997 .

[22]  P. Aczel The Type Theoretic Interpretation of Constructive Set Theory: Choice Principles , 1982 .

[23]  Gilles Barthe,et al.  Extensions of Pure Type Systems , 1995, TLCA.

[24]  Pierre Courtieu,et al.  Représentation d'algèbres non libres en théorie des types. (Representation of Non Free Algebras in Type Theory) , 2001 .

[25]  MA John Harrison PhD Theorem Proving with the Real Numbers , 1998, Distinguished Dissertations.

[26]  John Robert Harrison,et al.  Theorem proving with the real numbers , 1998, CPHC/BCS distinguished dissertations.

[27]  Gérard P. Huet,et al.  Constructive category theory , 2000, Proof, Language, and Interaction.

[28]  Thorsten Altenkirch Extensional equality in intensional type theory , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[29]  Amokrane Saïbi Typing algorithm in type theory with inheritance , 1997, POPL '97.

[30]  Qiao Haiyan Formalising Formulas-as-Types-as-Objects , 1999, TYPES.

[31]  Amy P. Felty,et al.  The Coq proof assistant user's guide : version 5.6 , 1990 .

[32]  Martin Hofmann,et al.  A Simple Model for Quotient Types , 1995, TLCA.

[33]  Zhaohui Luo,et al.  Computation and reasoning - a type theory for computer science , 1994, International series of monographs on computer science.

[34]  Benjamin Werner,et al.  Sets in Types, Types in Sets , 1997, TACS.