This module contains
- the data type
TerminationArgument, the elaborated form of aTerminationByclause, - the
TerminationArgumentstype for a clique, and - elaboration and deelaboration functions.
Elaborated form for a termination_by clause.
The fn has the same (value) arity as the recursive functions (stored in
arity), and maps its arguments (including fixed prefix, in unpacked form) to
the termination argument.
If structural := Bool, then the fn is a lambda picking out exactly one argument.
- ref : Lean.Syntax
- structural : Bool
- fn : Lean.Expr
Instances For
Equations
- Lean.Elab.instInhabitedTerminationArgument = { default := { ref := default, structural := default, fn := default } }
@[reducible, inline]
A complete set of TerminationArguments, as applicable to a single clique.
Instances For
def
Lean.Elab.TerminationArgument.elab
(funName : Lean.Name)
(type : Lean.Expr)
(arity extraParams : Nat)
(hint : Lean.Elab.TerminationBy)
:
Elaborates a TerminationBy to an TerminationArgument.
typeis the full type of the original recursive function, including fixed prefix.hint : TerminationByis the syntacticTerminationBy.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.TerminationArgument.elab.parameters 1 = (Lean.MessageData.ofFormat ∘ Lean.format) "one parameter"
- Lean.Elab.TerminationArgument.elab.parameters x = Lean.toMessageData "" ++ Lean.toMessageData x ++ Lean.toMessageData " parameters"
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.TerminationArgument.delab
(arity extraParams : Nat)
(termArg : Lean.Elab.TerminationArgument)
:
Lean.MetaM (Lean.TSyntax `Lean.Parser.Termination.terminationBy)
Delaborates a TerminationArgument back to a TerminationHint, e.g. for termination_by?.
This needs extra information:
arityis the value arity of the recursive functionextraParamsindicates how many of the functions arguments are bound “after the colon”.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[irreducible]
def
Lean.Elab.TerminationArgument.delab.go
(termArg : Lean.Elab.TerminationArgument)
:
Nat →
Lean.TSyntaxArray `ident → Lean.PrettyPrinter.Delaborator.DelabM (Lean.TSyntax `Lean.Parser.Termination.terminationBy)
Equations
- One or more equations did not get rendered due to their size.