User blog comment:SuperSpruce/Proposed fix to T array function to make it work past Gamma 0/@comment-36984051-20190623153224/@comment-35470197-20190626041933

Then I think that the algorithm does not correctly work, because there can be distinct ways to apply rules to a single expression. More precisely, there is no algorithm to determine # and % in Dimensional Array Rule and Catastrophic Rule, because they can be any strings.

For example, consider the expression which you wrote, i.e. [[[2],[0,0,1],0,2],0,0,1] . The scanning process does nothing, because the first entry 2 is immediate after [, which is immediate after [, …, which is immediate after nothing. Then Catastrophic Rule can be applied to [[[2],[0,0,1],0,2],0,0,1] for various ways.

For example, you can put

% = [[2],[0,

$ = empty

a = 1


 * 1) = ],0,2],0,0,1

and also

% = [[2],[0,0,1],

$ = empty

a = 2


 * 1) = ],0,0,1.