Zulip Chat Archive

Stream: general

Topic: Why can't identifiers be named in other languages?


Marvin (Feb 13 2026 at 17:26):

I'm using Lean as a host for a multilingual linguistics project. (I don't simply mean that the team members speak different languages, I mean the point is providing encodings for multiple languages)

If I try to name an identifier in Korean for example, I'm finding that this is considered illegal

axiom α : Type
axiom  : α
--    ^ expected token

Is there a technical reason for this, or is it just social norms enforcement?

I see that «나» is legal, but I don't want to write this everywhere and I don't understand why such restriction is in place. Can this be disabled at least on a codebase opt-in?

Malvin Gattinger (Feb 13 2026 at 17:33):

I think there are some restrictions on which part of unicode is allowed in identifiers by default, but could not find them. That said, you can use notation to be allowed to write it without the « » later:

axiom α : Type
axiom «나» : α

notation "나" => «나»

example :  =  := by rfl

Chris Bailey (Feb 13 2026 at 17:49):

Malvin Gattinger said:

I think there are some restrictions on which part of unicode is allowed in identifiers by default, but could not find them.

This maybe?

Aaron Liu (Feb 13 2026 at 18:04):

I'm guessing it's a docs#Lean.isIdFirst followed by zero or more docs#Lean.isIdRest

Yuyang Zhao (Feb 13 2026 at 18:06):

#lean4 > Accept more Unicode in identifiers?


Last updated: Feb 28 2026 at 14:05 UTC