Book contents
- Frontmatter
- Contents
- Foreword
- Preface
- 1 Formal Study of Natural Language
- 2 Lambda Calculus, Types, and Functional Programming
- 3 Functional Programming with Haskell
- 4 Formal Syntax for Fragments
- 5 Formal Semantics for Fragments
- 6 Model Checking with Predicate Logic
- 7 The Composition of Meaning in Natural Language
- 8 Extension and Intension
- 9 Parsing
- 10 Handling Relations and Scoping
- 11 Continuation Passing Style Semantics
- 12 Discourse Representation and Context
- 13 Communication as Informative Action
- Afterword
- Bibliography
- Index
2 - Lambda Calculus, Types, and Functional Programming
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Foreword
- Preface
- 1 Formal Study of Natural Language
- 2 Lambda Calculus, Types, and Functional Programming
- 3 Functional Programming with Haskell
- 4 Formal Syntax for Fragments
- 5 Formal Semantics for Fragments
- 6 Model Checking with Predicate Logic
- 7 The Composition of Meaning in Natural Language
- 8 Extension and Intension
- 9 Parsing
- 10 Handling Relations and Scoping
- 11 Continuation Passing Style Semantics
- 12 Discourse Representation and Context
- 13 Communication as Informative Action
- Afterword
- Bibliography
- Index
Summary
Summary
This chapter explains the basics of formal notation, lambda calculus, type theory, and functional programming.
Sets and Set Notation
All mathematical and logical concepts we will come across in the course of the book can be defined in terms of the fundamental concept of a set. We will thus start by introducing some basic set theory.
A set is a collection of definite, distinct objects. This is too vague for a definition, but unfortunately we cannot do better, and fortunately that does not matter. Let us give some examples of sets instead. Our first example is the set of words in the third edition of the Oxford Advanced Learner's Dictionary of Current English. Other examples are the set of colours of the Dutch flag, or the set of letters of the Greek alphabet. Yet another example is the set of even natural numbers greater than seven. And so on.
The elements of a set are also called its members. To indicate that a is an element of a set A we write a ∈ A. To deny that a is an element of a set A we write a ∉ A. The symbol ∈ is the symbol for membership. The elements of a set can be anything: words, colours, people, numbers.
- Type
- Chapter
- Information
- Computational Semantics with Functional Programming , pp. 15 - 32Publisher: Cambridge University PressPrint publication year: 2010