First-Order Predicate Logic — Syntax — Beginner-Friendly Notes
1. Why We Need FOL (First-Order Logic)
Propositional logic cannot say "all birds fly" without listing each bird. FOL adds objects, relations, variables, quantifiers — so one sentence covers infinitely many individuals.
Propositional = facts. FOL = objects + relations + quantification.
2. Syntax — Vocabulary
- Constants: specific objects — (lowercase start).
- Variables: placeholders — .
- Predicates: relations/properties — , , , — capitalised, arity matters.
- Functions: map objects to objects — , — not boolean, returns an object.
- Terms: constants, variables, or function applied to terms — e.g., , .
3. Atomic Sentences
Predicate applied to terms: , ,
4. Complex Sentences (build recursively)
If are sentences and variable:
- Connectives as before: $
eg PP \land QP \lor QP \Rightarrow QP \Leftrightarrow Q$ - Quantified: ,
- Equality: (optional)
Examples:
- "Every bird flies":
- "There is a red bird":
- "John likes everyone":
- "Someone likes John":
5. Precedence & Well-Formed Formulas
Quantifiers bind tightest: means . Use parentheses to be safe.
6. Why Syntax Matters for AI
- Allows general rules (one rule for all birds) and relations (family, spatial).
- Next topics add quantifiers (meaning) and inference (how to reason).
7. One-Line Summary
First-order logic builds sentences from constants, variables, predicate and function terms with connectives and quantifiers, enabling general statements about objects and relations.
8. Quick Self-Check
- Is well-formed if Likes expects 2 args?
- Write "All cats are mammals" in FOL.