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 / V01. The language of Mathlib

Mathlib.Util.CodeActions.BinderPlicity

1 declarations. Mathlib docs · Source

Binder plicity code action

A code action that allows one to switch between explicit and implicit binders.

  • (x : Nat) turns into {x : Nat}
  • {x : nat} turns into (x : Nat)

Implementation notes

We make use of Syntax.reprint to transform our new syntax into a String. Since Syntax.reprint adds whitespace when working over synthetic syntax nodes, we produce the new syntax by modifying the old one instead of creating it from scratch.

def Mathlib.CodeAction.binderPlicity E1 #

Lean.Server.CodeActionProvider

A code action to switch between explicit and implicit binders