Domain, Parentheses, and Brackets
Date: 11/01/2001 at 01:13:04 From: Andrew dunn Subject: Converting English to predicate logic Given: All people who are not poor and are smart are happy. Those people who read are not stupid. Jill can read and is wealthy. John is poor and stupid. Happy people have exciting lives. Use resolution to prove that there is someone with an exciting life. Who is it? What I have thought of so far is this: ForAll x [person(x) AND wealthy(x) AND smart(x)]=>Happy(x) ForAll x [person(x) AND read(x) => smart(x) read(Jill) AND Wealthy(Jill) ? ~wealthy(John) AND ~smart(John) ? Happy(x) => exciting(x) Thanks Alex
Date: 11/01/2001 at 11:13:57 From: Doctor Achilles Subject: Re: Converting English to predicate logic Hi Alex, Thanks for writing. One thing about logical translations is an idea called "domain." The domain is basically the big set of all the things you're worried about. For instance, if I'm doing a logical proof about properties of cars, then I'll note at the top that everything is a car, and then I don't need to go through and note all along the way that each individual thing is a car. In this case, the domain seems to be people, so we can just note that at the top and not worry about it. (The alternate, logically equivalent thing to do is write in everywhere that every variable and constant (proper name) we deal with is a person, but it's easier for us to use the domain to take care of that). Your translations are almost perfect otherwise; there are just a few places where you need to be careful with your parentheses. Let's take them one at a time. For: All people who are not poor and are smart are happy. You have: ForAll x [person(x) AND wealthy(x) AND smart(x)]=>Happy(x) The only problem here is that Happy(x) is outside the . Since the ForAll x comes right before the brackets, it "governs" or relates to all x's inside the brackets, but you want it to govern the x in Happy(x) too. However, you're on the right track having  around wealthy and smart because you need both of them to get happy, so there has to be something surrounding just them. The solution is to have parentheses inside brackets like this: ForAll x [(wealthy(x) AND smart(x))=>Happy(x)] That way the ForAll governs everything, and the wealthy and smart are taken together as BOTH necessary for happiness. Notice also that I took out the person(x) because everything we're dealing with will be a person so it's not needed. Next, for: Those people who read are not stupid. You have: ForAll x [person(x) AND read(x) => smart(x)] Again the only problem here is with parentheses. Here you actually make the opposite mistake you did before. You need to enclose person and read in their own set of parentheses because BOTH are needed to be smart. Actually, you've probably guessed by now that you don't even need to worry about that in this particular case, because everything is a person and so we don't need to include it, so we can just write: ForAll x [read(x) => smart(x)] Next, for: Jill can read and is wealthy. John is poor and stupid. You have: read(Jill) AND Wealthy(Jill) and ~wealthy(John) AND ~smart(John) These are exactly right! Good work. Last, for: Happy people have exciting lives. You have: Happy(x) => exciting(x) This is close, but you need a quantifier, either ForAll x or ForSome x. x is a variable, and when you use it it needs to have a quantifier governing it. In this case, the sentence indicates that all happy people have exciting lives, so we should use the for all (again, we don't need to include person(x) because that's the domain). ForAll x [Happy(x) => exciting(x)] What if our domain weren't people? Then the sentence would be equivalent to "if you're happy and you're a person, then you'll have an exciting life." That would look like: ForAll x [(Happy(x) AND person(x)) => exciting(x)] But we don't need to worry about that here. Now a quick note on how to deal with proofs involving universal quantifiers. When you have a "ForAll x [something]" you can get rid of the ForAll x and replace EVERY x inside the  with whatever object in your domain you want. For example, you can take: ForAll x [read(x) => smart(x)] And replace it with: read(Jill) => smart(Jill) You can then do logic on that. If you get stuck on the proof, I'd be happy to help you more. Have fun and please write back if you ever have other questions. - Doctor Achilles, The Math Forum http://mathforum.org/dr.math/
Date: 11/01/2001 at 12:07:33 From: Andrew dunn Subject: Re: Converting English to predicate logic This is great - thanks a lot!
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2013 The Math Forum