lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

fix: prepend underscore on autogenerated 'proof_{n}' constant names

Open dwrensha opened this issue 2 years ago • 0 comments

Mathlib's library_search is frequently picking up constants named proof_1, preventing it from finding more appropriate lemmas. I opened a PR there to work around the problem (https://github.com/leanprover-community/mathlib4/pull/2349), but it risks wrongly ignoring user-written lemmas whose names happen to start with the prefix proof_. It would be much cleaner if core Lean 4 gave us a way to know exactly which constants to ignore.

This PR proposes to achieve that by prepending an underscore to the generated proof_{n} constants, allowing them to be detected by the existing Lean.Name.isInternal function.

dwrensha avatar Feb 17 '23 18:02 dwrensha