This file contains a collection definitions and theorems about lists that are not part of Lean's standard library. At least when initially writing some of these, suitable variants did not exist or I simply did not find them.
Some cleanup is certainly needed here.
If two lists resulting from append calls are equal and the second components have the same length, then the first components also have the same length.
Mapping over list produces the same list if the mapping function maps each list member to itself. Note that this is very close to List.map_id''
but that List.map_id'' has a stronger assumption. Namely it requires the function to be the id not only on list elements but on every representant of the element type.
A list that is longer than a list without duplicates but only contains the same elements must have a duplicate.
The index of an element that we get from given index is exactly this index. Note that this uses DecidableEq.