First Lecture
First Lecture
3) Functions ( )دوال: تأخد قيم معينة و تقوم بعمل معين و ترجع قيمة واحدة
فقط
• Ex: f(x), sum(x,y)
• Items (1,2,3)
Components ()مكونات:(con’t)
• 4) Predicate()العالقات:
• Predicate Name (Item1 , item2, item3,……)
• Ex: man(ahmed)
(Not)
5) Connectives ( )الروابط:
(and)
(Implies ())يؤدى إلى
(or)
(equel)
6) Quantifires ()محددات
(There Exist = OR)
( For All = and )
Formalization The Logic
•problem
If Mary loves pat, then Mary loves Quincy.
• If it is Monday, then Mary loves pat or Quincy.
• Mary loves one person at a time.
• If it is Monday, does Mary Love Quincy ?
• does Mary love Quincy?
• does Mary love pat?
Simple Premises: Questions:
Sentences:
Mary loves pat p p q q
Mary loves q m p q q
Quincy m q
it is Monday m pq
Examples
• John Likes Susan
• Solve: LIKE (john,susan)
• John has a cat
• Solve: has (john ,cat)
• A whale is a mammal
• Solve: mammal (whale)
• Barking dog’s don’t bite
• Solve: (bd)
Examples (con’t)
• Either every fruit is bitter or every fruit is sweet.
Solve : x[b(fruit)] x[s(fruit)]
• Every student heard some news.(possibly different
news for each student)
• Solve : x[student(x)] y[news(y) heard(x,y)]
• There is some news that every student heard
• Solve :∃x[news(x)] [student(y)]
• No student likes any exams
Solve :∃x [likes(student,exam)]
Example )con’t(
• All kings are Persons.
• Solve: x [king(x) person (y)]