**Chapter 19**

**Tuple / Relation Maximaland Minimal Typesetc.**

*Nothing at all takes place in the universe in which some rule of the maximum or minimum does not appear.*

—Leonhard Euler: *Methodus Inveniendi Lineas Curvas* (1744)

The previous chapter mentioned *T_alpha* and *T_omega* several times. Both are generic names; they denote the maximal type and the minimal type, respectively, with respect to some specified type *T*, or in other words the least upper bound and the greatest lower bound, respectively, with respect to the type lattice to which that type *T* belongs. If *T* is scalar, of course, those “*T*_” prefixes can be dropped, since all scalar types belong to the same type lattice and there’s exactly one maximal and exactly one minimal scalar type: viz., *alpha* and *omega*, respectively. *Alpha* and *omega* were discussed under IM Prescription 20 in Chapter 12; the tuple / relation counterpart to that prescription is IM Prescription 25, which—along with IM Prescription 26, to which it’s closely related—is the principal topic of the present chapter.

**IM PRESCRIPTION 25: TUPLE / RELATION MAXIMAL AND MINIMAL TYPES**

Let *T*, *T_alpha*, and *T_omega* be all tuple types or all relation types, with headings

{ <A1,T1> , <A2,T2> , ... , <An,Tn> }{ <A1,T1_alpha> , <A2,T2_alpha> , ... , <An,Tn_alpha> }{ <A1,T1_omega> , <A2,T2_omega> , ... , <An,Tn_omega> }

respectively. Then (a) type *T_alpha* shall be the **maximal type with respect to type** * T* if and only if, for all

*j*(

*j*= 1, 2, ...,

*n*), type

*Tj_alpha ...*

Get *Type Inheritance and Relational Theory* now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.