Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 2 — Representing Simple Facts in Predicate Logic

Lesson 18 of 34 in the free Artificial Intelligence notes on Siksha Sarovar, written by Rohit Jangra.

Representing Simple Facts in Logic

Predicate logic (first-order logic) extends propositional logic with objects, properties, relations, and quantifiers, making it expressive enough to represent most facts needed by an AI system.

From Propositional to Predicate Logic

Propositional LogicPredicate Logic
Basic unitWhole statements (true/false)Predicates applied to objects: P(x)
Can express "for all"/"there exists"?NoYes — universal (for all) and existential (there exists) quantifiers
Example"Ram is a student" = one atomic fact PStudent(Ram) — Ram is an argument to the predicate Student

Building Blocks

ElementMeaningExample
ConstantA specific objectRam, 5, Delhi
VariableStands for an unspecified objectx, y
PredicateA property of, or relation among, objectsStudent(x), Likes(x, y)
FunctionMaps objects to objectsFatherOf(x)
ConnectiveCombines statementsAND, OR, NOT, IMPLIES
QuantifierStates "for all" or "there exists"Universal, Existential

Representing Simple Facts

English sentencePredicate logic
Ram is a studentStudent(Ram)
Ram likes MangoLikes(Ram, Mango)
Every student likes some subjectFor all x: Student(x) implies there exists y: Likes(x, y)
Ram is taller than ShyamTaller(Ram, Shyam)
Marcus was a manMan(Marcus)
All men are mortalFor all x: Man(x) implies Mortal(x)

Classic Example: Marcus the Pompeian

Man(Marcus)
Pompeian(Marcus)
For all x: Pompeian(x) implies Roman(x)
ruler(Caesar)
For all x: Roman(x) implies loyalto(x, Caesar) OR hate(x, Caesar)
For all x, there exists y: loyalto(x, y)
For all x, y: man(x) AND ruler(y) AND tryassassinate(x, y) implies NOT loyalto(x, y)
tryassassinate(Marcus, Caesar)

From these facts, an inference procedure (e.g., resolution) can derive NOT loyalto(Marcus, Caesar) and then hate(Marcus, Caesar) — a textbook demonstration of how predicate logic supports automated reasoning, not just fact storage.

Well-Formed Formulas (WFFs)

A predicate logic sentence must be built following strict syntax rules (a well-formed formula) so that an inference engine can parse and manipulate it mechanically — this precision is predicate logic's biggest advantage over informal representations like plain English or ad-hoc semantic nets.