Collection of notes for various classes I've taken.
P | ~P |
---|---|
T | F |
F | T |
$P \leadsto Q$ “if P then Q”
P | Q | $P\leadsto Q$ |
---|---|---|
T | T | T |
T | F | F |
F | T | T |
F | F | T |
Notice this statement is only false when hypothesis is true and conclusion is false. This is vacuously true, or true by default.
E.g.
P | q | $P \land \lnot Q$ | $P\land \lnot Q \leadsto \lnot P$ |
---|---|---|---|
T | T | F | T |
T | F | T | F |
F | T | F | T |
F | F | F | T |
Important Claim: $p\leadsto q \equiv \lnot p \lor q$
i.e. $\lnot(p\leadsto q)$ is $p\land \lnot q$.
For example:
Negate: if x>2 then x>
\[\lnot(x>2 \leadsto x>1)\\ \equiv x>2 \land x \leq 1\]
Or:
Negate” if n is prime then n>1
\[\lnot(\textrm{n is prime }\leadsto n>1)\equiv \textrm{n is prime } \land n \leq 1\]
Or:
Negate: if n is prime then n > 1 and n has no divisors other than 1 and itself
\[\lnot(\textrm{statement above}) \equiv \textrm{n is prime and n }\leq 1\textrm{ or n has a divisor other than itself and 1}\]
Also: $A\land (B\lor C) \equiv (A \land B)\lor(A\land C)$
Given $p\leadsto q$, $\lnot q \leadsto \lnot p$
E.g. “if it snows tonight, then I will be unhappy”
Contrapositive: If I will be happy, then it will not snow tonight.
Given $p\leadsto q$, $q\leadsto p$
E.g. “if it snows tonight, then I will be unhappy”
Converse: If I will be unhappy, then it will snow tonight.
Given $p\leadsto q$, $\lnot p \leadsto \lnot q$
E.g. “if it snows tonight, then I will be unhappy”
Inverse: If it does not snow tonight, then I will be happy.
- If $\det A \neq 0$ then $A$ is invertible
- Contrapositive: If $A$ is not invertible, then $\det A = 0$
- Converse: If $A$ is invertible then $\det A \neq 0$
- Inverse: If $\det A=0$ then $A$ is not invertible
P is necessary and sufficient for q means $p\iff q$.
$p$ | $q$ | $p\leadsto q$ (premise 1) | $p$ (premise 2) | $q$ (conclusion) |
---|---|---|---|---|
T | T | T | T | T |
T | F | F | T | F |
F | T | T | F | T |
F | F | T | F | F |
the first row in the truth table is called the critical row.
Invalid (converse error): $p\leadsto q$, $q$, $\therefore p$. This is a fallacious syllogism.
Modus tollens is the contrapositive of modus ponens.
E.g.:
- If I’m tall then I wear socks
- I don’t wear socks
- Therefore I am not tall
Fallacy (Inverse Error):
E.g.:
- If $n>2$ then n is positive
- $n\leq 2$
- $\therefore n$ is not positive
OR
Such that the truth trable is
$p$ | $q$ | $p\lor q$ |
---|---|---|
T | T | T |
F | T | T |
T | F | T |
F | F | F |
OR
Worded as “we have P and Q therefore we have P;” or, vice versa.
OR
E.g.
- $p\lor q\lor r$
- $\lnot q\land\lnot r$
- $\therefore p$
E.g.
- If I am home on Saturday I will be bored
- If I’m bored on Saturday then I will eat pizza
- Therefore if I’m home on Saturday then I will eat pizza
where $c$ is a contradiction (always-false).
$p$ | $\lnot p\leadsto c$ | $p$ (conclusion) |
---|---|---|
T | F | |
F | T |
(not p -> c is false when the statement p is true, because a conditional is false when the premise is true and the conclusion is false)
E.g. Claim: $\pi+1$ is irrational Proof:
- Suppose by way of contradiction (BWOC) that $\pi + 1$ is rational
- Since $\pi +1$ is rational, we can find two integers $m$ and $n$ such that $\pi +1=\frac{m}{n}$.
- Then it’s the case that $\pi=\frac{m}{n}-1=\frac{m-n}{n}$ so it’s the case that $\pi$ is rational
- Hence, by this contradiction is proven that $\pi +1$ is irrational