File: .lake/packages/lean4/src/lean/Lean/Meta/Match/MatcherInfo.lean

full_name: Lean.Meta.Match.instInhabitedDiscrInfo
code: structure DiscrInfo where
  /-- `some h` if the discriminant is annotated with `h:` -/
  hName? : Option Name := none
  deriving Inhabited
goal: Inhabited Lean.Meta.Match.DiscrInfo

full_name: Lean.Meta.Match.DiscrInfo
code: structure DiscrInfo where
  /-- `some h` if the discriminant is annotated with `h:` -/
  hName? : Option Name := none
  deriving Inhabited
goal: Type

full_name: Lean.Meta.Match.DiscrInfo.hName?
code: structure DiscrInfo where
  /-- `some h` if the discriminant is annotated with `h:` -/
  hName? : Option Name := none
  deriving Inhabited
goal: Option Lean.Name

full_name: Lean.Meta.Match.MatcherInfo
code: /--
A "matcher" auxiliary declaration has the following structure:
- `numParams` parameters
- motive
- `numDiscrs` discriminators (aka major premises)
- `altNumParams.size` alternatives (aka minor premises) where alternative `i` has `altNumParams[i]` parameters
- `uElimPos?` is `some pos` when the matcher can eliminate in different universe levels, and
   `pos` is the position of the universe level parameter that specifies the elimination universe.
   It is `none` if the matcher only eliminates into `Prop`. -/
structure MatcherInfo where
  numParams    : Nat
  numDiscrs    : Nat
  altNumParams : Array Nat
  uElimPos?    : Option Nat
  /--
    `discrInfos[i] = { hName? := some h }` if the i-th discriminant was annotated with `h :`.
  -/
  discrInfos   : Array DiscrInfo
goal: Type

full_name: Lean.Meta.Match.MatcherInfo.uElimPos?
code: /--
A "matcher" auxiliary declaration has the following structure:
- `numParams` parameters
- motive
- `numDiscrs` discriminators (aka major premises)
- `altNumParams.size` alternatives (aka minor premises) where alternative `i` has `altNumParams[i]` parameters
- `uElimPos?` is `some pos` when the matcher can eliminate in different universe levels, and
   `pos` is the position of the universe level parameter that specifies the elimination universe.
   It is `none` if the matcher only eliminates into `Prop`. -/
structure MatcherInfo where
  numParams    : Nat
  numDiscrs    : Nat
  altNumParams : Array Nat
  uElimPos?    : Option Nat
  /--
    `discrInfos[i] = { hName? := some h }` if the i-th discriminant was annotated with `h :`.
  -/
  discrInfos   : Array DiscrInfo
goal: Option Nat

full_name: Lean.Meta.Match.MatcherInfo.numParams
code: /--
A "matcher" auxiliary declaration has the following structure:
- `numParams` parameters
- motive
- `numDiscrs` discriminators (aka major premises)
- `altNumParams.size` alternatives (aka minor premises) where alternative `i` has `altNumParams[i]` parameters
- `uElimPos?` is `some pos` when the matcher can eliminate in different universe levels, and
   `pos` is the position of the universe level parameter that specifies the elimination universe.
   It is `none` if the matcher only eliminates into `Prop`. -/
structure MatcherInfo where
  numParams    : Nat
  numDiscrs    : Nat
  altNumParams : Array Nat
  uElimPos?    : Option Nat
  /--
    `discrInfos[i] = { hName? := some h }` if the i-th discriminant was annotated with `h :`.
  -/
  discrInfos   : Array DiscrInfo
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.altNumParams
code: /--
A "matcher" auxiliary declaration has the following structure:
- `numParams` parameters
- motive
- `numDiscrs` discriminators (aka major premises)
- `altNumParams.size` alternatives (aka minor premises) where alternative `i` has `altNumParams[i]` parameters
- `uElimPos?` is `some pos` when the matcher can eliminate in different universe levels, and
   `pos` is the position of the universe level parameter that specifies the elimination universe.
   It is `none` if the matcher only eliminates into `Prop`. -/
structure MatcherInfo where
  numParams    : Nat
  numDiscrs    : Nat
  altNumParams : Array Nat
  uElimPos?    : Option Nat
  /--
    `discrInfos[i] = { hName? := some h }` if the i-th discriminant was annotated with `h :`.
  -/
  discrInfos   : Array DiscrInfo
goal: Array Nat

full_name: Lean.Meta.Match.MatcherInfo.discrInfos
code: /--
A "matcher" auxiliary declaration has the following structure:
- `numParams` parameters
- motive
- `numDiscrs` discriminators (aka major premises)
- `altNumParams.size` alternatives (aka minor premises) where alternative `i` has `altNumParams[i]` parameters
- `uElimPos?` is `some pos` when the matcher can eliminate in different universe levels, and
   `pos` is the position of the universe level parameter that specifies the elimination universe.
   It is `none` if the matcher only eliminates into `Prop`. -/
structure MatcherInfo where
  numParams    : Nat
  numDiscrs    : Nat
  altNumParams : Array Nat
  uElimPos?    : Option Nat
  /--
    `discrInfos[i] = { hName? := some h }` if the i-th discriminant was annotated with `h :`.
  -/
  discrInfos   : Array DiscrInfo
goal: Array Lean.Meta.Match.DiscrInfo

full_name: Lean.Meta.Match.MatcherInfo.numDiscrs
code: /--
A "matcher" auxiliary declaration has the following structure:
- `numParams` parameters
- motive
- `numDiscrs` discriminators (aka major premises)
- `altNumParams.size` alternatives (aka minor premises) where alternative `i` has `altNumParams[i]` parameters
- `uElimPos?` is `some pos` when the matcher can eliminate in different universe levels, and
   `pos` is the position of the universe level parameter that specifies the elimination universe.
   It is `none` if the matcher only eliminates into `Prop`. -/
structure MatcherInfo where
  numParams    : Nat
  numDiscrs    : Nat
  altNumParams : Array Nat
  uElimPos?    : Option Nat
  /--
    `discrInfos[i] = { hName? := some h }` if the i-th discriminant was annotated with `h :`.
  -/
  discrInfos   : Array DiscrInfo
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.numAlts
code: def MatcherInfo.numAlts (info : MatcherInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.arity
code: def MatcherInfo.arity (info : MatcherInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.getFirstDiscrPos
code: def MatcherInfo.getFirstDiscrPos (info : MatcherInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.getDiscrRange
code: def MatcherInfo.getDiscrRange (info : MatcherInfo) : Std.Range 
goal: Std.Range

full_name: Lean.Meta.Match.MatcherInfo.getFirstAltPos
code: def MatcherInfo.getFirstAltPos (info : MatcherInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.getAltRange
code: def MatcherInfo.getAltRange (info : MatcherInfo) : Std.Range 
goal: Std.Range

full_name: Lean.Meta.Match.MatcherInfo.getMotivePos
code: def MatcherInfo.getMotivePos (info : MatcherInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.getNumEqsFromDiscrInfos
code: def getNumEqsFromDiscrInfos (infos : Array DiscrInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.MatcherInfo.getNumDiscrEqs
code: def MatcherInfo.getNumDiscrEqs (info : MatcherInfo) : Nat 
goal: Nat

full_name: Lean.Meta.Match.Extension.Entry.name
code: structure Entry where
  name : Name
  info : MatcherInfo
goal: Lean.Name

full_name: Lean.Meta.Match.Extension.Entry.info
code: structure Entry where
  name : Name
  info : MatcherInfo
goal: Lean.Meta.MatcherInfo

full_name: Lean.Meta.Match.Extension.Entry
code: structure Entry where
  name : Name
  info : MatcherInfo
goal: Type

full_name: Lean.Meta.Match.Extension.State.map
code: structure State where
  map : SMap Name MatcherInfo := {}
goal: Lean.SMap Lean.Name Lean.Meta.MatcherInfo

full_name: Lean.Meta.Match.Extension.State
code: structure State where
  map : SMap Name MatcherInfo := {}
goal: Type

full_name: Lean.Meta.Match.Extension.instInhabitedState
code: instance : Inhabited State 
goal: Inhabited Lean.Meta.Match.Extension.State

full_name: Lean.Meta.Match.Extension.State.addEntry
code: def State.addEntry (s : State) (e : Entry) : State 
goal: Lean.Meta.Match.Extension.State

full_name: Lean.Meta.Match.Extension.State.switch
code: def State.switch (s : State) : State 
goal: Lean.Meta.Match.Extension.State

full_name: Lean.Meta.Match.Extension.initFn._@..lake.packages.lean4.src.lean.Lean.Meta.Match.MatcherInfo._hyg.377
code: builtin_initialize extension : SimplePersistentEnvExtension Entry State ←
  registerSimplePersistentEnvExtension {
    addEntryFn    := State.addEntry
    addImportedFn := fun es => (mkStateFromImportedEntries State.addEntry {} es).switch
  }
goal: IO (Lean.SimplePersistentEnvExtension Lean.Meta.Match.Extension.Entry Lean.Meta.Match.Extension.State)

full_name: Lean.Meta.Match.Extension.extension
code: builtin_initialize extension : SimplePersistentEnvExtension Entry State ←
  registerSimplePersistentEnvExtension {
    addEntryFn    := State.addEntry
    addImportedFn := fun es => (mkStateFromImportedEntries State.addEntry {} es).switch
  }
goal: Lean.SimplePersistentEnvExtension Lean.Meta.Match.Extension.Entry Lean.Meta.Match.Extension.State

full_name: Lean.Meta.Match.Extension.addMatcherInfo
code: def addMatcherInfo (env : Environment) (matcherName : Name) (info : MatcherInfo) : Environment 
goal: Lean.Environment

full_name: Lean.Meta.Match.Extension.getMatcherInfo?
code: def getMatcherInfo? (env : Environment) (declName : Name) : Option MatcherInfo 
goal: Option Lean.Meta.MatcherInfo

full_name: Lean.Meta.Match.addMatcherInfo
code: def addMatcherInfo (matcherName : Name) (info : MatcherInfo) : MetaM Unit 
goal: Lean.MetaM Unit

full_name: Lean.Meta.getMatcherInfoCore?
code: def getMatcherInfoCore? (env : Environment) (declName : Name) : Option MatcherInfo 
goal: Option Lean.Meta.MatcherInfo

full_name: Lean.Meta.getMatcherInfo?
code: def getMatcherInfo? [Monad m] [MonadEnv m] (declName : Name) : m (Option MatcherInfo) 
goal: m (Option Lean.Meta.MatcherInfo)

full_name: Lean.Meta.isMatcherCore
code: @[export lean_is_matcher]
def isMatcherCore (env : Environment) (declName : Name) : Bool 
goal: Bool

full_name: Lean.Meta.isMatcher
code: def isMatcher [Monad m] [MonadEnv m] (declName : Name) : m Bool 
goal: m Bool

full_name: Lean.Meta.isMatcherAppCore?
code: def isMatcherAppCore? (env : Environment) (e : Expr) : Option MatcherInfo 
goal: Option Lean.Meta.MatcherInfo

full_name: Lean.Meta.isMatcherAppCore
code: def isMatcherAppCore (env : Environment) (e : Expr) : Bool 
goal: Bool

full_name: Lean.Meta.isMatcherApp
code: def isMatcherApp [Monad m] [MonadEnv m] (e : Expr) : m Bool 
goal: m Bool