The current solution for shifts is quite ad-hoc, it is more or less a level's-like approach to shifting but in an indices setting, which is weird.
Here I move to a more principled approach where a shift may be the actual shift or a lift, making so that shifts always have the following form M[↑by : depth] this allows to propagate shifts down by increasing the depth, while making them completely relative and not level dependent.
Also, for some reason it makes the tests 2.5x faster, combining shifts makes it improve a bit, but I'm not sure on why it increases that much.
Goals
More principled and easier to invert shifts.
Context
The current solution for shifts is quite ad-hoc, it is more or less a level's-like approach to shifting but in an indices setting, which is weird.
Here I move to a more principled approach where a shift may be the actual shift or a lift, making so that shifts always have the following form
M[↑by : depth]
this allows to propagate shifts down by increasing the depth, while making them completely relative and not level dependent.Also, for some reason it makes the tests 2.5x faster, combining shifts makes it improve a bit, but I'm not sure on why it increases that much.
Related
165