Documentation

Lean.Linter.List

This file defines style linters for the List/Array/Vector modules.

Currently, we do not anticipate that they will be useful elsewhere.

set_option linter.indexVariables true enables a strict linter that validates that the only variables appearing as an index (e.g. in xs[i] or xs.take i) are i, j, or k, and similarly that the only variables appearing as a width (e.g. in List.replicate n a or Vector α n) are n or m.

set_option linter.listVariables true enables a strict linter that validates that all List/Array/Vector variables use standardized names.

Return the syntax for all expressions in which an fvarId appears as a "numerical index", along with the user name of that fvarId.

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

Return the syntax for all expressions in which an fvarId appears as a "numerical width", along with the user name of that fvarId.

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

Return the syntax for all expressions in which an fvarId appears as a "BitVec width", along with the user name of that fvarId.

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

Strip optional suffixes from a binder name.

Equations

Allowed names for index variables.

Equations

Allowed names for width variables.

Equations

Allowed names for BitVec width variables.

Equations

A linter which validates that the only variables used as "indices" (e.g. in xs[i] or xs.take i) are i, j, or k.

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

Allowed names for List variables.

Equations

Allowed names for Array variables.

Equations

Allowed names for Vector variables.

Equations
def Lean.Linter.List.binders (t : Elab.InfoTree) (p : ExprBool := fun (x : Expr) => true) :

Find all binders appearing in the given info tree.

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

A linter which validates that all List/Array/Vector variables use allowed names.

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