SlideShare a Scribd company logo
2
Most read
5
Most read
11
Most read
Prepositional Logic and
First order Predicate Logic
Name :- Ashish Duggal
Qualification :- M.C.A.
Prepositional Logic
Propositional logic (PL) is the simplest form of logic where all the statements are
made by propositions. A proposition is a declarative statement which is either
true or false. It is a technique of knowledge representation in logical and
mathematical form.
Example:
a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.
Following are some basic facts about
propositional logic:
 Propositional logic is also called Boolean logic as it works on 0 and 1.
 Propositions can be either true or false, but it cannot be both.
 A proposition formula which is always true is called tautology, and it is also called a valid
sentence.
 A proposition formula which is always false is called Contradiction or Unsatisfiable .
 A statement is satisfiable if there is some interpretation for which it is true.
 Statements which are questions, commands, or opinions are not propositions such as
"Where is Rohini", "How are you", "What is your name", are not propositions.
Syntax of propositional logic:
There are two types of Propositions:
 Atomic Propositions - :
Atomic propositions are the simple propositions. It consists of a single proposition
symbol. These are the sentences which must be either true or false.
Example:
a) 2+2 is 4, it is an atomic proposition as it is a true fact.
b) "The Sun is cold" is also a proposition as it is a false fact.
 Compound proposition -:
Compound propositions are constructed by combining simpler or atomic propositions,
using parenthesis and logical connectives.
Example:
a) "It is raining today, and street is wet."
b) "Ankit is a doctor, and his clinic is in Mumbai."
Logical Connectives:
 Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive literal or
negative literal.
 Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction.
Example: Rohan is intelligent and hardworking.
P= Rohan is intelligent, Q= Rohan is hardworking. → P∧ Q.
 Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where P and Q
are the propositions.
Example: "Ritika is a doctor or Engineer",
P= Ritika is Doctor. Q= Ritika is Engineer, so we can write it as P ∨ Q.
 Implication: A sentence such as P → Q, is called an implication. Implications are also known as if-then
rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
 Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example If I am breathing, then I
am alive
Summarized table for Propositional Logic
Connectives:
Logical equivalence:
 Logical equivalence is one of the features of propositional logic. Two
propositions are said to be logically equivalent if and only if the columns in
the truth table are identical to each other.
 Let's take two propositions A and B, so for logical equivalence, we can write
it as A⇔B. In below truth table we can see that column for ¬A∨ B and A→B,
are identical hence A is Equivalent to B
Properties of Operators:
 Commutativity:
P∧ Q= Q ∧ P, or
P ∨ Q = Q ∨ P.
 Associativity:
(P ∧ Q) ∧ R= P ∧ (Q ∧ R),
(P ∨ Q) ∨ R= P ∨ (Q ∨ R)
 Identity element:
P ∧ True = P,
P ∨ True= True.
 Distributive:
P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
 DE Morgan's Law:
¬ (P ∧ Q) = (¬P) ∨ (¬Q)
¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
 Double-negation elimination:
¬ (¬P) = P.
Limitations of Propositional logic:
 We cannot represent relations like ALL, some, or none with
propositional logic. Example:
All the girls are intelligent.
Some apples are sweet.
 Propositional logic has limited expressive power.
First order Predicate Logic
 First-order logic is another way of knowledge representation in AI. It is an extension to
propositional logic.
 FOPL is sufficiently expressive to represent the natural language statements in a concise way.
 First-order logic is also known as Predicate logic or First-order predicate logic. First-order
logic is a powerful language that develops information about the objects in a more easy way
and can also express the relationship between those objects.
 First-order logic (like natural language) does not only assume that the world contains facts like
propositional logic but also assumes the following things in the world:
Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ......
Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation such
as: the sister of, brother of, has color, comes between
Function: Father of, best friend, third inning of, end of, ......
 As a natural language, first-order logic also has two main parts:
Syntax
Semantics
Syntax of First-order Logic: Basic Elements
Constant 1, 2, A, John, Mumbai, cat,....
Variables x, y, z, a, b,....
Predicates Brother, Father, >,....
Function sqrt, LeftLegOf, ....
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
Atomic sentences:
 Atomic sentences are the most basic sentences of first-order logic. These
sentences are formed from a predicate symbol followed by a parenthesis with
a sequence of terms.
We can represent atomic sentences as
Predicate (term1, term2, ......, term n).
 Example:
Ravi and Ajay are brothers: => Brothers(Ravi, Ajay).
Tom is a cat: => cat (Tom).
Complex Sentences:
 Complex sentences are made by combining atomic sentences using connectives.
First-order logic statements can be divided into two parts:
 Subject: Subject is the main part of the statement.
 Predicate: A predicate can be defined as a relation, which binds two atoms
together in a statement.
Consider the statement:"x is an integer.",
it consists of two parts, the first part x is the subject of the statement and second
part "is an integer," is known as a predicate.
Quantifiers in First-order logic:
There are two types of quantifier:
 Universal Quantifier(∀), (for all, everyone, everything)
Universal quantifier is a symbol of logical representation, which specifies that the
statement within its range is true for everything or every instance of a particular thing.
The Universal quantifier is represented by a symbol ∀ .
In universal quantifier we use implication "→".
 Existential quantifier(∃), (for some, at least one)
Existential quantifiers are the type of quantifiers, which express that the statement within
its scope is true for at least one instance of something.
It is denoted by the logical operator ∃.
In Existential quantifier we always use AND or Conjunction symbol (∧)
Example:
Universal Quantifier:
 Every man respects his parent
predicate is "respect(x, y),"
where x=man, and y= parent
∀x man(x) → respects (x, parent)
Existential Quantifier:
 Some boys play cricket.
predicate is "play(x, y),"
where x= boys, and y= game
∃x boys(x) → play(x, cricket).
Thank You

More Related Content

PDF
Active Directory in ICS: Lessons Learned From The Field
PPTX
Ideology of pakistan
PPT
Natural language processing
PPTX
Simulation & Modelling
PPTX
TYBSC IT PGIS Unit V Data Visualization
PPTX
Blood Bank Management System (including UML diagrams)
PPS
Pre sales process
PPTX
Knowledge representation In Artificial Intelligence
Active Directory in ICS: Lessons Learned From The Field
Ideology of pakistan
Natural language processing
Simulation & Modelling
TYBSC IT PGIS Unit V Data Visualization
Blood Bank Management System (including UML diagrams)
Pre sales process
Knowledge representation In Artificial Intelligence

What's hot (20)

PDF
I.BEST FIRST SEARCH IN AI
PDF
Artificial Intelligence Chap.5 : Uncertainty
PPTX
Predicate logic
PPTX
Artificial Intelligence Notes Unit 3
PPTX
Prolog Programming Language
PPTX
Alpha-beta pruning (Artificial Intelligence)
PPT
AI Lecture 7 (uncertainty)
PPT
L03 ai - knowledge representation using logic
PPT
Heuristic Search Techniques {Artificial Intelligence}
PPT
Artificial intelligence and knowledge representation
PPTX
Lecture 17 Iterative Deepening a star algorithm
PPTX
Dempster shafer theory
PPTX
RECURSIVE DESCENT PARSING
PPTX
First order logic
PDF
Artificial Neural Network Lecture 6- Associative Memories & Discrete Hopfield...
PPT
3. mining frequent patterns
PPTX
Ai lecture 13(unit03)
PPT
AI Lecture 3 (solving problems by searching)
PPTX
knowledge representation using rules
PDF
I. Alpha-Beta Pruning in ai
I.BEST FIRST SEARCH IN AI
Artificial Intelligence Chap.5 : Uncertainty
Predicate logic
Artificial Intelligence Notes Unit 3
Prolog Programming Language
Alpha-beta pruning (Artificial Intelligence)
AI Lecture 7 (uncertainty)
L03 ai - knowledge representation using logic
Heuristic Search Techniques {Artificial Intelligence}
Artificial intelligence and knowledge representation
Lecture 17 Iterative Deepening a star algorithm
Dempster shafer theory
RECURSIVE DESCENT PARSING
First order logic
Artificial Neural Network Lecture 6- Associative Memories & Discrete Hopfield...
3. mining frequent patterns
Ai lecture 13(unit03)
AI Lecture 3 (solving problems by searching)
knowledge representation using rules
I. Alpha-Beta Pruning in ai
Ad

Similar to Artificial Intelligence (AI) | Prepositional logic (PL)and first order predicate logic (FOPL) | Knowledge Representation (20)

PPTX
Knowledege Representation.pptx
PPTX
Logic in Computer Science Unit 2 (1).pptx
PDF
unit-3 First half..pdf nice ppt helps in ai intelligence
PPTX
Basic Knowledge Representation and Reasonong
PDF
Ai lecture 09(unit03)
PDF
Knowledge Representation, Prepositional Logic, Representation and Mapping
PPT
good teaching skills and other beautiful things
PPT
Best presentation about discrete structure
PPT
Per3 logika&pembuktian
PPTX
AI-09 Logic in AI
PPTX
DM(1).pptx
PPTX
Propositional logic
PPTX
DISCRETE MATHEMATICS for IT students.pptx
PDF
logicproof-141212042039-conversion-gate01.pdf
PPT
Logic&proof
PPTX
continuity of module 2.pptx
PPT
Discrete Maths141 - Course Outline and Lecture Slides
PPT
Predicate logic_2(Artificial Intelligence)
PPTX
First order predicate logic(fopl)
PPTX
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
Knowledege Representation.pptx
Logic in Computer Science Unit 2 (1).pptx
unit-3 First half..pdf nice ppt helps in ai intelligence
Basic Knowledge Representation and Reasonong
Ai lecture 09(unit03)
Knowledge Representation, Prepositional Logic, Representation and Mapping
good teaching skills and other beautiful things
Best presentation about discrete structure
Per3 logika&pembuktian
AI-09 Logic in AI
DM(1).pptx
Propositional logic
DISCRETE MATHEMATICS for IT students.pptx
logicproof-141212042039-conversion-gate01.pdf
Logic&proof
continuity of module 2.pptx
Discrete Maths141 - Course Outline and Lecture Slides
Predicate logic_2(Artificial Intelligence)
First order predicate logic(fopl)
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
Ad

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
Institutional Correction lecture only . . .
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
master seminar digital applications in india
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Business Ethics Teaching Materials for college
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Final Presentation General Medicine 03-08-2024.pptx
Cell Structure & Organelles in detailed.
Institutional Correction lecture only . . .
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
PPH.pptx obstetrics and gynecology in nursing
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
master seminar digital applications in india
VCE English Exam - Section C Student Revision Booklet
Business Ethics Teaching Materials for college
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Microbial disease of the cardiovascular and lymphatic systems
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...

Artificial Intelligence (AI) | Prepositional logic (PL)and first order predicate logic (FOPL) | Knowledge Representation

  • 1. Prepositional Logic and First order Predicate Logic Name :- Ashish Duggal Qualification :- M.C.A.
  • 2. Prepositional Logic Propositional logic (PL) is the simplest form of logic where all the statements are made by propositions. A proposition is a declarative statement which is either true or false. It is a technique of knowledge representation in logical and mathematical form. Example: a) It is Sunday. b) The Sun rises from West (False proposition) c) 3+3= 7(False proposition) d) 5 is a prime number.
  • 3. Following are some basic facts about propositional logic:  Propositional logic is also called Boolean logic as it works on 0 and 1.  Propositions can be either true or false, but it cannot be both.  A proposition formula which is always true is called tautology, and it is also called a valid sentence.  A proposition formula which is always false is called Contradiction or Unsatisfiable .  A statement is satisfiable if there is some interpretation for which it is true.  Statements which are questions, commands, or opinions are not propositions such as "Where is Rohini", "How are you", "What is your name", are not propositions.
  • 4. Syntax of propositional logic: There are two types of Propositions:  Atomic Propositions - : Atomic propositions are the simple propositions. It consists of a single proposition symbol. These are the sentences which must be either true or false. Example: a) 2+2 is 4, it is an atomic proposition as it is a true fact. b) "The Sun is cold" is also a proposition as it is a false fact.  Compound proposition -: Compound propositions are constructed by combining simpler or atomic propositions, using parenthesis and logical connectives. Example: a) "It is raining today, and street is wet." b) "Ankit is a doctor, and his clinic is in Mumbai."
  • 5. Logical Connectives:  Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive literal or negative literal.  Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction. Example: Rohan is intelligent and hardworking. P= Rohan is intelligent, Q= Rohan is hardworking. → P∧ Q.  Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where P and Q are the propositions. Example: "Ritika is a doctor or Engineer", P= Ritika is Doctor. Q= Ritika is Engineer, so we can write it as P ∨ Q.  Implication: A sentence such as P → Q, is called an implication. Implications are also known as if-then rules. It can be represented as If it is raining, then the street is wet. Let P= It is raining, and Q= Street is wet, so it is represented as P → Q  Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example If I am breathing, then I am alive
  • 6. Summarized table for Propositional Logic Connectives:
  • 7. Logical equivalence:  Logical equivalence is one of the features of propositional logic. Two propositions are said to be logically equivalent if and only if the columns in the truth table are identical to each other.  Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B. In below truth table we can see that column for ¬A∨ B and A→B, are identical hence A is Equivalent to B
  • 8. Properties of Operators:  Commutativity: P∧ Q= Q ∧ P, or P ∨ Q = Q ∨ P.  Associativity: (P ∧ Q) ∧ R= P ∧ (Q ∧ R), (P ∨ Q) ∨ R= P ∨ (Q ∨ R)  Identity element: P ∧ True = P, P ∨ True= True.  Distributive: P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R). P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).  DE Morgan's Law: ¬ (P ∧ Q) = (¬P) ∨ (¬Q) ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).  Double-negation elimination: ¬ (¬P) = P.
  • 9. Limitations of Propositional logic:  We cannot represent relations like ALL, some, or none with propositional logic. Example: All the girls are intelligent. Some apples are sweet.  Propositional logic has limited expressive power.
  • 10. First order Predicate Logic  First-order logic is another way of knowledge representation in AI. It is an extension to propositional logic.  FOPL is sufficiently expressive to represent the natural language statements in a concise way.  First-order logic is also known as Predicate logic or First-order predicate logic. First-order logic is a powerful language that develops information about the objects in a more easy way and can also express the relationship between those objects.  First-order logic (like natural language) does not only assume that the world contains facts like propositional logic but also assumes the following things in the world: Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ...... Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation such as: the sister of, brother of, has color, comes between Function: Father of, best friend, third inning of, end of, ......  As a natural language, first-order logic also has two main parts: Syntax Semantics
  • 11. Syntax of First-order Logic: Basic Elements Constant 1, 2, A, John, Mumbai, cat,.... Variables x, y, z, a, b,.... Predicates Brother, Father, >,.... Function sqrt, LeftLegOf, .... Connectives ∧, ∨, ¬, ⇒, ⇔ Equality == Quantifier ∀, ∃
  • 12. Atomic sentences:  Atomic sentences are the most basic sentences of first-order logic. These sentences are formed from a predicate symbol followed by a parenthesis with a sequence of terms. We can represent atomic sentences as Predicate (term1, term2, ......, term n).  Example: Ravi and Ajay are brothers: => Brothers(Ravi, Ajay). Tom is a cat: => cat (Tom).
  • 13. Complex Sentences:  Complex sentences are made by combining atomic sentences using connectives. First-order logic statements can be divided into two parts:  Subject: Subject is the main part of the statement.  Predicate: A predicate can be defined as a relation, which binds two atoms together in a statement. Consider the statement:"x is an integer.", it consists of two parts, the first part x is the subject of the statement and second part "is an integer," is known as a predicate.
  • 14. Quantifiers in First-order logic: There are two types of quantifier:  Universal Quantifier(∀), (for all, everyone, everything) Universal quantifier is a symbol of logical representation, which specifies that the statement within its range is true for everything or every instance of a particular thing. The Universal quantifier is represented by a symbol ∀ . In universal quantifier we use implication "→".  Existential quantifier(∃), (for some, at least one) Existential quantifiers are the type of quantifiers, which express that the statement within its scope is true for at least one instance of something. It is denoted by the logical operator ∃. In Existential quantifier we always use AND or Conjunction symbol (∧)
  • 15. Example: Universal Quantifier:  Every man respects his parent predicate is "respect(x, y)," where x=man, and y= parent ∀x man(x) → respects (x, parent) Existential Quantifier:  Some boys play cricket. predicate is "play(x, y)," where x= boys, and y= game ∃x boys(x) → play(x, cricket).