What I did with a given input essentially was to find it on the Stern-Brocot tree, making note of the sequence of turns. I then reversed this sequence, and used that to traverse the tree to get the output.
To traverse the Stern-Brocot tree easily, you need to have a left and right 'ancestor' and their 'descendant', which is their mediant. It is possible to calculate the ancestors from the descendant, but it's much easier to just keep track of the ancestors. To go 'left' on the tree, the mediant of the left ancestor and the descendant becomes the new descendant, and the old descendant becomes the right ancestor. To go to the right the process is analogous.
By convention, the left ancestor is taken as smaller than the right. It is more convenient, however, for this proof to reverse this convention.
Since all iterated descendants of two given ancestors are between them, to capture all positive rationals we need to start with 1/0 as the left ancestor and 0/1 as the right ancestor. Also, it will be helpful to keep track of the numerators and denominators of the ancestors in matrix form(numerator on top). Thus the starting point of the tree is:
The following matrices then represent going left and right on the tree respectively, if we multiply them in on the right:
Note all the previous matrices have determinant 1, therefore so does the matrix of any path down the tree. Also, the elements of each path matrix are all integers.
The crux of the proof comes down to two lemmas.
Lemma 1:
From path matrix M get M' by path reversal. Then M' is the 'anti-transpose' on M where m'ij = m(n-j+1)(n-i+1), assuming 1-indexing.
This can be proven by induction.
Lemma 2:
Given a 2x2 matrix A, let s be the sum of all elements and ri, kj represent row and column sums respectively. The following equation holds:
rikj = aijs - det(A)*(-1^(ij))
This can be proven directly.
These two lemmas along with some facts we observed earlier, immediately imply that implosion's method is equivalent to to the path reversal method.