Zulip Chat Archive
Stream: triage
Topic: issue !4#5463: Review all names with `'`
Random Issue Bot (Jan 15 2024 at 14:05):
Today I chose issue 5463 for discussion!
Review all names with '
Created by @Yury G. Kudryashov (@urkud) on 2023-06-24
Labels:
Is this issue still relevant? Any recent updates? Anyone making progress?
Kim Morrison (Jan 16 2024 at 00:34):
I commented on the issue with the list of all primed names (over 7000!) and the code to produce the list.
Presumably it will require a more targeted approach to make progress here.
Kim Morrison (Jan 16 2024 at 00:34):
I hope that we might aspire to one day not having primed names, but I'm not sure how we would ever get there.
Yury G. Kudryashov (Jan 16 2024 at 00:37):
How do I restrict the list to the definitions and lemmas defined in Mathlib
, not its dependencies?
Kim Morrison (Jan 16 2024 at 00:51):
import Mathlib
open Lean
def primedNames : CoreM (Array Name) := do
let env ← getEnv
let mut r := #[]
for (n, _) in env.constants.map₁.toList do
if let some m := env.getModuleFor? n then
if m.components.head! = `Mathlib then
if n.toString.endsWith "'" then r := r.push n
return r
run_meta do for n in ← primedNames do IO.println n
Kim Morrison (Jan 16 2024 at 00:53):
(Although arguably going via Environment.moduleData
would be more efficient. For a small library like Mathlib the above code is no problem, however. :-)
Yury G. Kudryashov (Jan 16 2024 at 00:54):
Thank you!
Random Issue Bot (Jan 05 2025 at 14:12):
Today I chose issue 5463 for discussion!
Review all names with '
Created by @Yury G. Kudryashov (@urkud) on 2023-06-24
Labels:
Is this issue still relevant? Any recent updates? Anyone making progress?
Violeta Hernández (Jan 22 2025 at 23:47):
Relevant, but slowly getting better.
Last updated: May 02 2025 at 03:31 UTC