perf: speed up `Expr.cleanupAnnotations` This PR speeds up `Expr.cleanupAnnotations`, which `match_expr` and `let_expr` call on the discriminant and after every argument they peel. It now inspects the root of the expression once, instead of applying `consumeMData` and `consumeTypeAnnotations` and comparing the result with `Expr.eqv` to detect a fixpoint. The PR also fixes the docstring examples of `cleanupAnnotations` and `consumeTypeAnnotations`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.