Takeaways of CS70
Note 1
1. Propositional Logic
- Conjunction: $P \wedge Q$ (“P and Q”). True only when both P and Q are true.
- Disjunction: $P \vee Q$ (“P or Q”). True when at least one of P and Q is true.
- Negation: $\neg P$ (“not P”). True when P is false.
$P$ | $Q$ | $P \wedge Q$ |
---|---|---|
$T$ | $T$ | $T$ |
$T$ | $F$ | $F$ |
$F$ | $T$ | $F$ |
$F$ | $F$ | $F$ |
- Implication: $P \Rightarrow Q$ (“P implies Q”). This is the same as “If P, then Q.”
P | Q | $P \Rightarrow Q$ | $\neg P \lor Q$ |
---|---|---|---|
$T$ | $T$ | $T$ | $T$ |
$T$ | $F$ | $F$ | $F$ |
$F$ | $T$ | $T$ | $T$ |
$F$ | $F$ | $T$ | $T$ |
$P \Rightarrow Q$ is the most common form mathematical theorems take. Here are some of the different ways of saying it:
- P, then Q;
- Q if P;
- P only if Q;
- P is sufficient for Q;
- Q is necessary for P;
- Q unless not P.
If both $P \Rightarrow Q$ and $Q \Rightarrow P$ are true, then we say “P if and only if Q” (abbreviated “P iff Q”) or $P \Leftrightarrow Q$
Given an implication $P \Rightarrow Q$, we can also define its
- Contrapositive: $¬Q \Rightarrow ¬P $
- Converse: $Q \Rightarrow P$
$P$ | $Q$ | $\neg P$ | $\neg Q$ | $P \Rightarrow Q$ | $Q \Rightarrow P$ | $\neg Q \Rightarrow \neg P$ | $P \Leftrightarrow Q$ |
---|---|---|---|---|---|---|---|
$T$ | $T$ | $F$ | $F$ | $T$ | $T$ | $T$ | $T$ |
$T$ | $F$ | $F$ | $T$ | $F$ | $T$ | $F$ | $F$ |
$F$ | $T$ | $T$ | $F$ | $T$ | $F$ | $T$ | $F$ |
$F$ | $F$ | $T$ | $T$ | $T$ | $T$ | $T$ | $T$ |
2. Quantifiers and Negation
Quantifier:
- $(∀x ∈ Z)(∃y ∈ Z)(x < y)$
- $(∃y ∈ Z)(∀x ∈ Z)(x < y)$
Negation:
- $¬(P∧Q) ≡ (¬P∨ ¬Q)$
- $¬(P∨Q) ≡ (¬P∧ ¬Q)$
- $¬(∃xP(x)) ≡ ∀x¬P(x)$
- $¬(∀xP(x)) ≡ ∃x¬P(x)$
- $¬(∀x∃yP(x, y)) ≡ ∃x¬(∃yP(x, y)) ≡ ∃x∀y¬P(x, y).$
Note 2
1. Direct Proof
$$ \begin{array}{|l|} \hline \textbf{Direct Proof} \\ \quad \textit{Goal}: \text{ To prove } P \Rightarrow Q. \\ \quad\textit{Approach}: \text{ Assume } P \\ \hspace{4cm}\vdots \\ \hspace{3cm}\text{Therefore } Q \\ \hline \end{array} $$2. Proof by Contraposition
$$ \begin{array}{|l|} \hline \textbf{Proof by Contraposition} \\ \quad\textit{Goal}: \text{ To prove } P \Rightarrow Q. \\ \quad\textit{Approach}: \text{ Assume } \neg Q \\ \hspace{4cm}\vdots \\ \hspace{3cm}\text{Therefore } \neg P \\ \quad\textit{Conclusion}: \neg Q \Rightarrow \neg P, \text{ which is equivalent to } P \Rightarrow Q. \\ \hline \end{array} $$Recall from our discussion on propositional logic that any implication $P \Rightarrow Q$ is equivalent to its contrapositive $¬Q \Rightarrow ¬P$. Yet, sometimes $¬Q \Rightarrow ¬P$ can be much simpler to prove than $P \Rightarrow Q$. Thus, a proof by contraposition proceeds by proving $¬Q \Rightarrow ¬P$ instead of $P \Rightarrow Q$.
3. Proof by Contradiction
$$ \begin{array}{|l|} \hline \textbf{Proof by Contradiction} \\ \quad\textit{Goal}: \text{ To prove } P. \\ \quad\textit{Approach}: \text{ Assume } \neg P \\ \hspace{4cm}\vdots \\ \hspace{3.85cm}R \\ \hspace{4cm}\vdots \\ \hspace{3.7cm}\neg R \\ \quad\textit{Conclusion}: \neg P \Rightarrow (\neg R \land R), \text{ which is a contradiction. Thus, } P. \\ \hline \end{array} $$4. Proof by Cases
$\textit{Skip}$
Note 3
1. Mathematical Induction
- Base Case: Prove that P(0) is true.
- Induction Hypothesis: For arbitrary k ≥ 0, assume that P(k) is true.
- Inductive Step: With the assumption of the Induction Hypothesis in hand, show that P(k+1) is true
2. Simple Induction vs. Strong Induction
There is another notion of induction, which we now discuss, called strong induction.
The latter is similar to simple induction, except we have a slightly different induction hypothesis: Instead of just assuming $P(k)$ is true (as was the case with simple induction), we assume the stronger statement that $P(0), P(1), . . . , \text{and} P(k)$ are all true (i.e., that $\wedge^k_{i=0} P(i)$ is true).
strong induction does have an appealing advantage — it can make proofs easier, since we get to assume a stronger hypothesis