Skip to content

Autoparam helper decls are always public #11569

Closed

Description

@thorimur

The auxiliary declarations generated by Lean.Elab.Term.declareTacticSyntax to hold the Syntax of autoparams are never private per se, in the sense that they do not start with _private even when in private sections or declarations.

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

I am not yet sure if this is intentional or not, so I have not yet filed this as a bug. (If this issue acquires the bug label, I will remove this paragraph.)

Context

This was noticed when Mathlib's private module linter, which lints against modules that have no public declarations, failed to warn on a module with no obviously public declarations besides these autogenerated autoparam declarations which do not satisfy isPrivateName. (Zulip).

In particular, the question there is whether this is an oversight, or if the criteria we use for detecting private declarations ought to be expanded.

This has also been asked about on Zulip here.

Activity

  1. added a commit that references this issue on Dec 11, 2025
    a20e029
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