- name : Name
A declaration corresponding to the inductive constructor. (For custom recursors, the alternatives correspond to parameter names in the recursor, so we may not have a declaration to point to.) This is used for go-to-definition on the alternative name.
- numFields : Nat
- provesMotive : Bool
If
provesMotive := true, then this alternative hasmotiveas its conclusion. Only for those alternatives theinductiontactic should introduce reverted hypotheses.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Information about an eliminator as used by induction or cases.
Created from an expression by getElimInfo. This typically contains level metavariables that
are instantiated as we go (e.g. in addImplicitTargets), so this is single use.
- elimExpr : Expr
- elimType : Expr
- motivePos : Nat
- altsInfo : Array ElimAltInfo
- numComplexMotiveArgs : Nat
Extra arguments to the motive, after the targets, that are instantiated with non-atomic expressions in the goal
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.instReprElimInfo = { reprPrec := Lean.Meta.instReprElimInfo.repr }
Equations
Given the type t of an alternative, determines the number of parameters
(.forall and .let)-bound, and whether the conclusion is a motive-application.
Equations
- Lean.Meta.altArity motive n (Lean.Expr.forallE binderName binderType b binderInfo) = Lean.Meta.altArity motive (n + 1) b
- Lean.Meta.altArity motive n (Lean.Expr.letE declName type value b nondep) = Lean.Meta.altArity motive (n + 1) b
- Lean.Meta.altArity motive n x✝ = (n, x✝.getAppFn == motive)
Instances For
Equations
- Lean.Meta.getElimInfo elimName baseDeclName? = do let __do_lift ← Lean.Meta.mkConstWithFreshMVarLevels elimName Lean.Meta.getElimExprInfo __do_lift baseDeclName?
Instances For
Eliminators/recursors may have implicit targets. For builtin recursors, all indices are implicit targets. Given an eliminator and the sequence of explicit targets, this methods returns a new sequence containing implicit and explicit targets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Equations
- Lean.Meta.instReprCustomEliminators.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "map" ++ Std.Format.text " := " ++ (Std.Format.nest 7 (repr x✝.map)).group) " }"
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.addCustomEliminator declName attrKind induction = do let e ← Lean.Meta.mkCustomEliminator declName induction Lean.ScopedEnvExtension.add Lean.Meta.customEliminatorExt e attrKind
Instances For
Gets all the eliminators defined using the @[induction_eliminator] and @[cases_eliminator] attributes.
Equations
- Lean.Meta.getCustomEliminators = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState Lean.Meta.customEliminatorExt __do_lift)
Instances For
Gets an eliminator appropriate for the provided array of targets.
If induction is true then returns a matching eliminator defined using the @[induction_eliminator] attribute
and otherwise returns one defined using the @[cases_eliminator] attribute.
The @[induction_eliminator] attribute is for the induction tactic
and the @[cases_eliminator] attribute is for the cases tactic.
Equations
- One or more equations did not get rendered due to their size.