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
1 - Untyped lambda calculus
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
Input–output behaviour of functions
Many functions can be described by some kind of expression, e.g. x2 + 1, that tells us how, given an input value for x, one can calculate an output value. In the present case this proceeds as follows: first determine the square of the input value and consequently add 1 to this. The so-called ‘variable’ x acts as an arbitrary (or abstract) input value. In a concrete case, for example when using input value 3, one must replace x with 3 in the expression. Function x2 + 1 then delivers the output value 32 + 1, which adds up to 10.
In order to emphasise the ‘abstract’ role of such a variable x in an expression for a function, it is customary to use the special symbol λ: one adds λx in front of the expression, followed by a dot as a separation marker. Hence, instead of x2 + 1, one writes λx · x2 + 1, which means ‘the function mapping x to x2 + 1’. This notation expresses that x itself is not a concrete input value, but an abstraction. As soon as a concrete input value comes in sight, e.g. 3, we may give this as an argument to the function, thus making a start with the calculation.
- Type
- Chapter
- Information
- Type Theory and Formal ProofAn Introduction, pp. 1 - 32Publisher: Cambridge University PressPrint publication year: 2014