4.7. Countability and Completeness

Numbers of injections

For any finite sets X, Y, the set Inj(X,Y) of injections from X to Y is finite (subset of the finite set YX), and its cardinal only depends on those of X and Y. Let us denote

P(|Y|,|X|) = |Inj(X,Y)|

Then obviously ∀n∈ℕ,

P(n,0) = 1
P(n,1) = n
k∈ℕ, n<kP(n,k) = 0

Now let AX, B = X\A and πA : Inj(X,Y) → Inj(A,Y) defined by ff|A. Then

g∈ Inj(A,Y), πA(g) ≈ Inj(B, Y\Im g)

by the bijection ff|B. Hence with |A|=i=|Im g|, |B|= k and |Y|= n+i,

n,k,i ∈ℕ, P(n+i, k+i) = P(n,k)⋅P(n+i, i)

In particular,

P(n+1, k+1) = P(n,k)⋅(n+1)
P(n+i, i+1) = nP(n+i, i)

The last one can also be written

n,k ∈ℕ, P(n,k+1) = (nk)⋅P(n,k)

by extension to n<kP(n,k+1)= 0 = P(n,k).
Either formula, together with P(n,0) = 1 and the 0 value for n<k, forms a recursive definition of P(n,k). Either way, this implies coincidence with the definition of the falling factorial (among other possible notations and names) on a larger domain

n∈ℤ,∀k∈ℕ, P(n,k) = ∏i<k (ni)

where i<k abbreviates iVk.

The above formulas keep validity for negative n except that P(n,k) ≠ 0. Namely, it is conveniently expressed there by the rising factorial

n∈ℤ,∀k∈ℕ, P+(n,k) = ∏i<k (n+i) = P(n+k−1,k)
P(-n,k) = P+(n,k)⋅(-1)k

The factorial comes as a particular case :

n∈ℕ, n! = |𝔖n| = P(n,n) = P+(1,n) >0

The falling and rising factorials can be expressed from it : ∀n,k ∈ℕ,

n!⋅P+(n+1, k) = n!⋅P(n+k,k) = (n+k)!

Numbers of combinations

For any set X and any k∈ℕ, a k-combination of X is a subset AX such that |A| = k. The number of k-combinations of Vn (and thus of any set of n elements) is denoted C(n,k). This easily implies by Inj(Vk,Vn)∋f ↦ Im f, the following formula which we extend as a definition of C on a larger domain:

n∈ℤ,∀k∈ℕ, k!⋅C(n,k) = P(n,k)

Indeed P(n,k) is still a multiple of k! for negative n, as it repeats its values from positive n for the same k. Namely, let us similarly define ∀n∈ℤ,∀k∈ℕ,

C+(n,k) = C(n+k−1,k)
C(-n,k) = C+(n,k)⋅(-1)k

including C+(0,0) = C(0,0) = 1 from the latter formula.

As 0! = 1! = 1 we generally have C(n,0) = C+(n,0) = 1 and C(n,1) = C+(n,1) = n.
As A ↦ ∁X A defines a bijective correspondence between k-combinations and n-combinations of Vn+k,

n,k∈ℕ, C(n+k,k) = C(n+k,n) = C+(n+1,k) = C+(k+1,n)

The first equality is more usually written knC(n,k) = C(n,nk).

Given n=|X| and k,l∈ℕ, the number of possible data of disjoint A,BX with |A| = k and |B| = l, can be expressed in 3 ways according to which of A, B or AB is chosen first. This gives the following double equality (its validity for all n∈ℤ follows either by relating cases of negative n to those of positive n, or by deducing the general formula from numerical definitions after multiplication by k!⋅l!) :

n∈ℤ,∀k,l∈ℕ, C(nk,l)⋅C(n,k) = C(nl,k)⋅C(n,l) = C(k+l,l)⋅C(n,k+l)

In particular when l = 1

n∈ℤ,∀k∈ℕ, (nk)⋅C(n,k) = nC(n−1,k) = (k+1)⋅C(n,k+1)

From there follows

n∈ℤ,∀k∈ℕ*, C(n,k) = C(n−1,k−1) + C(n−1,k)

The simple proof for n,k∈ℕ*, is that a k-combination of Vn is either a k-combination of Vn−1, or ({n−1} ∪ a k−1-combination of Vn−1).
General proof :
kC(n−1,k) = (nk)⋅C(n−1,k−1) = k⋅(C(n,k) − C(n−1,k−1)) ∎
This proof has 2 variants, each failing to cover some cases due to multiplication by zero:

nC(n−1,k) = (nk)⋅C(n,k) = n⋅(C(n,k) − C(n−1,k−1))
(nk)⋅C(n−1,k) = nC(n−1,k) − kC(n−1,k) = (nk)⋅(C(n,k) − C(n−1,k−1))

The form of these versions together suggest an idea of possible failure on n=k=0 for an extension of C(n,k) to negative k. Two natural extensions may be considered. The one giving 0 for all negative k, preserves C(n,k) = C(n−1,k−1) + C(n−1,k) but breaks C(n,k) = C(n,nk). Another, preserves the latter but breaks the former and switches the sign of the link between C(n+k−1,k) and C(-n,k) for negative k. We shall not use either.

The number of strictly monotone g:VkVn is C(n,k).
Proof : g bijectively matches the k-combination Im g of Vn. ∎

The number of monotone f:VkVn is C+(n,k).
Proof : f bijectively matches strictly monotone g:VkVn+k−1 by g(x) = f(x) + x. ∎

Monotone f:VkVn+1, monotone g:VnVk+1, and k-combinations A of Vn+k, are so bijectively related by

x<k, ∀y<n, f(x) ≤ yx < g(y) ⇔ x < |AVx+y+1|

The number of h:Vn → ℕ such that ∑h = k is C+(n,k).
Proof : h bijectively matches monotone f:VkVn by ∀x<n, h(x) = |f(x)|. ∎

The number of h:Vn → ℕ such that ∑hk is C+(n+1,k).
Proof : they are bijectively h = h'|Vn for h':Vn+1 → ℕ such that ∑h' = k. ∎

The number of h:Vk → ℕ such that ∑h < n is C+(n,k).
Proof : h bijectively matches monotone f:VkVn by ∀x<k, f(x) = ∑ix h(i). ∎

Related wikipedia pages:

Countable sets

A set A is called countable if |A| ≤ |ℕ|, and countably infinite if |A| = |ℕ|.

Not all sets are countable, as in particular ℘(ℕ) is not countable.

The following are equivalent

  1. A is either finite or countably infinite
  2. A is countable
  3. There exists a total order on A such that all <(x) are finite.
Obviously 1. ⇒ 2. ⇒ 3.
Proof of 3. ⇒ 1.
It is easy to see that f = (Ax ↦ |<(x)|) is strictly monotone. Thus
xA, f[<(x)] ⊂ <(f(x)) = Vf(x), and (as f is injective) |f[<(x)]| = |<(x)| = f(x).
Thus by Dedekind-finiteness f[<(x)] = Vf(x).
Finally, Im f ≠ ℕ ⇒ ∃y∈ ℕ\Im f, ∀xA, yVf(x)f(x) ≤ y hence A is finite.∎
Moreover with finite A, Im f = V|A| for the same reason as with f[<(x)].

Another way to prove 2. ⇒ 1. is as follows. Let A⊂ℕ, and assume A≠∅ (as ∅ is finite).
Let SA the successor function (3.12) of A.
As we described the set of all finite subsets of ℕ in 4.6., if A is infinite then A ⊂ Dom SA, thus |ℕ| ≤ |A|.∎

Any quotient of a countable set is countable. Namely, like already seen with finite sets, any surjection f: ℕ ↠ A has a section given by y↦ min f(y).

For the same reason, any product of nonempty subsets of ℕ is nonempty. However, to extend this to products of nonempty countable sets, depends on the existence of a family of choices of injections to ℕ. So, it works if a definition specifying such choices is available; otherwise, it fails since not using the axiom of choice was the point of the question.

Sums of total orders

The sum of a totally ordered family of totally ordered sets ((Ai, ≤i)iI with a total order on I), is their disjoint union U with the total order defined as follows. Assuming these sets pairwise disjoint to simplify notations as U = ⋃iI Ai, let

U = (⋃iIi) ∪ (⋃i<jI Ai×Aj)

If I and all Ai are well-ordered then their sum is also well-ordered.
Proof: for any nonempty BU, the least element of BAi for the least i such that BAi ≠ ∅, is the least element of B.∎

However, the property of finiteness of all <(x) is not always preserved. For example it holds in Vn ⊔ ℕ, but not in ℕ ⊔ Vn if n ≠ 0.
For any sequence a∈ℕ, the sum U = ∐n∈ℕ Van satisfies

∀(n,x)∈U, |<(n,x)| = x + ∑k<n ak

forming a bijection from U to Vn∈ℕ an if a has finite support, or to ℕ otherwise.
If a is a constant function with value b∈ℕ*, this gives the bijection from ℕ×Vb to ℕ

∀(q,r)∈ℕ×Vb, |<(q,r)| = bq + r

whose inverse is called the Euclidean division by b.

More generally, any set of the form U = ⋃n∈ℕ An where each An is finite, is countable under either additional assumption

Proof. The union is a quotient of the disjoint union, which is countable.∎

Under the axiom of countable choice, any infinite set E is Dedekind-infinite.

Proof. ∀n∈ℕ, ∃j: VnE. Hence the existence of a function from the countable set ∐n∈ℕ Vn to E whose restriction to each component Vn is injective. Its image is both countable and infinite, thus |ℕ| ≤ |E|.∎

x\y 01234
0 0 1 4 9 16
1 2 3 5 10 17
2 6 7 8 11 18
3 12 13 14 15 19

2 is countable because it is ⋃n∈ℕ Vn2.
This gives a bijection from ℕ2 to ℕ defined by (x,y) ↦ (x < y ? yy + x : xx + x + y).
Hence the countability of any U = ⋃n∈ℕ An where each An is countable, either with an invariant injection to ℕ (which together define a surjection from a subset of ℕ2 to U), or under countable choice.

Another bijection, with a generalization to ℕk for any k > 0, will be introduced next.

Lexicographic order

A lexicographically ordered set is a set of functions FYX where X, Y are totally ordered sets, such that for all fgF, the set {xX| f(x) ≠ g(x)} has a greatest element mf,g : this lets a total order on F be defined by f<gf(mf,g) < g(mf,g).

(Another definition uses the least element, which amounts to reversing the order of X, but that is less useful)

The positional numeral systems, of which the decimal system is a particular case, come depending on a choice of base b > 1, as the use of the lexicographically ordered set Vb(ℕ).
Indeed

gVb(ℕ),∀x∈ℕ, {fVb(ℕ)|f<gmf,g = x} ≈ Vbx×Vg(x)

from which comes

|{fVb(ℕ)|f<g}| = ∑x∈ℕ bxg(x)

hence Vb(ℕ) is countably infinite. The particular case V2(ℕ) is identifiable with ℘fin(ℕ),

B∈℘fin(ℕ),|{A∈℘fin(ℕ)|A<B}| = ∑xB 2x

and this bijection from ℕ to ℘fin(ℕ) is a curried form of the BIT predicate.

Now for k > 0 let Fk ⊂ ℕk the set of monotone k-tuples of natural numbers. For all gFk and x<k the set {fFk|f<gmf,g = x} is in bijection (by restriction) with the set of monotone f:Vx+1Vg(x), with cardinal C+(g(x),x+1) = C(g(x)+x,x+1). So

|{fFk|f<g}| = ∑x<k C+(g(x),x+1)

hence Fk is countably infinite. Finally, ℕk is also countably infinite as h∈ℕk bijectively defines fFk by

x<k, f(x) = ∑ix h(i).

x\y 0 1 2 3 4
0 0 1 3 6 10
1 2 4 7 11
2 5 8 12
3 9 13
In particular with k=2 we get b2 : ℕ×ℕ → ℕ defined as b2(x,y) = Tx+y+x where the triangular numbers are defined by Tn = C+(n,2) or equivalently by T0 = 0 ∧ ∀n∈ℕ, Tn+1 = Tn+n+1.
This gives ℕ2 the ground (0,S)-term algebra structure (recursively defining b2-1(z))

0ℕ×ℕ = (0,0)
S(x,0) = (0,Sx)
S(x,Sy) = (Sx,y)

Another way to express b2-1 (to infer x and y from b2(x,y)) first calculates x+y as the only n such that Tnb2(x,y) < TSn.

Countable term algebras

Constructing ground term algebras over any language, suffices to also give term algebras with any set of variables, by treating those variables as more constants in the language. This construction remains to be specified for any language L0L1 where the set L0 of constants and the set L1 of other symbols (with nonzero arity), are both non-empty (beyond the one-one case for which it gave ℕ).
Obviously, such ground term algebras are also Dedekind-infinite. We shall prove their existence, starting with cases of countable L, for which they are also countably infinite.
Indeed we can define a ground term L0L1-algebra structure on ℕ as follows.
L0L1ℕ = L0L1ℕ, while L0 is countable, and since L1 is countable,

L1ℕ = ∐sL1nsL1×ℕ ≈ ℕ

By such a bijection of a natural kind as above defined, any (s,u) ∈ L1ℕ matches an n ∈ ℕ such that Im uVn+1.
But, after composing this with a natural bijection of L0∪ ℕ with ℕ starting with a constant (from L0), to give ℕ a bijective L0L1-structure, any (s,u) ∈ L1ℕ finally matches there an n ∈ ℕ such that Im uVn.
In other words, the relation R from 4.1 is included in the strict order of ℕ and is thus well-founded. This gives ℕ a role of ground L0L1-term algebra. ∎

Generally, one may form a ground term L-algebra out of any injective L-algebra, by taking its minimal subalgebra.

Aside this construction of countable term algebras based on the axiom of infinity, another idea to form injective algebras starts by assuming the existence of a model U of a very simple kind of set theory. Namely, the excerpt of set theory which describes tuples, makes U an injective algebra over the language made of the tuples definers. From this, term algebras come as subalgebras generated by sets whose elements are not tuples. Beyond the mere tuples definers, for any language L of algebraic symbols which belong to U, the set U is an injective L-algebra. If U is standard, this takes the simple form LUU, making (U, IdLU) an injective L-algebra.

Proof of the Completeness Theorem

Let us finally prove the Completeness theorem previously commented in 1.1, 1.9, 1.10, 1.B and 1.C.

Theorem. First-order logic has a proving system both sound and complete in the following equivalent senses

  1. Any consistent first-order theory T with countable language has a countable model.
  2. Any statement A true in all countable models of T is deducible from its axioms.
The equivalence is easy : 1. is the particular case of 2. where A is 0 (false); conversely, it implies all of 2. by There can be different ways to prove 1. (or even directly 2.) depending on the precise chosen formal system of rules of proof with this quality. But, we shall skip here such details (those of propositional calculus, whose interest is rather technical and specialized), or somehow keep them implicit, to focus on the other side of the proof : the construction of a model of any consistent theory. Yet I have two such constructions to offer (which may be both original, as usual proofs given elsewhere look much more complex).

As T may admit multiple types, it is first reduced to a single-type theory T1 simulating the use of types by unary relation symbols and axioms (as in 1.7 and 1.10), but not requiring all objects to belong to some type. Adding the axiom (∃x, 1) in T1 (if not a theorem of T) is harmless, not contradicting a possible emptiness of each type.
Axioms of T1 are then expressed in prenex form, that is chains of quantifiers applied to quantifier-free formulas, by equivalences adapted from 2.5 and 2.7, such as

(C ∧ ∃Ax, R(x))  ⇔  (∃x, CA(x) ∧ R(x))
(C ∨ ∃Ax, B(x)) ⇔ (∃x, C ∨ (A(x) ∧ B(x)))
(C ∧ ∀Ax, B(x)) ⇔ (∀x, C ∧ (A(x) ⇒ B(x)))

Then turn T1 into a theory T2 by 2 more changes (Axiom 5. of equality over additional operation symbols is neither needed nor harmful).

Form a propositional theory T3, made of

If T3 had a contradiction, namely if a finite set of its axioms was not satisfiable by any tuple of Boolean values of their variables, it would lead to a contradiction in T1 as follows:
Take the finite list (without repetition) of all terms whose root is an additional symbol S of T2 (not from T), and which occur as sub-terms among the axioms of T3 involved in the contradiction. Then list all axioms of T2 which use these terms. For example an axiom of T1,

x,∃y,∀z,∃u, A(x,y,z,u)

gave the axiom of T2

x,z, A(x,K(x),z, S(x,z))

Successively replace any such terms in used axioms of T2 by variables in T1, as follows : if we have for example terms S(t0,t1) and S(t0,t2) (where t0, t1, t2M), the reasoning in T1 will first do such replacements in t0,t1 and t2 where applicable (starting with their smallest sub-terms), then say of the so modified t0,t1 and t2
"Let y such that ∀z,∃u, A(t0,y,z,u);
let u1 such that A(t0,y,t1,u1);
let u2 such that A(t0,y,t2,u2);"
and so on, to finally apply the contradiction from T3 where y replaces K(t0), u1 replaces S(t0,t1) and u2 replaces S(t0,t2).
Now in absence of contradiction, the set PM of Boolean variables gets interpreted this way : recursively by a chosen bijection from ℕ to PM, add one by one to the axioms, each of these Boolean variables if not refutable from previously accepted axioms. So, all get values without contradiction.
Then a model is formed by quotienting M by the "equality" relation, and removing the elements with no type. ∎

As this construction depends on multiple choices (between equivalent formalizations of a theory, possible bijections from ℕ to PM, and variations are possible on the method itself), it can give different models, which may be non-isomorphic and even have different truth values of the theory's undecidable statements.

Skolem's Paradox

Comparing the completeness theorem with Cantor's theorem gives this paradox :
Any consistent set theory has a countable model U, including a set P playing the role named as "℘(ℕ)", which it qualifies as "uncountable".

This discrepancy can be analyzed in two ways:

Actually, even the interpretation of ℕ is likely to differ, as we shall explain with non-standard models of arithmetic ; but this does not invalidate the above observations (and there also exist countable universes whose interpretations of arithmetic are standard, as will be seen with the Lowenheim-Skolem theorem).

Anyway so, when the powerset axiom declares the class of subsets of ℕ to be a set ℘(ℕ), it only determines ℘(ℕ) as given by the range of subsets of ℕ which happen to exist (be represented) in the current universe, thus remains relative to this universe.

In the other interpretation of what it means for a class to be a set ("strong" version in "Classes and sets in expanding universes"), this would mean the current universe already contains "really all" subsets of ℕ, forming the supposedly "true" set ℘(ℕ) which will stay fixed in any further expansion of the universe. However, this wish cannot be expressed in first-order logic nor any other conceivable mathematical formalism: there is no way to talk about meta-sets that "cannot be found" in this universe but would «exist elsewhere» (in any mysterious bigger universe) to exclude them from there. (Only one aspect of this idea can be formalized as the axiom schema of specification).


Set theory and foundations of mathematics
1. First foundations of mathematics
2. Set theory
3. Algebra 1
4. Arithmetic and first-order foundations
4.1. Algebraic terms
4.2. Quotient systems
4.3. Term algebras
4.4. Integers and recursion
4.5. Presburger Arithmetic
4.6. Finiteness
4.7. Countability and Completeness
4.8. More recursion tools
4.9. Non-standard models of Arithmetic
4.10. Developing theories : definitions
4.11. Constructions
4.A. The Berry paradox
5. Second-order foundations
6. Foundations of Geometry