Documentation

FormalConjectures.Util.Answer

The answer( ) elaborator #

This file provides syntax for marking up answers in a problem statement.

Note: certain problems also providing an answer, and can be formalised using answer(sorry) as a placeholder. While providing a proof simply requires finding any way to replace := sorry, providing an answer is not just finding any way to replace answer(sorry): it requires evaluation of mathematical meaning, which is a job for human mathematicians, not Lean alone.

A type that captures the current setting for the answer() elaborator.

  • alwaysTrue : AnswerSetting

    Default mode: answer(sorry) defaults to True when sorry has type Prop.

  • postpone : AnswerSetting

    Default mode for answer(foo): just postpones elaboration.

  • withAuxiliary : AnswerSetting

    Elaborate answer(foo) by creating an auxiliary definition with value foo.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.
    def Google.elabTermAndAnnotate (stx : Lean.TSyntax `term) (expectedType? : Option Lean.Expr) (postpone : Bool := false) :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Indicates where the answer is in a problem statement.

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

        An answer: a term, and the context in which it was elaborated

        Instances For

          Print an answer

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

            Find answers by inspecting an InfoTree

            Equations
            Instances For