Skip to content

Noisy proofs relying on loopholes in flexible-tactic linter #724

Open

Description

@loefflerd

LeanPool's policies require code to pass the mathlib standard linter set without warnings, including the "flexible tactic" linter. However, due to an oversight in mathlib, while simp counts as flexible, its variant simp? does not; and some LeanPool projects uses this to smuggle unreliable code past the linter (since the output of simp? is classed as info, not warning, and thus does not cause a CI fail). For example in
LeanPool/PolynomialMethodRestrictedSums/CompressedSizesRestrictedSum.lean we have

refine le_antisymm ?_ ?_ <;> simp_all? +decide [Finset.max']
· exact fun i hi => not_lt.1 fun contra => not_lt_of_ge (right i contra) hi
· exact ⟨j, left, le_rfl⟩

This produces an info message in CI; but deleting the question-mark on simp_all? produces a flexible-tactic warning. So this code should not have passed the quality gate.

I propose two fixes:

Activity

  1. grunweg commented on Oct 28, 2026

    @grunweg

    How about a third fix, preventing noisy files in CI at all? If I leave e.g. a #check in the code, that is not appropriate for polished code.

  2. loefflerd commented on Oct 28, 2026

    @loefflerd
    Author

    2. How about a third fix, preventing noisy files in CI at all? If I leave e.g. a #check in the code, that is not appropriate for polished code.

    Sounds good to me, but that is up to Vasily to decide, he's the boss around here 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions