Equations
Instances For
Equations
- Lean.Name.anonymous.getPrefix = Lean.Name.anonymous
- (p.str str).getPrefix = p
- (p.num i).getPrefix = p
Instances For
Equations
- (pre.str s).getString! = s
- x.getString! = panicWithPosWithDecl "Lean.Data.Name" "Lean.Name.getString!" 22 15 "unreachable code has been reached"
Instances For
Equations
Instances For
Equations
- Lean.Name.anonymous.updatePrefix x = Lean.Name.anonymous
- (pre.str s).updatePrefix x = x.mkStr s
- (pre.num s).updatePrefix x = x.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
- (Lean.Name.anonymous.str s).eqStr x = (s == x)
- x✝.eqStr x = 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
Returns true if this a part of name that is internal or dynamically generated so that it may easily be changed.
Generally, user code should not explicitly use internal names.
Equations
Instances For
Check that a string begins with the given prefix, and then is only digit characters.
Equations
- Lean.Name.isInternalDetail.matchPrefix s pre = (s.startsWith pre && (s.drop pre.length).all Char.isDigit)
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
- Lean.Name.anonymous.isAtomic = true
- (Lean.Name.anonymous.str str).isAtomic = true
- (Lean.Name.anonymous.num i).isAtomic = true
- x.isAtomic = false
Instances For
Equations
- Lean.Name.anonymous.isAnonymous = true
- x.isAnonymous = false