First-Order Logic: Basic Concepts
Abstract:In order to talk about meanings, we need a way for representing them. In this chapter, we're going to use the language of first-order logic for this purpose. So, when we say that we construct a meaning representation for some sentence, that means that we construct a formula of first-order logic that we take to represent this meaning.You may say: "What's the point in that? You're not giving the meaning of that sentence, you're just translating it to some artificial language that nobody uses." Is the situation really like that? No! Using first-order logic as a meaning-representation language has many advantages. Here are two of them:
- First of all, first order logic isn't just some artificial language that nobody uses. There is the truth-functional interpretation telling us unambigously under which conditions formulas hold true and what the symbols they're made of mean. In other words, we have a formally precise conception of how our first order meaning representations relate to certain situations in the world. And we can compare this to our intuitions about the truth-conditions of the natural language sentences under consideration. That way we can judge the adequacy of our first-order formulas as meaning representations.
- Second, first order logic is a formal language with desirable properties such as having a simple, well defined (and unambigous) syntax. This makes it fit for use with computer programs.
We assume that you've already heard about first order logic. In the following we'll only shortly review its syntax, and not say anything about (first-order) semantic concepts like truth or models for formulas. The reason is simply that these don't play a great role in the rest of the chapter. There, it's enough to have some intuition about what's the right first order formula for a given sentence. So as regards semantics, all we will do is sometimes give rough natural language equivalents to first-order formulas and their building blocks, to help you get this intuition.
Table of Contents
VocabulariesIntuitively, a vocabulary tells us the language the "first-order conversation" is going to be conducted in. It tells us
in what terms we will be able to talk about things. Here is our first vocabulary:
First-Order LanguagesA first-order language defines how we can use a vocabulary to form complex, sentence-like entities. Starting from a vocabulary, we then build the
↗first-order language over that vocabulary out of the following ingredients:
Building FormulasLet's suppose we've composed a certain vocabulary. How do we mix these ingredients together? That is, what is the
syntax of first-order languages? First of all, we define a first-order
↗termτ to be any constant or any variable. Roughly speaking, terms are the noun phrases of first-order languages: constants can be thought of as first-order counterparts of proper names, and variables as first-order counterparts of pronouns.
Bound and Free VariablesLet's now turn to a rather important topic: the distinction between
↗free variable s and
↗bound variable s.
NotationIn what follows, we won't always be adhering to the official first-order syntax defined above. Instead, we'll generally try and use as few brackets as possible, as this tends to improve readability. For example, we would rather not write
Representing formulas in PrologWe would like to use first order logic as a semantic representation formalism, and we want to deal with it in Prolog. So the next thing we need is a way of writing down formulas of first-order logic in Prolog. In short, we will simply use Prolog terms for this purpose that resemble the formulas they stand for as closely as possible. This is what we deal with in this section.