First- and Second-Order Logic
First-order logic with equality (standard logic):
We have variables, constant symbols, relation symbols, and the following logical symbols:
|
"There exists" |
|
(inclusive) or |
|
not |
We define
|
"for all" |
|
|
and |
|
|
if ... then |
|
|
if and only if |
|
We can say things like:
A
structure for a symbol set (a set of relation, function, and constant symbols) is a pair of a nonempty set (the domain or universe) and a function that takes each symbol to the right sort of thing. Example:
Every sentence of this logic is either true or false in every appropriate structure for the logic.
A sentence

is a
logical consequence of a set of sentences

iff every structure in which every member of

is true is also such that

is true.
Last semester we introduced a formal system of derivations for this language and proved:
(1) Completeness: If

is a logical consequence of

then there is a derivation of

from
(1) Upward and Downward Löwenheim-Skolem-Tarski Theorem: Every set of sentences that is true in a structure with an infinite domain is true in structures with domains of every infinite size.
Second order logic: We introduce new variables,

for

-ary relations, and we allow ourselves to quantify over them too:
Fact: The usual axioms for arithmetic include this second-order axiom, and they have only one model: the natural numbers.
Second-order logic does everything first-order logic couldn't: it can characterize the natural numbers, and the axioms have all truths about the numbers as logical consequences.
Unfortunately, second-order logic is incomplete. That is, there is no formal system of derivations that captures the notion of logical consequence.

has two meanings: When it is between a set of formulas and a formula, like this:

, it means logical consequence.
When it is between an interpretation and a formula, like this:

, it means true in.
The symbol

means derivable, or provable, in a formal system of logic (introduced earlier). For example,

means there is a derivation starting from sentences in

that ends with

.
Last time I mentioned the soundness theorem: if

then

. I also mentioned the completeness theorem, which is the converse. These are results for first-order logic. Soundness will apply to any logic: it is what we set up derivation systems for. Completeness is a rare and special property.

is the set of all sentences in the symbol set

, where a symbol set is just a set of symbols. `Th' just stands for theory.
An example. A set is infinite if you can map it properly into itself. Thus, the successor function maps all the natural numbers into the nonzero natural numbers.
That can't be done for finite sets: if you pair off members of a set with members of the same set, then all the members must get used.
We need some terminology: A function from a domain to a range,

takes every member of

to exactly one member of

. An

-ary function has

domains (example, addition). An
operation is a function for which all the domains and the range are the same.
A function is
injective (into, one-to-one) if no two members of the domain are mapped to the same member of the range.
Examples: The doubling function is injective. The integer halving function (half of 1 is 1, half of 2 is 1, half of 3 is 2, half of 4 is 2, ... ) is not injective.
An operation

is injective if and only if the following is true:
A function is
surjective (onto) if every element of the range is hit by some member of the domain. Thus, the doubling function is not surjective (it misses, for example, 1), but my halving function is surjective.
An operation

is surjective if
A set is finite if and only if every injective operation on the set is surjective.
One more piece of business: Our second-order logic only has quantification over relations, but it is easy to simulate quantification over functions.
Example: Every injective operation on X is surjective.
Forall F if F is an operation on X and F is injective, then F is surjective.
We will never do this again. We will just pretend our language has quantification over functions and write
In fact, we won't usually even do that, we'll just write

If

is an injective function on

, then

is a surjective function on

.
Main moral: "Finite" is definable in second-order logic.
Theorem: If a theory of first-order logic has models of unbounded finite size, then it has an infinite model. That is "finite" is not definable in first-order logic.
We've shown that second-order logic is much more powerful than first-order logic, by showing that "finite" is expressible in second- but not first-order logic. Similarly, one can express countable and uncountable. That can be used to show that second-order logic is too powerful:
The following is expressible as a sentence of second-order logic: Every infinite subset of the set of subsets of a countable set can be put into bijective (injective and surjective) correspondence with either the countable set or with the set of all of its subsets.
That claim is known as Cantor's continuum hypothesis, and it is independent of all known mathematical and logical principles, that is, it cannot be proved either true or false on the basis of them. That means that either the sentence or its negation is a logical truth of second-order logic, but we have no way to know which.
--
ShaughanLavine - 14 Jan 2005