This package tries to spot patterns in a list. In this particular case, it tries to find whether the beginning of the list is repeating. This can be useful for repetition detection, for example.
It has variables to determine upper and lower bounds for the length of a repetition, how often it must repeat, and it has a variable to determine whether these repetitions must be consecutive or not. It’s a small pattern detector, I guess.
See the test cases at the end of the file to get an idea of how to use this. I am sure this can be optimized a lot.