Documentation

Auto.Lib.ExprExtra

def Auto.mkAuxName {m : TypeType} [Monad m] [Lean.MonadEnv m] (baseName : Lean.Name) (idx : Nat) :
Equations
Instances For
    def Auto.Expr.collectRawM {m : TypeType u_1} [Monad m] (p : Lean.Exprm Bool) :
    Equations
    Instances For
      Equations
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Given an expression e, which is the type of some term t, find the arguments of t that are class instances

            Equations
            Instances For

              Given e = ∀ (xs : αs), t, return the indexes of dependent binders within xs. This function only works for expressions that does not contain loose bound variables

              Equations
              Instances For

                Given the name c of a constant, suppose @c : ty, return Expr.depArgs ty

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

                  This should only be used when we're sure that reducing ty won't be too expensive e.g. ty must be defeq to Expr.sort <?lvl>

                  Equations
                  Instances For

                    Given expression e₁, e₂ where e₁ have universe level parameters params, attempt to find variables x₁, ⋯, xₗ, terms t₁, ⋯, tₖ and a m ≤ l such that ∀ x₁ ⋯ xₗ. e₁ t₁ ⋯ tₖ = e₂ x₁ ⋯ xₘ Note that universe polymorphism is not supported

                    If successful, return (fun x₁ ⋯ xₗ => Eq.refl (e₂ x₁ ⋯ xₘ), ∀ x₁ ⋯ xₗ. e₁ t₁ ⋯ tₖ = e₂ x₁ ⋯ xₘ)

                    Otherwise, return .none

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

                      ident must be of type Expr → TermElabM Unit Compiles term into Expr, then applies ident to it

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

                          Consider the canonical instance of Lean.ToExpr Expr. We require that (← exprFromExpr (← Lean.toExpr e)) ≝ e

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