File: .lake/packages/lean4/src/lean/Lean/Elab/PreDefinition/WF/TerminationArgument.lean

full_name: Lean.Elab.WF.TerminationArgument
code: /--
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.
-/
structure TerminationArgument where
  ref : Syntax
  arity : Nat
  extraParams : Nat
  fn : Expr
deriving Inhabited
goal: Type

full_name: Lean.Elab.WF.TerminationArgument.extraParams
code: /--
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.
-/
structure TerminationArgument where
  ref : Syntax
  arity : Nat
  extraParams : Nat
  fn : Expr
deriving Inhabited
goal: Nat

full_name: Lean.Elab.WF.TerminationArgument.fn
code: /--
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.
-/
structure TerminationArgument where
  ref : Syntax
  arity : Nat
  extraParams : Nat
  fn : Expr
deriving Inhabited
goal: Lean.Expr

full_name: Lean.Elab.WF.TerminationArgument.ref
code: /--
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.
-/
structure TerminationArgument where
  ref : Syntax
  arity : Nat
  extraParams : Nat
  fn : Expr
deriving Inhabited
goal: Lean.Syntax

full_name: Lean.Elab.WF.instInhabitedTerminationArgument
code: /--
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.
-/
structure TerminationArgument where
  ref : Syntax
  arity : Nat
  extraParams : Nat
  fn : Expr
deriving Inhabited
goal: Inhabited Lean.Elab.WF.TerminationArgument

full_name: Lean.Elab.WF.TerminationArgument.arity
code: /--
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.
-/
structure TerminationArgument where
  ref : Syntax
  arity : Nat
  extraParams : Nat
  fn : Expr
deriving Inhabited
goal: Nat

full_name: Lean.Elab.WF.TerminationArguments
code: /-- A complete set of `TerminationArgument`s, as applicable to a single clique.  -/
abbrev TerminationArguments 
goal: Type

full_name: Lean.Elab.WF.TerminationArgument.elab
code: /--
Elaborates a `TerminationBy` to an `TerminationArgument`.

* `type` is the full type of the original recursive function, including fixed prefix.
* `arity` is the value arity of the recursive function; the termination argument cannot take more.
* `extraParams` is the the number of parameters the function has after the colon; together with
  `arity` indicates how many parameters of the function are before the colon and thus in scope.
* `hint : TerminationBy` is the syntactic `TerminationBy`.
-/
def TerminationArgument.elab (funName : Name) (type : Expr) (arity extraParams : Nat)
    (hint : TerminationBy) : TermElabM TerminationArgument 
goal: Lean.Elab.TermElabM Lean.Elab.WF.TerminationArgument

full_name: Lean.Elab.WF.TerminationArgument.elab.parameters
code: /--
Elaborates a `TerminationBy` to an `TerminationArgument`.

* `type` is the full type of the original recursive function, including fixed prefix.
* `arity` is the value arity of the recursive function; the termination argument cannot take more.
* `extraParams` is the the number of parameters the function has after the colon; together with
  `arity` indicates how many parameters of the function are before the colon and thus in scope.
* `hint : TerminationBy` is the syntactic `TerminationBy`.
-/
def TerminationArgument.elab (funName : Name) (type : Expr) (arity extraParams : Nat)
    (hint : TerminationBy) : TermElabM TerminationArgument 
goal: Nat → Lean.MessageData

full_name: Lean.Elab.WF.TerminationArgument.delab
code: def TerminationArgument.delab (termArg : TerminationArgument) : MetaM (TSyntax ``terminationBy) 
goal: Lean.MetaM (Lean.TSyntax `Lean.Parser.Termination.terminationBy)

full_name: Lean.Elab.WF.TerminationArgument.delab.go
code: def TerminationArgument.delab (termArg : TerminationArgument) : MetaM (TSyntax ``terminationBy) 
goal: Nat →
  Lean.TSyntaxArray `ident → Lean.PrettyPrinter.Delaborator.DelabM (Lean.TSyntax `Lean.Parser.Termination.terminationBy)