some hif the discriminant is annotated withh:
Instances For
Equations
- Lean.Meta.Match.instInhabitedDiscrInfo.default = { hName? := default }
Instances For
A "matcher" auxiliary declaration has the following structure:
numParamsparameters- motive
numDiscrsdiscriminators (aka major premises)altNumParams.sizealternatives (aka minor premises) where alternativeihasaltNumParams[i]parametersuElimPos?issome poswhen the matcher can eliminate in different universe levels, andposis the position of the universe level parameter that specifies the elimination universe. It isnoneif the matcher only eliminates intoProp.
- numParams : Nat
- numDiscrs : Nat
discrInfos[i] = { hName? := some h }if the i-th discriminant was annotated withh :.
Instances For
Equations
- info.numAlts = info.altNumParams.size
Instances For
Equations
- info.getFirstDiscrPos = info.numParams + 1
Instances For
def
Lean.Meta.Match.MatcherInfo.getDiscrRange
(info : MatcherInfo)
:
Std.PRange { lower := Std.PRange.BoundShape.closed, upper := Std.PRange.BoundShape.open } Nat
Equations
- info.getDiscrRange = info.getFirstDiscrPos...info.getFirstDiscrPos + info.numDiscrs
Instances For
Instances For
def
Lean.Meta.Match.MatcherInfo.getAltRange
(info : MatcherInfo)
:
Std.PRange { lower := Std.PRange.BoundShape.closed, upper := Std.PRange.BoundShape.open } Nat
Equations
- info.getAltRange = info.getFirstAltPos...info.getFirstAltPos + info.numAlts
Instances For
Equations
- info.getMotivePos = info.numParams
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
def
Lean.Meta.Match.Extension.addMatcherInfo
(env : Environment)
(matcherName : Name)
(info : MatcherInfo)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Match.addMatcherInfo
{m : Type → Type}
[Monad m]
[MonadEnv m]
(matcherName : Name)
(info : MatcherInfo)
:
m Unit
Equations
- Lean.Meta.Match.addMatcherInfo matcherName info = Lean.modifyEnv fun (env : Lean.Environment) => Lean.Meta.Match.Extension.addMatcherInfo env matcherName info
Instances For
Equations
- Lean.Meta.getMatcherInfoCore? env declName = Lean.Meta.Match.Extension.getMatcherInfo? env declName
Instances For
def
Lean.Meta.getMatcherInfo?
{m : Type → Type}
[Monad m]
[MonadEnv m]
(declName : Name)
:
m (Option MatcherInfo)
Equations
- Lean.Meta.getMatcherInfo? declName = do let __do_lift ← Lean.getEnv pure (Lean.Meta.getMatcherInfoCore? __do_lift declName)
Instances For
@[export lean_is_matcher]
Equations
- Lean.Meta.isMatcherCore env declName = (Lean.Meta.getMatcherInfoCore? env declName).isSome
Instances For
Equations
- Lean.Meta.isMatcher declName = do let __do_lift ← Lean.getEnv pure (Lean.Meta.isMatcherCore __do_lift declName)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.isMatcherAppCore env e = (Lean.Meta.isMatcherAppCore? env e).isSome
Instances For
Equations
- Lean.Meta.isMatcherApp e = do let __do_lift ← Lean.getEnv pure (Lean.Meta.isMatcherAppCore __do_lift e)