I'm trying to write a proof to show that a tree structure of finite nodes terminate.
Suppose we can say that either a node is a parent of another node ($Pqp$: $q$ is the parent of $p$), or it is a terminal node ($Tp$: $p$ does not have a parent).
- $\forall_p \space Tp \otimes \exists_q Pqp$
Every node that has a parent only has one parent.
- $\forall_{pqr} \space (Pqp \space \land \space Prp) \rightarrow q=r$
We say that if node $q$ comes before node $p$ ($Bqp$), then any node that comes before $q$ also comes before $p$. Additionally, we deny that $p$ comes before $q$. This avoids cyclical chains.
- $\forall_{pqr} \space Bqp \rightarrow ((Brq \rightarrow Brp) \space \land \space \lnot Bpq)$
Any node that is the parent of a nother node must also come before it.
- $\forall_{pq} \space Ppq \rightarrow Bpq$
Suppose we know that at least one node exists.
- $\exists p$
I want to conclude that there must be a terminal node $\therefore \exists_p \space Tp$ however, one can always find a counter-example using premise 1 in that $p$ has a parent -- resulting in an infinite regress.
(tl;dr)
So my struggle is, I want to formalise the assumption that there are finite nodes. In all of the definitions of a finite set that I've seen, you need to specify some maximum N. In this case, I want to be intentionally vague about it -- only claiming that it's finite; not how it's finite.
An idea I had was to assume that the domain of discourse is positive integers with something like $N\in \mathbb{N_1}$ and $\forall_p \space p < N$ but something about this solution feels kind of hacky.
So is there a better way to do this and, if so what is it?
What you want to do cannot be formalised in first-order logic.
The Compactness theorem states this: if every finite subset of axioms of a first-order theory has a model, then the whole set has a model.
Let $A_n$ be the axiom "there are at least $n$ elements", which can be expressed in first order logic:
$$(\exists x_1)(\exists x_2)\cdots(\exists x_n)\lnot(x_1=x_2)\land\lnot(x_1=x_3)\land\ldots\land\lnot(x_{n-1}=x_n)$$
(there are $\binom{n}{2}$ terms in the conjunction). Let's suppose that you have found a first order theory $\Phi$ that axiomatises the class of all the finite trees. Then add to your theory finitely many of those axioms $A_n$ and it will have a model. (There are trees of any finite size.) Then the compactness theorem implies that there is a model of all of those axioms. That model satisfies $\Phi$ and has to be infinite. Thus $\Phi$ fails to capture "just the finite trees".
Once you depart from first-order theories, you need to specify which framework you will use. As a general advice, unless you are interested in set-theoretical or logical aspects of the story, it doesn't matter too much, why not just say "$X$ is finite"?