Documentation

Lean.ToExpr

class Lean.ToExpr (α : Type u) :

We use the ToExpr type class to convert values of type α into expressions that denote these values in Lean.

Examples:

toExpr true = .const ``Bool.true []

toTypeExpr Bool = .const ``Bool []

See also ToLevel for representing universe levels as Level expressions.

  • toExpr : α → Expr

    Convert a value a : α into an expression that denotes a

  • toTypeExpr : Expr

    Expression representing the type α

Instances
    @[instance_reducible]
    Equations
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    Instances For
      @[instance_reducible]
      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.
      Instances For
        Equations
        Instances For
          @[instance_reducible]
          instance Lean.instToExprFin {n : Nat} :
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          Equations
          Instances For
            @[instance_reducible]
            Equations
            • One or more equations did not get rendered due to their size.
            Equations
            Instances For
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              Equations
              Instances For
                @[instance_reducible]
                Equations
                • One or more equations did not get rendered due to their size.
                Equations
                Instances For
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Equations
                  Instances For
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    • One or more equations did not get rendered due to their size.
                    @[instance_reducible]
                    Equations
                    • One or more equations did not get rendered due to their size.
                    @[instance_reducible]
                    Equations
                    • One or more equations did not get rendered due to their size.
                    @[instance_reducible]
                    instance Lean.instToExprProdOfToLevel {α : Type u} {β : Type v} [ToLevel] [ToLevel] [ToExpr α] [ToExpr β] :
                    ToExpr (α × β)
                    Equations
                    • One or more equations did not get rendered due to their size.
                    @[instance_reducible]
                    Equations
                    • One or more equations did not get rendered due to their size.
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    • One or more equations did not get rendered due to their size.