This is a rather straightforward proof. We rely heavily on the fact that the prefix is an ECF and the ECF is defined by a reduced trajectory, and all reduced trajectories terminate with an odd number.
Let us begin by considering a parent node n with prefix {p0β,p1β,β¦,pmβ}. The corresponding ICF is as follows:
Now, suppose that this parent node has good nature π’, denote the number at left and right children as gLβ and gRβ respectively. The resulting ICFs are:
Note that in both bad and good cases, we have the expression prβ+1βpmβ; this is always a positive integer as pmββ€prβ by definition of how prefixes change within the PIPTree.
There is a cute relationship between children:
bRβ²β=2prβ+1βpmβ3bLβ²β+1ββ3m+1
gLβ²β=2prβ+1βpmβ3gRβ²β+1β+3m+1
Even or Odd
We have defined ECFs over reduced trajectories only, so prefixes should also correspond to trajectories with odd terminating numbers. As such, gLβ²β,gRβ²β and bLβ²β,bRβ²β should be odd numbers, if the parent is good or bad respectively.
Note that nmβ is a terminating number too, and must be odd by definition. With this, we can observe that bLβ²β and gRβ²β are always odd!
Now, notice that gLβ²β=3m+1+bRβ²β. So, if bRβ²β is odd then gLβ²β is even, or if bRβ²β is even then gLβ²β is odd. This means that if bRβ²β is odd, the node has bad nature; or if bRβ²β is even, the node has good nature.
All we now care about is whether the following expression is even or odd:
2prβ+1βpmβ3nmβ+1β
If you look carefully, this is as if we are doing a reduced Collatz operationR. In fact, our node n with prefix {p0β,p1β,β¦,pmβ} corresponded to the trajectory:
That is it! Check if bRβ²β is odd, and if it is, the node is bad; otherwise good.
Invariance
The nature of a node at some index i is always the same, regardless of the size of PIPTree; it is an invariant. How is that possible if we calculated the nature via number and prefix, which is changing?
To see why, consider the effects of going from PIPTree of k to PIPTree of k+1.
Although the number and prefix changed for the node in PIPTree, the terminating number did not change. Nature calculation relies on the terminating number, the root prefix prβ and pmβ for a given node. Well, prβ and pmβ both increased by 1, so their change canceled out too! As a result, the nature of a node does not change with respect to PIPTree size.
The root node is always good. The number is n=2prβ with prefix {prβ}. As such, the terminating number of this trajectory is 1 (i.e. nmβ=1). So: