0% found this document useful (0 votes)
7 views10 pages

First Lecture

Uploaded by

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

First Lecture

Uploaded by

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

First Lecture

DR. Yousef Yassin


Assistant Lecturer, Department of Information Systems and
Computers, Faculty of Commerce, Alexandria University
Predicate Logic
or FOL (First Order Logic)
• Components (‫ )مكونات‬:
1) Constant (‫ )ثوابت‬: Small Letter or Numbers
• Ex: ahmed,12

2) Variables (‫ )متغيرات‬: Capital Letter


• Ex: X , Y , Ahmed

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)]

• Everyone Likes icecream


• Solve: x [likes (x,icecream]
Examples (Con’t)
• Every student is happy.
a. ∀x [student(x) → happy(x)]
b. ∀x [student(x) ∧ happy(x)]

• Some students are happy.


a. ∃x [student(x) ∧ happy(x)]
b. ∃x [student(x) → happy(x)]
Examples (Con’t)
• No student complained.
• a. ∀x [student(x) → ¬complained(x)]
• b. ¬∃x [student(x) ∧ complained(x)]
• Not every student complained.
• a. ¬∀x [student(x) → complained(x)]
• b. ∃x [student(x) ∧ ¬ complained(x)]
Examples (Con’t)
• John is tall.
Solve: T (j)
• John is taller than Bill.
Solve : T (j,b)
• Everybody sleeps.
∀x[S(x)]
Somebody likes David.
∃x[L(x,d)]

You might also like