Plug into The Power of Knowledge Engineering. Visit us at www.skf.com/knowledge
Download free eBooks at bookboon.com
67
The first appears to lack a verb, but we know that “O for a…” is a poetical way of expressing a wish for something on the part of the speaker, so we can paraphrase it fairly accurately by replacing “O” by “I wish”, and the sentence thus revised passes the test. In the second case we have only to delete the word “that”, whose presence serves only for emphasis (and scansion, of course!), and alter the punctuation slightly: “It is true that ‘to be or not to be?’ is the question.”
Now, a statement is a sentence that is declarative in form: it declares something that is supposed to be true. Example 3.3, “Student StudentId is enrolled on course CourseId”, is not a statement—it does not pass the test. It does, however, have the grammatical form of a statement. We can say that, like a statement, it is declarative in form. And we know that we have only to replace those italicised symbols (about which more anon) by appropriate designators, such as S1 and C1, to make it into a statement. Now I can say exactly what are meant by the terms predicate and proposition, starting with predicate.
A sentence that is in declarative form has a certain meaning, hopefully agreed upon by all who might read or hear it. That meaning is what logicians call a predicate. We can therefore say that such a sentence
denotes a certain predicate. It is important to bear the distinction between the sentences and the predicates they denote firmly in mind. For consider the following sentences:
• 1 is less than 2 • 1 est moins que 2 • 1 < 2
They are written in three different languages but they all have exactly the same meaning—they denote the same predicate. Here are some more declarative sentences:
• I love you.
Here the designators are the pronouns, “I” and “you”. In isolation they designate nothing but in an appropriate context they do, if we know who the speaker is and to whom the sentence is spoken.
• The present king of France is bald
This is a popular example used by logicians when they want to discuss problems concerning designators. Here we have something—“The present king of France”—that looks like a designator but in fact, at the time of writing, designates nothing because France has no king. At various times in the past, however, France has had a king. As far as relational databases are concerned, problems to do with designation are addressed by types (see Chapter 2) and database constraints (Chapter 5).
• 2 + 2 = 5 • x < y
• a + b = c
These three are sentences written in mathematical notation. The first is a statement but the other two are not—they contain italicised symbols that designate nothing.
Download free eBooks at bookboon.com
68 • Student s is enrolled on course c.
This is identical to Example 3.3, except that s replaces StudentId and c replaces CourseId. It will suit our present purposes to regard this and Example 3.3 as denoting distinct predicates, though not all textbooks on logic take this stance (and not all are even clear on the matter). • P(x,y)
This kind of notation is commonly used by logicians as denoting a predicate without stating which particular predicate is being denoted. Notice that the symbol P, standing for what would be written in roman for a particular predicate, is italicised. For example, if we replace P by the “less than” symbol, <, we obtain <(x,y), which might be just another way of denoting the same predicate as x < y.
Up to now I have been very careful to maintain that clear distinction between the sentences and the predicates denoted by those sentences. However, it is often very convenient to refer to the sentences themselves as predicates, just to avoid excessive repetition of “denoted by”, and I will do so frequently from now on in this book—starting right now.
Consider again, then, the predicate “Student StudentId is enrolled on course CourseId” (Example 3.3). Instead of designators for student and course it has symbols StudentId and CourseId, neither of which designates anything in particular. They are usually called variables, but note very carefully that they are not variables in the sense of that term as defined in Chapter 2. Logic does not deal with that kind of variable, so no confusion arises in texts dealing with logic alone, but in this book we have to deal with both kinds of variable. For that reason I prefer the alternative term, parameter, for variables appearing in predicates—but we shall see later that although a parameter is a variable, not all variables appearing in predicates are parameters (so I will occasionally have to revert to the term variable).
Special adjectives are used to indicate the number of parameters in a predicate. In general these take the form of a number suffixed by “-adic”. Thus a 5-adic predicate has five parameters, a 0-adic predicate none at all, and an n-adic predicate has n parameters. For the lower numbers the appropriate prefix derived from Greek is often used instead: monadic, dyadic, triadic, tetradic, and so on, though we switch to Latin with niladic for 0-adic.
Some of the predicates I have shown you contain one or more parameters; others do not. Those that contain no parameters are, as already noted, statements. The predicate denoted by a statement is a very important special case: what logicians call a proposition. Now, recall that test used to determine whether a sentence in English is in fact a statement—can it be prefixed by “Is it true that” to yield a grammatical question in English? A proposition, then, being denoted by a sentence p that passes that test, is something that is either true or false, depending on the correct answer to the question, “Is it true that p?”
Download free eBooks at bookboon.com
Click on the ad to read more
69
3.3
Substitution and Instantiation
If a predicate has n parameters (n>0) and we replace one of those parameters by a designator, we obtain a predicate with n-1 parameters. For example, in the dyadic predicate
a < b
if we replace b by 10 we obtain the monadic predicate
a < 10
We say that the designator 10 is substituted for the parameter b. If the designator is being substituted for a parameter that appears more than once in the sentence denoting the predicate, then of course that same designator must be substituted for each such appearance. For example, in the triadic predicate
a < b and b < c
if we substitute 10 for b we obtain the dyadic predicate
a < 10 and 10 < c