This PR adds more MPL spec lemmas for all combinations of `for` loops, `fold(M)` and the `filter(M)/filterMap(M)/map(M)` iterator combinators. These kinds of loops over these combinators (e.g. `it.mapM`) are first transformed into loops over their base iterators (`it`), and if the base iterator is of type `Iter _` or `IterM Id _`, then another spec lemma exists for proving Hoare triples about it using an invariant and the underlying list (`it.toList`). The PR also fixes a bug that MPL always assigns the default priority to spec lemmas if `Std.Tactic.Do.Syntax` is not imported and a bug that low-priority lemmas are preferred about high-priority ones. For context, the MPL bug was related to the fact that the `Attr.spec` syntax is not built-in. Therefore, Lean falls back to the `Attr.simple` syntax, which *basically* also works, but which stores the priority at a different position. The routine to extract the priority does not consider this and so it falls back to the default priority given an `Attr.simple` syntax object. |
||
|---|---|---|
| .. | ||
| src | ||
| stdlib | ||