1. Propositional formulas
They are built from propositions $p,\ q,\ r,\ \ldots$, logical operators and brackets. Order of the operators: not, $\land$, $\vee$, $\rightarrow$, $\leftrightarrow$. For $n$ variables, the truth table has $2^{n}$ rows.
2. Tautologies. Equivalent formulas
Definitions
Tautology = a formula that is true for all values of its variables. Examples: $p \vee \overline{p}$, $p \rightarrow p$.
$A \equiv B$ (“$A$ is equivalent to $B$”): $A$ and $B$ have the same truth values on every row.
Example: $p \rightarrow q \equiv \overline{p} \vee q$.
3. Negation rules
| Rule | Formula |
|---|---|
| double negation | $\overline{\overline{p}} \equiv p$ |
| De Morgan's laws |
$\overline{p \land q} \equiv \overline{p} \vee \overline{q}$ $\overline{p \vee q} \equiv \overline{p} \land \overline{q}$ |
| negation of an implication | $\overline{p \rightarrow q} \equiv p \land \overline{q}$ |
Check for $\overline{p \land q} \equiv \overline{p} \vee \overline{q}$:
| $p$ | $q$ | $p \land q$ | $\overline{p \land q}$ | $\overline{p}$ | $\overline{q}$ | $\overline{p} \vee \overline{q}$ |
|---|---|---|---|---|---|---|
| $1$ | $1$ | $1$ | $0$ | $0$ | $0$ | $0$ |
| $1$ | $0$ | $0$ | $1$ | $0$ | $1$ | $1$ |
| $0$ | $1$ | $0$ | $1$ | $1$ | $0$ | $1$ |
| $0$ | $0$ | $0$ | $1$ | $1$ | $1$ | $1$ |
Negating relations: $=$ becomes $\neq$; $<$ becomes $\geq$; $>$ becomes $\leq$; $\in$ becomes $\notin$.
4. Negating statements – examples
- “$x > 0$ and $y > 0$” → “$x \leq 0$ or $y \leq 0$”.
- “$x = 1$ or $x = 2$” → “$x \neq 1$ and $x \neq 2$”.
- “If it rains, I take my umbrella” → “It rains and I do not take my umbrella”.
5. The converse and the inverse of an implication
Definitions
For the implication $p \rightarrow q$: the converse $q \rightarrow p$; the inverse $\overline{p} \rightarrow \overline{q}$; the contrapositive $\overline{q} \rightarrow \overline{p}$.
| $p$ | $q$ | $p \rightarrow q$ | $q \rightarrow p$ | $\overline{p} \rightarrow \overline{q}$ | $\overline{q} \rightarrow \overline{p}$ |
|---|---|---|---|---|---|
| $1$ | $1$ | $1$ | $1$ | $1$ | $1$ |
| $1$ | $0$ | $0$ | $1$ | $1$ | $0$ |
| $0$ | $1$ | $1$ | $0$ | $0$ | $1$ |
| $0$ | $0$ | $1$ | $1$ | $1$ | $1$ |
Remember
$p \rightarrow q \equiv \overline{q} \rightarrow \overline{p}$ and $q \rightarrow p \equiv \overline{p} \rightarrow \overline{q}$. An implication and its converse may have different values.
Example
“If $n \vdots 4$, then $n \vdots 2$” – true; the converse “If $n \vdots 2$, then $n \vdots 4$” – false ($n = 6$); the contrapositive “If $n$ is not divisible by $2$, then it is not divisible by $4$” – true.