Pretty prints a list of arguments of a declaration. Assumes l is a list of argument positions
and binders (or any other element that can be pretty printed).
l can be obtained e.g. by applying list.indexes_values to a list obtained by
Tests whether type-class inference search will end quickly on certain unsolvable
type-class problems. This is to detect loops or very slow searches, which are problematic
(recall that normal type-class search often creates unsolvable subproblems, which have to fail
quickly for type-class inference to perform well.
We create these type-class problems by taking an instance, and removing the last hypothesis that
doesn't appear in the goal (or a later hypothesis). Note: this argument is necessarily an
instance-implicit argument if it passes the linter.incorrect_type_class_argument.
This tactic succeeds if mk_instance succeeds quickly or fails quickly with the error
message that it cannot find an instance. It fails if the tactic takes too long, or if any other
error message is raised (usually a maximum depth in the search).
Checks whether an instance contains a semireducible non-instance with a class as
type in its value. We add some restrictions to get not too many false positives:
We only consider classes with an add or mul field, since those classes are most likely to
occur as a field to another class, and be an extension of another class.
We only consider instances of type-valued classes and non-instances that are definitions.
We currently ignore declarations foo that have a foo._main declaration. We could look inside,
or at the generated equation lemmas, but it's unlikely that there are many problematic instances
defined using the equation compiler.