0% found this document useful (0 votes)
23 views13 pages

First Order Logic

First Order Logic (FOL) is a knowledge representation technique in Artificial Intelligence that extends propositional logic to express natural language constructs, including objects, relations, and functions. It consists of syntax and semantics, where syntax defines the rules for writing expressions and semantics evaluates these expressions using known relations. FOL utilizes atomic and complex sentences, as well as quantifiers, to represent and manipulate knowledge effectively.

Uploaded by

Aditi Chauhan
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)
23 views13 pages

First Order Logic

First Order Logic (FOL) is a knowledge representation technique in Artificial Intelligence that extends propositional logic to express natural language constructs, including objects, relations, and functions. It consists of syntax and semantics, where syntax defines the rules for writing expressions and semantics evaluates these expressions using known relations. FOL utilizes atomic and complex sentences, as well as quantifiers, to represent and manipulate knowledge effectively.

Uploaded by

Aditi Chauhan
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/ 13

First Order Logic

• First Order Logic in AI is a technique for knowledge representation


and is robust enough to represent any natural language sentence.
• This article covers the details about the syntax of First Order Logic in
Artificial Intelligence and its basic components.
• First Order Logic in Artificial Intelligence is a technique used for
knowledge representation.
• It is an extension of propositional logic and unlike propositional logic,
it is sufficiently expressive in representing any natural language
construct.
• First Order Logic in AI is also known as Predicate Logic or First Order
Predicate Logic.
• It is a robust technique to represent objects as well as their
relationships.
• Unlike propositional logic, First Order Logic in Artificial Intelligence
doesn't only include facts but also different other entities as listed
below.
Objects:
• Objects can denote any real-world entity or any variable. E.g., A, B,
colours, theories, circles etc.
Relations:
• Relations represent the links between different objects. Relations can be
unary(relations defined for a single term) and n-ary(relations defined for
n terms). E.g., blue, round (unary); friends, siblings (binary); etc.
Functions:
• Functions map their input object to the output object using their
underlying relation. Eg: father_of(), mother_of() etc.
Parts of First Order Logic

• First-order logic in Artificial Intelligence comprises two


main components, which are as follows.
1.Syntax:
Syntax represents the rules to write expressions in First
Order Logic in Artificial Intelligence.
2.Semantics:
Semantics refers to the techniques that we use to
evaluate an expression of First Order Logic in AI. These
techniques use various known relations and facts of the
respective environment to deduce the boolean value of
the given First Order Logic expression.
Syntax of First Order Logic

• Syntax of First Order Logic in Artificial Intelligence represents the rules


of representing any natural language construct in terms of First Order
Logic in AI.
• This involves the rules to describe any object and the relationships
between different objects.
• These rules comprise rules for writing constants, variables, predicates,
quantifiers, etc.
• In the following sections, we present various examples of the syntax
of first-order logic in AI.
• These rules are further illustrated in the following sections.
Basic Elements of First-Order
Logic
Element Example Meaning
Constant 1, 2, A, John, Mumbai, cat, .... Values that can not be changed
Can take up any value and can also
Variables x, y, z, a, b, ....
change
Defines a relationship between its
Predicates Brother, Father, >, ....
input terms

Computes a defined relation of


Function sqrt, LeftLegOf, ....
input term

Used to form complex sentences


Connectives ∧, ∨, ¬, ⇒, ⇔
using atomic sentences

Relational operator that checks


Equality ==
equality
Imposes a quantity on the
Quantifier ∀, ∃
respective variable
Atomic Sentences

• Atomic sentences are the most basic expressions of First


Order Logic in AI. These sentences comprise a predicate
followed by a set of terms inside a parenthesis. Formally
stating, the structure of an atomic sentence looks like the
following.
• Predicate ( term 1, term 2, term 3,...) Predicate ( term 1​
, term 2​, term 3​,...)
• One example of an atomic sentence in First Order Logic in
Artificial Intelligence can
be Sisters ( Geeta , Seeta ) Sisters ( Geeta , Seeta ).
• Another example involving a unary predicate can
be Polygon ( Rectangle ) Polygon ( Rectangle ).
Complex Sentences
• Complex sentences can be constructed by combining
atomic sentences using connectives like AND (∧), OR
(∨), NOT (¬), IMPLIES (⇒), IF AND ONLY IF (⇔) etc.
• Formally stating, if c1​,c2​,... represent connectives, a complex
sentence in First Order Logic in AI can be defined as follows.
• Predicate 1​( term 1​, term 2​,...)c1​Predicate 2​( term 1​, term 2​
,...)c2​...
• An example of a complex sentence in First Order Logic in
Artificial Intelligence can
be Sisters ( Geeta,Seeta) ∧Sisters ( Geeta,Leela ).
• Another example using just one predicate can be
¬Sisters(Geeta,Seeta)
• Any expression of First Order Logic in AI can be broken
into two main components, namely subject and
predicate.
• The subject is the main entity about which the
expression describes. Predicate depicts the relation
between different subjects.
• For example, in the expression, Polygon(Rectangle),
which is a translation of "Rectangle is a polygon." in
First Order Logic in Artificial Intelligence, "Rectangle" is
the subject, and "Polygon" represents a predicate
Quantifiers in First-Order Logic
• Quantifiers in First Order Logic in AI, as the name suggests, are used
to quantify any entity in a given environment.
• Quantification refers to the identification of the total number of an
entity that is present in the environment and satisfies a given
expression in First Order Logic in Artificial Intelligence.
• Quantifiers enable us to determine the range and scope of a variable
in a logical expression.
• Two types of quantifiers are stated as follows.

• Universal Quantifier
• Existential Quantifier
Universal Quantifier
• Universal Quantifier in First Order Logic in AI is a symbol in a
logical expression that signifies that the given expression is
true in its range for all instances of the concerned entity. It is
represented by the symbol ∀∀ (an inverted A). If x is a variable,
then ∀x is read as "For all x" or "For every x" or "For each x".
• For example, let us take the sentence, "All cats like fish". Let us
take a variable x which can take the value of "cat". Let us take
a predicate cat (x) which is true if x is a cat. Similarly, let us
take another predicate likes (x,y) which is true if x likes y.
Therefore, using the universal quantifier ∀∀, we can write
∀x cat (x)⟹ likes (x, fish )
This expression is read as "For all x, if x is a cat, then x likes to
fish"
Existential Quantifier
• An existential Quantifier in First Order Logic in Artificial
Intelligence is a symbol in a logical expression that signifies that the
given expression is true in its range for at least one of the instances
of the concerned entity. It is represented by the symbol ∃∃ (an
inverted E). If x is a variable, then ∃x is read as "There exists
x" or "For some x" or "For at least one x".
• For example, let us take the sentence, "Some students like ice
cream". Let us take a variable x which can take the value of
"student". Let us take a predicate student (x), which is true if x is a
student. Similarly, let us take another predicate likes likes (x,y),
which is true if x likes y. Therefore, using the existential quantifier ∃,
we can write
∃x student (x)∧ likes (x, ice-cream )
This expression reads, "There exists some x such that x is a student
and also likes ice cream".

You might also like