Documentation

Lean.Meta.Constructions.CtorIdx

def Lean.mkCtorIdxName (indName : Name) :
Equations
Instances For
    Equations
    Instances For
      Equations
      Instances For
        def Lean.mkCtorIdx (indName : Name) :

        For an inductive type T with more than one function builds a function T.ctorIdx : T → Nat that returns the constructor index of the given value. Does nothing if T does not eliminate into Type or if T is unsafe. Assumes T.casesOn to be defined already.

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