Documentation

Init.Meta.Defs

Instances For
    Instances For
      Instances For
        @[extern lean_get_githash]
        Instances For
          @[extern lean_version_get_is_release]
          @[extern lean_version_get_special_desc]

          Additional version description like "nightly-2018-03-11"

          Instances For
            Instances For
              @[extern lean_internal_is_stage0]
              @[extern lean_internal_has_llvm_backend]

              This function can be used to detect whether the compiler has support for generating LLVM instead of C. It is used by lake instead of the --features flag in order to avoid having to run a compiler for this every time on startup. See #2572.

              @[inline]

              Valid identifier names

              Instances For
                Instances For
                  @[inline]
                  Instances For
                    Instances For
                      @[inline]
                      Instances For
                        @[inline]
                        Instances For
                          @[inline]
                          Instances For
                            @[inline]
                            Instances For
                              Instances For
                                Instances For
                                  @[inline]
                                  Instances For
                                    @[inline]
                                    Instances For
                                      Instances For
                                        @[export lean_is_inaccessible_user_name]
                                        Instances For

                                          Here we give a private implementation of Name.toString. The real implementation is in Init.Data.ToString.Name, which we cannot import here due to import hierarchy limitations.

                                          The difference between the two versions is that this one uses the String.Internal.* functions, while the one in Init.Data.ToString.Name uses the public String functions. These differ in that the latter versions have better inferred borrowing annotations, which is significant for an inner-loop function like Name.toString.

                                          Instances For
                                            @[implicit_reducible]
                                            Instances For
                                              Instances For

                                                eraseSuffix? n s return n' if n is of the form n == n' ++ s.

                                                Instances For
                                                  @[inline]
                                                  def Lean.Name.modifyBase (n : Name) (f : NameName) :

                                                  Remove macros scopes, apply f, and put them back

                                                  Instances For
                                                    @[export lean_name_append_after]
                                                    def Lean.Name.appendAfter (n : Name) (suffix : String) :
                                                    Instances For
                                                      @[export lean_name_append_index_after]
                                                      Instances For
                                                        @[export lean_name_append_before]
                                                        Instances For
                                                          theorem Lean.Name.beq_iff_eq {m n : Name} :
                                                          (m == n) = true m = n
                                                          @[implicit_reducible]
                                                          @[inline]
                                                          Instances For
                                                            Instances

                                                              Creates a globally unique Name, without any semantic interpretation. The names are not intended to be user-visible. With the default name generator, names use _uniq as a base and have a numeric suffix.

                                                              This is used for example by Lean.mkFreshFVarId, Lean.mkFreshMVarId, and Lean.mkFreshLMVarId. To create fresh user-visible identifiers, use functions such as Lean.Core.mkFreshUserName instead.

                                                              Instances For
                                                                @[implicit_reducible]
                                                                @[implicit_reducible]
                                                                @[implicit_reducible]
                                                                @[reducible, inline]

                                                                Syntax that represents a Lean term.

                                                                Instances For
                                                                  @[reducible, inline]

                                                                  Syntax that represents a command.

                                                                  Instances For
                                                                    @[reducible, inline]

                                                                    Syntax that represents a universe level.

                                                                    Instances For
                                                                      @[reducible, inline]

                                                                      Syntax that represents a tactic.

                                                                      Instances For
                                                                        @[reducible, inline]

                                                                        Syntax that represents a precedence (e.g. for an operator).

                                                                        Instances For
                                                                          @[reducible, inline]

                                                                          Syntax that represents a priority (e.g. for an instance declaration).

                                                                          Instances For
                                                                            @[reducible, inline]

                                                                            Syntax that represents an identifier.

                                                                            Instances For
                                                                              @[reducible, inline]

                                                                              Syntax that represents a string literal.

                                                                              Instances For
                                                                                @[reducible, inline]

                                                                                Syntax that represents a character literal.

                                                                                Instances For
                                                                                  @[reducible, inline]

                                                                                  Syntax that represents a quoted name literal that begins with a back-tick.

                                                                                  Instances For
                                                                                    @[reducible, inline]

                                                                                    Syntax that represents a scientific numeric literal that may have decimal and exponential parts.

                                                                                    Instances For
                                                                                      @[reducible, inline]

                                                                                      Syntax that represents a numeric literal.

                                                                                      Instances For
                                                                                        @[reducible, inline]

                                                                                        Syntax that represents macro hygiene info.

                                                                                        Instances For
                                                                                          @[reducible, inline]

                                                                                          Syntax that represent a hexadecimal number without the 0x prefix.

                                                                                          Instances For
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            @[implicit_reducible]
                                                                                            Instances For
                                                                                              @[implicit_reducible]
                                                                                              partial def Lean.Syntax.structEq :

                                                                                              Compare syntax structures modulo source info.

                                                                                              @[implicit_reducible]
                                                                                              @[implicit_reducible]

                                                                                              Finds the first SourceInfo from the back of stx or none if no SourceInfo can be found.

                                                                                              Finds the first SourceInfo from the back of stx or SourceInfo.none if no SourceInfo can be found.

                                                                                              Instances For

                                                                                                Finds the trailing size of the first SourceInfo from the back of stx. If no SourceInfo can be found or the first SourceInfo from the back of stx contains no trailing whitespace, the result is 0.

                                                                                                Instances For

                                                                                                  Finds the trailing whitespace substring of the first SourceInfo from the back of stx. If no SourceInfo can be found or the first SourceInfo from the back of stx contains no trailing whitespace, the result is none.

                                                                                                  Instances For

                                                                                                    Finds the tail position of the trailing whitespace of the first SourceInfo from the back of stx. If no SourceInfo can be found or the first SourceInfo from the back of stx contains no trailing whitespace and lacks a tail position, the result is none.

                                                                                                    Instances For
                                                                                                      def Lean.Syntax.getSubstring? (stx : Syntax) (withLeading withTrailing : Bool := true) :

                                                                                                      Return substring of original input covering stx. Result is meaningful only if all involved SourceInfo.originals refer to the same string (as is the case after parsing).

                                                                                                      Instances For
                                                                                                        Instances For

                                                                                                          Replaces the trailing whitespace in stx, if any, with an empty substring.

                                                                                                          The trailing substring's startPos and str are preserved in order to ensure that the result could have been produced by the parser, in case any syntax consumers rely on such an assumption.

                                                                                                          Instances For
                                                                                                            Instances For
                                                                                                              Instances For

                                                                                                                Return the first atom/identifier that has position information

                                                                                                                Instances For

                                                                                                                  Ensure head position is synthetic. The server regards syntax as "original" only if both head and tail info are original.

                                                                                                                  Instances For
                                                                                                                    @[inline]
                                                                                                                    def Lean.withHeadRefOnly {m : TypeType} [Monad m] [MonadRef m] {α : Type} (x : m α) :
                                                                                                                    m α

                                                                                                                    Use the head atom/identifier of the current ref as the ref

                                                                                                                    Instances For
                                                                                                                      partial def Lean.expandMacros (stx : Syntax) (p : SyntaxNodeKindBool := fun (k : SyntaxNodeKind) => k != `Lean.Parser.Term.byTactic) :

                                                                                                                      Expand macros in the given syntax. A node with kind k is visited only if p k is true.

                                                                                                                      Note that the default value for p returns false for by ... nodes. This is a "hack". The tactic framework abuses the macro system to implement extensible tactics. For example, one can define

                                                                                                                      syntax "my_trivial" : tactic -- extensible tactic
                                                                                                                      
                                                                                                                      macro_rules | `(tactic| my_trivial) => `(tactic| decide)
                                                                                                                      macro_rules | `(tactic| my_trivial) => `(tactic| assumption)
                                                                                                                      

                                                                                                                      When the tactic evaluator finds the tactic my_trivial, it tries to evaluate the macro_rule expansions until one "works", i.e., the macro expansion is evaluated without producing an exception. We say this solution is a bit hackish because the term elaborator may invoke expandMacros with (p := fun _ => true), and expand the tactic macros as just macros. In the example above, my_trivial would be replaced with assumption, decide would not be tried if assumption fails at tactic evaluation time.

                                                                                                                      We are considering two possible solutions for this issue: 1- A proper extensible tactic feature that does not rely on the macro system.

                                                                                                                      2- Typed macros that know the syntax categories they're working in. Then, we would be able to select which syntactic categories are expanded by expandMacros.

                                                                                                                      Helper functions for processing Syntax programmatically #

                                                                                                                      def Lean.mkIdentFrom (src : Syntax) (val : Name) (canonical : Bool := false) :

                                                                                                                      Creates an identifier with its position copied from src.

                                                                                                                      To refer to a specific constant without a risk of variable capture, use mkCIdentFrom instead.

                                                                                                                      Instances For
                                                                                                                        def Lean.mkIdentFromRef {m : TypeType} [Monad m] [MonadRef m] (val : Name) (canonical : Bool := false) :

                                                                                                                        Creates an identifier with its position copied from the syntax returned by getRef.

                                                                                                                        To refer to a specific constant without a risk of variable capture, use mkCIdentFromRef instead.

                                                                                                                        Instances For
                                                                                                                          def Lean.mkCIdentFrom (src : Syntax) (c : Name) (canonical : Bool := false) :

                                                                                                                          Creates an identifier referring to a constant c. The identifier's position is copied from src.

                                                                                                                          This variant of mkIdentFrom makes sure that the identifier cannot accidentally be captured.

                                                                                                                          Instances For
                                                                                                                            def Lean.mkCIdentFromRef {m : TypeType} [Monad m] [MonadRef m] (c : Name) (canonical : Bool := false) :

                                                                                                                            Creates an identifier referring to a constant c. The identifier's position is copied from the syntax returned by getRef.

                                                                                                                            This variant of mkIdentFrom makes sure that the identifier cannot accidentally be captured.

                                                                                                                            Instances For

                                                                                                                              Creates an identifier that refers to a constant c. The identifier has no source position.

                                                                                                                              This variant of mkIdent makes sure that the identifier cannot accidentally be captured.

                                                                                                                              Instances For
                                                                                                                                @[export lean_mk_syntax_ident]
                                                                                                                                def Lean.mkIdent (val : Name) :

                                                                                                                                Creates an identifier from a name. The resulting identifier has no source position.

                                                                                                                                Instances For
                                                                                                                                  @[inline]

                                                                                                                                  Creates a group node, as if it were parsed by Lean.Parser.group.

                                                                                                                                  Instances For

                                                                                                                                    Creates an array of syntax, separated by sep.

                                                                                                                                    Instances For

                                                                                                                                      Creates an optional node.

                                                                                                                                      Optional nodes consist of null nodes that contain either zero or one element.

                                                                                                                                      Instances For
                                                                                                                                        def Lean.mkHole (ref : Syntax) (canonical : Bool := false) :

                                                                                                                                        Creates a hole (_). The hole's position is copied from ref.

                                                                                                                                        Instances For

                                                                                                                                          Creates the syntax of a separated array of items. sep is inserted between each item from a, and the result is wrapped in a null node.

                                                                                                                                          Instances For

                                                                                                                                            Constructs a typed separated array from elements by adding suitable separators. The provided array should not include the separators.

                                                                                                                                            Like Syntax.TSepArray.ofElems but for untyped syntax.

                                                                                                                                            Instances For
                                                                                                                                              def Lean.Syntax.SepArray.ofElemsUsingRef {m : TypeType} [Monad m] [MonadRef m] {sep : String} (elems : Array Syntax) :
                                                                                                                                              m (SepArray sep)

                                                                                                                                              Constructs a typed separated array from elements by adding suitable separators. The provided array should not include the separators. The generated separators' source location is that of the syntax returned by getRef.

                                                                                                                                              Instances For
                                                                                                                                                @[implicit_reducible]

                                                                                                                                                Constructs a typed separated array from elements by adding suitable separators. The provided array should not include the separators.

                                                                                                                                                Like Syntax.SepArray.ofElems but for typed syntax.

                                                                                                                                                Instances For
                                                                                                                                                  @[implicit_reducible]
                                                                                                                                                  def Lean.Syntax.mkApp (fn : Term) (args : TSyntaxArray `term) :

                                                                                                                                                  Creates syntax representing a Lean term application, but avoids degenerate empty applications.

                                                                                                                                                  Instances For
                                                                                                                                                    def Lean.Syntax.mkCApp (fn : Name) (args : TSyntaxArray `term) :

                                                                                                                                                    Creates syntax representing a Lean constant application, but avoids degenerate empty applications.

                                                                                                                                                    Instances For

                                                                                                                                                      Creates a literal of the given kind. It is the caller's responsibility to ensure that the provided literal is a valid atom for the provided kind.

                                                                                                                                                      If info is provided, then the literal's source information is copied from it.

                                                                                                                                                      Instances For

                                                                                                                                                        Creates literal syntax for the given character.

                                                                                                                                                        If info is provided, then the literal's source information is copied from it.

                                                                                                                                                        Instances For

                                                                                                                                                          Creates literal syntax for the given string.

                                                                                                                                                          If info is provided, then the literal's source information is copied from it.

                                                                                                                                                          Instances For

                                                                                                                                                            Creates literal syntax for a number, which is provided as a string. The caller must ensure that the string is a valid token for the num token parser.

                                                                                                                                                            If info is provided, then the literal's source information is copied from it.

                                                                                                                                                            Instances For

                                                                                                                                                              Creates literal syntax for a natural number.

                                                                                                                                                              If info is provided, then the literal's source information is copied from it.

                                                                                                                                                              Instances For

                                                                                                                                                                Creates literal syntax for a number in scientific notation. The caller must ensure that the provided string is a valid scientific notation literal.

                                                                                                                                                                If info is provided, then the literal's source information is copied from it.

                                                                                                                                                                Instances For

                                                                                                                                                                  Creates literal syntax for a name. The caller must ensure that the provided string is a valid name literal.

                                                                                                                                                                  If info is provided, then the literal's source information is copied from it.

                                                                                                                                                                  Instances For

                                                                                                                                                                    Recall that we don't have special Syntax constructors for storing numeric and string atoms. The idea is to have an extensible approach where embedded DSLs may have new kind of atoms and/or different ways of representing them. So, our atoms contain just the parsed string. The main Lean parser uses the kind numLitKind for storing natural numbers that can be encoded in binary, octal, decimal and hexadecimal format. isNatLit implements a "decoder" for Syntax objects representing these numerals.

                                                                                                                                                                    Instances For

                                                                                                                                                                      Decodes a 'scientific number' string which is consumed by the OfScientific class. Takes as input a string such as 123, 123.456e7 and returns a triple (n, sign, e) with value given by n * 10^-e if sign else n * 10^e.

                                                                                                                                                                      Instances For
                                                                                                                                                                        Instances For

                                                                                                                                                                          Decodes a valid string gap after the \. Note that this function matches "\" whitespace+ rather than the more restrictive "\" newline whitespace* since this simplifies the implementation. Justification: this does not overlap with any other sequences beginning with \.

                                                                                                                                                                          Instances For

                                                                                                                                                                            Takes a raw string literal, counts the number of #'s after the r, and interprets it as a string. The position i should start at 1, which is the character after the leading r. The algorithm is simple: we are given r##...#"...string..."##...# with zero or more #s. By counting the number of leading #'s, we can extract the ...string....

                                                                                                                                                                            Takes the string literal lexical syntax parsed by the parser and interprets it as a string. This is where escape sequences are processed for example. The string s is either a plain string literal or a raw string literal.

                                                                                                                                                                            If it returns none then the string literal is ill-formed, which indicates a bug in the parser. The function is not required to return none if the string literal is ill-formed.

                                                                                                                                                                            Instances For

                                                                                                                                                                              If the provided Syntax is a string literal, returns the string it represents.

                                                                                                                                                                              Even if the Syntax is a str node, the function may return none if its internally ill-formed. The parser should always create well-formed str nodes.

                                                                                                                                                                              Instances For

                                                                                                                                                                                Split a name literal (without the backtick) into its dot-separated components. For example, foo.bla.«bo.o»["foo", "bla", "«bo.o»"]. If the literal cannot be parsed, return [].

                                                                                                                                                                                Instances For

                                                                                                                                                                                  Converts a substring to the Lean compiler's representation of names. The resulting name is hierarchical, and the string is split at the dots ('.').

                                                                                                                                                                                  "a.b".toRawSubstring.toName is the name a.b, not «a.b». For the latter, use Name.mkSimple ∘ Substring.Raw.toString. -- TODO: deprecate old name

                                                                                                                                                                                  Instances For

                                                                                                                                                                                    Converts a string to the Lean compiler's representation of names. The resulting name is hierarchical, and the string is split at the dots ('.').

                                                                                                                                                                                    "a.b".toName is the name a.b, not «a.b». For the latter, use Name.mkSimple.

                                                                                                                                                                                    Instances For
                                                                                                                                                                                      Instances For
                                                                                                                                                                                        Instances For
                                                                                                                                                                                          Instances For
                                                                                                                                                                                            Instances For
                                                                                                                                                                                              Instances For

                                                                                                                                                                                                Interprets a numeric literal as a natural number.

                                                                                                                                                                                                Returns 0 if the syntax is malformed.

                                                                                                                                                                                                Instances For

                                                                                                                                                                                                  Returns the value of the hexadecimal numeral as a natural number.

                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                    Returns the number of hexadecimal digits.

                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                      Extracts the parsed name from the syntax of an identifier.

                                                                                                                                                                                                      Returns Name.anonymous if the syntax is malformed.

                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                        Extracts the components of a scientific numeric literal.

                                                                                                                                                                                                        Returns a triple (n, sign, e) : Nat × Bool × Nat; the number's value is given by:

                                                                                                                                                                                                        if sign then n * 10 ^ (-e) else n * 10 ^ e
                                                                                                                                                                                                        

                                                                                                                                                                                                        Returns (0, false, 0) if the syntax is malformed.

                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                          Decodes a string literal, removing quotation marks and unescaping escaped characters.

                                                                                                                                                                                                          Returns "" if the syntax is malformed.

                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                            Decodes a character literal.

                                                                                                                                                                                                            Returns (default : Char) if the syntax is malformed.

                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                              Decodes a quoted name literal, returning the name.

                                                                                                                                                                                                              Returns Lean.Name.anonymous if the syntax is malformed.

                                                                                                                                                                                                              Instances For

                                                                                                                                                                                                                Decodes macro hygiene information.

                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                  def Lean.HygieneInfo.mkIdent (s : HygieneInfo) (val : Name) (canonical : Bool := false) :
                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                    class Lean.Quote (α : Type) (k : SyntaxNodeKind := `term) :

                                                                                                                                                                                                                    Converts a runtime value into surface syntax that denotes it.

                                                                                                                                                                                                                    Instances do not need to guarantee that the resulting syntax will always re-elaborate into an equivalent value. For example, the syntax may omit implicit arguments that can usually be found automatically.

                                                                                                                                                                                                                    • quote : αTSyntax k

                                                                                                                                                                                                                      Returns syntax for the given value.

                                                                                                                                                                                                                    Instances
                                                                                                                                                                                                                      @[implicit_reducible]
                                                                                                                                                                                                                      @[implicit_reducible]
                                                                                                                                                                                                                      @[implicit_reducible]
                                                                                                                                                                                                                      @[implicit_reducible]
                                                                                                                                                                                                                      @[implicit_reducible]
                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                        @[implicit_reducible]
                                                                                                                                                                                                                        @[implicit_reducible]
                                                                                                                                                                                                                        instance Lean.instQuoteProdMkStr1 {α β : Type} [Quote α] [Quote β] :
                                                                                                                                                                                                                        Quote (α × β)
                                                                                                                                                                                                                        @[implicit_reducible]
                                                                                                                                                                                                                        instance Lean.instQuoteListMkStr1 {α : Type} [Quote α] :
                                                                                                                                                                                                                        Quote (List α)
                                                                                                                                                                                                                        @[implicit_reducible]
                                                                                                                                                                                                                        instance Lean.instQuoteArrayMkStr1 {α : Type} [Quote α] :
                                                                                                                                                                                                                        @[implicit_reducible]
                                                                                                                                                                                                                        instance Lean.Option.hasQuote {α : Type} [Quote α] :

                                                                                                                                                                                                                        Evaluator for prec DSL

                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                          Evaluator for prio DSL

                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                              @[reducible, inline]
                                                                                                                                                                                                                              abbrev Array.getSepElems {α : Type u_1} (as : Array α) :
                                                                                                                                                                                                                              Instances For

                                                                                                                                                                                                                                Filters an array of syntax, treating every other element as a separator rather than an element to test with the monadic predicate p. The resulting array contains the tested elements for which p returns true, separated by the corresponding separator elements.

                                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                                  Filters an array of syntax, treating every other element as a separator rather than an element to test with the predicate p. The resulting array contains the tested elements for which p returns true, separated by the corresponding separator elements.

                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                                                      Extracts the non-separator elements of a separated array.

                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                        Extracts the non-separator elements of a separated array.

                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                          def Lean.Syntax.TSepArray.push {k : SyntaxNodeKinds} {sep : String} (sa : TSepArray k sep) (e : TSyntax k) :
                                                                                                                                                                                                                                          TSepArray k sep

                                                                                                                                                                                                                                          Adds an element to the end of a separated array, adding a separator as needed.

                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                            @[implicit_reducible]
                                                                                                                                                                                                                                            @[implicit_reducible]
                                                                                                                                                                                                                                            @[implicit_reducible]

                                                                                                                                                                                                                                            Helper functions for manipulating interpolated strings #

                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                              def Lean.TSyntax.expandInterpolatedStr (interpStr : TSyntax interpolatedStrKind) (type ofInterpFn : Term) (ofLitFn : Term := ofInterpFn) :

                                                                                                                                                                                                                                              Expand interpStr into a term of type type (which supports ++), calling ofInterpFn on terms within {}, and ofLitFn on the literals between the interpolations.

                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                def Lean.TSyntax.getDocString (stx : TSyntax `Lean.Parser.Command.docComment) :
                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                  @[implicit_reducible]
                                                                                                                                                                                                                                                  @[implicit_reducible]

                                                                                                                                                                                                                                                  Controls which new mvars are turned in to goals by the apply tactic.

                                                                                                                                                                                                                                                  • nonDependentFirst mvars that don't depend on other goals appear first in the goal list.
                                                                                                                                                                                                                                                  • nonDependentOnly only mvars that don't depend on other goals are added to goal list.
                                                                                                                                                                                                                                                  • all all unassigned mvars are added to the goal list.
                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                    Configures the behaviour of the apply tactic.

                                                                                                                                                                                                                                                    • newGoals : ApplyNewGoals
                                                                                                                                                                                                                                                    • synthAssignedInstances : Bool

                                                                                                                                                                                                                                                      If synthAssignedInstances is true, then apply will synthesize instance implicit arguments even if they have assigned by isDefEq, and then check whether the synthesized value matches the one inferred. The congr tactic sets this flag to false.

                                                                                                                                                                                                                                                    • allowSynthFailures : Bool

                                                                                                                                                                                                                                                      If allowSynthFailures is true, then apply will return instance implicit arguments for which typeclass search failed as new goals.

                                                                                                                                                                                                                                                    • approx : Bool

                                                                                                                                                                                                                                                      If approx := true, then we turn on isDefEq approximations. That is, we use the approxDefEq combinator.

                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                      @[reducible, inline]

                                                                                                                                                                                                                                                      Controls which new mvars are turned in to goals by the apply tactic.

                                                                                                                                                                                                                                                      • nonDependentFirst mvars that don't depend on other goals appear first in the goal list.
                                                                                                                                                                                                                                                      • nonDependentOnly only mvars that don't depend on other goals are added to goal list.
                                                                                                                                                                                                                                                      • all all unassigned mvars are added to the goal list.
                                                                                                                                                                                                                                                      Instances For

                                                                                                                                                                                                                                                        Configures the behavior of the rewrite and rw tactics.

                                                                                                                                                                                                                                                        • transparency : TransparencyMode

                                                                                                                                                                                                                                                          The transparency mode to use for unfolding

                                                                                                                                                                                                                                                        • offsetCnstrs : Bool

                                                                                                                                                                                                                                                          Whether to support offset constraints such as ?x + 1 =?= e

                                                                                                                                                                                                                                                        • Which occurrences to rewrite

                                                                                                                                                                                                                                                        • newGoals : NewGoals

                                                                                                                                                                                                                                                          How to convert the resulting metavariables into new goals

                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                          Configures the behaviour of the omega tactic.

                                                                                                                                                                                                                                                          • splitDisjunctions : Bool

                                                                                                                                                                                                                                                            Split disjunctions in the context.

                                                                                                                                                                                                                                                            Note that with splitDisjunctions := false omega will not be able to solve x = y goals as these are usually handled by introducing ¬ x = y as a hypothesis, then replacing this with x < y ∨ x > y.

                                                                                                                                                                                                                                                            On the other hand, omega does not currently detect disjunctions which, when split, introduce no new useful information, so the presence of irrelevant disjunctions in the context can significantly increase run time.

                                                                                                                                                                                                                                                          • splitNatSub : Bool

                                                                                                                                                                                                                                                            Whenever ((a - b : Nat) : Int) is found, register the disjunction b ≤ a ∧ ((a - b : Nat) : Int) = a - b ∨ a < b ∧ ((a - b : Nat) : Int) = 0 for later splitting.

                                                                                                                                                                                                                                                          • splitNatAbs : Bool

                                                                                                                                                                                                                                                            Whenever Int.natAbs a is found, register the disjunction 0 ≤ a ∧ Int.natAbs a = a ∨ a < 0 ∧ Int.natAbs a = - a for later splitting.

                                                                                                                                                                                                                                                          • splitMinMax : Bool

                                                                                                                                                                                                                                                            Whenever min a b or max a b is found, rewrite in terms of the definition if a ≤ b ..., for later case splitting.

                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                            inductive Lean.Meta.CheckTactic.CheckGoalType {α : Sort u} (val : α) :

                                                                                                                                                                                                                                                            Type used to lift an arbitrary value into a type parameter so it can appear in a proof goal.

                                                                                                                                                                                                                                                            It is used by the #check_tactic command.

                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                              partial def Lean.Parser.Tactic.getConfigItems (c : Syntax) :
                                                                                                                                                                                                                                                              TSyntaxArray `Lean.Parser.Tactic.configItem

                                                                                                                                                                                                                                                              Extracts the items from a tactic configuration, either a Lean.Parser.Tactic.optConfig, Lean.Parser.Tactic.config, or these wrapped in null nodes.

                                                                                                                                                                                                                                                              def Lean.Parser.Tactic.mkOptConfig (items : TSyntaxArray `Lean.Parser.Tactic.configItem) :
                                                                                                                                                                                                                                                              TSyntax `Lean.Parser.Tactic.optConfig
                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                def Lean.Parser.Tactic.appendConfig (cfg cfg' : Syntax) :
                                                                                                                                                                                                                                                                TSyntax `Lean.Parser.Tactic.optConfig

                                                                                                                                                                                                                                                                Appends two tactic configurations. The configurations can be Lean.Parser.Tactic.optConfig, Lean.Parser.Tactic.config, or these wrapped in null nodes (for example because the syntax is (config)?).

                                                                                                                                                                                                                                                                Instances For