Zulip Chat Archive

Stream: lean4

Topic: Should autoparam helper decls be private?


Thomas Murrills (Dec 08 2025 at 19:03):

It was noticed in #mathlib4 > PrivateModule linter not firing @ 💬 that the autogenerated declarations for autoparams (created by docs#Lean.Elab.Term.declareTacticSyntax) don't respect scoping directly, i.e., they don't start with _private when they "should".

However, they do start with _auto and have macro scopes, so they are not accessible to the user.

Should they also be private per se when appropriate, or is this intended?

I'm basically asking for two reasons: (1) to attempt to be helpful, in case this was overlooked and affects builds somehow (2) to figure out what the right criterion for a "private declaration" really is re: that linter. :)

Kim Morrison (Dec 09 2025 at 21:29):

@Thomas Murrills, Sebastian is travelling at present, so may not see this message. Could you open a lean4 issue about this?

Thomas Murrills (Dec 09 2025 at 21:31):

Will do. :) By the way, do you think I should do so for #lean4 > Public recursor can reference private declaration? as well, or is that a known/expected phenomenon?

Thomas Murrills (Dec 09 2025 at 21:47):

lean4#11569

Kim Morrison (Dec 09 2025 at 22:26):

Thomas Murrills said:

Will do. :) By the way, do you think I should do so for #lean4 > Public recursor can reference private declaration? as well, or is that a known/expected phenomenon?

I think I've heard someone mention this issue before, but I can't find where, so I think we'll have to wait for Sebastian.

Michael Rothgang (Dec 10 2025 at 17:31):

@Sebastian Ullrich Thanks a lot for the prompt fix to lean4#11569! Will this change be in the upcoming Lean release (in < a week), or in the next version? Just to understand if adding a band-aid fix to mathlib is useful or not :-)

Sebastian Ullrich (Dec 10 2025 at 17:32):

upcoming RC!


Last updated: Dec 20 2025 at 21:32 UTC