File: .lake/packages/batteries/Batteries/Lean/Meta/UnusedNames.lean

full_name: _private.«.lake».packages.batteries.Batteries.Lean.Meta.UnusedNames.0.Lean.Name.parseIndexSuffix
code: private def parseIndexSuffix (s : Substring) : Option Nat 
goal: Option Nat

full_name: Lean.Name.MatchUpToIndexSuffix.noMatch
code: /--
Result type of `Lean.Name.matchUpToIndexSuffix`. See there for details.
-/
inductive MatchUpToIndexSuffix
  /-- Exact match. -/
  |  exactMatch
  /-- No match. -/
  | noMatch
  /-- Match up to suffix. -/
  | suffixMatch (i : Nat)
goal: Lean.Name.MatchUpToIndexSuffix

full_name: Lean.Name.MatchUpToIndexSuffix.exactMatch
code: /--
Result type of `Lean.Name.matchUpToIndexSuffix`. See there for details.
-/
inductive MatchUpToIndexSuffix
  /-- Exact match. -/
  |  exactMatch
  /-- No match. -/
  | noMatch
  /-- Match up to suffix. -/
  | suffixMatch (i : Nat)
goal: Lean.Name.MatchUpToIndexSuffix

full_name: Lean.Name.MatchUpToIndexSuffix.suffixMatch
code: /--
Result type of `Lean.Name.matchUpToIndexSuffix`. See there for details.
-/
inductive MatchUpToIndexSuffix
  /-- Exact match. -/
  |  exactMatch
  /-- No match. -/
  | noMatch
  /-- Match up to suffix. -/
  | suffixMatch (i : Nat)
goal: Lean.Name.MatchUpToIndexSuffix

full_name: Lean.Name.MatchUpToIndexSuffix
code: /--
Result type of `Lean.Name.matchUpToIndexSuffix`. See there for details.
-/
inductive MatchUpToIndexSuffix
  /-- Exact match. -/
  |  exactMatch
  /-- No match. -/
  | noMatch
  /-- Match up to suffix. -/
  | suffixMatch (i : Nat)
goal: Type

full_name: Lean.Name.matchUpToIndexSuffix
code: /--
Succeeds if `n` is equal to `query`, except `n` may have an additional `_i`
suffix for some natural number `i`. More specifically:

- If `n = query`, the result is `exactMatch`.
- If `n = query ++ "_i"` for some natural number `i`, the result is
  `suffixMatch i`.
- Otherwise the result is `noMatch`.
-/
def matchUpToIndexSuffix (n : Name) (query : Name) :
    MatchUpToIndexSuffix 
goal: Lean.Name.MatchUpToIndexSuffix

full_name: Lean.LocalContext.getUnusedUserNameIndex.updateMinSuffix
code: /--
Obtain the least natural number `i` such that `suggestion ++ "_i"` is an unused
name in the given local context. If `suggestion` itself is unused, the result
is `none`.
-/
def getUnusedUserNameIndex (lctx : LocalContext) (suggestion : Name) :
    Option Nat 
goal: Option Nat → Nat → Option Nat

full_name: Lean.LocalContext.getUnusedUserNameIndex
code: /--
Obtain the least natural number `i` such that `suggestion ++ "_i"` is an unused
name in the given local context. If `suggestion` itself is unused, the result
is `none`.
-/
def getUnusedUserNameIndex (lctx : LocalContext) (suggestion : Name) :
    Option Nat 
goal: Option Nat

full_name: Lean.LocalContext.getUnusedUserName
code: /--
Obtain a name `n` such that `n` is unused in the given local context and
`suggestion` is a prefix of `n`. This is similar to `getUnusedName` but uses
a different algorithm which may or may not be faster.
-/
def getUnusedUserName (lctx : LocalContext) (suggestion : Name) : Name 
goal: Lean.Name

full_name: Lean.LocalContext.getUnusedUserNames
code: /--
Obtain `n` distinct names such that each name is unused in the given local
context and `suggestion` is a prefix of each name.
-/
def getUnusedUserNames (lctx : LocalContext) (n : Nat) (suggestion : Name) :
    Array Name 
goal: Array Lean.Name

full_name: Lean.LocalContext.getUnusedUserNames.loop
code: /--
Obtain `n` distinct names such that each name is unused in the given local
context and `suggestion` is a prefix of each name.
-/
def getUnusedUserNames (lctx : LocalContext) (n : Nat) (suggestion : Name) :
    Array Name 
goal: Array Lean.Name

full_name: Lean.Meta.getUnusedUserName
code: /--
Obtain a name `n` such that `n` is unused in the current local context and
`suggestion` is a prefix of `n`.
-/
def getUnusedUserName [Monad m] [MonadLCtx m] (suggestion : Name) : m Name 
goal: m Lean.Name

full_name: Lean.Meta.getUnusedUserNames
code: /--
Obtain `n` distinct names such that each name is unused in the current local
context and `suggestion` is a prefix of each name.
-/
def getUnusedUserNames [Monad m] [MonadLCtx m] (n : Nat) (suggestion : Name) :
    m (Array Name) 
goal: m (Array Lean.Name)