# 前情提要

如果要了解以下所說明的,建議先看前一篇。

# 1.1 (命題邏輯)

  1. Which of these sentences are propositions? What are the
    truth values of those that are propositions?
    a) Boston is the capital of Massachusetts.
    b) Miami is the capital of Florida.
    c) 2 + 3 = 5.
    d) 5 + 7 = 10.
    e) x + 2 = 11.
    f) Answer this question.
a) yes, true
b) yes, false
c) yes, true
d) yes, false
e) no
f) no
  1. Let p and q be the propositions “Swimming at the New
    Jersey shore is allowed” and “Sharks have been spotted
    near the shore,” respectively. Express each of these compound propositions as an English sentence.
    a) ¬q
    b) p ∧ q
    c) ¬p ∨ q
    d) p → ¬q
    e) ¬q → p
    f) ¬p → ¬q
    g) p ↔ ¬q
    h) ¬p ∧ (p ∨ ¬q)
a) Sharks have not been spotted near the shore.
b) Swimming at the New Jersey shore is allowed, and sharks have been spotted near the shore.
c) Swimming at the New Jersey shore is not allowed, or sharks have been spotted near the shore.
d) If swimming at the New Jersey shore is allowed, then sharks have not been spotted near the shore.
e)
f)
g) Swimming at the New Jersey shore is allowed if and only if sharks have not been spotted near the shore.
h) Swimming at the New Jersey shore is not allowed, and either swimming at the New Jersey shore is allowed or sharks have not been spotted near the shore.

# 1.3 基本結構

In Exercises 1–6, translate the given statement into propositional logic using the propositions provided.

  1. You cannot edit a protected Wikipedia entry unless you are an administrator. Express your answer in terms of e: “You can edit a protected Wikipedia entry” and a: “You are an administrator.”

Ans: eae \rightarrow a

  1. You are eligible to be President of the U.S.A. only if you
    are at least 35 years old, were born in the U.S.A., or at the
    time of your birth both of your parents were citizens, and
    you have lived at least 14 years in the country. Express
    your answer in terms of e: “You are eligible to be President of the U.S.A.,” a: “You are at least 35 years old,”
    b: “You were born in the U.S.A.,” p: “At the time of your
    birth, both of your parents were citizens,” and r: “You
    have lived at least 14 years in the U.S.A.”

Ans: ea(bp)re \rightarrow a \wedge (b \vee p) \wedge r

p only if q 翻譯成 pqp \rightarrow q, 有時候會搞混。

# 1.4 Propositional Equivalences

  1. Use De Morgan’s laws to find the negation of each of the following statements.
    a) Jan is rich and happy.
    b) Carlos will bicycle or run tomorrow.
    c) Mei walks or takes the bus to class.
    d) Ibrahim is smart and hard working.

Ans:
a) pq=>¬(pq)=¬p¬qp \wedge q => \neg (p \wedge q) = \neg p \vee \neg q, Jan is not rich, or Jan is not happy.
b) Carlos will not bicycle tomorrow, and Carlos will not run tomorrow.
c) Mei does not walk to class, and Mei does not take the bus to class.
d) Ibrahim is not smart, or Ibrahim is not hard working.

  1. Show that each of these conditional statements is a tautology by using truth tables
    a) (p ∧ q) → p
    b) p → (p ∨ q)
    c) ¬p → (p → q)
    d) (p ∧ q) → (p → q)
    e) ¬(p → q) → p
    f) ¬(p → q) → ¬q

Ans:

  • a)

pq(pq)pq001011101111\begin{array}{|c|c||c|} p & q & (p \wedge q) \rightarrow p \leftrightarrow q \\ \hline 0&0&1\\ 0&1&1\\ 1&0&1\\ 1&1&1\\ \end{array}

  • b)

pq(pq)pq001011101111\begin{array}{|c|c||c|} p & q & (p \wedge q) \rightarrow p \leftrightarrow q \\ \hline 0&0&1\\ 0&1&1\\ 1&0&1\\ 1&1&1\\ \end{array}

  1. Show that each conditional statement in Exercise 11 is a tautology using the fact that a conditional statement is false exactly when the hypothesis is true and the conclusion is false. (Do not use truth tables
    a) 假設其不為恆真句的話,(pq)(p \wedge q) 為 True, pp 為 false, 這樣命題就為 false, 但這樣第一個條件就不成立了。因此矛盾。

這樣的證明方法被稱為:Proof by Contradiction

# 1.6 推論規則