0% found this document useful (0 votes)
126 views1 page

Examples For How To Translate English Sentences Into First-Order Logic

The document provides examples of how to translate English sentences into first-order logic. It gives the logical expression that corresponds to sentences about students, courses, loves, sisters and more. The precedence of logical operators is also indicated, with NOT, AND, OR, IMPLIES and EQUIV listed from highest to lowest precedence. Multiple equivalent logical expressions may correspond to a single English sentence.

Uploaded by

azamfaisal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views1 page

Examples For How To Translate English Sentences Into First-Order Logic

The document provides examples of how to translate English sentences into first-order logic. It gives the logical expression that corresponds to sentences about students, courses, loves, sisters and more. The precedence of logical operators is also indicated, with NOT, AND, OR, IMPLIES and EQUIV listed from highest to lowest precedence. Multiple equivalent logical expressions may correspond to a single English sentence.

Uploaded by

azamfaisal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Examples for how to Translate English Sentences into First-Order Logic

If you would like to practise, there are some more problems (with sample solutions) in Nilsson, Section 15.6.2, and ((with-
out sample solutions) in Russell and Norvig, Exercise 7.2. The following problems were inspired by them. In the following,
it is important to remember the precedence of the operators, which are (from highest to lowest): ¬ (NOT), ∧ (AND), ∨ (OR),
⇒ (IMPLIES), ⇔ (EQUIV). Notice also that there are always several (equivalent) sentences in first-order logic that corre-
spond to a given English sentence. We give only one example.
All students are smart.
∀ x ( Student(x) ⇒ Smart(x) )
There exists a student.
∃ x Student(x).
There exists a smart student.
∃ x ( Student(x) ∧ Smart(x) )
Every student loves some student.
∀ x ( Student(x) ⇒ ∃ y ( Student(y) ∧ Loves(x,y) ))
Every student loves some other student.
∀ x ( Student(x) ⇒ ∃ y ( Student(y) ∧ ¬ (x = y) ∧ Loves(x,y) ))
There is a student who is loved by every other student.
∃ x ( Student(x) ∧ ∀ y ( Student(y) ∧ ¬(x = y) ⇒ Loves(y,x) ))
Bill is a student.
Student(Bill)
Bill takes either Analysis or Geometry (but not both)
Takes(Bill, Analysis) ⇔ ¬ Takes(Bill, Geometry)
Bill takes Analysis or Geometry (or both).
Takes(Bill, Analysis) ∨ Takes(Bill, Geometry)
Bill takes Analysis and Geometry.
Takes(Bill, Analysis) ∧ Takes(Bill, Geometry)
Bill does not take Analysis.
¬ Takes(Bill, Analysis).
No student loves Bill.
¬ ∃ x ( Student(x) ∧ Loves(x, Bill) )
Bill has at least one sister.
∃ x SisterOf(x,Bill)
Bill has no sister.
¬ ∃ x SisterOf(x,Bill)
Bill has at most one sister.
∀ x, y ( SisterOf(x, Bill) ∧ SisterOf(y, Bill) ⇒ x = y )
Bill has exactly one sister.
∃ x ( SisterOf(x, Bill) ∧ ∀ y ( SisterOf(y, Bill) ⇒ x = y ))
Bill has at least two sisters.
∃ x, y ( SisterOf(x, Bill) ∧ SisterOf(y, Bill) ∧ ¬ (x = y) )
Every student takes at least one course.
∀ x ( Student(x) ⇒ ∃ y ( Course(y) ∧ Takes(x,y) ))
Only one student failed History.
∃ x ( Student(x) ∧ Failed(x, History) ∧ ∀ y ( Student(y) ∧ Failed(y, History) ⇒ x = y ))
No student failed Chemistry but at least one student failed History.
¬ ∃ x ( Student(x) ∧ Failed(x, Chemistry) ) ∧ ∃ x ( Student(x) ∧ Failed(x, History) )
Every student who takes Analysis also takes Geometry.
∀ x ( Student(x) ∧ Takes(x, Analysis) ⇒ Takes(x, Geometry) )
No student can fool all the other students.
¬ ∃ x ( Student(x) ∧ ∀ y ( Student(y) ∧ ¬ (x = y) ⇒ Fools(x,y) ))

You might also like