Equations
- Lean.instCoeStringName = { coe := Lean.Name.mkSimple }
@[export lean_name_hash_exported]
Equations
Equations
- Lean.Name.getPrefix _fun_discr = match _fun_discr with | Lean.Name.anonymous => Lean.Name.anonymous | Lean.Name.str p str => p | Lean.Name.num p i => p
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- Lean.Name.eqStr _fun_discr _fun_discr = match _fun_discr, _fun_discr with | Lean.Name.str Lean.Name.anonymous s, s' => s == s' | x, x_1 => false
Equations
- Lean.Name.isPrefixOf _fun_discr Lean.Name.anonymous = (_fun_discr == Lean.Name.anonymous)
- Lean.Name.isPrefixOf _fun_discr (Lean.Name.num p' i) = (_fun_discr == Lean.Name.num p' i || Lean.Name.isPrefixOf _fun_discr p')
- Lean.Name.isPrefixOf _fun_discr (Lean.Name.str p' str) = (_fun_discr == Lean.Name.str p' str || Lean.Name.isPrefixOf _fun_discr p')
Equations
- Lean.Name.isSuffixOf Lean.Name.anonymous _fun_discr = true
- Lean.Name.isSuffixOf (Lean.Name.str p₁ s₁) (Lean.Name.str p₂ s₂) = (s₁ == s₂ && Lean.Name.isSuffixOf p₁ p₂)
- Lean.Name.isSuffixOf (Lean.Name.num p₁ n₁) (Lean.Name.num p₂ n₂) = (n₁ == n₂ && Lean.Name.isSuffixOf p₁ p₂)
- Lean.Name.isSuffixOf _fun_discr _fun_discr = false
Equations
- Lean.Name.cmp Lean.Name.anonymous Lean.Name.anonymous = Ordering.eq
- Lean.Name.cmp Lean.Name.anonymous _fun_discr = Ordering.lt
- Lean.Name.cmp _fun_discr Lean.Name.anonymous = Ordering.gt
- Lean.Name.cmp (Lean.Name.num p₁ i₁) (Lean.Name.num p₂ i₂) = match Lean.Name.cmp p₁ p₂ with | Ordering.eq => compare i₁ i₂ | ord => ord
- Lean.Name.cmp (Lean.Name.num pre i) (Lean.Name.str pre_1 str) = Ordering.lt
- Lean.Name.cmp (Lean.Name.str pre str) (Lean.Name.num pre_1 i) = Ordering.gt
- Lean.Name.cmp (Lean.Name.str p₁ n₁) (Lean.Name.str p₂ n₂) = match Lean.Name.cmp p₁ p₂ with | Ordering.eq => compare n₁ n₂ | ord => ord
Equations
- Lean.Name.lt x y = (Lean.Name.cmp x y == Ordering.lt)
Equations
- Lean.Name.quickCmpAux Lean.Name.anonymous Lean.Name.anonymous = Ordering.eq
- Lean.Name.quickCmpAux Lean.Name.anonymous _fun_discr = Ordering.lt
- Lean.Name.quickCmpAux _fun_discr Lean.Name.anonymous = Ordering.gt
- Lean.Name.quickCmpAux (Lean.Name.num p₁ i₁) (Lean.Name.num p₂ i₂) = match compare i₁ i₂ with | Ordering.eq => Lean.Name.quickCmpAux p₁ p₂ | ord => ord
- Lean.Name.quickCmpAux (Lean.Name.num pre i) (Lean.Name.str pre_1 str) = Ordering.lt
- Lean.Name.quickCmpAux (Lean.Name.str pre str) (Lean.Name.num pre_1 i) = Ordering.gt
- Lean.Name.quickCmpAux (Lean.Name.str p₁ n₁) (Lean.Name.str p₂ n₂) = match compare n₁ n₂ with | Ordering.eq => Lean.Name.quickCmpAux p₁ p₂ | ord => ord
Equations
- Lean.Name.quickCmp n₁ n₂ = match compare (Lean.Name.hash n₁) (Lean.Name.hash n₂) with | Ordering.eq => Lean.Name.quickCmpAux n₁ n₂ | ord => ord
Equations
- Lean.Name.quickLt n₁ n₂ = (Lean.Name.quickCmp n₁ n₂ == Ordering.lt)
@[inline]
Alternative HasLt instance.
Equations
- Lean.Name.hasLtQuick = { lt := fun a b => Lean.Name.quickLt a b = true }
@[inline]
Equations
- Lean.Name.instDecidableRelNameLtHasLtQuick = inferInstanceAs (DecidableRel fun a b => Lean.Name.quickLt a b = true)
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
- Lean.Name.isInternal (Lean.Name.str p s) = (String.get s 0 == Char.ofNat 95 || Lean.Name.isInternal p)
- Lean.Name.isInternal (Lean.Name.num p i) = Lean.Name.isInternal p
- Lean.Name.isInternal _fun_discr = false
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Name.isAnonymous _fun_discr = match _fun_discr with | Lean.Name.anonymous => true | x => false
Equations
- Lean.Name.isStr _fun_discr = match _fun_discr with | Lean.Name.str pre str => true | x => false
Equations
- Lean.Name.isNum _fun_discr = match _fun_discr with | Lean.Name.num pre i => true | x => false
Equations
- String.toName s = let ps := String.splitOn s "." List.foldl (fun n p => Lean.Name.mkStr n (String.trim p)) Lean.Name.anonymous ps