Documentation

Lean.Elab.PreDefinition.WF.TerminationHint

Support for termination_by notation #

A single termination_by clause

Instances For
    Equations
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[inline, reducible]

      A complete set of termination_by hints, as applicable to a single clique.

      Equations
      Instances For

        A single decreasing_by clause

        Instances For

          The termination annotations for a single function. For decreasing_by, we store the whole decreasing_by tacticSeq expression, as this is what Term.runTactic expects.

          • extraParams : Nat

            Here we record the number of parameters past the :. This is

            • GuessLex when there is no termination_by annotation, so that we can print the guessed order in the right form.
            • If there are fewer variables in the termination_by annotation than there are extra parameters, we know which parameters they should apply to.

            It it set in TerminationHints.checkVars, which is the place where we also check that the user does not bind more extra parameters than present in the predefinition.

          Instances For
            Equations
            Equations
            Instances For

              Logs warnings when the TerminationHints are present.

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

                Checks that termination_by binds at most as many variables are present in the outermost lambda of value, and logs (without failing) appropriate errors.

                Also remembers extraParams for later use.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Lean.Elab.WF.elabTerminationHints {m : TypeType} [Monad m] [Lean.MonadError m] (stx : Lean.TSyntax `Lean.Parser.Termination.suffix) :

                  Takes apart a Termination.suffix syntax object

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