0% found this document useful (0 votes)
41 views32 pages

02-Predicate Calculus Presentation

Predicate Calculus, or First-Order Logic, extends propositional logic by incorporating quantifiers and predicates to express statements about objects and their relationships. It includes concepts such as syntax, semantics, logical connectives, and quantifiers, enabling the representation of complex logical structures. Predicate logic is widely applicable in fields like AI reasoning systems, database querying, and software verification.

Uploaded by

b241430
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)
41 views32 pages

02-Predicate Calculus Presentation

Predicate Calculus, or First-Order Logic, extends propositional logic by incorporating quantifiers and predicates to express statements about objects and their relationships. It includes concepts such as syntax, semantics, logical connectives, and quantifiers, enabling the representation of complex logical structures. Predicate logic is widely applicable in fields like AI reasoning systems, database querying, and software verification.

Uploaded by

b241430
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

Predicate Calculus (First-Order

Logic)
Understanding Symbols, Semantics,
Quantifiers & Logical Representation
Presented by: [Your Name]
Introduction
• Predicate Calculus (or First-Order Logic) is a
formal system that allows expressing
statements about objects and their
relationships. It extends propositional logic
with quantifiers and predicates.
Why Predicate Logic?
• Propositional logic is limited to whole
statements. Predicate logic allows internal
structure by introducing objects, predicates,
and quantifiers. Example:
• Propositional: P = "Socrates is mortal"
• Predicate: Mortal(Socrates)
Syntax vs Semantics
• Syntax defines the rules for forming valid
expressions.
• Semantics assigns meaning to these
expressions and determines their truth value
in a model.
Symbols in Predicate Logic
• • Constants: Specific objects (e.g., Socrates)
• • Variables: General placeholders (e.g., x, y)
• • Predicates: Properties or relations (e.g.,
Human(x))
• • Functions: Return objects (e.g., fatherOf(x))
• • Connectives, Quantifiers, Equality
Constants, Variables, and Functions
• • Constants refer to specific elements in the
domain.
• • Variables range over elements in the
domain.
• • Functions map elements to other elements
in the domain (e.g., parentOf(x)).
Predicates
• Predicates express properties or relationships
among terms.
• • Unary: Prime(x)
• • Binary: Loves(x, y)
• • N-ary: MoreThan(x, y, z)
Terms
• Terms are the basic building blocks.
• • Variables: x
• • Constants: Socrates
• • Function applications: fatherOf(x)
Atomic Sentences
• Formed by applying predicates to terms.
• Examples:
• • Loves(John, Mary) → "John loves Mary"
• • GreaterThan(4, 2) → "4 is greater than 2"
Logical Connectives
• • ¬P: Not P
• • P ∧ Q: P and Q
• • P ∨ Q: P or Q
• • P → Q: If P then Q
• • P ↔ Q: P if and only if Q
Complex Sentences
• Built from atomic sentences using
connectives.
• Example:
• ¬Happy(x) ∨ Smart(x) → "Either x is not
happy, or x is smart"
Semantics of Predicate Logic
• Truth depends on:
• • Domain: Universe of discourse
• • Interpretation: Assigns meaning to symbols
• • A sentence can be true in one model and
false in another.
Domain and Interpretation
• • Domain: Set of entities (e.g., all people)
• • Interpretation:
• - Human → set of humans
• - Loves(x, y) → pairs (x, y) where x loves y
Models and Satisfaction
• A model is a domain with interpretations.
• A formula is satisfied if true under the model.
• If always true → logically valid.
Free vs Bound Variables
• • Free variable: Not within quantifier scope
• E.g., Loves(x, Mary)
• • Bound variable: Within quantifier
• E.g., ∀x Loves(x, Mary)
Quantifiers Overview
• Quantifiers express generalization:
• • Universal (∀): Applies to all
• • Existential (∃): At least one
• • Uniqueness (∃!): Exactly one
Universal Quantifier (∀)
• Syntax: ∀x P(x)
• Meaning: For every x, P(x)
• Example:
• ∀x (Human(x) → Mortal(x)) → All humans are
mortal
Existential Quantifier (∃)
• Syntax: ∃x P(x)
• Meaning: At least one x makes P(x) true
• Example:
• ∃x (Student(x) ∧ Passed(x, Math)) → Some
student passed Math
Uniqueness Quantifier (∃!)
• Meaning: Exactly one object satisfies P(x)
• Example:
• ∃!x King(x) → There is exactly one king
Expressing Uniqueness in FOL
• ∃x (P(x) ∧ ∀y (P(y) → y = x))
• This means:
• 1. At least one x such that P(x)
• 2. If any y satisfies P(y), then y must equal x
Nested Quantifiers
• Order matters:
• • ∀x ∃y Loves(x, y) → Everyone loves
someone
• • ∃y ∀x Loves(x, y) → There exists someone
loved by everyone
Scope of Quantifiers
• Scope: The part of the formula the quantifier
governs.
• Clarify using parentheses:
• ∀x (Human(x) → Mortal(x))
Translating English to FOL
• "Every student loves some book"
• FOL: ∀x (Student(x) → ∃y (Book(y) ∧ Loves(x,
y)))
Translating FOL to English
• FOL: ∃x (Doctor(x) ∧ Helps(x, y))
• English: "There exists a doctor who helps y"
Equality in Predicate Logic
• • x = y means x and y refer to the same object
• • ∃x (x = 5 ∧ Prime(x)) → "5 is prime"
Equivalence of Statements
• • ¬∀x P(x) ↔ ∃x ¬P(x)
• • ¬∃x P(x) ↔ ∀x ¬P(x)
• Used in proofs and simplifications.
Inference in Predicate Logic
• • Universal Instantiation: ∀x P(x) ⇒ P(a)
• • Existential Instantiation: ∃x P(x) ⇒ P(c)
• • Modus Ponens: P → Q, P ⊢ Q
• • Forward Chaining: Start from facts and
derive new facts
• • Backward Chaining: Start from goal and
verify using facts
Sample Predicate Logic Knowledge
Base
• Given:
• 1. Human(Socrates)
• 2. ∀x (Human(x) → Mortal(x))
• We can infer: Mortal(Socrates)
Predicate Logic vs Propositional
Logic
• Predicate Logic is more expressive:
• • Has quantifiers
• • Represents objects and relationships
• • Propositional logic lacks these capabilities
Applications of Predicate Logic
• Used in:
• • AI reasoning systems
• • Database querying (e.g., SQL)
• • Linguistic analysis
• • Software verification and proof systems
Forward Chaining
• • Data-driven inference
• • Apply rules to known facts to derive
conclusions
• • Example:
• Human(Socrates), ∀x (Human(x) → Mortal(x))
⇒ Mortal(Socrates)
Backward Chaining
• • Goal-driven inference
• • Start with goal and prove from facts
• • Example:
• To prove Mortal(Socrates), show
Human(Socrates) and ∀x (Human(x) →
Mortal(x))

You might also like