SlideShare a Scribd company logo
1 of 13
Download to read offline
First order predicate logic
Habiba Saeed
25 different examples
• There is at least one thief.
∃x: thief(x)
• Some cats are black.
∃x: cats(x) ^ black(x)
• Every apple is delicious.
∀x: apple(x) → delicious(x)
First order predicate logic
• All students taking Al are genius.
∀x: students(x) ^ taking AI(x) → genius(x)
• Some students are taking AL are genius and hardworking.
∃x: students(x) ^ taking AI(x) →genius(x) ^hardworking(x)
• Hiba takes DM and AI.
∃x: hiba(x) ^ takes(x, DM) ^ takes(x, AI)
• All romans were either loyal to Caesar or hated him.
• Anyone who is married and has more than one spouse is a bigamist.
• Bigamist: someone who marries a person while already legally married to
someone else
solution
• All romans were either loyal to Caesar or hated him.
∀x: Roman(x) → Loyal(x, Caesar) ∨ Hated (x, Caesar)
• Anyone who is married and has more than one spouse is a bigamist.
∀x: married(x) ^ (no.of.Spouse(x) > 1) → bigamist(x)
• Ancestors of my ancestors are ancestors of mine.
∀x ∀y ∀z: ancestor(x, y) ^ ancestors(y, z) → ancestor(x, z)
x= dada dadi y= Ami Abu z=me
• NO purple mushroom is poisonous.
∀x: mushroom(x) ^ purple(x) → ~poisonous(x)
• Saleh takes either AI or DM( but not both).
∃x: saleha(x) ^ takes(x, AI) ↔ ~takes (x, DM)
• If any bananas are yellow , they are ripe.
∀x : Banana(x) ^ yellow(x) → Ripe(x)
• If anyone cheats, everyone suffers.
∀x ∀y: cheat(x) → suffers(y)
• No whale is a fish.
∀x : whale(x) → ~fish(x)
• Brothers are siblings.
∀x ∀y: brother(x) → Siblings(x, y)
• Nida has no sister.
~∃x: Sister.Of(x, Nida)
• Every student smiles.
∀x : student(x) → smile(x)
• Every student except Ayesha smiles.
∀x : student(x) → (x ≠ Ayesha ↔ smile(x))
• Every student who loves Mary is happy.
∀x : student(x) ^ loves(x, Mary) → happy(x)
• Everyone loves himself.
∀x : Love(x, x)
• Every boy who loves Mary hates every boy who Mary loves.
∀x ∀y: (boy(x) ^ love(x, Mary)) → (boy(y) ^ love(Mary, y)) → hate(x, y)
• Every boy who loves Mary hates every other boy who Mary loves.
∀x ∀y: (boy(x) ^ love(x, Mary)) → (boy(y) ^ love(Mary, y) ^ y ≠ x )→
hate(x, y)
First order predicate logic examples

More Related Content

What's hot

First Order Logic resolution
First Order Logic resolutionFirst Order Logic resolution
First Order Logic resolutionAmar Jukuntla
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammarmeresie tesfay
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logicankush_kumar
 
Compiler lab final report writing
Compiler lab final report writingCompiler lab final report writing
Compiler lab final report writingUmme habiba
 
Introdution and designing a learning system
Introdution and designing a learning systemIntrodution and designing a learning system
Introdution and designing a learning systemswapnac12
 
List,tuple,dictionary
List,tuple,dictionaryList,tuple,dictionary
List,tuple,dictionarynitamhaske
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicManjula V
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsackAmin Omi
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDAAshish Duggal
 
Graphics software and standards
Graphics software and standardsGraphics software and standards
Graphics software and standardsMani Kanth
 
Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...Beckham000
 
Ai lecture 06(unit-02)
Ai lecture 06(unit-02)Ai lecture 06(unit-02)
Ai lecture 06(unit-02)vikas dhakane
 
Introduction to C++
Introduction to C++ Introduction to C++
Introduction to C++ Bharat Kalia
 
Airline Reservation System Documentation
Airline Reservation System DocumentationAirline Reservation System Documentation
Airline Reservation System DocumentationSanjana Agarwal
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic Junya Tanaka
 
Compiler Design
Compiler DesignCompiler Design
Compiler DesignMir Majid
 

What's hot (20)

First Order Logic resolution
First Order Logic resolutionFirst Order Logic resolution
First Order Logic resolution
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammar
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
Compiler lab final report writing
Compiler lab final report writingCompiler lab final report writing
Compiler lab final report writing
 
Introdution and designing a learning system
Introdution and designing a learning systemIntrodution and designing a learning system
Introdution and designing a learning system
 
List,tuple,dictionary
List,tuple,dictionaryList,tuple,dictionary
List,tuple,dictionary
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
 
Graphics software and standards
Graphics software and standardsGraphics software and standards
Graphics software and standards
 
Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...
 
Ai lecture 06(unit-02)
Ai lecture 06(unit-02)Ai lecture 06(unit-02)
Ai lecture 06(unit-02)
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Introduction to C++
Introduction to C++ Introduction to C++
Introduction to C++
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Airline Reservation System Documentation
Airline Reservation System DocumentationAirline Reservation System Documentation
Airline Reservation System Documentation
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 

Recently uploaded

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

First order predicate logic examples

  • 4. • There is at least one thief. ∃x: thief(x) • Some cats are black. ∃x: cats(x) ^ black(x) • Every apple is delicious. ∀x: apple(x) → delicious(x) First order predicate logic
  • 5. • All students taking Al are genius. ∀x: students(x) ^ taking AI(x) → genius(x) • Some students are taking AL are genius and hardworking. ∃x: students(x) ^ taking AI(x) →genius(x) ^hardworking(x) • Hiba takes DM and AI. ∃x: hiba(x) ^ takes(x, DM) ^ takes(x, AI)
  • 6. • All romans were either loyal to Caesar or hated him. • Anyone who is married and has more than one spouse is a bigamist. • Bigamist: someone who marries a person while already legally married to someone else
  • 7. solution • All romans were either loyal to Caesar or hated him. ∀x: Roman(x) → Loyal(x, Caesar) ∨ Hated (x, Caesar) • Anyone who is married and has more than one spouse is a bigamist. ∀x: married(x) ^ (no.of.Spouse(x) > 1) → bigamist(x)
  • 8. • Ancestors of my ancestors are ancestors of mine. ∀x ∀y ∀z: ancestor(x, y) ^ ancestors(y, z) → ancestor(x, z) x= dada dadi y= Ami Abu z=me • NO purple mushroom is poisonous. ∀x: mushroom(x) ^ purple(x) → ~poisonous(x) • Saleh takes either AI or DM( but not both). ∃x: saleha(x) ^ takes(x, AI) ↔ ~takes (x, DM)
  • 9. • If any bananas are yellow , they are ripe. ∀x : Banana(x) ^ yellow(x) → Ripe(x) • If anyone cheats, everyone suffers. ∀x ∀y: cheat(x) → suffers(y) • No whale is a fish. ∀x : whale(x) → ~fish(x)
  • 10. • Brothers are siblings. ∀x ∀y: brother(x) → Siblings(x, y) • Nida has no sister. ~∃x: Sister.Of(x, Nida) • Every student smiles. ∀x : student(x) → smile(x)
  • 11. • Every student except Ayesha smiles. ∀x : student(x) → (x ≠ Ayesha ↔ smile(x)) • Every student who loves Mary is happy. ∀x : student(x) ^ loves(x, Mary) → happy(x) • Everyone loves himself. ∀x : Love(x, x)
  • 12. • Every boy who loves Mary hates every boy who Mary loves. ∀x ∀y: (boy(x) ^ love(x, Mary)) → (boy(y) ^ love(Mary, y)) → hate(x, y) • Every boy who loves Mary hates every other boy who Mary loves. ∀x ∀y: (boy(x) ^ love(x, Mary)) → (boy(y) ^ love(Mary, y) ^ y ≠ x )→ hate(x, y)