This module contains the types
IndGroupInfo, a variant ofInductiveValwith information that applies to a whole group of mutual inductives andIndGroupInstwhich extendsIndGroupInfowith levels and parameters to indicate a instantiation of the group.
One purpose of this abstraction is to make it clear when a function operates on a group as a whole, rather than a specific inductive within the group.
Equations
- Lean.Elab.Structural.instInhabitedIndGroupInfo = { default := { all := default, numNested := default } }
Equations
- Lean.Elab.Structural.IndGroupInfo.ofInductiveVal indInfo = { all := indInfo.all.toArray, numNested := indInfo.numNested }
Instances For
Instances For
Instantiates the right .brecOn or .bInductionOn for the given type former index,
including universe parameters and fixed prefix.
An instance of an mutually inductive group of inductives, identified by the all array
and the level and expressions parameters.
For example this distinguishes between List α and List β so that we will not even attempt
mutual structural recursion on such incompatible types.
- levels : List Lean.Level
Instances For
Equations
- Lean.Elab.Structural.instInhabitedIndGroupInst = { default := { toIndGroupInfo := default, levels := default, params := default } }
Equations
- igi.toMessageData = Lean.MessageData.ofExpr (Lean.mkAppN (Lean.Expr.const igi.all[0]! igi.levels) igi.params)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiates the right .brecOn or .bInductionOn for the given type former index,
including universe parameters and fixed prefix.
Equations
- group.brecOn ind lvl idx = Lean.mkAppN (Lean.Expr.const (group.brecOnName ind idx) (if ind = true then group.levels else lvl :: group.levels)) group.params
Instances For
Figures out the nested type formers of an inductive group, with parameters instantiated and indices still forall-abstracted.
For example given a nested inductive
inductive Tree α where | node : α → Vector (Tree α) n → Tree α
(where n is an index of Vector) and the instantiation Tree Int it will return
#[(n : Nat) → Vector (Tree Int) n]
Equations
- One or more equations did not get rendered due to their size.