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: