










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A brief introduction to translating mathematical statements into predicate logic. It covers the basics of constant symbols, predicates, and binary connectives. It also discusses the use of quantifiers and function symbols in predicate logic.
What you will learn
Typology: Lecture notes
1 / 18
This page cannot be seen from the preview
Don't miss anything!
Pick up a mathematics textbook or journal, and you’ll discover dozens of specialized symbols (e.g., ∅, ℘, and ∂). Like most academic books and journals, mathematical texts also contain hundreds of esoteric terms (e.g., diffeomorphism). So it’s rather surprising that every mathematical state- ment can be translated into a symbolic language that contains only half a dozen symbols. That language is called the language of first-order pred- icate logic. In these notes, I’ll provide a brief lesson about how to translate intro- ductory mathematical statements - like those you’d find in a high-school geometry or algebra class - into the language of predicate logic. Then I’ll discuss how to represent Aristotelian syllogisms in the language of predicate logic. Finally, I’ll explain why Aristotelian syllogisms are insufficient for representing the logical inferences made in introductory mathematics.
Very simple English sentences contains two parts: a subject and a predicate. The subject is a noun-phrase, which describes a person, place or thing. The predicate is a verb-phrase, which describes what the subject did, is doing, or will do. In the sentence “Socrates drank hemlock,” for example, the subject is “Socrates” and the predicate is “drank hemlock.” Simple sentences in predicate logic likewise contain two parts. The first are constant symbols, which behave much like proper names do in English. Constant symbols, like c 1 , c 2 , and so on, are intended to denote specific ob- jects. For example, c 1 might represent Socrates, c 2 your favorite sweater, and so on. Just as two different English names can refer to the same person (e.g., “Snoop Dogg” and “Cordozar Calvin Broadus, Jr.”), so can two differ- ent constant symbols (e.g., c 1 and c 2 ) refer to the same object in predicate logic. In predicate logic, predicates are represented by uppercase letters P, Q, R, etc. which are called predicate symbols. For example, P might represent
the phrase “is purple”, Q “is quiet”, and R “is red.” In predicate logic, we write P (c) to represent the claim “c has property P .” For example, if c = John’s favorite sweater and P =“is purple”, then P (c) means “John’s favorite sweater is purple.” Easy so far, right? Predicate symbols can also take more than one argument. Such predi- cate symbols are often called relation symbols because they designate a relationship between two or more objects. For example, suppose that L rep- resents the predicate “loves,” c 1 represents John, and c 2 represents John’s sweater. Then L(c 1 , c 2 ) represents “John loves his sweater,” and L(c 2 , c 1 ) represents “John’s sweater loves John.” This example shows that order matters in predicate logic, just as it does in mathematics (e.g., 4/ 3 6 = 3/4). Although it’s rarer, some mathematical statements involve predicates that take three or more arguments. For example, we might write T (a, b, c) to represent the claim that points a, b, and c form a triangle. In order to indicate how many arguments a predicate symbol takes, it is common to use variables, like x, y, and z, and to say that, for example, L(x, y) represents the claim that “x loves y” and that T (x, y, z) represents the claims that “ x, y and z form a triangle.” I will talk more about the differences between variables and constant symbols in future sections. Predicate symbols cannot be nested. For instance, suppose P (x) means “x is purple” and S(x) means “x is a sweater.” Then to represent the claim that c is a purple sweater we ought to write P (c)&S(c); it is incorrect to write S(P (c)).
English Sentence Correct Incorrect c is a purple sweater P (c)&S(c) P (S(c))
Suppose a, b, and c represent the numbers 2, 3 and 6 respectively. Further, assume D(x, y) represents the claim that “x is divisible by y” and that L(x, y) represents the claim, “x is less than y.”
(a) D(a, c) (b) D(c, a) (c) L(a, b) (d) L(b, a)
that the a sentence of the form ϕ ∨ ψ is true if either ϕ is true, or ψ is true, or both are true. Lastly, the formula D(c, a) → L(a, c) represents the claim that “If 6 is divisible by 2, then 2 is less than 6.” This claim is also true, but it’s impor- tant to say something about how conditionals are understood in predicate logic. A conditional ϕ → ψ in predicate logic is assumed to be true if either of the following holds: (1) ϕ is false, or (2) both ϕ and ψ are true. That is, there is precise one circumstance in which a conditional is false, namely, if ϕ is true and ψ is false. I won’t explain the reasons for this convention, but I will note that it does have some unintuitive consequences. According to this convention, the formula D(a, b) → L(c, a), which asserts that “If two is divisible by three, then six is less than two,” is true. If you have difficulty remembering this convention, I would recommend thinking of the conditional ϕ → ψ as the following equivalent disjunction: ¬ϕ ∨ ψ. This disjunction is true if either (1) ϕ is false or (2) both ϕ and ψ are true, just as I said the conditional is.
English also contains ways of changing the meaning of a single sentence by inserting a phrase at the outset. For example, consider the phrases “It’s not the case that” and “It’s surprising that.” Then we can take a single sentence, like “Socrates drank hemlock” and insert those phrases at the outset to obtain:
The language of predicate logic likewise contains a single unary con- nective that allows one to negate a sentence.
Symbol Name of connective English Equivalent ¬ Negation “It’s not the case that”
If P (x) represents “x is purple,” L(x, y) represents “x loves y,” c 1 repre- sents John, and c 2 represents “John’s sweater,” then ¬P (c 1 ) represents the claim “ John is not purple” and ¬P (c 2 ) → ¬L(c 1 , c 2 ) represents the claim that “If John’s sweater is not purple, then John doesn’t love it.”
For reasons that we’ll not explore, it turns out that the connectives ¬, ∨, & and → are all we’ll need, in the sense that for any other connective,^1 we can find expressions that are equivalent to that connective using the four that we’ve already discussed. To see why, it’s helpful to first note that we can use more than one con- nective in a sentence. For example, suppose P (x) represents “x is purple,” L(x, y) represents “x loves y,” c 1 represents John, and c 2 represents “John’s sweater.” Then (L(c 1 , c 2 )&P (c 2 )) ∨ P (c 1 ) represents the claim that “John loves his sweater, and his sweater is purple, OR John is purple.” This sen- tence is true if either (i) John has a purple sweater that he loves, or (ii) John is purple, or both (i) and (ii) hold. Combining connectives gives one lots of expressive power. For example, we said a formula of predicate logic of the form ϕ ∨ ψ is true if ϕ is true, or ψ is true, or if both are true. How can we represent the claim that “Either ϕ or ψ is true, but both are not true” or in other words, that “Exactly one of ϕ or ψ is true?” Well, first we’d like to say that one of the two sentences must be true, and we can represent that claim by the formula ϕ ∨ ψ. But we also need to say “It’s not the case that both ϕ and ψ are true.” That second claim can be represented by the formula, ¬(ϕ&ψ). Putting them together, we get (ϕ ∨ ψ)&¬(ϕ&ψ). That formula represents the claim we want, namely, that “Either ϕ or ψ is true, but both are not true.” Let’s consider one more example. Suppose we want to represent the claim “Neither ϕ nor ψ is true.” To put it another way, we’d like to represent the sentence, “It’s not the case that either ϕ or ψ is true.” Then we can write ¬(ϕ ∨ ψ).
Suppose a, b, and c represent the numbers 2, 3 and 6 respectively. Further, assume D(x, y) represents the claim that “x is divisible by y” and that L(x, y) represents the claim, “x is less than y.”
(a) ¬D(a, c) ∨ D(c, a) (b) L(c, a) → (D(a, c)&D(b, c)) (^1) Technically, this is true only for every truth-functional connective.
Unlike predicate symbols, function symbols can be nested. Suppose, for instance, f is that “mother function” described above and that c 1 repre- sents “Michelle Obama” and “Sasha Obama.” Then f (f (c 2 )) represents the mother of the mother of Sasha Obama, i.e., it represents Sasha Obama’s maternal grandmother. Thus, the equation f (f (c 2 )) = f (c 1 ) represents the claim “Sasha Obama’s maternal grandmother is Michelle Obama’s mother.” Binary functions can also be nested. For instance, suppose that f (x, y) represents “x plus y” and assume that c 1 , c 2 and c 3 respectively represent 2 , 3 and 6. Then f (c 1 , f (c 1 , c 2 )) represents 2 + (2 + 3), and the equation f (c 1 , f (c 1 , c 1 )) = c 3 represents the claim that 2 + (2 + 2) = 6. Finally, function symbols can also be nested in predicates but not vice versa. For example, suppose that P (x) represents the claim “x is a woman,” that c 1 represents Sasha Obama, and that f is the mother function above. Then P (f (c 1 )) represents the claim that “Sasha Obama’s mother is a woman.” It is incorrect to try to nest predicate symbols in function symbols. For in- stance, f (P (c 1 )) is ill-formed in predicate logic; it is meaningless.
Suppose a, b, and c represent the numbers 2, 3 and 6 respectively. Further, assume D(x, y) represents the claim that “x is divisible by y” and that the function symbol f (x, y) represents “x times y.”
(a) f (c 1 , c 2 ) = c 3 → D(c 3 , c 1 ). (b) f (c 1 , c 2 ) = f (c 2 , c 1 ). (c) f (f (c 1 , c 2 ), f (c 1 , c 2 )) = f (c 3 , c 3 ). (d) D(c 3 , f (c 1 , c 1 ))
(a) If two times three is six, then three times two is six as well. (b) If two squared is not six, and three squared is not six, and two times three is not six, then six is not divisible by two or three. (c) Six is divisible by the product of two and three. (d) Three times two cubed is equal to six times two squared.
3 Quantifiers and Variables
In natural languages, we often want to say how many objects of a particular type there are. For example, we might want to say “Most people are kind,” or “There are 27 students in the class,” or “Everyone has a mother,” or “Something stinks,” or “Nothing is impossible.” Words like “most,” “all,” “none, ” and “some” are called quantifiers because they tell us how many objects (i.e. the quantity of objects) have some property. Predicate logic has exactly two quantifiers: “all” and “at least one.” These two quantifiers are represented using the symbols ∀ and ∃ respectively, as shown in the following table.
Symbol Name of Quantifier English Equivalent ∀ Universal quantifier All ∃ Existential quantifier At least one
Before giving examples of formula using the symbols ∀ and ∃, one last remark is necessary. In English, we typically do not make assertions about every object in existence, even if we use the word “every.” Rather, in a normal conversation, we might talk about “every student in the class” or “every grocery store in Seattle.” In a particular conversational context, the set of objects that one is discussing is called the domain of discourse. Because some domains of discourse are so common, we have special words that combine “every” with specific domains of discourse. For example, we say “everything” or “everyone” or “everywhere” to signal when we’re taking about things, people, and places respectively. Similar remarks apply to the quantifier “some:” we say “someone,” “something,” and “somewhere.” Confusion can arise quickly if two people are using different domains of discourse in some conversation. If you use the word “everyone” to refer to hip kids between the ages of 18 and 25, and I think interpret “everyone” to refer to all people, then I will be very confused if you tell me that “Everyone uses Twitter.” When translating a sentence into predicate logic, you must also be careful to specify your domain of discourse. For example, suppose our domain of discourse is all natural numbers (i.e., the numbers 0, 1 , 2 , and so on) and that P (x) represents the claim that “x is prime.” Then (∀x)P (x) represents the claim “All natural numbers are prime” and (∃x)P (x) represents the claim “At least one natural number is prime.” If I said the domain of discourse is all even natural numbers, then (∀x)P (x) and (∃x)P (x) would respectively represents the claims “All even natural numbers are prime” and “At least one even natural number is prime.”
odd.” Given our (strange) convention about conditionals, that formula is true: since not all natural numbers are prime, the conditional has a false antecedent. In general, the formula (∀x)(P (x) → Q(x)) entails (∀x)P (x) → (∀x)Q(x), but not vice versa.
Suppose the domain of discourse is all natural numbers. Let P (x) represent the claim “x is odd” and Q(x) represent the claim “x is even.” Translate the following sentences from predicate logic back into English. Which of the formula are true?
We can also use quantifiers with predicate symbols that take more than one argument. Again, suppose our domain of discourse is natural numbers. Suppose P (x) represents “x is prime”, Q(x) represents “is odd,” L(x, y) represents the claim that “x is less than y,” and suppose c and d respectively
represents the numbers 0 and 2. Then (∃x)(P (x)&L(d, x)) represents the claim that at least one natural number is prime and greater than two. Now take a moment to think about what the formula (∀x)((L(d, x)&¬Q(x)) → ¬P (x)) represents. Ready for the answer? It represents the claim that every natural number x that is greater than two and is not odd is also not prime. Quantified statements become very tricky very quickly. Learning how quantifiers work in mathematics takes considerable practice, and you should not feel discouraged if you struggle at first. So below are a few examples.
Example: As above, suppose our domain of discourse is natural numbers. Suppose P (x) represents “x is prime”, Q(x) represents “is odd,” L(x, y) represents the claim that “x is less than y,” and suppose c and d respectively represents the numbers 0 and 2.
English Predicate Formula Truth-Value All natural numbers are greater than zero.
(∀x)L(c, x) False. 0 is not greater than 0. All natural numbers that are not equal to zero are greater than zero
(∀x)(¬x = c → L(c, x)) True.
There is a prime number that is not odd and greater than two.
(∃x)(P (x)&¬Q(x)&L(d, x)) False.
Every prime number is either odd or equal to two.
(∀x)(P (x) → (Q(x) ∨ x = 2)) True.
It’s not the case that every number is prime.
¬(∀x)P (x) True.
There is no prime number that is greater than two but not odd.
¬(∃x)(P (x)&(L(d, x)&¬Q(x))) True.
If every number is prime, then it’s not the case that every prime number is odd.
(∀x)P (x) → ¬(∀x)(P (x) → Q(x))
True.
Suppose the domain of discourse is all UW students. Let c represent you, d represent your best friend at UW, and L(x, y) represent the claim “x loves y.” Translate the following sentences into predicate logic.
Formula English Truth-Value (∀x)(∃y)M (x, y) Everyone has a mother. True. (∃y)(∀x)M (x, y) Everyone has the same mother, i.e., there is at least one person who is everyone’s mother.
False. My mother is not your mother.
(∀y)(∃x)M (x, y) Everyone is someone’s mother. False. I’m not a mother. (∃x)(∀y)M (x, y) Someone is everyone’s child. False. No one is his or her own child, for in- stance. (∃x)(∃y)M (x, y) At least one person has at least one mother.
True.
(∀x)(∀y)M (x, y) Everyone is everyone’s biolog- ical mother.
False
Example 2: Suppose our domain of discourse is all natural. Assume L(x, y) represents the claim “x is less than y.”
Formula English Truth-Value (∀x)(∃y)L(x, y) Everyone number x is less than some number y.
True.
(∃y)(∀x)L(x, y) Every number is less than the same number, i.e.,there is some number that is greater than all numbers.
False.
(∀y)(∃x)L(x, y) Every number y is greater than some number x.
False. Zero is greater than nothing. (∀y)(¬y = 0 → (∃x)L(x, y)) Every non-zero number y is greater than some number x.
True.
(∃x)(∀y)L(x, y) There’s some number x that is less than all natural numbers y.
False. Zero is not less than itself.
(∃x)(∀y)(¬y = 0 → L(x, y)) There’s some number x that is less than all non-zero, natural numbers.
True.
(∃x)(∃y)L(x, y) At least one number x is less than some number y.
True. 1 < 2.
(∀x)(∀y)L(x, y) Everyone number is less than every number.
False
Some students ask why (∀x)(∃y)M (x, y) means “Everyone has a mother” whereas (∃y)(∀x)M (x, y) means “Everyone has the same mother.” This is akin to asking why the sentence “I ate because I was hungry” means something different from “I was hungry because I ate.” In any language, whether natural or symbolic, there are rules/conventions for how word order determines the meaning of sentences. In predicate logic, the string (∀x)(∃y) just means something different than (∃y)(∀x). It’s just a brute fact about the language, and we could have adopted a different convention if we chose to do so.
Suppose the domain of discourse is all things and events. Let P (x, y) rep- resent “x is the cause of y” and c represent God. Translate the following sentences into predicate logic.
Let’s now use function symbols in quantified statements. Suppose the do- main of discourse is all natural numbers. Suppose that f (x, y) represents “x times y” and assume that c 1 , c 2 and c 3 respectively represent 2, 3 and 6. Finally, suppose D(x, y) means “x is divisible by y.”
Translating “real” definitions of mathematics into predicate logic re- quires considerable practice. So in a set theory or advanced logic class, you would practice representing more and more statements in predicate logic. You won’t be required to do so in this course. But hopefully, with a little bit of effort, you could translate those sentences into predicate logic if I asked you to do so. Nonetheless, I provide the examples above to convince you that, in principle, predicate logic is powerful to represent fairly complex mathematical definitions and theorems. You can see the alternating quanti- fiers in the above statements, the use of connectives like “if-then”, and the use of function symbols and identities. A central discovery of the early 20th century is that the tools of predicate logic were sufficient for all of math.
4 Aristotelian Logic
It’s now time to compare the expressive power of predicate logic with that of Aristotelian logic. To do so, it suffices to consider two syllogistic forms as examples: Barbara and Celarent. Consider the following example of Barbara first:
We might represent this syllogism in predicate logic as follows. Suppose the domain of discourse is all animals. Let M (x) represent “x is a mammal,” W (x) represent “x is warm blooded,” and H(x) represent “x can maintain
body temperatures higher than the environment.” Then the three sentences above can be translated as follows:
Here’s a second example. Consider the Aristotelian syllogism Celarent, as in the following argument:
We might represent this syllogism in predicate logic as follows. Suppose the domain of discourse is all animals. Let R(x) represent “x is a reptile,” S(x) represents “x is a snake,” and T (x) represents “x has fur.” Then the three sentences above can be translated as follows: