TorchLean API

NN.Widgets.Core.Docs

Docs #

Small helpers for surfacing docstrings in the InfoView.

This is available through the widget entrypoint (import NN.Widgets) or directly as import NN.Widgets.Core.Docs, since it depends on ProofWidgets.

Commands:

Tip: if you already have an identifier in the InfoView (e.g. under “Expected type”), you can also hover it to see its type + docstring. InfoView hover tooltips can be toggled in VS Code under Lean 4 > Infoview: Show Tooltip On Hover.

Main definitions #

Monospaced block that wraps long lines instead of scrolling, for signatures and docstrings.

Instances For

    One declaration rendered as a card: name, type, and docstring, themed to the editor.

    Instances For

      Return the head constant name of an application, if one exists.

      Instances For

        Normalize optional docs into user-facing text.

        Instances For

          Pretty-print a declaration type using Lean's normal pretty-printer.

          Instances For

            Resolve an input term to a declaration name for doc lookup.

            Instances For

              Commands #