LIN1032 Formal Foundations for Lecture 5 Albert Gatt
In this lecture We conclude our discussion of the logical connectives We begin our foray into predicate logic much more expressive than propositional logic also, closer in many ways to natural language than propositional logic (though it s far from a perfect translation)
Part 1 Some properties of the logical connectives
Commutativity The order of propositions conjoined or disjoined does not matter: p 1 p 2 p 3 = p 2 p 1 p 3 p 1 p 2 p 3 = p 2 p 1 p 3 I.e. we can commute or change the order. In other words: p 1 p 2 p 2 p 1 p1 p2 p2 p1
Associativity With conjunction and disjunction, it doesn t really matter where we put parentheses: (p q) r p (q r) (p q) r p (q r) Note: It s only when we have the same operator. These two aren t equivalent: (p q) r (2+2=4 AND 5+5=10) OR (John is tall) p (q r) (2+2=4) AND (5+5=10 OR John is tall)
Idempotence Conjunction and disjunction are idempotent: p p = p p p = p Thus, it makes no difference if we disjoin/conjoin a proposition with itself: I m Albert and/or I m Albert
Absorption p (p q) = p p (p q) = p Example: Either it s raining or (it s raining and John is tall) The truth of this proposition is exactly the same as the truth of it s raining on its own.
Distributivity p (q r) = (p q) (p r) p (q r) = (p q) (p r) Thus, we distribute the outer operator over the inner two.
Double negation The sentence John is not unkind basically means John is kind. NB: double negation in language often serves a different purpose: it seems to be less forceful than saying John is kind outright. In general: p = p It s not the case that it s not the case that p
Part 2 Preliminaries to predicate logic: individual constants, variables and predicates
A motivating argument All students are clever. Stuart is a student. ------------------------------- Stuart is clever
Beyond propositional logic This argument is valid. In fact, it looks like a tautology: given the two premises, the conclusion should always follow. But in propositional logic, this would take the form: (p Λ q) r In a standard truth table, this would not come out as always true.
Topic #3 Predicate Logic Quantifiers Our example argument also contans quantifiers: every, a etc Propositional logic has no way of stating generalisations like every x is y For inferences like this, we need a more expressive logic, which also has quantifiers.
Propositional vs predicate logic The problem: we can tell the argument is valid not just because of the relations between the sentences, but also because of: the relations WITHIN each sentence; the quantifiers used.
A detailed examination Consider: Stuart is a student. says something about an individual called Stuart the subject it predicates the property of being a student of that individual the predicate Predicate logic follows this pattern: a predicate is applied to (predicated of) some individual.
Other examples of subjectpredicate structures The bear is asleep. Barack Obama is president. Philip was the King of Spain. In all cases: the subject is some individual the rest of the sentence is the predicate (is X)
Formulas of predicate logic: Individual constants We will use various kinds of individual constants that stand for individuals/objects. Notation: a,b,c, s, t, Example, we can use `s to stand for an expression like Stuart Constants are a bit like names: they stand for exactly one individual in the universe of discourse.
Formulas of predicate logic: Individual variables Individual variables over objects: x, y, z Useful when we have quantifiers: Every student is clever For every x, if x is a student then x is clever. Unlike individual constants, variables do not stand for a specific individual. They stand for any one of the individuals in the universe of discourse.
Formulas of predicate logic: Predicates Predicates such as clever or king-of-spain are generally denoted using uppercase P, Q, The result of applying a predicate P to a constant a is the proposition P(a) Meaning: the object denoted by a has the property denoted by P. Example: clever(s), where s = the man named Stuart king-of-spain(b), where b = Philip
Predicate-argument structure English: John is clever Predicate logic: assume: j = the individual called John (an individual constant) C = the predicate clever C(j) predicate argument
Individual constants vs variables Suppose we use the individual constant j for the individual called John. clever(j) is a proposition predicating the property clever of the individual called John. What about clever(x)? x is a variable not a constant the variable stands for some unspecified individual(s) as it is, this expression predicates a property of some arbitrary individuals this is not a proposition (it s not about someone specific) it s an open sentence
Relations as predicates So far we ve looked at one-place predicates like clever. We can extend the same notation for predicates that take more than one argument: John loves Mary: love(j,m) Sue showed Jimmy the kennel show(s,j,k) Cindy bought Dave a motorbike for one thousand pounds buy(c,d,m, 1000)
An aside about sets and predicates Recall: we can define sets by description: S = {x x is a woman} i.e. the set S consists of those elements x in our universe of discourse U, such that x is a woman It is often useful to view predicates in a set-theoretic way: man(x) is true of just that set of elements x in U which are men N-placed predicates are sets of ordered tuples!
Part 3 Quantifiers
Motivating example Consider the sentence everyone is a student How do we represent this sentence logically? We need to capture the sense that this sentence makes a generalisation.
Take 1 We could apply the same treatment as with individual constants and variables: treat the noun phrase everyone as an argument: student(everyone) Problem: we re treating everyone as though it named a specific individual or individuals but there is no individual constant that can be substituted for everyone we can t ever consider this to be a real proposition, predicating something of some specific person or persons
Take 2 What we d like to express is the notion that: for every x, x is a student Note: we ve identified 1 predicate here: student we ve introduced a variable: x we apply the predicate to x: student(x) we ve introduced a quantifier: for every we use the quantifier to bind x: for every x
Universal quantification For every x, x is a student Ingredients: x student(x) [since we predicate the property student of the variable x] something that means for every : x[student(x)] for all x, x is a student
A further example Compare the previous ex to: there is a student here, we do not have the same force of generalisation as before we are only committed to the idea that there is at least one student (possible more than one) more precisely, we re saying there exists some x such that x is a student
Existential quantification Ingredients: x student(x) [since we predicate the property student of the variable x] something that means there exists : x[student(x)] there exists at least one x such that x is a student
Structure of these formulas x [ student(x) ] x [ student(x) ] A quantifier that binds the variable appearing in the open sentence An open sentence: predicate applied to a variable
How these formulas work (I) As usual, we re assuming a universe of discourse U, consisting of all the individuals of interest. In x and x, the x is a variable which takes as value any individual in U. Recall: if j is the constant standing for the individual called John, then student(j) is a proposition we can tell whether it s true or false but student(x) is not, it is an open sentence we can t tell whether it s true or false
How these formulas work (II) With student(j), we can legitimately ask: Is it true that j(ohn) is a student? With student(x), the question is strange: Is it true that x is a student? It depends who x is! To turn an open sentence into a proposition we can either: substitute some individual constant for x; OR place a quantifier in front of the sentence that binds x
How these formulas work (IV) If we take: student(x) and place a universal quantifier in front of it to bind the variable x[student(x)] We have a sentence of which we can legitimately ask whether it s true or false: Is it true that everyone (in U) is a student? Similarly for x[student(x)]: Is it true that there exists at least one student (in U)?
Vacuous quantification It only makes sense to quantify over variables which appear in the following open sentence. Let j be a constant, the individual John Then, the sentence: x[student(j)] says: for every x, John is a student somewhat meaningless the quantified variable adds nothing to the sentence student(j) in many formulations of predicate logic, this is allowed syntactically, but is simply understood as meaningless
Exercise 1 Assume our universe U consists of three people: John (j), Lucille (l) and Antoine (a) Express: John is tall. tall(j) Antoine likes Lucille. like(a,l) Lucille is short and Antoine is tubby. (you can use logical conjunction here) short(l) tubby(a)
Exercise 2 In the same universe U = {j,l,a}, express: Everyone is human. x[human(x)] There is someone who is male. x[male(x)]
More complex predications with quantification As we saw in Exercise 1, we have the connectives from propositional logic in predicate logic as well. We can form arbitrarily complex expressions, such as: There s someone who is clever and tall. Every student is clever. Everyone who loves Sue is dumb.
More complex examples There is someone who is clever and tall. x[clever(x) tall(x)] Every student is clever. x[student(x) clever(x)] for all x, if x is a student then x is clever everyone who is a student is clever Everyone who loves Sue is dumb. x[love(x,s) dumb(x)]
Predicate logic vs. English every man is colourblind x[man(x) colourblind(x)] Here, we have implication: for every x, if x is a man than x is colourblind. there is a man who is colourblind x[man(x) colourblind(x)] Here, we have conjunction: there is an x who is a man and is colourblind.
Why the differences? Suppose we represent our universally quantified sentence using conjunction: Every man is colourblind. x[man(x) colourblind(x)] Not the intended meaning at all! What this really says is: Everyone is a man and is colourblind. for every x, x is a man and x is colourblind But our original sentence would still be true if U contained some women who are not colourblind!
Why the differences? Suppose we use implication for our existential sentence. There is a man who is colourblind. x[man(x) colourblind(x)] Again, wrong meaning! What this really says: There exists an x such that, if x is a man, then x is colourblind. Given how implication works, this would be true if there is some object in the universe which is not a man.
Part 4 Quantifier scope and multiple quantifiers
Quantifier scope x[clever(x) tall(x)] This is the scope of the quantifier. The part of the sentence in which x is understood to be the same x which is bound by the In this example, every occurrence of x is bound by
Things to note In a complex example like x[clever(x) tall(x)] the variable x: 1. takes on different values from the universe U, but 2. within the scope of the quantifier, the meaning of x is the same, no matter how often x occurs.
Free vs. Bound variables x[clever(x) tall(x)] Every occurrence of x is bound here. We use the bracketing to indicate scoping. x[clever(x) tall(x)] male(x) There is an instance of x which is outside the quantifier scope: male(x) So this occurrence of x may have a different value from that for clever and tall.
Free and Bound Variables An open sentence like P(x) is said to have a free variable x (i.e., x is not defined ). A quantifier (either or ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables.
Example of Binding P(x,y) has 2 free variables, x and y. x P(x,y) has 1 free variable, and one bound variable. [Which is which?] x is bound y is free An expression with zero free variables is a proposition.
Combining quantifiers A formula of predicate logic can contain several quantifiers: Everyone loves someone. For all x, there is a y such that x loves y x y[love(x,y)] Note: The two quantifiers bind different variables. The existential quantifier is within the scope of the universal quantifier. The relative order of the quantifiers is important!
Multiple quantifiers and language Consider: Everyone admires someone. Strictly speaking, this is ambiguous: 1. For every person, there is someone (else) whom that person admires; OR 2. There is someone whom everyone admires.
Multiple quantifiers and language Interpretation 1: For every x, there is some y whom x admires. x y[admire(x,y)] NB: universal quantifier has wide scope over the existential. Interpretation 2: There is someone such that everyone ADMIRES THEM y x[admire(x,y)] NB: existential quantifier has wide scope over the universal.
Interpretation 1 in graphics A simple universe of 4 individuals Arrows indicate who admires whom jake pam sarah cindy jake pam sarah cindy
Interpretation 2 in graphics A simple universe of 4 individuals Arrows indicate who admires whom jake pam sarah cindy jake pam sarah cindy
Some further consequences A sentence of the form: y x[admire(x,y)] implies the sentence of the form: x y[admire(x,y)] If there s someone whom everyone admires, then everyone has someone whom they admire. But the reverse is not true!
Exercise 3 Interpret the following: x[man(x) y [woman(y) love(x,y)]] every man loves some woman for every x, if x is a man, then there is a woman whom he loves x y z[boy(x) friend(y) book(z) give(x,y,z)] a boy gave a friend a book there is a boy and there is a book and there is a friend such that the boy gave the friend the book
Some further linguistic examples More ambiguity: Everyone did not see the movie. (assume the movie is an individual constant) 1. Nobody saw the movie x[ see(x,m)] for every x, x did not see the movie 2. Not everybody saw the movie. x[see(x,m)] it is not the case that everybody saw the movie
Part 5 Definition of the syntax of predicate logic
Basic vocabulary individual constants: a, b, c, individual variables: x, y, z predicate variables: P, Q, R quantifiers:, Also, from propositional logic: propositional variables: p, q, r logical connectives:,,, ->, parentheses: ( )
Some conventions We will use t1, t2, etc to stand for any individual term: a variable; or an individual constant. We will use Greek letters (α, β ) to stand for well-formed formulas of predicate logic.
Formation rules (I) 1. Every sentence variable is a well-formed formula. (i.e. we are assuming that p, q, etc are acceptable in predicate, as in propositional, logic) 2. If t1 is an individual term, and P is a oneplace predicate, then P(t1) is a well-formed formula. 3. If t1 and t2 are individual terms, and P is a two-place predicate, then P(t1,t2) is a well-formed formula.
Formation rules (II) 4. If t1, t2,, tn are individual terms, and P is an n-place predicate, then P(t1, t2,, tn) is a wff. 5. If x is an individual variable, and α is a formula in which x occurs as a free variable, then xα is a wff. 6. If x is an individual variable, and α is a formula in which x occurs as a free variable, then xα is a wff.
Formation rules (III) 7. If α and β are wff s, then the following are wffs: α α β α β Α β α β
Formation rules (IV) 8. A wff which does not contain any free variables is a proposition. 9. Only the formulas constructed with these rules are wff s of predicate logic.
Summary Today we ve introduced predicate logic: predicates constants and variables quantifiers Next up: we ll look at the semantics of predicate logic