some h
if the discriminant is annotated withh:
Instances For
Equations
- Lean.Meta.Match.instInhabitedDiscrInfo = { default := { hName? := default } }
A "matcher" auxiliary declaration has the following structure:
numParams
parameters- motive
numDiscrs
discriminators (aka major premises)altNumParams.size
alternatives (aka minor premises) where alternativei
hasaltNumParams[i]
parametersuElimPos?
issome pos
when the matcher can eliminate in different universe levels, andpos
is the position of the universe level parameter that specifies the elimination universe. It isnone
if 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
Instances For
Instances For
Instances For
Equations
- info.getMotivePos = info.numParams
Instances For
Instances For
Instances For
- name : Lean.Name
- info : Lean.Meta.MatcherInfo
Instances For
Instances For
def
Lean.Meta.Match.Extension.addMatcherInfo
(env : Lean.Environment)
(matcherName : Lean.Name)
(info : Lean.Meta.MatcherInfo)
:
Instances For
Equations
- Lean.Meta.Match.Extension.getMatcherInfo? env declName = (Lean.Meta.Match.Extension.extension.getState env).map.find? declName
Instances For
def
Lean.Meta.Match.addMatcherInfo
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(matcherName : Lean.Name)
(info : Lean.Meta.MatcherInfo)
:
m Unit
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 : Lean.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 : Lean.Name)
:
m Bool
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.isMatcherApp e = do let __do_lift ← Lean.getEnv pure (Lean.Meta.isMatcherAppCore __do_lift e)