Documentation

Lean.Elab.PreDefinition.Structural.BRecOn

partial def Lean.Elab.Structural.searchPProd {α : Type} (e F : Expr) (k : ExprExprMetaM α) :

Calculates the .brecOn motive corresponding to one structural recursive function. The value is the function with (only) the fixed parameters moved into the context.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Lean.Elab.Structural.mkBRecOnF (recArgInfos : Array RecArgInfo) (positions : Positions) (recArgInfo : RecArgInfo) (value FType : Expr) :

    Calculates the .brecOn functional argument corresponding to one structural recursive function. The value is the function with (only) the fixed parameters moved into the context, The FType is the expected type of the argument. The recArgInfos is used to transform the body of the function to replace recursive calls with uses of the below induction hypothesis.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Lean.Elab.Structural.mkBRecOnConst (recArgInfos : Array RecArgInfo) (positions : Positions) (motives : Array Expr) :
      MetaM (NatExpr)

      Given the motives, figures out whether to use .brecOn or .binductionOn, pass the right universe levels, the parameters, and the motives. It was already checked earlier in checkCodomainsLevel that the functions live in the same universe.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Lean.Elab.Structural.inferBRecOnFTypes (recArgInfos : Array RecArgInfo) (positions : Positions) (brecOnConst : NatExpr) :

        Given the recArgInfos and the motives, infer the types of the F arguments to the .brecOn combinators. This assumes that all .brecOn functions of a mutual inductive have the same structure.

        It also undoes the permutation and packing done by packMotives

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Lean.Elab.Structural.mkBrecOnApp (positions : Positions) (fnIdx : Nat) (brecOnConst : NatExpr) (FArgs : Array Expr) (recArgInfo : RecArgInfo) (value : Expr) :

          Completes the .brecOn for the given function. The value is the function with (only) the fixed parameters moved into the context.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For