This module contains roughly everything needed to turn mutual n-ary functions into a single unary function, as used by well-founded recursion.
def
Lean.Elab.WF.packCalls
(fixedParamPerms : FixedParamPerms)
(argsPacker : Meta.ArgsPacker)
(funNames : Array Name)
(newF e : Expr)
:
Processes the expression and replaces calls to the preDefs with calls to f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.WF.mutualName
(fixedParamPerms : FixedParamPerms)
(argsPacker : Meta.ArgsPacker)
(preDefs : Array PreDefinition)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.WF.packMutual
(fixedParamPerms : FixedParamPerms)
(argsPacker : Meta.ArgsPacker)
(preDefs : Array PreDefinition)
:
Creates a single unary function from the given preDefs, using the machinery in the ArgPacker
module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.WF.varyingVarNames
(fixedParamPerms : FixedParamPerms)
(preDefIdx : Nat)
(preDef : PreDefinition)
:
Collect the names of the varying variables (excluding the fixed parameters); this also determines the
arity for the well-founded translations, and is turned into an ArgsPacker.
We use the term to determine the arity, but take the name from the type, for better names in the
fun : (n : Nat) → Nat | 0 => 0 | n+1 => fun n
idiom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.WF.preDefsFromUnaryNonRec
(fixedParamPerms : FixedParamPerms)
(argsPacker : Meta.ArgsPacker)
(preDefs : Array PreDefinition)
(unaryPreDefNonRec : PreDefinition)
:
Equations
- One or more equations did not get rendered due to their size.