## Coercive Subtyping in Type Theory (1996)

Venue: | Proc. of CSL'96, the 1996 Annual Conference of the European Association for Computer Science Logic, Utrecht. LNCS 1258 |

Citations: | 25 - 14 self |

### BibTeX

@INPROCEEDINGS{Luo96coercivesubtyping,

author = {Zhaohui Luo},

title = {Coercive Subtyping in Type Theory},

booktitle = {Proc. of CSL'96, the 1996 Annual Conference of the European Association for Computer Science Logic, Utrecht. LNCS 1258},

year = {1996},

pages = {draft.}

}

### Years of Citing Articles

### OpenURL

### Abstract

We propose and study coercive subtyping, a formal extension with subtyping of dependent type theories such as Martin-Lof's type theory [NPS90] and the type theory UTT [Luo94]. In this approach, subtyping with specified implicit coercions is treated as a feature at the level of the logical framework; in particular, subsumption and coercion are combined in such a way that the meaning of an object being in a supertype is given by coercive definition rules for the definitional equality. It is shown that this provides a conceptually simple and uniform framework to understand subtyping and coercion relations in type theories with sophisticated type structures such as inductive types and universes. The use of coercive subtyping in formal development and in reasoning about subsets of objects is discussed in the context of computerassisted formal reasoning. 1 Introduction A type in type theory is often intuitively thought of as a set. For example, types in Martin-Lof's type theory [ML84, NPS90...

### Citations

759 | On understanding types, data abstraction and polymorphism - Cardelli, Wegner - 1985 |

696 | A framework for defining logics
- Harper, Honsell, et al.
- 1989
(Show Context)
Citation Context ... typed version of Martin-Lof's logical framework (see Chapter 19 of [NPS90] for a presentation of the latter). We should also point out that LF is different from the Edinburgh Logical Framework (ELF) =-=[HHP87]-=-. The presentation of LF and discussions on how it should be used in specifying type theories can be found in Chapter 9 of [Luo94]. The inference rules of LF are given in Figure 1, which include gener... |

341 |
Intuitionistic type theory
- Martin-Löf
- 1984
(Show Context)
Citation Context ...opted in the presentation of the Extended Calculus of Constructions [Luo90] and used in systems such as Lego), called by Martin-Lof as universes `a la Tarski and universes `a la Russell, respectively =-=[ML84]-=-. The latter approach is based on overloading common term operators and is not quite compatible with the elimination rules when general inductive types are introduced; in particular, the subject reduc... |

264 |
Foundations of Constructive Mathematics
- Beeson
- 1985
(Show Context)
Citation Context ... (fi)-rule, the above rule (Ext) is equivalent to (j)() as equational 1 One may want to consider a more philosophical argument of whether an operation should be considered as typed. See, for example, =-=[Bee85]-=- for some relevant discussions. 2 Contexts and assumptions hi valid \Gamma ` K kind x 62 FV (\Gamma) \Gamma; x:K valid \Gamma; x:K; \Gamma 0 valid \Gamma; x:K; \Gamma 0 ` x : K General equality rules ... |

261 |
Programming in Martin-Löf’s Type Theory: An Introduction
- Nordström, Petersson, et al.
- 1990
(Show Context)
Citation Context ... Fax: (+44)191-3742560, Email: zhaohui.luo@durham.ac.uk Abstract We propose and study coercive subtyping, a formal extension with subtyping of dependent type theories such as Martin-Lof's type theory =-=[NPS90]-=- and the type theory UTT [Luo94]. In this approach, subtyping with specified implicit coercions is treated as a feature at the level of the logical framework; in particular, subsumption and coercion a... |

147 |
The LEGO proof development system: A user's manual
- Luo, Pollack
- 1992
(Show Context)
Citation Context ...ith good proof-theoretic properties. More recently, in Aczel's project on formalising abstract algebraic theories (Galois theory), Bailey has implemented various forms of coercions in the Lego system =-=[LP92]-=-, which are very useful in practical large-scale development of mathematical theories [Bai96]. In this paper, we present an equational formulation of coercive subtyping, a novel approach to introducin... |

108 | Inductively defined types - Coquand, Paulin-Mohring |

108 |
Computation and Reasoning, A Type Theory for Computer Science
- Luo
- 1994
(Show Context)
Citation Context ...haohui.luo@durham.ac.uk Abstract We propose and study coercive subtyping, a formal extension with subtyping of dependent type theories such as Martin-Lof's type theory [NPS90] and the type theory UTT =-=[Luo94]-=-. In this approach, subtyping with specified implicit coercions is treated as a feature at the level of the logical framework; in particular, subsumption and coercion are combined in such a way that t... |

93 | The ALF proof editor and its proof engine - Magnusson, Nordström |

87 |
A modest model of records, inheritance, and bounded quantification
- Bruce, Longo
(Show Context)
Citation Context ... programming (cf., [CW85, Car88]). Semantic studies on subtyping in type systems (without dependent types) such as the second-order lambda calculus (ie, the system F) include the use of the PER model =-=[BL90]-=- and the coercion-based approach [BCGS91]. A more recent logical study of subtyping in system F can be found in [LMS95]. There is not 14 much work on subtyping in dependent type systems in the context... |

84 | An Extended Calculus of Constructions
- Luo
- 1990
(Show Context)
Citation Context ...tion When subtyping is introduced, a type theory does not have the property of unique typing (type uniqueness) anymore. Instead, a notion of principal typing is the best that one can expect (see, eg, =-=[Luo90]-=- for a definition of the notion of principal type for ECC). Intuitively, K is a principal kind of object k if and only if k is of kind K and, for any kind K 0 , k is of kind K 0 if and only if K is a ... |

76 | Inductive sets and families in Martin-Löfs Type Theory and their set-theoretic semantics: An inversion principle for Martin-Löfs type theory - Dybjer - 1991 |

68 | The theory of LEGO: A proof checker for the extended calculus of constructions
- Pollack
- 1994
(Show Context)
Citation Context ...Gog94]. Implemented in the Lego proof development system, UTT has been applied to program specification and verification (eg, [Bur93, BM92]), data refinement [Luo93], and formalisation of mathematics =-=[Pol94]-=-. 2.3 Definitional equality and computational equality We use LF seriously as a meta-level language (see Section 9.1.2 of [Luo94] for a discussion). Along the same line, we make a distinction between ... |

67 | Subtyping dependent types
- Aspinall, Compagnoni
- 1996
(Show Context)
Citation Context ...ems in the context of proof development systems based on type theory. Pfenning's work on refinement types [Pfe93] and Aspinall and Compagnoni's work on the decidability of Edinburgh LF with subtyping =-=[AC96]-=- are among the recent research development. It is clear that coercive subtyping is strongly motivated by the need in proof development, where inductive types are essential. Traditional approaches base... |

52 |
A Typed Operational Semantics for Type Theory
- Goguen
- 1994
(Show Context)
Citation Context ...ctive data types (and inductive families, not covered above), and predicative type universes. UTT has nice meta-theoretic properties such as Church-Rosser, Subject Reduction, and Strong Normalisation =-=[Gog94]-=-. Implemented in the Lego proof development system, UTT has been applied to program specification and verification (eg, [Bur93, BM92]), data refinement [Luo93], and formalisation of mathematics [Pol94... |

42 | Refinement types for logical frameworks
- Pfenning
- 1993
(Show Context)
Citation Context ...ystem F can be found in [LMS95]. There is not 14 much work on subtyping in dependent type systems in the context of proof development systems based on type theory. Pfenning's work on refinement types =-=[Pfe93]-=- and Aspinall and Compagnoni's work on the decidability of Edinburgh LF with subtyping [AC96] are among the recent research development. It is clear that coercive subtyping is strongly motivated by th... |

41 | Typing algorithm in type theory with inheritance
- Saïbi
- 1997
(Show Context)
Citation Context ...s Lego and solves the above problem. 4.4 Interpreting practical forms of coercion Anthony Bailey has recently implemented various interesting and useful coercion mechanisms in Lego [Bai96]. (Also see =-=[Sai96]-=- for a related development in the Coq system.) Bailey has given interesting examples to illustrate the use of implicit coercion to make proof development easier (more readable etc.). We briefly discus... |

36 | extended calculus of constructions - ECC - 1989 |

34 |
Inheritance and explicit coercion
- Breazu-Tannen, Coquand, et al.
- 1991
(Show Context)
Citation Context ...for principal typing, this gives a proof-theoretic (and direct meaningtheoretic) treatment of subtyping as implicit coercions, as compared with its possible model-theoretic semantic counterpart (cf., =-=[BCGS91]-=-). ffl Subtyping is treated as an extension of the underlying logical framework---the meta-language in which type theories are formulated. Making essential use of a typed logical framework LF [Luo94] ... |

29 | Typechecking dependent types and subtypes - Cardelli - 1988 |

28 | Program specification and data refinement in type theory
- Luo
- 1993
(Show Context)
Citation Context ...ject Reduction, and Strong Normalisation [Gog94]. Implemented in the Lego proof development system, UTT has been applied to program specification and verification (eg, [Bur93, BM92]), data refinement =-=[Luo93]-=-, and formalisation of mathematics [Pol94]. 2.3 Definitional equality and computational equality We use LF seriously as a meta-level language (see Section 9.1.2 of [Luo94] for a discussion). Along the... |

24 | A higher-order calculus and theory abstraction
- Luo
- 1991
(Show Context)
Citation Context ...ications such as specification and data refinement (with refinement maps between specifications [Luo93] as coercions), development of mathematical theories in proof development (with theory morphisms =-=[Luo91]-=- as coercions [Bai96]), and library structuring for proof reuse [Luo95]. Subtyping is in general a subtle issue partly because, in the presence of (arbitrary) subtyping, a judgement of the form k :: K... |

20 | Implicit syntax
- Pollack
- 1990
(Show Context)
Citation Context ...n interesting conversation on this topic, which has helped to spot an error in an earlier version of this paper. 13 The above discussion on type-casting is an example of understanding implicit syntax =-=[Pol90]-=- (via coercive subtyping). It would be interesting to study whether other forms of implicit syntax can be understood in such a manner. 5 Conclusions, related work, and further research The central ide... |

17 | Deliverables: a categorical approach to program development in type theory - Burstall, McKinna - 1992 |

17 |
Analytic and Synthetic Judgements in Type Theory", Kant and Contemporary
- MARTIN-LÖF
- 1994
(Show Context)
Citation Context ...roof reuse [Luo95]. Subtyping is in general a subtle issue partly because, in the presence of (arbitrary) subtyping, a judgement of the form k :: K is a synthetic judgement in the sense of Martin-Lof =-=[ML94]-=-; that is, the judgement form is essentially existential and hence in general undecidable, unless the formulation of the system has certain restrictions. Coercive subtyping offers one such restriction... |

14 | A logic of subtyping
- Longo, Milsted, et al.
- 1995
(Show Context)
Citation Context ... second-order lambda calculus (ie, the system F) include the use of the PER model [BL90] and the coercion-based approach [BCGS91]. A more recent logical study of subtyping in system F can be found in =-=[LMS95]-=-. There is not 14 much work on subtyping in dependent type systems in the context of proof development systems based on type theory. Pfenning's work on refinement types [Pfe93] and Aspinall and Compag... |

14 |
A unifying theory of dependent types: the schematic approach
- Luo
- 1992
(Show Context)
Citation Context ... development system, it is natural to assume such extensions of the basic subtyping relation, unless requested otherwise by the user (e.g., by giving a specific coercion between two \Sigma-types). In =-=[Luo92]-=- we have suggested how subtyping can in general be extended to inductive types on the basis of the inductive schemata. Here, we extend the idea to coercive subtyping, which gives a systematic extensio... |

9 |
Lego with implicit coercions
- Bailey
- 1996
(Show Context)
Citation Context ...ct algebraic theories (Galois theory), Bailey has implemented various forms of coercions in the Lego system [LP92], which are very useful in practical large-scale development of mathematical theories =-=[Bai96]-=-. In this paper, we present an equational formulation of coercive subtyping, a novel approach to introducing user-specified implicit coercions into dependent type theories that can be formulated in a ... |

6 |
Simple overloading for type theories
- Aczel
- 1994
(Show Context)
Citation Context ... believe that coercive subtyping provides easier and more powerful reasoning mechanisms for reasoning about subsets of objects as well as for reusing proven results in developed formal theories (cf., =-=[Acz94]-=-). In the following section, we briefly introduce the logical framework and explain how to use it as a metalanguage to specify type theories. In Section 3, the basic ideas of coercive subtyping are fu... |

4 | Developing reuse technology in proof engineering
- Luo
- 1995
(Show Context)
Citation Context ...s between specifications [Luo93] as coercions), development of mathematical theories in proof development (with theory morphisms [Luo91] as coercions [Bai96]), and library structuring for proof reuse =-=[Luo95]-=-. Subtyping is in general a subtle issue partly because, in the presence of (arbitrary) subtyping, a judgement of the form k :: K is a synthetic judgement in the sense of Martin-Lof [ML94]; that is, t... |

3 |
Pattern matching with dependent types. Talk given at
- Coquand
- 1992
(Show Context)
Citation Context ...o ensure decidable type-checking. One suggestion that has been made in the literature is to specify a subtype by declaring its constructors to be a subset of the constructors of an existing supertype =-=[Coq92]-=-, but this would exclude even the example of Even and other interesting applications of subtyping such as inheritance between mathematical theories [Acz94]. A related problem is that, in the presence ... |

2 | Extended Calculus of Constructions as a specification language - Burstall - 1993 |