Proof that the number of proofs is countably infinite

Regarding the proof that the number of statements is countably infinite

So suppose that the number of symbols $S=\{s_1,\dots,s_n\}$ is finite and equal to $n$. Then a statement is an element of the set $S^{<\mathbb N}$ of the finite sequences $(s_{j_1},\dots, s_{j_k})$ of elements of $S$.

You can create an injection from $S^{<\mathbb N}$ into $\mathbb N$ by setting $(s_{j_1},\dots, s_{j_n}) \mapsto p_1^{j_1} \times \dots \times p_n^{j_n}$, where $p_i$ is the $i$-th prime number. This is an injection according to the uniqueness factorization theorem.


Correct me if wrong:

Consider :

Let $S = \cup_{n \in \mathbb{Z^+}} E_n,$ where $E_n$ is countable, then $S$ is countable. (Rudin Theorem 2.12).

Consider a line length of $n$ characters .

The set $A_n$ of elements of line lengths of $n$ characters is finite.

For the set of proofs $E_n$ of line length of $n$ characters we have :

$ E_n \subset A_n $ , i.e finite.

Hence

$S= \cup_{n \in \mathbb{Z^+}} E_n$ is countable.


Let say we have a set of symbols symbols, $S=(s_0,...,s_{n-1})$, and $n$ elements in $S$.

We will now give every symbol a number between $0$ and $n-1$: $\forall i_{\in\Bbb N}<n(s_i\to i)$

For any arbitrary string $K=(k_0,...,k_m)$ of elements of $S$ we will look at the number in base $n$ created by its elements as digits: $k_m...k_1k_0(base~n)=k_mn^m+...+k_1n+k_0$, in other words I create a bijective function from the set of finite strings of $S$ to $\Bbb N$.

The number of proofs is subset of the above set hence it is also countable


As David point out this method has a problem: if I have at the start of the string $s_0$ it won't change the number but will change the string($s_0L\ne L$ but after converting to numbers they will be equal)

So instead of bijective I'll create the injective function $$K=(k_0,...,k_m)\mapsto 1k_m...k_1k_0(base~n)=n^{m+1}+k_mn^m+...+k_1n+k_0$$