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.
Instances For
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.
Instances For
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.
Instances For
Strip optional suffixes from a binder name.
Equations
- Lean.Linter.List.stripBinderName s = ((((s.stripSuffix "'").stripSuffix "₁").stripSuffix "₂").stripSuffix "₃").stripSuffix "₄"
Instances For
Allowed names for BitVec width variables.
Equations
Instances For
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.