The areas / V01. The language of Mathlib
Mathlib.Util.CompileInductive
8 declarations. Mathlib docs · Source
def Mathlib.Util.mkRecNames E1 #
List Lean.Name → ℕ → List Lean.Name
Returns the names of the recursors for a nested or mutual inductive,
using the all and numMotives arguments from RecursorVal.
def Mathlib.Util.compileDefn E1 #
Lean.DefinitionVal → Lean.MetaM Unit
Compile the definition dv by adding a second definition dv✝ with the same body,
and registering a csimp-lemma dv = dv✝.
def Mathlib.Util.hasCSimpLemma E1 #
Lean.Environment → Lean.Name → Bool
Returns true if the given declaration has a @[csimp] lemma.
def Mathlib.Util.«commandCompile_def%_» E1 #
Lean.ParserDescr
compile_def% Foo.foo adds compiled code for the definition Foo.foo.
This can be used for type class projections or definitions like List._sizeOf_1,
for which Lean does not generate compiled code by default
(since it is not used 99% of the time).
def Mathlib.Util.compileInductiveOnly E1 #
Lean.InductiveVal → Lean.RecursorVal → optParam Bool true → Lean.MetaM Unit
Generate compiled code for the recursor for iv, excluding the sizeOf function.
opaque Mathlib.Util.compileInductive E1 #
Lean.InductiveVal → optParam Bool true → Lean.MetaM Unit
Generate compiled code for the recursor for iv.
opaque Mathlib.Util.compileSizeOf E1 #
Lean.InductiveVal → Lean.RecursorVal → Lean.MetaM Unit
Compiles the sizeOf auxiliary functions. It also recursively compiles any inductives required to
compile the sizeOf definition (because sizeOf definitions depend on T.rec).
def Mathlib.Util.«commandCompile_inductive%_» E1 #
Lean.ParserDescr
compile_inductive% Foo creates compiled code for the recursor Foo.rec,
so that Foo.rec can be used in a definition
without having to mark the definition as noncomputable.