Course Test · University: upper level

Mathematical logic: test

Unsatisfiable clause sets, entailment, CNF, model counting, minimal DNF, natural-deduction proofs found and checked, resolution refutations, the gap between classical and intuitionistic logic (excluded middle, double negation, Peirce's law), first-order validity and a two-element countermodel for swapping quantifiers, prenex and Skolem normal forms, evaluating sentences in finite structures, finding models, the K axiom and the T and S5 frame axioms, and counting the valid syllogisms with and without existential import.

Twenty exercises of the kind this course sets. Answers are on the independent answers page; the same exercises done with RatMath are on the RatMath answers page.

  1. 1.Satisfiability
    Is (p∨q)∧(¬p∨q)∧(p∨¬q)∧(¬p∨¬q)(p \lor q) \land (\lnot p \lor q) \land (p \lor \lnot q) \land (\lnot p \lor \lnot q) satisfiable?
  2. 2.Entailment
    Show p→q, ¬q⊨¬pp \to q,\ \lnot q \models \lnot p.
  3. 3.Conjunctive normal form
    Put p↔qp \leftrightarrow q in conjunctive normal form.
  4. 4.Counting models
    How many of the 8 valuations of p,q,rp, q, r satisfy p∨q∨rp \lor q \lor r?
  5. 5.Minimal DNF
    Find a minimal sum of products for f(a,b,c)=∑m(0,1,2,5,6,7)f(a, b, c) = \sum m(0, 1, 2, 5, 6, 7).
  6. 6.Natural deduction
    Give a natural-deduction proof of (p→q)→(¬q→¬p)(p \to q) \to (\lnot q \to \lnot p).
  7. 7.Checking a proof
    Check this proof of p→q, ¬q⊢¬pp \to q,\ \lnot q \vdash \lnot p: 1. p→qp \to q premise; 2. ¬q\lnot q premise; 3. ∣p\mid p assumption; 4. ∣q\mid q →\toE 1, 3; 5. ∣⊥\mid \bot ¬\lnotE 4, 2; 6. ¬p\lnot p ¬\lnotI 3–5.
  8. 8.Resolution
    Use resolution to show p∨q, ¬p∨q⊨qp \lor q,\ \lnot p \lor q \models q.
  9. 9.Intuitionistic logic
    Which of these are provable intuitionistically: p∨¬pp \lor \lnot p; ¬¬(p∨¬p)\lnot\lnot(p \lor \lnot p); Peirce's law ((p→q)→p)→p((p \to q) \to p) \to p? Which classically?
  10. 10.First-order validity
    Is ∀x P(x)→∃x P(x)\forall x\,P(x) \to \exists x\,P(x) valid?
  11. 11.Swapping quantifiers
    Show ∃x∀y R(x,y)⊨∀y∃x R(x,y)\exists x\forall y\,R(x, y) \models \forall y\exists x\,R(x, y), and that the converse fails.
  12. 12.Prenex normal form
    Put ∀x P(x)→∃y Q(y)\forall x\,P(x) \to \exists y\,Q(y) in prenex form.
  13. 13.Skolem normal form
    Skolemize ∀x∃y R(x,y)\forall x\exists y\,R(x, y).
  14. 14.Truth in a structure
    On the domain {1,2,3}\{1, 2, 3\} let L={(1,2),(2,3),(3,1)}L = \{(1,2), (2,3), (3,1)\}. Evaluate ∀x∃y L(x,y)\forall x\exists y\,L(x, y) and ∃x∀y L(x,y)\exists x\forall y\,L(x, y).
  15. 15.Finding a model
    What is the smallest model of ∀x∃y R(x,y)∧∀x ¬R(x,x)\forall x\exists y\,R(x, y) \land \forall x\,\lnot R(x, x)?
  16. 16.Modal logic: K
    Is the distribution axiom □(p→q)→(□p→□q)\Box(p \to q) \to (\Box p \to \Box q) valid in every Kripke model? Is □p→p\Box p \to p?
  17. 17.Modal systems T and S5
    Is □p→p\Box p \to p valid in T (reflexive frames)? Is ◊p→□◊p\Diamond p \to \Box\Diamond p valid in S5?
  18. 18.Syllogisms
    Is "All M are P; all S are M; therefore all S are P" valid? What is its traditional name?
  19. 19.Counting valid syllogisms
    Of the 256 syllogistic forms, how many are valid in modern logic, and how many with Aristotle's existential import?
  20. 20.Tautologies
    Is ((p→q)∧(q→r))→(p→r)((p \to q) \land (q \to r)) \to (p \to r) a tautology?