First Order
Logic
PRESENTED BY
Sana Sayyad -4317
Rahul Rana -4322
Vansh Mehta -4326
Vivek Rai-4327
Rohit Rana -4328
Introduction to First Order Logic
(FOL)
○FOL is another way of knowledge representation
in AI , It is an extension to propositional logic.
○Also known as Predicate Logic or First Order
Predicate Logic.
○First Order Logic ,Like Natural Language has well
defined
Syntax
Semantic
Key Aspect
How objects interact or relate
Quantifiers are use to express the
quantities without giving an exact
number
The entities in the domain of
discourse.
John
Object
Relation
Quantifi
er
Eg . John Lives in Paris
LivesIn(John,Paris)
E.g. All , Some, many ,none
Syntax of First Order Logic
Constant 3
variable x
Function
It could be anything like
sqrt.
Connective
s
∧, , ¬, ,
∨ ⇒ ⇔
The syntax of first-order logic specifies the rules for
constructing valid expressions, including terms and
formulas.
Predicates
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.
TYPES
It must be true for all
elements in the
specific domain
Existential Quantifier
( )
∃
There must be at least one
value such that statement
becomes true
Quantifiers
Universal Quantifier ( )
∀
Determining the Domain
Domain of Discourse
Specifies the range of the quantifiers
Defines the possible objects
Example
Domain could be all natural numbers
Or all people living in a city
Semantic of FOL
• An Semantic of a FOL assigns a notation to all symbols
• It also determines a domain, that specifies the range of the quantifiers.
• Each term is assigned an object, each predicate is assigned a property of objects, and each
sentence is assigned a truth value.
• In this way, the FOL provides meaning to the terms, the predicates, and formulas of the
language.
Truth Value of FOL
Truth values are used in First-Order Logic (FOL) to evaluate and analyze the correctness of statements
or sentences.
Example: For the statement "John is tall," knowing the truth value helps us understand if John actually
has the property of being tall.
• Negation (¬): Flips the truth value of a sentence.
• Conjunction ( ):
∧ True if both sentences are true.
• Conditional (→): True unless the first part is true and the second part is false.
• Biconditional (↔): True if both parts are either true or false together.
Examples
Knowledge Engineering in FOL
• Introduction to Knowledge Engineering in FOL:
o Knowledge Engineering involves the systematic process of building a knowledge base using
First Order Logic (FOL).
o FOL provides a structured and formal method to represent knowledge and reasoning in a way that
mimics human logical thought processes.
o Purpose: The goal is to create a system that can reason, make decisions, and solve problems
based on the knowledge encoded using FOL.
Knowledge Engineering
• Definition:
• Knowledge Engineering is the process of constructing a knowledge base using First Order Logic
(FOL).
• Objective:
• The main goal is to represent knowledge in a structured form that a system can use to perform
reasoning, make decisions, and solve complex problems.
• Key Aspects:
• Involves defining the domain of discourse, specifying the rules, and encoding the facts using
FOL.
• It’s critical to ensure that the knowledge base is both accurate and comprehensive to support
effective reasoning.
Steps Involved
1) Identify the Task:
Objective: Determine the problem that needs to be represented and solved.
Action: Clearly define the scope and objectives of the task to ensure the knowledge base will address
the right issues.
2) Assemble the Relevant Knowledge:
Objective: Gather all necessary facts, rules, and information relevant to the task.
Action: Collect and organize information from various sources to ensure a comprehensive knowledge
base.
3) Decide on Vocabulary:
Objective: Choose the predicates, functions, and constants to represent the knowledge.
Action: Select the specific terms and symbols that will be used in the knowledge base to represent
objects, relationships, and functions. This ensures consistency and clarity in how knowledge is encoded.
4) Encode General Knowledge:
Objective: Define general rules and facts that apply broadly across the domain of discourse.
Action: Formulate and encode statements that are universally true within the domain, using the chosen
vocabulary. These rules form the foundation of the knowledge base.
Steps Involved
5) Encode Specific Problem Instances
Objective: Add specific facts related to the current problem.
Action: Input detailed instances or scenarios that need to be addressed by the knowledge base. These are
usually specific cases or examples that the system will encounter.
6) Query the Knowledge Base:
Objective: Use FOL to ask questions and retrieve information.
Action: Develop queries to test the knowledge base's accuracy and functionality. This step ensures that the
system can retrieve and process information correctly.
7)Debugging and Maintenance:
Objective: Continually refine the knowledge base to ensure accuracy and efficiency.
Action: Regularly check for errors, update information, and optimize the knowledge base for better
performance over time.
Knowledge Representation Using FOL
• Objects: Represented by constants or variables
• Facts: Express relationships or properties of objects.Example:`IsMother(Mary, John)`.
• Rules: Encode logical implications. Example: x
Ɐ (Human(x) → Mortal(x)).
• Queries: Ask about the truth of statements. Example: Is there an x such that
`Loves(x, Mary)`?
Examples
• Family Relationships: Encode family trees, parent-child
relationships, and more.
• Geographical Knowledge: Encode locations, distances,
and regions.
• Medical Knowledge: Encode symptoms, diagnoses, and
treatments.

Introduction to First order logic .pptx

  • 1.
    First Order Logic PRESENTED BY SanaSayyad -4317 Rahul Rana -4322 Vansh Mehta -4326 Vivek Rai-4327 Rohit Rana -4328
  • 2.
    Introduction to FirstOrder Logic (FOL) ○FOL is another way of knowledge representation in AI , It is an extension to propositional logic. ○Also known as Predicate Logic or First Order Predicate Logic. ○First Order Logic ,Like Natural Language has well defined Syntax Semantic
  • 3.
    Key Aspect How objectsinteract or relate Quantifiers are use to express the quantities without giving an exact number The entities in the domain of discourse. John Object Relation Quantifi er Eg . John Lives in Paris LivesIn(John,Paris) E.g. All , Some, many ,none
  • 4.
    Syntax of FirstOrder Logic Constant 3 variable x Function It could be anything like sqrt. Connective s ∧, , ¬, , ∨ ⇒ ⇔ The syntax of first-order logic specifies the rules for constructing valid expressions, including terms and formulas.
  • 5.
    Predicates First-order logic statementscan be divided into two parts: SUBJECT Subject is the main part of the statement. PREDICATE A predicate can be defined as a relation.
  • 6.
    TYPES It must betrue for all elements in the specific domain Existential Quantifier ( ) ∃ There must be at least one value such that statement becomes true Quantifiers Universal Quantifier ( ) ∀
  • 7.
    Determining the Domain Domainof Discourse Specifies the range of the quantifiers Defines the possible objects Example Domain could be all natural numbers Or all people living in a city
  • 8.
    Semantic of FOL •An Semantic of a FOL assigns a notation to all symbols • It also determines a domain, that specifies the range of the quantifiers. • Each term is assigned an object, each predicate is assigned a property of objects, and each sentence is assigned a truth value. • In this way, the FOL provides meaning to the terms, the predicates, and formulas of the language.
  • 9.
    Truth Value ofFOL Truth values are used in First-Order Logic (FOL) to evaluate and analyze the correctness of statements or sentences. Example: For the statement "John is tall," knowing the truth value helps us understand if John actually has the property of being tall. • Negation (¬): Flips the truth value of a sentence. • Conjunction ( ): ∧ True if both sentences are true. • Conditional (→): True unless the first part is true and the second part is false. • Biconditional (↔): True if both parts are either true or false together.
  • 10.
  • 11.
    Knowledge Engineering inFOL • Introduction to Knowledge Engineering in FOL: o Knowledge Engineering involves the systematic process of building a knowledge base using First Order Logic (FOL). o FOL provides a structured and formal method to represent knowledge and reasoning in a way that mimics human logical thought processes. o Purpose: The goal is to create a system that can reason, make decisions, and solve problems based on the knowledge encoded using FOL.
  • 12.
    Knowledge Engineering • Definition: •Knowledge Engineering is the process of constructing a knowledge base using First Order Logic (FOL). • Objective: • The main goal is to represent knowledge in a structured form that a system can use to perform reasoning, make decisions, and solve complex problems. • Key Aspects: • Involves defining the domain of discourse, specifying the rules, and encoding the facts using FOL. • It’s critical to ensure that the knowledge base is both accurate and comprehensive to support effective reasoning.
  • 13.
    Steps Involved 1) Identifythe Task: Objective: Determine the problem that needs to be represented and solved. Action: Clearly define the scope and objectives of the task to ensure the knowledge base will address the right issues. 2) Assemble the Relevant Knowledge: Objective: Gather all necessary facts, rules, and information relevant to the task. Action: Collect and organize information from various sources to ensure a comprehensive knowledge base. 3) Decide on Vocabulary: Objective: Choose the predicates, functions, and constants to represent the knowledge. Action: Select the specific terms and symbols that will be used in the knowledge base to represent objects, relationships, and functions. This ensures consistency and clarity in how knowledge is encoded. 4) Encode General Knowledge: Objective: Define general rules and facts that apply broadly across the domain of discourse. Action: Formulate and encode statements that are universally true within the domain, using the chosen vocabulary. These rules form the foundation of the knowledge base.
  • 14.
    Steps Involved 5) EncodeSpecific Problem Instances Objective: Add specific facts related to the current problem. Action: Input detailed instances or scenarios that need to be addressed by the knowledge base. These are usually specific cases or examples that the system will encounter. 6) Query the Knowledge Base: Objective: Use FOL to ask questions and retrieve information. Action: Develop queries to test the knowledge base's accuracy and functionality. This step ensures that the system can retrieve and process information correctly. 7)Debugging and Maintenance: Objective: Continually refine the knowledge base to ensure accuracy and efficiency. Action: Regularly check for errors, update information, and optimize the knowledge base for better performance over time.
  • 15.
    Knowledge Representation UsingFOL • Objects: Represented by constants or variables • Facts: Express relationships or properties of objects.Example:`IsMother(Mary, John)`. • Rules: Encode logical implications. Example: x Ɐ (Human(x) → Mortal(x)). • Queries: Ask about the truth of statements. Example: Is there an x such that `Loves(x, Mary)`?
  • 16.
    Examples • Family Relationships:Encode family trees, parent-child relationships, and more. • Geographical Knowledge: Encode locations, distances, and regions. • Medical Knowledge: Encode symptoms, diagnoses, and treatments.