Predicate Logic
Predicate Logic = First Order Logic
Limitation of Propositional Logic
Section titled “Limitation of Propositional Logic”- Cannot represent statements involving objects and their properties
- Cannot express “for all” or “there exists”
- Cannot handle relationships between objects
- Cannot generalize patterns
Example limitations:
- “All students passed” - cannot express relationship between students and passing
- “Some number is prime” - cannot quantify over numbers
- “Every integer has a successor” - cannot express universal property
- Propositional logic treats “John is tall” and “Mary is tall” as unrelated
Predicate Logic
Section titled “Predicate Logic”- Extends propositional logic with variables, predicates, and quantifiers
- Also called First Order Logic (FOL)
- Can express properties of objects and relationships
- More expressive power than propositional logic
Components:
- Variables: x, y, z (represent objects)
- Predicates: P(x), Q(x,y) (properties/relations)
- Quantifiers: ∀ (for all), ∃ (there exists)
- Connectives: ¬, ∧, ∨, →, ↔ (same as propositional logic)
- Constants: a, b, c (specific objects)
- Functions: f(x), g(x,y) (map objects to objects)
Predicate
Section titled “Predicate”- A predicate is a statement with variables that becomes a proposition when values are assigned
- Notation: P(x), Q(x,y), R(x,y,z)
- P(x) - unary predicate (one variable)
- Q(x,y) - binary predicate (two variables)
Examples:
- P(x): “x is even”
- P(4) → True (4 is even)
- P(5) → False (5 is not even)
- Q(x,y): “x > y”
- Q(5,3) → True
- Q(2,7) → False
- R(x): “x is a prime number”
- S(x,y): “x is a parent of y”
Truth value:
- Predicate alone has NO truth value
- Becomes proposition when:
- Variables are assigned values, OR
- Variables are quantified
Domain (Universe of Discourse)
Section titled “Domain (Universe of Discourse)”- Set of all possible values that variables can take
- Must be clearly defined
- Affects truth value of quantified statements
Examples:
- Domain = (Integers): {…, -2, -1, 0, 1, 2, …}
- Domain = (Natural numbers): {0, 1, 2, 3, …}
- Domain = Students in a class
- Domain = All humans
- Domain = Real numbers
GATE Important:
- Same statement can be true in one domain, false in another
- Always check domain carefully
Example:
-
- True if domain = (Real numbers)
- Also true if domain = (Integers)
Quantifiers
Section titled “Quantifiers”Used to specify how many elements in the domain satisfy a predicate
Universal Quantifier (∀) - “For All”
Section titled “Universal Quantifier (∀) - “For All””Notation:
Meaning: P(x) is true for ALL x in the domain
Truth condition:
- True: P(x) is true for every single element
- False: If even ONE element violates P(x)
Examples:
-
- “All x are positive”
- False in domain (integers include negatives)
- True in domain (positive naturals)
-
- “Square of every x is non-negative”
- True in domain (real numbers)
-
- “All students passed”
Key point: One counterexample makes it false
Existential Quantifier (∃) - “There Exists”
Section titled “Existential Quantifier (∃) - “There Exists””Notation:
Meaning: There exists AT LEAST ONE x such that P(x) is true
Truth condition:
- True: If at least one element satisfies P(x)
- False: If NO element satisfies P(x)
Examples:
-
- “There exists x whose square is 4”
- True in domain (x = 2 or x = -2)
-
- “There exists x greater than 10”
- True in domain (many such numbers exist)
- False in domain {1, 2, 3, 4, 5}
-
- “There exists an even prime”
- True (x = 2)
Key point: One example makes it true
Unique Existential Quantifier (∃!)
Section titled “Unique Existential Quantifier (∃!)”Notation:
Meaning: There exists EXACTLY ONE x such that P(x) is true
Expansion:
Example:
- - “There exists exactly one x such that x + 5 = 8”
- True (only x = 3)
Nested Quantifiers
Section titled “Nested Quantifiers”- Multiple quantifiers in same statement
- Order matters critically
Examples:
1.
- “For every x, there exists some y such that P(x,y)”
- For each x, we can pick DIFFERENT y
- Example: - True in
- For any integer x, there exists larger integer y
2.
- “There exists one y that works for ALL x”
- Same y must work for every x
- Example: - False in
- No single integer is greater than all integers
Key GATE Point:
More Examples:
3.
- Same as (order doesn’t matter for same quantifier)
- “For all x and all y, P(x,y) is true”
4.
- Same as (order doesn’t matter for same quantifier)
- “There exist x and y such that P(x,y) is true”
5.
- For every x, there exists y (possibly different for each x), such that for all z, P(x,y,z)
Truth Table for Nested Quantifiers:
| Statement | Meaning |
|---|---|
| P holds for all pairs | |
| P holds for at least one pair | |
| For each x, some y works | |
| Some x works for all y | |
| Some y works for all x (NOT same as above) |
Free and Bound Variables
Section titled “Free and Bound Variables”Bound Variable:
- Variable that is quantified
- Scope limited to quantifier
Free Variable:
- Variable NOT quantified
- Truth value depends on assignment
Examples:
1.
- x → bound (quantified by ∀)
- y → free (not quantified)
- Truth value depends on value of y
2.
- x → bound
- y → free
3.
- x → bound by ∀
- y → bound by ∃
- z → free
4.
- x → bound
- No free variables (closed formula)
GATE Important:
- Formula with no free variables = Sentence/Closed Formula
- Formula with free variables = Open Formula
- Only sentences have definite truth values
Scope of Quantifier
Section titled “Scope of Quantifier”- Portion of formula where quantifier applies
- Usually indicated by parentheses
Examples:
1.
- Scope of ∀x: entire
2.
- Scope of ∀x: only
- y is free in Q(y)
3.
- Ambiguous! Use parentheses
- Could mean: OR
Convention:
- Quantifier has lowest precedence
- means
Predicate Logic Connectives
Section titled “Predicate Logic Connectives”Same connectives as propositional logic, but operate on predicates:
- - NOT
- - AND
- - OR
- - Implication
- - Biconditional
Examples:
- - “If x has property P, then x has property Q”
- - “There exists x with both properties P and Q”
- - “Every x has property P or property Q”
Negation of Quantifiers (Very Important for GATE)
Section titled “Negation of Quantifiers (Very Important for GATE)”Rule 1:
Meaning:
- “NOT all x satisfy P” = “There exists x that does NOT satisfy P”
Example:
- Statement: “All students passed”
- Negation: “At least one student did not pass”
Rule 2:
Meaning:
- “There does NOT exist x satisfying P” = “All x do NOT satisfy P”
Example:
- Statement: “There exists a perfect square that is negative”
- Negation: “All perfect squares are non-negative”
Nested Quantifiers Negation:
1.
2.
General Rule:
- Push negation inward
- Flip each quantifier (∀ becomes ∃, ∃ becomes ∀)
- Negate the predicate at the end
GATE Major Trap:
- Correct:
Logical Equivalence in Predicate Logic
Section titled “Logical Equivalence in Predicate Logic”Definition: Two formulas are equivalent if they have same truth value for all interpretations
Important Equivalences:
1. Distributive Laws:
WARNING - NOT Equivalent:
2. De Morgan’s for Quantifiers:
3. Implication:
4. Contrapositive:
5. Quantifier Commutation (Same Type):
6. Different Quantifiers - NOT Commutative:
7. Prenex Normal Form:
- All quantifiers moved to front
- Example: is in prenex form
Validity and Satisfiability
Section titled “Validity and Satisfiability”Valid (Logically True):
- True for ALL interpretations (all domains, all predicates)
- Example:
- “If P holds for all, then P holds for at least one”
Satisfiable:
- True for AT LEAST ONE interpretation
- Example:
- Can be true in some domain
Unsatisfiable (Contradiction):
- False for ALL interpretations
- Example:
- “All x have P AND some x doesn’t have P”
Relationships:
- Valid ⇒ Satisfiable
- Unsatisfiable ⇒ Not Valid
- is valid ⟺ is unsatisfiable
Conjecture (Predicate Logic)
Section titled “Conjecture (Predicate Logic)”- A statement with quantifiers assumed to be true
- Requires formal proof or counterexample
- Common in mathematical reasoning
Examples:
- Goldbach’s Conjecture:
- Collatz Conjecture: Properties of iterative sequences
English to Predicate Logic Translation
Section titled “English to Predicate Logic Translation”Domain: All people
| English | Predicate Logic |
|---|---|
| ”All students are intelligent" | |
| "Some student is intelligent" | |
| "No student is lazy" | |
| "Not all students passed" | |
| "Every student loves some professor" | |
| "Some professor is loved by all students” |
Key Pattern:
- “All A are B” → (use →)
- “Some A is B” → (use ∧)
- “No A is B” →
GATE Trap:
- is WRONG for “All students passed”
- Correct:
GATE Focus Points
Section titled “GATE Focus Points”- Difference between ∀ and ∃
- ∀ = all, ∃ = at least one
- Negation of quantified statements
- Flip quantifier, negate predicate
- Order of quantifiers
- Bound vs free variables
- Quantified vs not quantified
- Valid vs satisfiable statements
- Valid = always true, Satisfiable = sometimes true
- Translation from English to logic
- “All” uses →, “Some” uses ∧
- Scope of quantifiers
- Use parentheses clearly
- Distributive property limitations
- Works for ∀ with ∧, ∃ with ∨ only
- Contrapositive in predicate logic
- Nested quantifier negation
- Push negation through, flip each quantifier
Common GATE Traps
Section titled “Common GATE Traps”-
Universal with AND (Wrong):
- “All students passed” ≠
- Correct:
-
Existential with Implication (Wrong):
- “Some student passed” ≠
- Correct:
-
Negation Flip:
- Correct:
-
Quantifier Order:
- very different from
-
Distribution Error:
-
Free Variables:
- Formula with free variables has no definite truth value
Quick Formula Reference
Section titled “Quick Formula Reference”
Final Insights
Section titled “Final Insights”- Quantifier negation is critical - flip and negate
- Order matters for different quantifiers -
- Use → for “all”, ∧ for “some” - standard pattern
- Bound variables are dummy variables - can be renamed
- Free variables prevent truth assignment - only sentences have truth values
- Distributive laws are limited - only certain combinations work
- Domain affects truth - always check universe of discourse
- Nested quantifiers need care - work from outside in
- Prenex form simplifies - move all quantifiers to front
- Practice translation - English ↔ Predicate Logic is key skill