basic language

PHIL 452 · Modal Logic

Gabriel Uzquiano

induction and recursion

induction on the natural numbers

Given a condition on natural numbers, if

  • \(0\) meets the condition, and
  • a natural number \(n\) meets the condition only if its successor \(n + 1\) does,

then all natural numbers satisfy the condition.

\[\begin{array}{llll} 0 & < & 1 & = & 2^0 \\ 1 & < & 2 & = & 2^1\\ 2 & < & 4 & = & 2^2 \\ \cdots & & \cdots & & \cdots \\ \end{array}\]

For all natural numbers \(n\), \(n < 2^n\).

how to deploy induction on the natural numbers

Set \(\Phi(n)\) as: \(n < 2^n\), and observe:

  1. \(\Phi(0)\)

    \(0 < 1 = 2^0\).

  2. If \(\Phi(n)\), then \(\Phi(n+1)\).

    If \(n < 2^n\), then \(2^n \geq 1\) and \(n + 1 < 2^{n} + 2^{n} = 2^{n+1}\).

By induction, we conclude that for all natural numbers \(n\), \(n < 2^n\).

induction on the positive integers

Given a condition on positive integers, if

  • \(1\) meets the condition, and
  • a positive integer \(n\) meets the condition only if its successor \(n +1\) does,

then all positive integers satisfy the condition.

\[\begin{array}{lllll} 1 + 3& = & 4 & = & 2^2\\ 1 + 3 + 5 & = & 9 & = & 3^2\\ 1 + 3+ 5 +7 & = & 16 & = & 4^2\\ \cdots & & \cdots & & \cdots \\ \end{array}\]

The sum of the first \(n\) odd numbers is \(n^2\).

how to deploy induction on the positive integers

Set \(\Phi(n)\) as: \(\sum_{k = 1}^{n}{2k - 1} = n^2\):

  1. \(\Phi(1)\)

    \(\sum_{k = 1}^{1} 2k - 1 = 1^2\).

  2. If \(\Phi(n)\), then \(\Phi(n+1)\).

    Suppose \(\sum_{k=1}^{n} 2k-1 = n^2\), and note:

    \[\begin{array}{lll} \sum_{k=1}^{n+1} 2k-1 & = & (\sum_{k=1}^{n} 2k-1) + 2 (n+1) - 1\\ & = & n^2 + 2n +1\\ & = & (n+1)^2 \\ \end{array}\]

how not to use induction on the natural numbers

For all natural number \(n\), if both \(A\) and \(B\) have each at most \(n\) members, then \(|A| = |B|\).

Set \(\Phi(n)\) be: If two sets \(A\) and \(B\) have each at most \(n\) members, then \(|A| = |B|\).

  • \(\Phi(0)\)

    If \(A\) and \(B\) have at most \(0\) members, then they are both empty and \(|A| = |B|\).

  • If \(\Phi(n)\), then \(\Phi(n+1)\)

    Suppose the condition holds for \(n\) and let \(A\) and \(B\) be two sets with at most \(n+1\) members. Let \(A^-\) and \(B^-\) be obtained from \(A\) and \(B\) by substracting one member from each. By inductive hypothesis, \(|A^-| = |B^-|\), whence \(|A| = |A^-| + 1 = |B^-| +1 = |B|\).

By induction, if two sets \(A\) and \(B\) have each at most \(n\) members, then \(|A| = |B|\)

Caution

It would seem to follow that all finite sets have the same cardinality, which is false.

Where is the flaw in the argument?

variants of induction

Complete Induction

Given a condition on natural numbers, if

  • \(0\) meets the condition, and
  • if for all \(m < n\), \(m\) meets the condition, then \(n\) does,

then all natural numbers satisfy the condition.

Complete Induction without a Base Case

Given a condition \(\Phi(n)\) on natural numbers, if

if for all \(m < n\), \(m\) meets the condition, then \(n\) does,

then all natural numbers satisfy the condition.

recursion

We define by recursion a set of formulas for a formal language. Suppose we start with a simple vocabulary, which consists of only three symbols:

\[@, \#, \%\]

We could define a set of formulas for that language by means of the following recursion:

\[\varphi ::= @ \ | \ \% \varphi \ | \ (\varphi \ \# \ \psi)\]

Here is how to read that notation now.

  • \(@\) is a formula of the language

  • if \(\varphi\) is a formula of the language, then \(\% \varphi\) is a formula

  • if \(\varphi\) and \(\psi\) are formulas of the language, then \((\varphi \ \# \ \psi)\) is a formula.

That means that the set of formulas of the language includes:

\[@, \%@, \%\% @, \dots, (@ \ \# \ @), (@ \ \# \% @), \% (@ \ \# \ @), \dots\]

propositional logic

basic language

Choose a stock of propositional variables or atoms:

\[ AT := p, q, r, \cdots \]

We define the formulas of a propositional language \(\mathcal{L}\) recursively:

\[ \varphi ::= AT \ | \ \neg \varphi \ | \ (\varphi \to \psi) \]

Here is how to read the last line:

  • All atoms are formulas.

  • If \(\varphi\) is a formula, then \(\neg \varphi\) is a formula.

  • If \(\varphi\) and \(\psi\) are formulas, then \((\varphi \to \psi)\) is a formula.

  • Nothing else is a formula.

some definitions

\[ \begin{array}{lll} \top & := & (p \to p)\\ \bot & := & \neg \top \\ (\varphi \vee \psi) & := & (\neg \varphi \to \psi)\\ (\varphi \wedge \psi) & := & \neg (\varphi \to \neg \psi)\\ (\varphi \leftrightarrow \psi) & := & (\varphi \to \psi) \wedge (\psi \to \varphi) \end{array} \]

induction on the complexity of formulas

Given a condition on formulas of \(\mathcal{L}\), if

  • all atoms meet the condition,

  • whenever a formula \(\varphi\) meets the condition, \(\neg \varphi\) meets the condition as well, and

  • whenever two formulas \(\varphi\) and \(\psi\) meet the condition, \((\varphi \to \psi)\) meets the condition as well,

then all formulas of \(\mathcal{L}\) meet the condition.

All formulas are balanced.

how to deploy induction on the complexity of formulas

Set \(\Phi(\varphi)\) as: \(\varphi\) is balanced:

  1. All atoms are balanced.

    Atoms have an equal number of left and right parentheses, namely \(0\).

  2. If \(\varphi\) is balanced, then \(\neg \varphi\) is balanced.

    Suppose \(\varphi\) is balanced. \(\neg \varphi\) contains the same number of left and right parentheses as \(\varphi\). So, \(\neg \varphi\) is balanced.

  3. If \(\varphi\) and \(\psi\) are each balanced, then \((\varphi \to \psi)\) is balanced.

    If \(n\) and \(m\) are the number of left and right parentheses for \(\varphi\) and \(\psi\) respectively, then \(n+m+1\) is the number of left and right parentheses for \((\varphi \to \psi)\). So, \((\varphi \to \psi)\) is balanced.

By induction on the complexity of formulas, all formulas are balanced.

semantics

valuation

example

Let \(v\) map all atoms into \(0\). Then: \[ \begin{array}{lll} V(p) & = & 0\\ & & \\ V(\neg p) & = & 1\\ & & \\ V(\neg p \to \neg \neg q) & = & 0\\ & & \\ V(\neg \neg q \to \neg \neg p) & = & 1\\ \end{array} \]

satisfaction and validity

practice

A formula φ is unsatisfiable if, and only if, ¬φ is valid.
A conjunction φ ∧ ψ is unsatisfiable if, and only if, ¬φ is valid or ¬ψ is valid.

practice

Γ ⊨ φ if, and only if, Γ ∪ {¬φ} is satisfiable
Γ ⊨ φ if, and only if, Γ ∪ {¬φ} is unsatisfiable