SlideShare a Scribd company logo
First-Order Logic – Examples
Translate to 1 Order Logic  st


•   Snakes are reptiles.
    (S(x): x is a snake, R(x): x is a reptile)
•   None but the brave deserve the fair.
    (B(x): x is brave, D(x): x deserves the fair)
    (B(x): x is brave, F(x): x is fair, D(x,y): x deserves y)
•   No coat is waterproof, unless it has been specially
    treated.
    (C(x): x is a coat, W(x): x is waterproof, S(x): x has
    been specially treated)
•   No car that is over 10 years old will be repaired if it is
    severely damaged.
    (C(x): x is a car, O(x): x is over 10 years old, R(x): x will
    be repaired, D(x): x is severely damaged)
Solutions
•   Snakes are reptiles.
    ∀x (S(x) → R(x))           Not: ∀x (S(x) ∧ R(x))
•   None but the brave deserve the fair.
    ∀x (D(x) → B(x))
    ∀x (∀y (F(y) ∧ D(x,y)) → B(x))
•   No coat is waterproof, unless it has been
    specially treated.
    ∀x (C(x) → ¬W(x) ∨ S(x))
•   No car that is over 10 years old will be repaired
    if it is severely damaged.
    ∀x (C(x) ∧ O(x) → (D(x) → ¬R(x))
More Translation
•    If anything is damaged, someone will be blamed.
     (D(x): x is damaged, P(x): x is a person, B(x): x is
     blamed)
•    If any bananas are yellow, they are ripe.
     (B(x): x is a banana, Y(x): x is yellow, R(x): x is ripe)
3.   If any bananas are yellow, then some bananas are ripe.
•    Dead men tell no tales.
     (D(x): x is dead, M(x): x is a man, T(x): x is a tale,
     T(x,y): x tells y)
•    There is a store from which everyone buys something.
     (P(x): x is a person, S(x): x is a store, B(x,y,z): x buys y
     from z)
Solutions
•   If anything is damaged, someone will be blamed.
    (∃x D(x)) → ∃y (P(y) ∧ B(y)) or
    ∀x ( D(x) → ∃y (P(y) ∧ B(y)) ) – notice braces
•   If any bananas are yellow, they are ripe.
    ∀x B(x) → (Y(x) → R(x)) or
    ∀x B(x) ∧ Y(x) → R(x)
•   If any bananas are yellow, then some bananas are ripe.
    ∀x B(x) → (Y(x) → ∃y (B(y) ∧ R(y)))
•   Dead men tell no tales.
    ∀x (D(x) ∧ M(x)) → ∀y (T(y) → ¬T(x,y))
•   There is a store from which everyone buys something.
    ∃x (S(x) ∧ ∀y (P(y) → ∃z B(y,z,x)))
Still More Translation
H(x): x is a horse
C(x): x is gentle
T(x): x has been well trained
4. Any horse that is gentle has been well
   trained.
5. Gentle horses have all been well trained.
6. If something is a well-trained horse, then
   it must be gentle.
Prove by Resolution Refutation
•   All athletes are brawny. Shyam is not brawny.
    Therefore, Shyam is not an athlete. A(x), B(x),
    s
•   Dates are edible. Only food items are edible.
    All food items are good. Therefore, all dates
    are good. D(x), E(x), F(x), G(x)

•   All astronauts are brave. Shyam is brave.
    Therefore, Shyam is an astronaut. A(x), B(x), s
Equality in First-Order Logic
   E.g. Brother(A) = B is a statement
   Handling equality in resolution: demodulation
    rule

         x = y, (…z…) ⇒ (…y…)

       Here (…z…) is any sentence containing z where z
        unifies with x
       Then, replace z with y
Measures
   Length(MyScale) = Inches(6) = CM(15)
   ∀x Inches(x) = CM(2.5 * x)

Express: All days have 24 hours.
Parts
   PartOf(AP,India)
   PartOf(head,body)

Express: Every body has 2 legs.
Substances
   ∀x,y (Butter(x)∧PartOf(y,x) → Butter(y))

Express: Every material object is made of
 substances.
Change: Situation Calculus
   Representing change in terms of situations and
    actions
   Add extra “situation argument” to all predicates
    and functions that can change over time.
       E.g. President(Narayanan,S0) ∧ President(Kalam,S1)
   Result situations: From one situation to another.
       E.g. Result(StudyHard(Shyam), S2) = S3
       Represents actions
       E.g. President(Kalam,Result(Nomination, S0))
       E.g. ∀x,s (Undergraduate(x, s) → Graduate(x, Result(
        StudyHard(x), s)))
Express:
   A non-rich person can become rich either
    by working hard or by stealing from a
    bank.

(P(x): x is a person, R(x,s): x is rich in
  situation s, W(x): x worked hard, S(x,y): x
  stole from y, B(x): x is a bank)
Symbolize and Translate
   Any single capital letter is a wff (well-
    formed-formula).
   If P is a wff then ¬P is a wff.
   If P and Q are wffs, then P ∧ Q and P ∨ Q
    are wffs.
   No formula will be regarded as being a wff
    unless its being so follows from this
    definition.
Symbolize and Translate
Preserve the intended meaning.
 One more outburst like that and you will be out
  of class.
 Spiderman is on TV tonight, if you’re interested.

 Well, I like AI and I don’t like AI.

 Any politician can fool some people all the time,
  all people some of the time, but not all people all
  of the time.
Higher-Order Logic
   In first-order logic we can quantify over
    objects but not over relations or functions.
   Higher-order logic allows us to quantify
    over relations and functions
   Example:
        ∀x,y (x = y) ↔ (∀p p(x) ↔ p(y))
   Higher-order logics have strictly more
    expressive power than first-order logic.
E.g. Translate Peano’s Axioms

Based on 3 concepts:

   A constant: zero
   A predicate indicating numbers: N
   A successor function: S
The Axioms
   Zero is a number.
   If x is a number, then successor of x is also a
    number.
   If the successors of two numbers are equal, then
    those two numbers are equal.
   No successor of any number is equal to zero.
   If ϕ (a predicate) applies to zero, then if it can be
    shown that ϕ applies to the successor of any
    number given that it applies to that number, then
    it follows that ϕ applies to all numbers.
In 2 order logic
        nd


   Zero is a number: N(zero)
   If x is a number, then successor of x is also a number:
    ∀x N(x) → N(S(x))
   If the successors of two numbers are equal, then those
    two numbers are equal:
    ∀x,y [ N(x) ∧ N(y) ∧ S(x) = S(y) → x = y ]
   No successor of any number is equal to zero:
    ¬ (∃x N(x) ∧ (S(x) = zero))
   If ϕ (a predicate) applies to zero, then if it can be shown
    that ϕ applies to the successor of any number given that
    it applies to that number, then it follows that ϕ applies to
    all numbers:
    ϕ(zero) ∧ ∀x ( N(x) ∧ (ϕ(x) → ϕ(S(x)))) → ∀x ( N(x) →
    ϕ(x) )
Prove using Resolution Refutation
   Any fish can swim faster than any smaller
    one. Therefore, if there is a largest fish,
    then there is a fastest fish.

    (F(x): x is a fish, L(x,y): x is larger= than y,
    S(x,y): x can swim faster= than y)

More Related Content

What's hot (20)

Methods of solving ODE
Methods of solving ODEMethods of solving ODE
Methods of solving ODE
 
Gaussian Elimination Method
Gaussian Elimination MethodGaussian Elimination Method
Gaussian Elimination Method
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
 
Lesson 22: Quadratic Forms
Lesson 22: Quadratic FormsLesson 22: Quadratic Forms
Lesson 22: Quadratic Forms
 
Convex Optimization
Convex OptimizationConvex Optimization
Convex Optimization
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
09
0909
09
 
Laplace transform
Laplace transformLaplace transform
Laplace transform
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplification
 
Bode plot & System type
Bode plot & System typeBode plot & System type
Bode plot & System type
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Bresenham algorithm
Bresenham algorithmBresenham algorithm
Bresenham algorithm
 
Problems, Problem spaces and Search
Problems, Problem spaces and SearchProblems, Problem spaces and Search
Problems, Problem spaces and Search
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
strong slot and filler
strong slot and fillerstrong slot and filler
strong slot and filler
 
Matrices and System of Linear Equations ppt
Matrices and System of Linear Equations pptMatrices and System of Linear Equations ppt
Matrices and System of Linear Equations ppt
 
Ece4510 notes08
Ece4510 notes08Ece4510 notes08
Ece4510 notes08
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problem
 

Viewers also liked

Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12yosser atassi
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolutionTianlu Wang
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolutionTianlu Wang
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferencePalGov
 
Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsMustafa Jarrar
 
Jarrar: First Order Logic
Jarrar: First Order LogicJarrar: First Order Logic
Jarrar: First Order LogicMustafa Jarrar
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsMustafa Jarrar
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANETSunita Sahu
 
Practical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & PigPractical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & PigMilind Bhandarkar
 
Deep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceDeep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceLukas Masuch
 

Viewers also liked (14)

Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolution
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
 
Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference Methods
 
Jarrar: First Order Logic
Jarrar: First Order LogicJarrar: First Order Logic
Jarrar: First Order Logic
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference Methods
 
A petri-net
A petri-netA petri-net
A petri-net
 
First order logic
First order logicFirst order logic
First order logic
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANET
 
Practical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & PigPractical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & Pig
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Deep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceDeep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial Intelligence
 

Similar to 3 fol examples v2

Similar to 3 fol examples v2 (20)

Course notes2summer2012
Course notes2summer2012Course notes2summer2012
Course notes2summer2012
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Use of quantifiers
Use of quantifiersUse of quantifiers
Use of quantifiers
 
Quantification
QuantificationQuantification
Quantification
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Module_5_1.pptx
Module_5_1.pptxModule_5_1.pptx
Module_5_1.pptx
 
CPSC 125 Ch 1 sec 3
CPSC 125 Ch 1 sec 3CPSC 125 Ch 1 sec 3
CPSC 125 Ch 1 sec 3
 
Computational logic First Order Logic
Computational logic First Order LogicComputational logic First Order Logic
Computational logic First Order Logic
 
Lecture3
Lecture3Lecture3
Lecture3
 
Predicates
PredicatesPredicates
Predicates
 
FOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptxFOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptx
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
Predicate & quantifier
Predicate & quantifierPredicate & quantifier
Predicate & quantifier
 
PredicateLogic (1).ppt
PredicateLogic (1).pptPredicateLogic (1).ppt
PredicateLogic (1).ppt
 
PredicateLogic.pptx
PredicateLogic.pptxPredicateLogic.pptx
PredicateLogic.pptx
 
Knowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxKnowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptx
 
Proba stats-r1-2017
Proba stats-r1-2017Proba stats-r1-2017
Proba stats-r1-2017
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 

More from Digvijay Singh (14)

Week3 applications
Week3 applicationsWeek3 applications
Week3 applications
 
Week3.1
Week3.1Week3.1
Week3.1
 
Week2.1
Week2.1Week2.1
Week2.1
 
Week1.2 intro
Week1.2 introWeek1.2 intro
Week1.2 intro
 
Networks
NetworksNetworks
Networks
 
Uncertainty
UncertaintyUncertainty
Uncertainty
 
Overfitting and-tbl
Overfitting and-tblOverfitting and-tbl
Overfitting and-tbl
 
Ngrams smoothing
Ngrams smoothingNgrams smoothing
Ngrams smoothing
 
Query execution
Query executionQuery execution
Query execution
 
Query compiler
Query compilerQuery compiler
Query compiler
 
Machine learning
Machine learningMachine learning
Machine learning
 
Hmm viterbi
Hmm viterbiHmm viterbi
Hmm viterbi
 
Multidimensional Indexing
Multidimensional IndexingMultidimensional Indexing
Multidimensional Indexing
 
Bayesnetwork
BayesnetworkBayesnetwork
Bayesnetwork
 

Recently uploaded

ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»QADay
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 

Recently uploaded (20)

ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 

3 fol examples v2

  • 2. Translate to 1 Order Logic st • Snakes are reptiles. (S(x): x is a snake, R(x): x is a reptile) • None but the brave deserve the fair. (B(x): x is brave, D(x): x deserves the fair) (B(x): x is brave, F(x): x is fair, D(x,y): x deserves y) • No coat is waterproof, unless it has been specially treated. (C(x): x is a coat, W(x): x is waterproof, S(x): x has been specially treated) • No car that is over 10 years old will be repaired if it is severely damaged. (C(x): x is a car, O(x): x is over 10 years old, R(x): x will be repaired, D(x): x is severely damaged)
  • 3. Solutions • Snakes are reptiles. ∀x (S(x) → R(x)) Not: ∀x (S(x) ∧ R(x)) • None but the brave deserve the fair. ∀x (D(x) → B(x)) ∀x (∀y (F(y) ∧ D(x,y)) → B(x)) • No coat is waterproof, unless it has been specially treated. ∀x (C(x) → ¬W(x) ∨ S(x)) • No car that is over 10 years old will be repaired if it is severely damaged. ∀x (C(x) ∧ O(x) → (D(x) → ¬R(x))
  • 4. More Translation • If anything is damaged, someone will be blamed. (D(x): x is damaged, P(x): x is a person, B(x): x is blamed) • If any bananas are yellow, they are ripe. (B(x): x is a banana, Y(x): x is yellow, R(x): x is ripe) 3. If any bananas are yellow, then some bananas are ripe. • Dead men tell no tales. (D(x): x is dead, M(x): x is a man, T(x): x is a tale, T(x,y): x tells y) • There is a store from which everyone buys something. (P(x): x is a person, S(x): x is a store, B(x,y,z): x buys y from z)
  • 5. Solutions • If anything is damaged, someone will be blamed. (∃x D(x)) → ∃y (P(y) ∧ B(y)) or ∀x ( D(x) → ∃y (P(y) ∧ B(y)) ) – notice braces • If any bananas are yellow, they are ripe. ∀x B(x) → (Y(x) → R(x)) or ∀x B(x) ∧ Y(x) → R(x) • If any bananas are yellow, then some bananas are ripe. ∀x B(x) → (Y(x) → ∃y (B(y) ∧ R(y))) • Dead men tell no tales. ∀x (D(x) ∧ M(x)) → ∀y (T(y) → ¬T(x,y)) • There is a store from which everyone buys something. ∃x (S(x) ∧ ∀y (P(y) → ∃z B(y,z,x)))
  • 6. Still More Translation H(x): x is a horse C(x): x is gentle T(x): x has been well trained 4. Any horse that is gentle has been well trained. 5. Gentle horses have all been well trained. 6. If something is a well-trained horse, then it must be gentle.
  • 7. Prove by Resolution Refutation • All athletes are brawny. Shyam is not brawny. Therefore, Shyam is not an athlete. A(x), B(x), s • Dates are edible. Only food items are edible. All food items are good. Therefore, all dates are good. D(x), E(x), F(x), G(x) • All astronauts are brave. Shyam is brave. Therefore, Shyam is an astronaut. A(x), B(x), s
  • 8. Equality in First-Order Logic  E.g. Brother(A) = B is a statement  Handling equality in resolution: demodulation rule x = y, (…z…) ⇒ (…y…)  Here (…z…) is any sentence containing z where z unifies with x  Then, replace z with y
  • 9. Measures  Length(MyScale) = Inches(6) = CM(15)  ∀x Inches(x) = CM(2.5 * x) Express: All days have 24 hours.
  • 10. Parts  PartOf(AP,India)  PartOf(head,body) Express: Every body has 2 legs.
  • 11. Substances  ∀x,y (Butter(x)∧PartOf(y,x) → Butter(y)) Express: Every material object is made of substances.
  • 12. Change: Situation Calculus  Representing change in terms of situations and actions  Add extra “situation argument” to all predicates and functions that can change over time.  E.g. President(Narayanan,S0) ∧ President(Kalam,S1)  Result situations: From one situation to another.  E.g. Result(StudyHard(Shyam), S2) = S3  Represents actions  E.g. President(Kalam,Result(Nomination, S0))  E.g. ∀x,s (Undergraduate(x, s) → Graduate(x, Result( StudyHard(x), s)))
  • 13. Express:  A non-rich person can become rich either by working hard or by stealing from a bank. (P(x): x is a person, R(x,s): x is rich in situation s, W(x): x worked hard, S(x,y): x stole from y, B(x): x is a bank)
  • 14. Symbolize and Translate  Any single capital letter is a wff (well- formed-formula).  If P is a wff then ¬P is a wff.  If P and Q are wffs, then P ∧ Q and P ∨ Q are wffs.  No formula will be regarded as being a wff unless its being so follows from this definition.
  • 15. Symbolize and Translate Preserve the intended meaning.  One more outburst like that and you will be out of class.  Spiderman is on TV tonight, if you’re interested.  Well, I like AI and I don’t like AI.  Any politician can fool some people all the time, all people some of the time, but not all people all of the time.
  • 16. Higher-Order Logic  In first-order logic we can quantify over objects but not over relations or functions.  Higher-order logic allows us to quantify over relations and functions  Example: ∀x,y (x = y) ↔ (∀p p(x) ↔ p(y))  Higher-order logics have strictly more expressive power than first-order logic.
  • 17. E.g. Translate Peano’s Axioms Based on 3 concepts:  A constant: zero  A predicate indicating numbers: N  A successor function: S
  • 18. The Axioms  Zero is a number.  If x is a number, then successor of x is also a number.  If the successors of two numbers are equal, then those two numbers are equal.  No successor of any number is equal to zero.  If ϕ (a predicate) applies to zero, then if it can be shown that ϕ applies to the successor of any number given that it applies to that number, then it follows that ϕ applies to all numbers.
  • 19. In 2 order logic nd  Zero is a number: N(zero)  If x is a number, then successor of x is also a number: ∀x N(x) → N(S(x))  If the successors of two numbers are equal, then those two numbers are equal: ∀x,y [ N(x) ∧ N(y) ∧ S(x) = S(y) → x = y ]  No successor of any number is equal to zero: ¬ (∃x N(x) ∧ (S(x) = zero))  If ϕ (a predicate) applies to zero, then if it can be shown that ϕ applies to the successor of any number given that it applies to that number, then it follows that ϕ applies to all numbers: ϕ(zero) ∧ ∀x ( N(x) ∧ (ϕ(x) → ϕ(S(x)))) → ∀x ( N(x) → ϕ(x) )
  • 20. Prove using Resolution Refutation  Any fish can swim faster than any smaller one. Therefore, if there is a largest fish, then there is a fastest fish. (F(x): x is a fish, L(x,y): x is larger= than y, S(x,y): x can swim faster= than y)