Skip to content
Home » Predicate logic

Predicate logic

Predicate Logic

1. What is Predicate Logic?

Predicate Logic is a formal logic used to represent objects, their properties, and relationships.

It is more powerful than propositional logic because it can represent individual objects and general rules.

Simple example

Consider:

Ravi is a student.

In predicate logic:\[ Student(Ravi) \]

Here:

  • Student = predicate
  • Ravi = constant/object

2. Why Predicate Logic?

Propositional logic can represent:\[ P = Ravi\ is\ a\ student \]

But it cannot easily express:

All students study.

Predicate logic can represent this as:\[ \forall x(Student(x)\rightarrow Studies(x)) \]

This means:

For every \(x\), if \(x\) is a student, then \(x\) studies.


3. Main Components

1. Constants

Represent specific objects.

Examples:\[ Ravi,\ Aman,\ Delhi \]

Example:\[ Student(Ravi) \]


2. Variables

Represent unspecified objects.

Examples:\[ x,\ y,\ z \]

Example:\[ Student(x) \]

means “x is a student.”


3. Predicates

Represent properties or relationships.

Property

\[ Student(Ravi) \]

Ravi is a student.

Relationship

\[ Likes(Ravi,AI) \]

Ravi likes AI.

Another example:\[ Teaches(Professor,Student) \]


4. Functions

Functions return an object/value.

Example:\[ FatherOf(Ravi) \]

means the father of Ravi.


5. Logical Connectives

Predicate logic uses:

SymbolMeaning
¬NOT
∧AND
∨OR
→IMPLIES
↔IF AND ONLY IF

Example:\[ Student(Ravi)\land Intelligent(Ravi) \]

means Ravi is a student and intelligent.


4. Quantifiers

Quantifiers are very important in predicate logic.

There are two main quantifiers.

A. Universal Quantifier — ∀

Means “for all” or “every”.

Example:

All students study.

\[ \boxed{\forall x(Student(x)\rightarrow Studies(x))} \]

Meaning:

For every x, if x is a student, x studies.


B. Existential Quantifier — ∃

Means “there exists” or “at least one”.

Example:

Some students are intelligent.

\[ \boxed{\exists x(Student(x)\land Intelligent(x))} \]

Meaning:

There exists at least one person who is both a student and intelligent.


5. Simple Examples

English:

Ravi is intelligent.

Predicate logic:\[ Intelligent(Ravi) \]

English:

Ravi studies AI.

\[ Studies(Ravi,AI) \]

English:

All students study.

\[ \forall x(Student(x)\rightarrow Studies(x)) \]

English:

Some students study AI.

\[ \exists x(Student(x)\land Studies(x,AI)) \]

English:

Every teacher teaches a subject.

\[ \forall x(Teacher(x)\rightarrow \exists y(Subject(y)\land Teaches(x,y))) \]


6. Predicate Logic for AI

Predicate logic is important in Knowledge Representation.

For example, an AI system may have:

Facts

\[ Student(Ravi) \]\[ Studies(Ravi,AI) \]

Rule

\[ \forall x(Student(x)\rightarrow Intelligent(x)) \]

The AI can infer:\[ Intelligent(Ravi) \]

Thus:

Facts + Rules
      ↓
Predicate Logic
      ↓
Inference
      ↓
New Knowledge

7. Predicate Logic vs Propositional Logic

Propositional LogicPredicate Logic
Uses propositionsUses predicates
Limited representationMore expressive
No variablesUses variables
No quantifiersUses ∀ and ∃
Cannot naturally represent relationshipsCan represent relationships
Example: PExample: Student(Ravi)
Suitable for simple factsSuitable for complex knowledge

Exam Definition

Predicate Logic is a formal knowledge representation language used to represent objects, their properties, relationships and general rules using predicates, variables, constants, logical connectives and quantifiers. It is more expressive than propositional logic and is widely used in Artificial Intelligence for knowledge representation and inference.

Remember

Predicate Logic = Objects + Properties + Relationships + Quantifiers\[ \boxed{\forall = \text{For All}} \]\[ \boxed{\exists = \text{There Exists}} \]