Equations
- mkToCtorIdxName indName = indName.mkStr "toCtorIdx"
Instances For
Equations
- mkCtorIdxName indName = indName.mkStr "ctorIdx"
Instances For
Equations
- isCtorIdxCore? env (indName.str "ctorIdx") = do let indInfo ← Lean.isInductiveCore? env indName pure indInfo
- isCtorIdxCore? env declName = none
Instances For
Equations
- isCtorIdx? declName = do let __do_lift ← Lean.getEnv pure (isCtorIdxCore? __do_lift declName)
Instances For
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.