Course Test · University: upper level

Mathematical logic: independent answers

Each answer here was worked out by hand, without RatMath, before the RatMath code was written. Where the arithmetic is long, the working says how it was checked.

  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?
    Answer
    The four clauses rule out each of the four assignments to p,qp, q: unsatisfiable.
  2. 2.Entailment
    Show p→q, ¬q⊨¬pp \to q,\ \lnot q \models \lnot p.
    Answer
    In any valuation with pp true, p→qp \to q forces qq true, contradicting ¬q\lnot q. So pp is false (modus tollens).
  3. 3.Conjunctive normal form
    Put p↔qp \leftrightarrow q in conjunctive normal form.
    Answer
    (p→q)∧(q→p)≡(¬p∨q)∧(p∨¬q)(p \to q) \land (q \to p) \equiv (\lnot p \lor q) \land (p \lor \lnot q).
  4. 4.Counting models
    How many of the 8 valuations of p,q,rp, q, r satisfy p∨q∨rp \lor q \lor r?
    Answer
    All but the all-false one: 7.
  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).
    Answer
    The minterms form a 6-cycle on the cube; it is covered by three of its edges, e.g. aˉbˉ+bcˉ+ac\bar a\bar b + b\bar c + ac (the other cover is aˉcˉ+bˉc+ab\bar a\bar c + \bar bc + ab). Three terms of two literals.
  6. 6.Natural deduction
    Give a natural-deduction proof of (p→q)→(¬q→¬p)(p \to q) \to (\lnot q \to \lnot p).
    Answer
    Assume p→qp \to q; assume ¬q\lnot q; assume pp; then qq by →\toE, contradiction with ¬q\lnot q; so ¬p\lnot p by ¬\lnotI; discharge twice with →\toI.
  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.
    Answer
    Each line follows by the rule cited; the assumption at 3 is discharged at 6. It is a correct proof of p→q,¬q⊢¬pp \to q, \lnot q \vdash \lnot p.
  8. 8.Resolution
    Use resolution to show p∨q, ¬p∨q⊨qp \lor q,\ \lnot p \lor q \models q.
    Answer
    Add ¬q\lnot q. Resolve p∨qp \lor q with ¬p∨q\lnot p \lor q on pp: qq. Resolve qq with ¬q\lnot q: the empty clause.
  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?
    Answer
    Intuitionistically only ¬¬(p∨¬p)\lnot\lnot(p \lor \lnot p): assume ¬(p∨¬p)\lnot(p \lor \lnot p); then pp gives a contradiction, so ¬p\lnot p, so p∨¬pp \lor \lnot p, a contradiction. Excluded middle and Peirce's law are classical tautologies but not intuitionistic theorems.
  10. 10.First-order validity
    Is ∀x P(x)→∃x P(x)\forall x\,P(x) \to \exists x\,P(x) valid?
    Answer
    Yes, given that domains are non-empty: pick any element aa; P(a)P(a) holds, so ∃x P(x)\exists x\,P(x).
  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.
    Answer
    If aa is related to every yy, then every yy has aa. Converse: on {0,1}\{0, 1\} with R={(0,0),(1,1)}R = \{(0, 0), (1, 1)\} every yy has some xx, but no xx works for all yy.
  12. 12.Prenex normal form
    Put ∀x P(x)→∃y Q(y)\forall x\,P(x) \to \exists y\,Q(y) in prenex form.
    Answer
    ¬∀x P(x)∨∃y Q(y)≡∃x∃y (¬P(x)∨Q(y))\lnot\forall x\,P(x) \lor \exists y\,Q(y) \equiv \exists x\exists y\,(\lnot P(x) \lor Q(y)).
  13. 13.Skolem normal form
    Skolemize ∀x∃y R(x,y)\forall x\exists y\,R(x, y).
    Answer
    Replace yy by a new function of the universally quantified xx: ∀x R(x,f(x))\forall x\,R(x, f(x)). Equisatisfiable, not equivalent.
  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).
    Answer
    Each element has a successor in the cycle: the first is true. No element is related to all three: the second is false.
  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)?
    Answer
    One element cannot work (it would need R(a,a)R(a, a)). Two do: R={(0,1),(1,0)}R = \{(0, 1), (1, 0)\}. Smallest size 2.
  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?
    Answer
    The first is valid on all frames (axiom K). □p→p\Box p \to p fails at a world ww where pp is false but every world ww sees has pp (for example, ww sees nothing, so □p\Box p holds vacuously).
  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?
    Answer
    Yes: every world sees itself. Yes: in an equivalence class every world sees the same worlds, so if some reachable world has pp, every world reaches it.
  18. 18.Syllogisms
    Is "All M are P; all S are M; therefore all S are P" valid? What is its traditional name?
    Answer
    Valid: mood AAA in the first figure, Barbara.
  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?
    Answer
    15 unconditionally valid; with existential import 9 more (the weakened and strengthened moods such as Darapti and Barbari): 24.
  20. 20.Tautologies
    Is ((p→q)∧(q→r))→(p→r)((p \to q) \land (q \to r)) \to (p \to r) a tautology?
    Answer
    Yes (hypothetical syllogism): if pp then qq, then rr.