"Rigorously" proving existence of certain formulas in FO logic While working through Enderton's A Mathematical Introduction to Logic, I have seen a few explanations/proofs where we essentially rely on "$\cdots$". I'm generally comfortable with this if I can easily translate it into something more rigorous, usually involving recursive definitions and/or induction. But as I am just getting into a logic I am not comfortable in this context.
Say we are trying to prove that, for each $n$ there is a sentence which is true in a strucure $\mathfrak A$ iff $\mathfrak A$ has at most $n$ elements. There are numerous questions here on MSE asking how to express this or related statements, e.g. here.
One method is as follows:
"There is at most one" : $∃x_2∀x_1(x_1=x_2)$
"There are at most $2$" : $∃x_3∃x_2∀x_1(x_1=x_3∨x_1=x_2)$
"There are at most $n$" : $∃x_{n+1}\cdots∃x_2∀x_1(x_1=x_{n+1}\lor \cdots\lor x_1=x_2)$
My question is, how do we make this more rigorous without relying on "dot dot dot", and actually go all the way proving that the sentence is true exactly when a structure has at most $n$ elements. My thinking is that you would first recursively define the desired formulas in some way, and then the definition would facilitate an inductive proof that the formulas are satisfied only in certain structures.
As a simple example of what I mean, here is an exercise on propositional logic.
Define $\sigma_k$ recursively by $\sigma_0=(P\rightarrow Q)$ and $\sigma_{k+1}=(\sigma_k\rightarrow P)$. For which $k$ is $\sigma_k$ a tautology? One solution is a proof by induction showing that for $k\geq 1$, if $k$ is even then $\sigma_k$ is a tautology and if $k$ is odd then truth assignments $v$ for which $v(P)=F$ do not satisfy $\sigma_k$. Hence $\sigma_k$ is a tautology only for the positive even integers $k$.
 A: First of all, it should be remarked that the statement "[the structure] $\mathfrak{A}$ has at most $n$ elements" is very significant and indispensable. Why?
Let us agree on what the expressions 'at least', 'at most' and 'exactly' denote aside from stylistic usages:
At least 3: the corresponding sequence is $3, 4, 5,\dots$
At most 3: the corresponding sequence is $0, 1, 2, 3$.
Exactly 3: the corresponding sequence is $3$.
Consider the formula $\exists x_{3}\exists x_{2}\forall x_{1}(x_{1} = x_{3} \vee x_{1} = x_{2})$ and a domain $\{a, b, c\}$. For the sake of simplicity, let $x_{3}=a$ and $x_{2}=b$, but then, $c$ remains not accounted for. The formula is satisfiable in domains with at most $2$ elements, otherwise, not (i.e., it does not actually pick out 2 elements from a domain with greater number of elements). Hence, it is not a valid formula.
When the method of induction is needed on the elements of a first-order language (the number of quantifiers, complexity of of formulas, etc.), we have to resort to induction in the metalanguage. Various induction and recursion schemas are logically equivalent, it is up to one's conceptual frame to choose one of them; I'll sketch a proof with strong induction:
As a basis clause, $k=1$, we take the formula $\psi_{1}$ as $\exists x_{1}\forall x(x = x_{1})$ and the structure $\mathcal{A}_{1}$ with the domain $\{a_{1}\}$. Clearly,
$$\mathcal{A}_{1}\models\psi_{1}$$
Inductive hypothesis (the dots are not to skip steps, but for a plainer presentation):
For $k=n$, $\psi_{n}$ is $\exists x_{n}\ldots\exists x_{1}\forall x(x = x_{1}\vee\ldots\vee x = x_{n})$ and
$$\mathcal{A}_{k}\models\psi_{k}$$
holds for all the values of $k = 1,\ldots, n$ with the domains of the structures $\mathcal{A}_{k}$ expanded accordingly up to $\{a_{1},\ldots a_{n}\}$.
Let us obtain a formula $\phi$ from $\psi_{n}$ by eliminating existential quantifiers and quantifier implication:
$$\forall x(x = a_{1}\vee\ldots\vee x = a_{n})$$
then
$$\exists x(x = a_{1}\vee\ldots\vee x = a_{n})$$
since by the basis clause we have a non-empty domain and by the inductive hypothesis we have the domain consisting of $\{a_{1},\ldots ,a_{n}\}$.
For $\phi$, $\mathcal{A}_{n}\models\phi$ as well. We can add a new constant $a_{n+1}$ to the domain of $\mathcal{A}_{n}$ and expand it to $\mathcal{A}_{n+1}$. Thus, we have
$$\mathcal{A}_{n+1}\models\phi\vee \exists x(x = a_{n+1})$$
Then, for $\psi_{n+1}$ as $\exists x_{n+1}\ldots\exists x_{1}\forall x(x = x_{1}\vee\ldots\vee x = x_{n+1})$, we can write
$$\mathcal{A}_{n+1}\models\phi\vee\exists x(x = a_{n+1})\leftrightarrow\psi_{n+1}$$
Hence, $\mathcal{A}_{n+1}\models\psi_{n+1}$.
