some hif the discriminant is annotated withh:
Instances For
Equations
- Lean.Meta.Match.instInhabitedDiscrInfo = { default := { hName? := default } }
- numParams : Nat
- numDiscrs : Nat
- discrInfos : Array Lean.Meta.Match.DiscrInfo
discrInfos[i] = { hName? := some h }if the i-th discriminant was annotated withh :.
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.
Instances For
Equations
- Lean.Meta.Match.MatcherInfo.numAlts info = Array.size info.altNumParams
Instances For
Equations
- Lean.Meta.Match.MatcherInfo.arity info = info.numParams + 1 + info.numDiscrs + Lean.Meta.Match.MatcherInfo.numAlts info
Instances For
Equations
- Lean.Meta.Match.MatcherInfo.getFirstDiscrPos info = info.numParams + 1
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Match.MatcherInfo.getFirstAltPos info = info.numParams + 1 + info.numDiscrs
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Match.MatcherInfo.getMotivePos info = info.numParams
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Match.MatcherInfo.getNumDiscrEqs info = Lean.Meta.Match.getNumEqsFromDiscrInfos info.discrInfos
Instances For
- name : Lake.Name
- info : Lean.Meta.MatcherInfo
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Meta.Match.Extension.State.addEntry
(s : Lean.Meta.Match.Extension.State)
(e : Lean.Meta.Match.Extension.Entry)
:
Equations
- Lean.Meta.Match.Extension.State.addEntry s e = { map := Lean.SMap.insert s.map e.name e.info }
Instances For
Equations
- Lean.Meta.Match.Extension.State.switch s = { map := Lean.SMap.switch s.map }
Instances For
def
Lean.Meta.Match.Extension.addMatcherInfo
(env : Lean.Environment)
(matcherName : Lake.Name)
(info : Lean.Meta.MatcherInfo)
:
Equations
- Lean.Meta.Match.Extension.addMatcherInfo env matcherName info = Lean.PersistentEnvExtension.addEntry Lean.Meta.Match.Extension.extension env { name := matcherName, info := info }
Instances For
Equations
- Lean.Meta.Match.Extension.getMatcherInfo? env declName = Lean.SMap.find? (Lean.SimplePersistentEnvExtension.getState Lean.Meta.Match.Extension.extension env).map declName
Instances For
Equations
- Lean.Meta.Match.addMatcherInfo matcherName info = Lean.modifyEnv fun env => 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]
[Lean.MonadEnv m]
(declName : Lake.Name)
:
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 = Option.isSome (Lean.Meta.getMatcherInfoCore? env declName)
Instances For
def
Lean.Meta.isMatcher
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(declName : Lake.Name)
:
m Bool
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 = Option.isSome (Lean.Meta.isMatcherAppCore? env e)
Instances For
Equations
- Lean.Meta.isMatcherApp e = do let __do_lift ← Lean.getEnv pure (Lean.Meta.isMatcherAppCore __do_lift e)
Instances For
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.