@[export lean_name_hash_exported]
Equations
Instances For
Equations
- x.getPrefix = match x with | Lean.Name.anonymous => Lean.Name.anonymous | p.str str => p | p.num i => p
Instances For
Equations
- x.getString! = match x with | pre.str s => s | x => panicWithPosWithDecl "Lean.Data.Name" "Lean.Name.getString!" 22 15 "unreachable code has been reached"
Instances For
Equations
Instances For
Equations
- x✝.updatePrefix x = match x✝, x with | Lean.Name.anonymous, x => Lean.Name.anonymous | pre.str s, newP => newP.mkStr s | pre.num s, newP => newP.mkNum s
Instances For
Equations
- Lean.Name.anonymous.componentsRev = []
- (p.str str).componentsRev = Lean.Name.anonymous.mkStr str :: p.componentsRev
- (p.num i).componentsRev = Lean.Name.anonymous.mkNum i :: p.componentsRev
Instances For
Equations
- x✝.eqStr x = match x✝, x with | Lean.Name.anonymous.str s, s' => s == s' | x, x_1 => false
Instances For
Equations
- x.isPrefixOf Lean.Name.anonymous = (x == Lean.Name.anonymous)
- x.isPrefixOf (p'.num i) = (x == p'.num i || x.isPrefixOf p')
- x.isPrefixOf (p'.str str) = (x == p'.str str || x.isPrefixOf p')
Instances For
Equations
- Lean.Name.anonymous.cmp Lean.Name.anonymous = Ordering.eq
- Lean.Name.anonymous.cmp x = Ordering.lt
- x.cmp Lean.Name.anonymous = Ordering.gt
- (p₁.num i₁).cmp (p₂.num i₂) = match p₁.cmp p₂ with | Ordering.eq => compare i₁ i₂ | ord => ord
- (pre.num i).cmp (pre_1.str str) = Ordering.lt
- (pre.str str).cmp (pre_1.num i) = Ordering.gt
- (p₁.str n₁).cmp (p₂.str n₂) = match p₁.cmp p₂ with | Ordering.eq => compare n₁ n₂ | ord => ord
Instances For
Equations
- x.lt y = (x.cmp y == Ordering.lt)
Instances For
Equations
- Lean.Name.anonymous.quickCmpAux Lean.Name.anonymous = Ordering.eq
- Lean.Name.anonymous.quickCmpAux x = Ordering.lt
- x.quickCmpAux Lean.Name.anonymous = Ordering.gt
- (p₁.num i₁).quickCmpAux (p₂.num i₂) = match compare i₁ i₂ with | Ordering.eq => p₁.quickCmpAux p₂ | ord => ord
- (pre.num i).quickCmpAux (pre_1.str str) = Ordering.lt
- (pre.str str).quickCmpAux (pre_1.num i) = Ordering.gt
- (p₁.str n₁).quickCmpAux (p₂.str n₂) = match compare n₁ n₂ with | Ordering.eq => p₁.quickCmpAux p₂ | ord => ord
Instances For
Equations
- n₁.quickCmp n₂ = match compare n₁.hash n₂.hash with | Ordering.eq => n₁.quickCmpAux n₂ | ord => ord
Instances For
Equations
- n₁.quickLt n₂ = (n₁.quickCmp n₂ == Ordering.lt)
Instances For
Returns true if the name has any numeric components.
Instances For
The frontend does not allow user declarations to start with _
in any of its parts.
We use name parts starting with _
internally to create auxiliary names (e.g., _private
).
Equations
Instances For
The frontend does not allow user declarations to start with _
in any of its parts.
We use name parts starting with _
internally to create auxiliary names (e.g., _private
).
This function checks if any component of the name starts with _
, or is numeric.
Equations
Instances For
Checks whether the name is an implementation-detail hypothesis name.
Implementation-detail hypothesis names start with a double underscore.
Equations
- (Lean.Name.anonymous.str s).isImplementationDetail = s.startsWith "__"
- (p.num i).isImplementationDetail = p.isImplementationDetail
- (p.str str).isImplementationDetail = p.isImplementationDetail
- Lean.Name.anonymous.isImplementationDetail = false
Instances For
Equations
- x.isAtomic = match x with | Lean.Name.anonymous => true | Lean.Name.anonymous.str str => true | Lean.Name.anonymous.num i => true | x => false
Instances For
Equations
- x.isAnonymous = match x with | Lean.Name.anonymous => true | x => false