Syntax and Semantics of Propositional Logic
Motivation: Why Formalize Reasoning? → Syntax → Semantics: Truth Tables → Logical Consequence and Equivalence → Numerical Example → Real-world Application → Additional Aspects → Connection with Other Branches of Mathematics → Historical Background and Development of the Idea
Formulas
- ·Propositional variables: p, q, r, p₁, p₂, ...
- ·Logical connectives: ¬ (negation), ∧ (conjunction—“and”), ∨ (disjunction—“or”), → (implication—“if... then”), ↔ (equivalence—“if and only if”).
- ·Parentheses: (, ).
- ·I(¬φ) = 1 − I(φ)
- ·I(φ ∧ ψ) = min(I(φ), I(ψ)) — true if both are true
- ·I(φ ∨ ψ) = max(I(φ), I(ψ)) — true if at least one is true
- ·I(φ → ψ) = max(1−I(φ), I(ψ)) — false only when φ=1, ψ=0
- ·I(φ ↔ ψ) = 1 if and only if I(φ) = I(ψ)
- ·Tautology: I(φ) = 1 for all interpretations. Denotation: ⊨ φ.
- ·Contradiction (antitautology): I(φ) = 0 for all interpretations.
- ·Satisfiability: I(φ) = 1 for some I.
- ·¬¬p ≡ p (double negation)
- ·(p → q) ≡ (¬p ∨ q) (implication via disjunction)
- ·¬(p ∧ q) ≡ (¬p ∨ ¬q) (De Morgan’s law)
- ·¬(p ∨ q) ≡ (¬p ∧ ¬q) (De Morgan’s law)
- ·p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
- ·p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Mathematical proofs consist of steps in which some statements are derived from others. But what is a “correct” step? Propositional logic provides a precise language: syntax (how to write formulas) and semantics (what they mean). This is the foundation underlying automated provers, compilers, and ...
Inductive definition of formulas: 1. Every variable p is a formula. 2. If φ is a formula, then ¬φ is a formula. 3. If φ and ψ are formulas, then (φ ∧ ψ), (φ ∨ ψ), (φ → ψ), (φ ↔ ψ) are formulas. 4. Nothing else is a formula.
Interpretation (valuation): function I: {variables} → {0, 1}. Extends to all formulas:
Problem: Prove the tautology called the “law of syllogism”: (p → q) → ((q → r) → (p → r)).