Zulip Chat Archive

Stream: lean4

Topic: unsupported unicode


Jihoon Hyun (Aug 10 2023 at 19:17):

The unicode for double tack (⫫ : U+2AEB) is not supported.
Is there a list of unicodes supported in lean?

Eric Wieser (Aug 10 2023 at 19:17):

Works for me:

notation "⫫" => 0
#check 

Eric Wieser (Aug 10 2023 at 19:18):

What do you mean by "unsupported"?

Jihoon Hyun (Aug 10 2023 at 19:18):

I meant that it couldn't be used as a variable like \alpha. Although after looking at your answer, I thought it is definitely not a variable..

Jon Eugster (Aug 10 2023 at 22:03):

Do you mean that the following things don't work:

variable ( : )    -- error: expected token
variable (ˣ : )    -- error: expected token
variable (s : )   -- error: expected token

I wanna say that variable names are of type Lean.Name and not everything is allowed in them. However, I wouldn't know how I'd find out what the rules are.

Eric Wieser (Aug 10 2023 at 22:05):

variable («⫫» : )    -- ok
variable («ˣ» : )    -- ok
variable («₁s» : )   -- ok

Mario Carneiro (Aug 11 2023 at 13:34):

there is a specific set of unicode codepoints allowed in identifiers without quoting, basically alphabetic characters in several languages plus letter-like symbols

Mario Carneiro (Aug 11 2023 at 13:35):

https://github.com/leanprover/lean4/blob/510bc47cc366e7d231c62c31f7ec1cbbacda9e6d/src/Init/Meta.lean#L71-L77


Last updated: Dec 20 2023 at 11:08 UTC