The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.Linter.EmptyLine

8 declarations. Mathlib docs · Source

The "emptyLine" linter

The "emptyLine" linter emits a warning on empty lines inside a command, but outside of a doc-string/module-doc.

Syntax filters

def Lean.Substring.Raw.getRange E1 #

Substring.Raw → Lean.Syntax.Range

Retrieve the String.Range of a Substring.

opaque Lean.Syntax.filterMapM E1 #

{m : Type → Type} → [Monad m] → {α : Type} → Lean.Syntax → (Lean.Syntax → m (Option α)) → m (Array α)

filterMapM stx f takes as input a Syntax stx and a monadic function f : Syntax → m α. It produces the array of the some values that f takes while traversing stx.

See filterMap for a non-monadic version.

def Lean.Syntax.filterMap E1 #

{α : Type} → Lean.Syntax → (Lean.Syntax → Option α) → Array α

filterMap stx f takes as input a Syntax stx and a function f : Syntax → α. It produces the array of the some values that f takes while traversing stx.

See filterMapM for a non-monadic version.

def Lean.Syntax.filter E1 #

Lean.Syntax → (Lean.Syntax → Bool) → Array Lean.Syntax

filter stx f takes as input a Syntax stx and a function f : Syntax → Bool. It produces the array of the syntax nodes in stx where f is true.

See also the similar filterMap and filterMapM.

opaque Mathlib.Linter.linter.style.emptyLine E1 #

Lean.Option Bool

The "emptyLine" linter emits a warning on empty lines inside a command, but outside of a doc-string/module-doc.

The linter is only active when there are no other warnings, so as to not add noise when developing incomplete proofs.

abbrev Mathlib.Linter.EmptyLine.AllowEmptyLines E1 #

Std.HashSet Lean.SyntaxNodeKind

The SyntaxNodeKinds where the EmptyLine linter is not active

abbrev Mathlib.Linter.EmptyLine.SkippedFileSegments E1 #

Std.HashSet Lean.Name

If a file contains one of these names as segments, we disable the emptyLine linter.

def Mathlib.Linter.EmptyLine.emptyLineLinter E1 #

Lean.Linter

The "emptyLine" linter emits a warning on empty lines inside a command, but outside of a doc-string/module-doc.

The linter is only active when there are no other warnings, so as to not add noise when developing incomplete proofs.