Convert sentences into First Order Logic

Click For Summary

Homework Help Overview

The discussion revolves around converting English sentences into First Order Logic (FOL). The sentences in question involve conditions about individuals being in class, their health status, and their activities, specifically focusing on logical implications and quantifiers.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss various attempts to translate sentences into FOL, questioning the correctness of quantifiers and logical structure. There are concerns about the implications of using existential versus universal quantifiers and the proper handling of predicates.

Discussion Status

There is an ongoing exploration of the correct formulation of the sentences in FOL. Some participants have provided feedback on previous attempts, highlighting issues with logical form and operator precedence. The discussion remains active with participants seeking clarity on the translation process.

Contextual Notes

Participants express confusion regarding the nuances of English phrasing and its implications for logical translation. There are references to specific terms and conditions that must be carefully considered, such as the distinction between "someone" and "anyone" in logical terms.

Cruger
Messages
7
Reaction score
0
Hello there, I have 3 sentences.

They are:
1) If someone is not in the class then that person is either ill or lazy.
2) Ill people do not go for shopping.
3) The class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop.
I want to convert above sentences to first order logic.
I have tried like this

1) \existsx person(x) \wedge \neginClass(x) \rightarrow ill(x) \vee lazy(x)

2) \forallx person(x) \wedge ill(x) \wedge \neggoShopping(x)

3) \existsx teacher(x) \wedge hasNoticed(x) \rightarrow \neginClass(James) \wedge goShopping(James)Please somebody tell me whether these are right or wrong?
If they are wrong can you correct them?
Thank you...
 
Last edited:
Physics news on Phys.org
1 doesn't look quite right. What if everyone is in class?

2 says that everyone is ill and nobody is shopping.

3 is also definitely wrong. Suppose Mr. X, a teacher, asks his class if anyone knows the answer to some question. He notices Jane raising her hand. This does not imply one thing about James. Mr. X might not even have James as a student.
 
Can you please write it in correct way?
I need to have a clear idea...
 
Is this right?

1) \existsx person(x) \wedge \neginClass(x) \rightarrow ill(x) \vee lazy(x)

2) \forallx person(x) \wedge ill(x) \rightarrow \neggoShopping(x)

3) \existsx teacher(x) \wedge (hasNoticed(x, James) \wedge \neginClass(James) \wedge goShopping(James))
 
A problem common to your answers 1 and 2: No parentheses. What you wrote is not a WFF because implication is the last to be evaluated without parentheses. The x's on the right hand side of the implication in your expressions are free variables. I'm assuming you meant ∃x (person(x) ∧ ¬inClass(x) → ill(x) ∨ lazy(x)), or with even more parentheses, ∃x ((person(x) ∧ ¬inClass(x)) → (ill(x) ∨ lazy(x))) (but neither of these is correct).

For (1), you shouldn't be using ∃. What happens if x is a rock (i.e., not a person)?

(3) also has problems. Try translating what you wrote back to English. Hint: To be correct, the teacher has to have noticed that James is not in class and has to have noticed that James left the Candy Store.
 
  • Like
Likes   Reactions: 1 person
how about this?

1) \forallx [\existsy \neginClass(y) \rightarrow ill(y) \vee lazy(y)]

2) \neg \existsx (go(ill_people, x) \wedge shopping(x))

3) \existsx teacher(x) \wedge (hasNoticed(x, James) \wedge \neg inClass(Suresh)) \wedge goes(James, shopping))
 
Last edited:
please reply......
 
No. What's x doing in your new version of 1? In 2, what's this go(ill_people,x)? In 3, who's Suresh? Where's the Candy Store?

It looks like you are just grasping for answers.
 
I'm so confused. please do this for me...
 
  • #10
We do not do your homework for you at this site.

It appears you are getting confused by "someone" in the phrase "if someone is not in the class then that person is either ill or lazy.". English is a bit sloppy. Sometimes "some" means "there exists", but not here. Consider the phrase "someone who is over 18 is eligible to vote". This does not mean that there exists some person who is over 18 and who is eligible to vote. It means that every person who is over 18 is eligible to vote. Try translating "Anyone who is not in class is either ill or lazy".

With regard to "ill people do not go for shopping," you were almost there once. You have to be careful of operator precedence. When in doubt, use parentheses. You can address this particular problem using either a universal or negated existential qualifier.

With regard to "the class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop," there's no mention of shopping. One thing you have to be careful of here is the temptation to use second order logic. Don't make a predicate that takes a predicate as an argument.
 
  • Like
Likes   Reactions: 1 person
  • #11
Cruger said:
Hello there, I have 3 sentences.

They are:
1) If someone is not in the class then that person is either ill or lazy.
2) Ill people do not go for shopping.
3) The class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop.
I want to convert above sentences to first order logic.

You've got to take these step by step. Looking at number 1, what is the shape of the sentence? It is an if-then sentence. So your answer will be something like "(quantifiers) if (predicate) then (predicate)". This is the first step.

Next, let's look at the first predicate, it says someone is not in the class. So let's have C(x) mean, x is in the class. So our sentence now looks like "(quantifiers) if ~C(x) then (predicate)".

The second predicate is similar, I'll leave you to handle that. Now to decide what the quantifiers should be. The question must apply to all students, because it means that ANYONE who isn't in the class is ill or lazy. So it must be "all students x". So finally, "For all students x, if ~C(x) then (predicate)."

This is almost ready to translate. If ##\in## is available to you, you can translate this as-is. Otherwise, you need to modify it so that x includes only students. I can think of 3 ways to do that, see if you can find a way to do that.
 

Similar threads

Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K