##
###
Coercive subtyping in type theory
[chapter]

Zhaohui Luo

1997
*
Lecture Notes in Computer Science
*

We propose and study coercive subtyping, a formal extension with subtyping of dependent type theories such as Martin-L of's type theory NPS90] and the type theory UTT Luo94]. In this approach, subtyping with speci ed 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 de nition rules for the de nitional equality. It is shown
## more »

... 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 type theories with subtyping. As a formal system, the extended framework is just a simple extension of LF. The extended framework provides a uniform setting to understand various forms of coercions in type systems (e.g., those for structured types and universes and those found in Bailey's implementation in Lego) and some other useful syntactic forms such as type-casting. Coercive subtyping can be seen to represent a conceptually simple but powerful approach to introducing subtyping into type theory. In the practice of computer-assisted formal reasoning, we 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 brie y 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 further explained and the extended logical framework is formally presented with discussions of its properties. The use of coercive subtyping is considered in Section 4. Related work and further research topics are discussed in the Conclusion. The logical framework LF and formulation of type theories The logical framework LF is a typed version of Martin-L of's logical framework (see Chapter 19 of NPS90] for a presentation of the latter). We should also point out that LF is di erent 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 general rules, the rules for the kind of all types (Type, which represents the conceptual universe of types), and the rules for dependent product kinds of the form (x:K)K 0 (kinds of functional operations). In the following, we give a brief introduction to LF and its use in specifying type theories, with discussions on several aspects with which we do not assume the familiarity of the reader. Functional operations in LF As in Martin-L of's meaning explanation for his type theory, a functional operation of kind (x:K)K 0 in LF can be applied to any object k of kind K to yield an object of kind k=x]K 0 . The meaning of a functional operation is given by explaining its application results. For example, abstractions are special forms of functional operations whose meaning is essentially given by the de nitional equality rule ( ). Remark In LF, the functional operations that express abstraction are of the form x:K]k, rather than the untyped x]k as found in Martin-L of's logical framework. In other words, we regard the meta-level functional operations as having speci c domains (and codomains). 1 This feature, as we shall see below, is essential in the formulation of coercive subtyping.

doi:10.1007/3-540-63172-0_45
fatcat:f2ygwdrulrbjnfzxvahqz2yg2a