some hif the discriminant is annotated withh:
Instances For
Equations
- Lean.Meta.Match.instInhabitedDiscrInfo = { default := { hName? := default } }
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 : Array Lean.Meta.Match.DiscrInfo
discrInfos[i] = { hName? := some h }if the i-th discriminant was annotated withh :.
Instances For
Equations
- info.numAlts = info.altNumParams.size
Instances For
Instances For
Instances For
Equations
Instances For
Instances For
Equations
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
- info.getNumDiscrEqs = 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
- s.addEntry e = { map := s.map.insert e.name e.info }
Instances For
Equations
- s.switch = { map := s.map.switch }
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.Meta.Match.Extension.extension.getState env).map.find? declName
Instances For
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]
[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 = (Lean.Meta.getMatcherInfoCore? env declName).isSome
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 = (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)