Book contents
- Frontmatter
- Contents
- Foreword
- Preface
- Acknowledgements
- Greek alphabet
- 1 Untyped lambda calculus
- 2 Simply typed lambda calculus
- 3 Second order typed lambda calculus
- 4 Types dependent on types
- 5 Types dependent on terms
- 6 The Calculus of Constructions
- 7 The encoding of logical notions in λC
- 8 Definitions
- 9 Extension of λC with definitions
- 10 Rules and properties of λD
- 11 Flag-style natural deduction in λD
- 12 Mathematics in λD: a first attempt
- 13 Sets and subsets
- 14 Numbers and arithmetic in λD
- 15 An elaborated example
- 16 Further perspectives
- Appendix A Logic in λD
- Appendix B Arithmetical axioms, definitions and lemmas
- Appendix C Two complete example proofs in λD
- Appendix D Derivation rules for λD
- References
- Index of names
- Index of definitions
- Index of symbols
- Index of subjects
13 - Sets and subsets
Published online by Cambridge University Press: 05 November 2014
- Frontmatter
- Contents
- Foreword
- Preface
- Acknowledgements
- Greek alphabet
- 1 Untyped lambda calculus
- 2 Simply typed lambda calculus
- 3 Second order typed lambda calculus
- 4 Types dependent on types
- 5 Types dependent on terms
- 6 The Calculus of Constructions
- 7 The encoding of logical notions in λC
- 8 Definitions
- 9 Extension of λC with definitions
- 10 Rules and properties of λD
- 11 Flag-style natural deduction in λD
- 12 Mathematics in λD: a first attempt
- 13 Sets and subsets
- 14 Numbers and arithmetic in λD
- 15 An elaborated example
- 16 Further perspectives
- Appendix A Logic in λD
- Appendix B Arithmetical axioms, definitions and lemmas
- Appendix C Two complete example proofs in λD
- Appendix D Derivation rules for λD
- References
- Index of names
- Index of definitions
- Index of symbols
- Index of subjects
Summary
Dealing with subsets in λD
In type theory, sets are not directly represented, although we have often treated sets as types (i.e. objects of type *) in the previous chapters. We wrote *s instead of * to underline this. However, types and sets have very different backgrounds. In Chapters 2 to 6, we introduced types as formal expressions, in order to eliminate undesired properties from the (‘free’) untyped lambda calculus. Sets, on the other hand, are mathematical constructs, meant to enable us to talk about collections of mathematical objects.
Until now, considering sets as types has worked out fine. But we may expect serious problems when it comes to subsets. The reason is that the Uniqueness of Types property (see e.g. Lemma 10.4.10) conflicts with the ‘natural’ view on subsets. For example, let S be a set and T a proper subset of S. Now let c be an element of S. In type theory this could be expressed as c: S. But what if we wish to express that c is also an element of the subset T? Then c: T doesn't work, because types S and T are different, hence Uniqueness of Types would be violated.
As another example, let P be a property of elements in S. Then one can form the set {x ∈ S | P x} of all elements of S satisfying P.
- Type
- Chapter
- Information
- Type Theory and Formal ProofAn Introduction, pp. 279 - 304Publisher: Cambridge University PressPrint publication year: 2014