Subtyping
Definition
Consider a type system with a typing relation , such as the simply typed lambda calculus extended with record types with distinct labels . A subtyping relation is a relation on types that is closed under these rules.
- Reflexivity: .
- Transitivity: if and , then .
- Functions: if and , then .
- Records: if each label equals some label , and for that .
The type system is linked to by the subsumption rule: if and , then . The relation is usually taken to be the least relation closed under the rules, together with chosen relations between base types, such as .
Remarks
Example: by rule 4, since the label occurs on the left and by rule 1. So a function of type may be applied to a point with two coordinates.
Non-example: with , one does not get . Rule 3 would need , which fails; and indeed a function defined only on integers cannot accept every real. The opposite inclusion does hold.
By rules 1 and 2, subtyping is a preorder on types. Rule 3 says that the arrow is contravariant in its argument and covariant in its result.
Reading path
To understand this page from the ground up, read these 26 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Element definition
- Intuitionistic logic concept
- Lambda calculus concept
- Preorder concept
- Proposition concept
- Set concept
- Type system concept
- Set definition
- Conjunction definition
- Disjunction definition
- Implication definition
- Negation definition
- Biconditional definition
- Truth table concept
- Modus ponens concept
- Mathematical proof concept
- Propositional logic concept
- Tautology definition
- Logical equivalence definition
- Double negation law statement
- Proof by contradiction concept
- Russell's paradox statement
- Type theory concept
- Curry–Howard correspondence concept
- Simply typed lambda calculus concept
- Subtyping definition
Further reading
About this page
| Tag | HSP09EW4V3 |
|---|---|
| URI | m2://HSP09EW4V3 |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68N15, 03B40 |
| Defines | Subtyping |
| Uses | Simply typed lambda calculus, Type system, Preorder |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.