Propositional Logic — Syntax and Semantics — Beginner-Friendly Notes
1. What It Is
Propositional logic: logic of true/false statements (propositions) combined with connectives. Each proposition is atomic — no internal structure (e.g., = "it rains").
2. Syntax — How to Write Sentences
- Atomic propositions: symbols (each true or false).
- Connectives: $
eg\land\lor\Rightarrow\Leftrightarrow$ (IFF). - Formation: if are sentences, so are $
eg PP \land QP \lor QP \Rightarrow QP \Leftrightarrow Q(P \land Q) \Rightarrow R$.
Precedence: $
eg\land\lor\Rightarrow\Leftrightarrow$; use parentheses for clarity.
Examples:
- "If it rains then ground wet":
- "Ground not wet and it rains": $P \land
eg Q$
3. Semantics — What Sentences Mean (truth tables)
An interpretation assigns each atomic proposition true/false. Sentence truth is computed compositionally:
| | | $
eg PP \land QP \lor QP \Rightarrow QP \Leftrightarrow Q$ |
|---|---|---|---|---|---|---|
| T | T | F | T | T | T | T |
| T | F | F | F | T | F | F |
| F | T | T | F | T | T | F |
| F | F | T | F | F | T | T |
Key: is false only when true and false; otherwise true.
4. Core Semantic Concepts
- Model: an assignment that makes sentence true.
- Satisfiable: has at least one model.
- Valid (tautology): true in all models (e.g., $P \lor
eg P$). - Unsatisfiable (contradiction): true in no model (e.g., $P \land
eg P$). - Entailment: iff every model of makes true — logically follows.
5. Why It Matters for AI
- Basis for knowledge base reasoning: (set of sentences) + inference rules → new facts.
- Limit: cannot say "for all , if is bird then flies" without enumerating each bird → needs first-order logic (next).
6. One-Line Summary
Propositional logic builds sentences from atoms with $
eg, \land, \lor, \Rightarrow, \LeftrightarrowKB \models α$.
7. Quick Self-Check
- When is false?
- Is $P \land
eg P$ satisfiable?