Documentation

Lean.LibrarySuggestions.SymbolFrequency

Symbol frequency #

This module provides a persistent environment extension for computing the frequency of symbols in the environment.

Collect the frequencies for constants occurring in declarations defined in the current module, skipping instance arguments and proofs.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Return the number of times a Name appears in the signatures of (non-internal) theorems in the current module, skipping instance arguments and proofs.

    Note that this is cached, and so returns the frequency within theorems that had been elaborated when the function is first called (with any argument).

    Equations
    Instances For
      def Lean.Environment.unsafeRunMetaM {α : Type} [Inhabited α] (env : Environment) (x : MetaM α) :
      α

      Helper function for running MetaM code during module export, when there is nothing but an Environment available. Panics on errors.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The symbol frequency map for imported constants. This is initialized on first use.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Return the number of times a Name appears in the signatures of (non-internal) theorems in the imported environment, skipping instance arguments and proofs.

          Equations
          Instances For