Propositional logic
A reasoning algebra is a structure $$ \begin{align*} \mathbf{X} = (X, +, \cdot, \to, -, 0,1) \end{align*} $$ where $X$ is a set, $+, \cdot , \to$ are binary operations, $-$ is a unary operation, and $0\neq 1\in X$ are nullary operations on $X$.
$\mathbf{X}$ is Boolean if the following Boolean laws hold: for all $x,y,z\in X$,
-
associativity: $x + (y + z) = (x + y) + z$ and $x \cdot (y \cdot z) = (x \cdot y) \cdot z$;
-
commutativity: $x+y = y+x$ and $x\cdot y = y\cdot x$;
-
distributivity: $x+(y\cdot z) = (x+y) \cdot (x+z)$ and $x\cdot (y+z) = x\cdot y + x\cdot z$;
-
neutrality: $x+0 = x$ and $x\cdot 1 = x$;
-
annihilation: $x+1 = 1$ and $x\cdot 0 = 0$;
-
idempotence: $x+x = x$ and $x\cdot x = x$;
-
absorption: $x+(x\cdot y) = x$ and $x\cdot (x+y) = x$;
-
double negation: $-(-x) = x$;
-
contradiction: $x\cdot (-x) = 0$;
-
excluded middle: $x + (-x) = 1$;
-
De Morgan's laws: $-(x+y) = (-x)\cdot (-y)$ and $-(x\cdot y) = (-x) + (-y)$;
-
implication: $x\to y = (-x) + y$.
$\mathbf{2} = (\set{0,1}, +, \cdot ,\to, -, 0,1)$ with the usual truth table is a Boolean algebra.
Given a countable set $P$ of propositional letters, the alphabet of propositional logic is $$ \begin{align*} Σ = P \cup \set{\wedge, \vee, \Rightarrow, \neg, \bot, \top, ), (}. \end{align*} $$
The set of formulas (denoted $\mathrm{Fml}$) is the smallest subset of $Σ^\ast$ containing
-
all elements of $P$,
-
$\bot$ and $\top$,
and such that if $ϕ, ψ\in \mathrm{Fml}$, then so are
-
$(ϕ \wedge ψ)$,
-
$(ϕ\vee ψ)$,
-
$(ϕ\Rightarrow ψ)$, and
-
$\neg ϕ$.
Then we obtain a reasoning algebra $\mathbf{Fml} = (\mathrm{Fml}, +, \cdot, \to, -, 1, 0)$ by iteratively defining $ϕ + ψ := (ϕ \vee ψ)$, $ϕ\cdot ψ := (ϕ\wedge ψ)$, $ϕ\to ψ := (ϕ \Rightarrow ψ)$, $-ϕ := \neg ϕ$, $1 = \top$, and $0 = \bot$.
We drop parentheses in informal settings.
A function $v: \mathrm{Fml}\to 2$ is a valuation if it is a homomorphism from $\mathbf{Fml}$ to $\mathbf{2}$.
$v(\top) = 1$ and $v(\bot) = 0$.
For any function $f: P \to 2$, there exists a unique extension to a valuation by induction.
Coincidence lemma: let $\op{occ}(ϕ)\subseteq P$ be the (finite) set of propositional letters that occur in $ϕ$. If $v,w$ are valuations such that $v|_{\op{occ}(ϕ)} = w|_{\op{occ}(ϕ)}$, then $v(ϕ) = w(ϕ)$.
Let $ϕ, ψ\in{}$ $\mathrm{Fml}$.
Say $ϕ$ is valid if $v(ϕ) = 1$ for all valuations $v$.
Say $ϕ$ and $ψ$ are logically equivalent if $v(ϕ) = v(ψ)$ for all valuations $v$.
By the coincidence lemma, to check validity or logical equivalence, we can compute truth tables.
An implication algebra is a tuple $\mathbf{A} = (A, \to, 0)$ where $A$ is a set, $\to$ is a binary operation, and $0 \in A$ is a nullary operation.
The reasoning algebra associated to $A$ is $\mathbf{A}^+ = (A, +, \cdot, \to, -, 0,1)$ where we define iteratively for all $x, y\in A$ $$ \begin{align*} 1 &:= 0\to 0, \\ -x &:= x \to 0, \\ x + y &:= (x\to 0) \to y, \\ x \cdot y &:= (x \to (y \to 0)) \to 0. \end{align*} $$
Call $\mathbf{A}$ Boolean if $\mathbf{A}^+$ is Boolean.
If $f: A\to B$ is a function between implication algebras, then $f$ is a homomorphism $\mathbf{A}\to \mathbf{B}$ iff it is a homomorphism $\mathbf{A}^+\to \mathbf{B}^+$. (Proof)
In propositional logic, an implication formula is a formula which does not contain the symbols $\wedge$, $\vee$, $\neg$, $\top$.
Define recursively $$ \begin{align*} t: \mathrm{Fml} &\to \mathrm{IFml} \\ p &\mapsto p \\ \bot &\mapsto \bot \\ \top &\mapsto (\bot \Rightarrow \bot) \\ \neg ϕ &\mapsto (t(ϕ) \Rightarrow \bot) \\ (ϕ \Rightarrow ψ) &\mapsto (t(ϕ) \Rightarrow t(ψ)) \\ (ϕ \vee ψ) &\mapsto (t(ϕ)\Rightarrow \bot) \Rightarrow t(ψ) \\ (ϕ \wedge ψ) &\mapsto (t(ϕ) \Rightarrow (t(ψ) \Rightarrow \bot))\Rightarrow \bot. \end{align*} $$ Check by induction that $t$ is well-defined surjection and $t(ϕ)$ and $ϕ$ are logically equivalent.
Let $T \subseteq{}$$\mathrm{Fml}$.
A string $D = ϕ_0 ϕ_1 \ldots ϕ_n \in \mathrm{Fml}^\ast$ is called a $T$-proof if for each $i = 0, 1, \ldots, n$, one of the following holds:
-
$A_T$: $ϕ_i\in T$;
-
$B$: $ϕ_i$ is one of the following axioms:
-
Type 1: $ϕ_i = (ϕ \Rightarrow (ψ \Rightarrow ϕ))$ for some $ϕ, ψ\in \mathrm{Fml}$;
-
Type 2: $ϕ_i = \bigl(\bigl(ϕ \Rightarrow (ψ \Rightarrow χ)\bigr) \Rightarrow \bigl((ϕ \Rightarrow ψ) \Rightarrow (ϕ \Rightarrow χ)\bigr)\bigr)$ for some $ϕ, ψ, χ\in \mathrm{Fml}$;
-
Type 3: $ϕ_i = (((ϕ \Rightarrow \bot) \Rightarrow \bot) \Rightarrow ϕ)$ for some $ϕ\in \mathrm{Fml}$;
-
Type 4: $ϕ_i = (ϕ \Rightarrow{}$$t$$(ϕ))$ or $(t(ϕ) \Rightarrow ϕ)$ for some $ϕ\in \mathrm{Fml}$;
-
-
$C$: there exists $j,k<i$ such that $(ϕ_j, ϕ_k, ϕ_i)$ is an instance of modus ponens, i.e. $ϕ_j = (ϕ_k \Rightarrow ϕ_i)$.
Call $D$ a proof if $T = \emptyset$.
If $ϕ$ occurs in $D$, then say $D$ is a proof of $ϕ$.
If there is a $T$-proof for $ϕ$, write $T \vdash ϕ$.
If $T\subseteq T'$, then every $T$-proof is a $T'$-proof.
If $D$ is a $T$-proof and $E$ is $S$-proof, then $DE$ is a $(T \cup S)$-proof.
Finiteness theorem: if $D$ is a $T$-proof, then $D$ is a $T_0$-proof where $T_0 = \sb{ϕ\in T}{ϕ\text{ occurs in }D}$ is a finite set.
Let $T\subseteq \mathrm{Fml}$ and $ϕ,ψ\in \mathrm{Fml}$.
If $T$${}\vdash{}$$ϕ$ and $T\cup \set{ϕ} \vdash ψ$, then $T \vdash ψ$.
Let $T\subseteq \mathrm{Fml}$ and $ϕ,ψ\in \mathrm{Fml}$.
Then $T$${}\vdash{}$$(ϕ \Rightarrow ψ)$ iff $T \cup \set{ϕ} \vdash ψ$.
In propositional logic, let $T\subseteq \mathrm{Fml}$ and $ϕ\in \mathrm{Fml}$.
If $T$${}\vdash{}$$ϕ$, then $T$${}\vDash{}$$ϕ$.
Let $T\subseteq \mathrm{Fml}$.
$T$ is said to be inconsistent if $T$${}\vdash{}$$\bot$. Otherwise it is consistent.
Ex falso: $\bot \vdash ϕ$ for all $ϕ\in \mathrm{Fml}$. (Proof) Therefore by the lemma on lemmas, $T$ is inconsistent iff $T \vdash ϕ$ for all $ϕ$.
If $T$ is consistent and $T \vdash ϕ$, then $T\cup \set{ϕ}$ is consistent by the lemma on lemmas.
If $T$ is inconsistent, then there exists a finite subset $T_0 \subseteq T$ which is inconsistent, by the finiteness theorem.
Let $T \subseteq \mathrm{Fml}$.
$T$ is negation complete if for all $ϕ\in \mathrm{Fml}$, either $T$${}\vdash{}$$ϕ$ or $T \vdash \neg ϕ$.
Let $T\subseteq \mathrm{Fml}$ is a set of formulae in proposition or predicate logic. Suppose $\mathrm{Fml}$ can be well-ordered. (Either $\mathrm{Fml}$ is countable, or assume the axiom of choice.)
If $T$ is consistent, then there is some $T^\ast \subseteq \mathrm{Fml}$ containing $T$ which is negation complete and consistent.
Every consistent set of $\mathrm{Fml}$ is satisfiable.
Let $T\subseteq \mathrm{Fml}$.
$T$ is satisfiable iff every finite subset of $T$ is satisfiable.
In propositional logic, let $T\subseteq \mathrm{Fml}$ and $ϕ\in \mathrm{Fml}$.
If $T$${}\vDash{}$$ϕ$, then $T$${}\vdash{}$$ϕ$.