Skip to content

Instantly share code, notes, and snippets.

@Nikolaj-K
Created March 12, 2026 17:45
Show Gist options
  • Select an option

  • Save Nikolaj-K/cc2c87ac30254dc8d5339dacbd6ec2cd to your computer and use it in GitHub Desktop.

Select an option

Save Nikolaj-K/cc2c87ac30254dc8d5339dacbd6ec2cd to your computer and use it in GitHub Desktop.
Impact of coding on rank and cardinality

This is the script for the video discussed at

https://youtu.be/7gbRTShKvp8

Cardinality individual coded reals

Z_2 reals

Constrain $d_i > 0, s_i\in{0,1}$.

$i\mapsto \tfrac{n_i}{d_i}(-1)^{s_i}$ in ${\mathbb Q}^{\mathbb N}$ can be coded as infinite subsets of ${\mathbb N}^4$ with members $\langle i, n_i, d_i, s_i\rangle$. (Choose $\mathrm{gcd}(n_i​,d_i​) = 1$ to pass from set to function.)

${\mathbb N}^4$ embeds into ${\mathbb N}$, say as $2^i \cdot 3^{n_i}\cdot 5^{d_i}\cdot 7^{s_i}$. (Or even use pairing function.)

Example: $S_{\mathrm e} := { 15, 90, 24300, 6561000,\dots}$ codes $i\mapsto \sum_{k=0}^i\tfrac{1}{k!}$.

$\sum_{k=0}^i\tfrac{1}{k!}$ are of course the components of a Cauchy-sequence, namely a member of the irrational Cauchy real number ${\mathrm e}$.

The components are each even primitive recursive, in this example.

Note that $|S_{\mathrm e}| = |{\mathbb N}| = |\omega|$.

Dedekind reals

Alternatively, define the lower closed cut

$L_{\mathrm e} := {q \in {\mathbb Q} \mid \exists i\in \omega. q < \sum_{k=0}^i\tfrac{1}{k!}}$

Note that this set is countable. (indeed $|U_{\mathrm e}| = |{\mathbb N}| = |\omega|$.)

Cauchy reals

Alternatively, ... equivalence class of sequences $\subset {\mathbb Q}^{\mathbb N}$.

But here we can salt any sequence with noise $\frac{a_n}{n+1}$ with binary $(a_n)_n\in {0, 1}^{\mathbb N}$.

So, e.g.

$|C_{\mathrm e}| = |{0, 1}^{\mathbb N}| = |{\mathbb R}|$

Rank of tuples

von Neumann ordinals: Recursive definition: $0:={}$ and $n := { 0, 1, 2, \dots, n-2, n-1 }$ Rank of the empty set is zero. Rank (depth) of $n$ equals the number it represents itself.

Kuratowski ordered pair: Definition: $\langle a,b\rangle := {{a}, {a, b}}$ Bumps rank by $+2$. (I.e. the rank is $\max$ of the ranks of $a$ and $b$ and then $2$ from the brackets.) So sets of pairs means bumping the rank by $+3$.

  • Cardinal exponentiation $5^3$ is the function space, i.e. the set of all $f \in { 0, 1, 2 }\to{ 0, 1, 2, 3, 4 }$

    • Each of those is $f \subset { 0, 1, 2 }\times{ 0, 1, 2, 3, 4 }$
    • Has $|5^3| = |125| = |{ 0, 1, 2, \dots, 123, 124 }|$
    • A function is just a set of pairs. Function space is a set of functions. So this bumps rank by up to $+4$.
  • Consider now the tuples of length $\ell=3$, i.e. $\langle \langle a, b\rangle, c\rangle$ with $a,b,c\in{ 0, 1, 2, 3, 4 }$

    • E.g. $(5\times 5)\times 5$, which has $|(5\times 5)\times 5| = |5^3| = |125|$ also
    • We have a pair inside a pair, so also here $+4$.

But from here on out it gets worse! The $\ell=6$ six-tuples look like $\langle \langle \langle \langle \langle a, b\rangle, c\rangle, d\rangle, e\rangle, f\rangle$

The rank here grows linear with tuple-length - in fact the varying term is $+2\ell$.

On small infinite ordinals / order types

Set of pairs of naturals,

$\omega\times\omega = \left{ \begin{matrix} \langle 0,0\rangle & \langle 0,1\rangle & \langle 0,2\rangle & \langle 0,3\rangle & \langle 0,4\rangle & \cdots \ \langle 1,0\rangle & \langle 1,1\rangle & \langle 1,2\rangle & \langle 1,3\rangle & \langle 1,4\rangle & \cdots \ \langle 2,0\rangle & \langle 2,1\rangle & \langle 2,2\rangle & \langle 2,3\rangle & \langle 2,4\rangle & \cdots \ \langle 3,0\rangle & \langle 3,1\rangle & \langle 3,2\rangle & \langle 3,3\rangle & \langle 3,4\rangle & \cdots \ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots \end{matrix} \right}$

The lexicographic order $\langle a,b\rangle <_{\omega^2} \langle A,B\rangle ,,,,:\Leftrightarrow,,,, a < A \lor (a = A \land b < B)$ on $\omega\times\omega$ characterizes the order type $\omega^2$.

E.g. $\langle 0,4\rangle <_{\omega^2} \langle 2,3\rangle$.

$R_i := \pi_{\mathrm{left}}^{-1}({i}) = {\langle i,k\rangle \mid k \in \omega}$

$I_{\omega + 7} := R_0 \cup {\langle 1,j\rangle \mid j<7}$

$I_{\omega\cdot 3} := R_0\cup R_1\cup R_2$

$I_{\omega + 7} \subseteq I_{\omega\cdot 3} \subseteq \omega \times \omega$

Similarly, $\omega^3$ uses what amounts to 3-tensors, $\omega^n$ uses length-$n$ tuples, all of these for $\omega^\omega$, etc.

Ordinal analysis of theories

${\mathsf {PA}}$ can be used to formalize a primitive-recursive ordinal-notation system for, say, $(\omega^\omega)^\omega$ and prove transfinite induction up ordinals below $\epsilon_0$.

$0 < 1 < 5 < \omega + 7 < \omega + \omega < \omega \cdot 3 < \omega^2 < \omega^2 + 4 < (\omega^\omega)^\omega < ((\omega^\omega)^\omega)^\omega < \cdots $

and then

$ \cdots < ((\omega^\omega)^\omega)^\omega < \epsilon_0 < \omega_1 < \omega_1 + 7 < \omega_7 < \omega_7^{\omega_7} < \cdots $

and then maybe (provable from set axioms beyond ${\mathsf {ZFC}}$)

$\cdots &lt; \omega_7^{\omega_7} &lt; \omega_\omega &lt; \omega_{\omega_1^{\omega_1}} &lt; \cdots$

Neumann ordinals

$Sx := x\cup{x}$ Write $S^{\mathrm{m}+1}x = S(S^\mathrm{m}x)$

$0:=\emptyset$ $n+1 = Sn$ These naturals validate $n=S^\mathrm{n}0$, i.e. that's a simple theorem.

Essentially, postulate the existence of $\omega$, which holds all of these above $n$, the finite von Neumann ordinals. It validates $\omega=\bigcup_{k\in\omega}k$.

Smaller countable ordinal multiplication:

$\alpha\cdot 0 := 0$ for all ordinals

$\omega\cdot (n+1) = \bigcup_{k\in\omega}S^{\mathrm{k}}(\omega\cdot n)$

$\omega^2 = \bigcup_{k\in\omega}(\omega\cdot k)$

The rank assignment is identity on von Neumann ordinal, i.e. an $\alpha$ has rank $\alpha$.

Universe stages

All member of $V_{\alpha}$ have rank below $\alpha$.

E.g. $V_{\omega\cdot 3}$, which contains a set which server as the collection of objects for a set topos, and which can use used to define a natural model of Zermelo set theory $\mathsf Z$, but at the same time it does not contain the ordinal $\omega\cdot 3$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment