Documentation

Lean.Elab.DocString.Builtin

The code represents a global constant.

  • name : Name

    The constant's name.

Instances For

    The code represents a local variable.

    • name : Name

      The local variable's name.

    • fvarId : FVarId

      The local variable's ID.

    • The local variable's context.

    • type : Expr

      The local variable's type.

    Instances For

      The code represents a tactic.

      • name : Name

        The name of the tactic's syntax kind.

      Instances For

        The code represents a conv tactic.

        • name : Name

          The name of the tactic's syntax kind.

        Instances For

          The code represents an attribute application @[...].

          Instances For

            The code represents a single attribute.

            Instances For

              The code represents syntax to set an option.

              Instances For

                The code represents an option.

                • name : Name

                  The option's name.

                Instances For

                  The code represents an atom drawn from some syntax.

                  • name : Name

                    The syntax kind's name.

                  • category : Name

                    The syntax category

                  Instances For

                    The code represents a syntax category name.

                    • name : Name

                      The syntax category.

                    Instances For

                      The code represents syntax in a given category.

                      Instances For

                        Displays a name, without attempting to elaborate implicit arguments.

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

                          A reference to a tactic.

                          In {tactic}`T`, T can be any of the following:

                          • The name of a tactic syntax kind (e.g. Lean.Parser.Tactic.induction)
                          • The first token of a tactic (e.g. induction)
                          • Valid tactic syntax, potentially including antiquotations (e.g. intro $x*)
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            A reference to a conv tactic.

                            In {conv}`T`, T can be any of the following:

                            • The name of a conv tactic syntax kind (e.g. Lean.Parser.Tactic.Conv.lhs)
                            • Valid conv tactic syntax, potentially including antiquotations (e.g. lhs)
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              A reference to an attribute or attribute-application syntax.

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

                                A reference to an option.

                                In {option}`O`, O can be either:

                                • The name of an option (e.g. pp.all)
                                • Syntax to set an option to a particular value (e.g. set_option pp.all true)
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  A reference to a particular syntax kind, via one of its atoms.

                                  It is an error if the syntax kind can't be automatically determined to contain the atom, or if multiple syntax kinds contain it. If the parser for the syntax kind is sufficiently complex, detection may fail.

                                  Specifying the category or kind using the named arguments cat and of can narrow down the process.

                                  Use kw? to receive a suggestion of a specific kind.

                                  Equations
                                  Instances For

                                    A reference to a particular syntax kind, via one of its atoms.

                                    It is an error if the syntax kind can't be automatically determined to contain the atom, or if multiple syntax kinds contain it. If the parser for the syntax kind is sufficiently complex, detection may fail.

                                    Specifying the category or kind using the named arguments cat and of can narrow down the process.

                                    Use kw? to receive a suggestion of a specific kind.

                                    Equations
                                    Instances For

                                      A reference to a syntax category.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        def Lean.Doc.syntax (cat : Ident) (xs : TSyntaxArray `inline) :

                                        A description of syntax in the provided category.

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

                                          A metavariable to be discussed in the remainder of the docstring.

                                          There are two syntaxes that can be used:

                                          • {given}`x` establishes x's type as a metavariable.
                                          • {given}`x : A uses A as the type for metavariable x.
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            def Lean.Doc.lean (name : Option Ident := none) (error warning : flag false) (code : StrLit) :

                                            Elaborates a sequence of Lean commands as examples.

                                            To make examples self-contained, elaboration ignores the surrouncing section scopes. Modifications to the environment are preserved during a single documentation comment, and discarded afterwards.

                                            The named argument name allows a name to be assigned to the code block; any messages created by elaboration are saved under this name.

                                            The flags error and warning indicate that an error or warning is expected in the code.

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

                                              Displays output from a named Lean code block.

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

                                                Treats the provided term as Lean syntax in the documentation's scope.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  def Lean.Doc.open (n : Ident) («scoped» : flag false) (only : many Ident) :

                                                  Opens a namespace in the remainder of the documentation comment.

                                                  The +scoped flag causes scoped instances and attributes to be activated, but no identifiers are brought into scope. The named argument only, which can be repeated, specifies a subset of names to bring into scope from the namespace.

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

                                                    Sets the specified option to the specified value for the remainder of the comment.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      def Lean.Doc.manual (domain : Ident) (name : String) (content : TSyntaxArray `inline) :

                                                      Constructs a link to the Lean langauge reference. Two positional arguments are expected:

                                                      • domain should be one of the valid domains, such as section.
                                                      • name should be the content's canonical name in the domain.
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For

                                                        Suggests the name role, if applicable.

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

                                                          Suggests the lean role, if applicable.

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

                                                            Suggests the tactic role, if applicable.

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

                                                              Suggests the attr role, if applicable.

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

                                                                Suggests the option role, if applicable.

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

                                                                  Suggests the kw role, if applicable.

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

                                                                    Suggests the syntaxCat role, if applicable.

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

                                                                      Suggests the syntax role, if applicable.

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