Zulip Chat Archive

Stream: mathlib4

Topic: Heuristically searching for incorrect theorem names


Emilie (Shad Amethyst) (Feb 02 2024 at 14:43):

Following the issue spotted by @Enrico Borba, I tried to see if I could detect those kind of issues automatically, namely instances of a theorem name mentionning something that is neither in its arguments nor in its return type.
I first tried to parse the code manually, to extract a list of theorems and their arguments, but it turns out that we already have this, through https://leanprover-community.github.io/mathlib4_docs/ :)
My code is temporarily hosted here. You can also find the output of my code, though it is quite noisy because of the reasons listed below.

So, there are several things I uncovered that way:

Ruben Van de Velde (Feb 02 2024 at 14:48):

What's the issue with Complex.not_lt_zero_iff?

Emilie (Shad Amethyst) (Feb 02 2024 at 14:52):

Hmm, you're right, the order has a different meaning than what I thought

Kevin Buzzard (Feb 02 2024 at 15:36):

But most of these are great! Thanks a lot!

Enrico Borba (Feb 02 2024 at 16:02):

This looks like a fantastic effort!

Emilie (Shad Amethyst) said:

since types are erased in the docs, theorems like docs#AddCircle.norm_neg_period or docs#ZMod.isSquare_neg_one_mul visually look tautological

Autoparam erasure also makes theorems like docs#MeasureTheory.integrableOn_def harder to read, (I can't tell what measure Integrable f is over.


Last updated: May 02 2025 at 03:31 UTC