Zulip Chat Archive

Stream: new members

Topic: Ascii not (and more)


Eric Conlon (Sep 27 2023 at 20:17):

Hi all - How do I find the ASCII version of \not or even not equals? Is there a table with all the common pieces of syntax?

Ruben Van de Velde (Sep 27 2023 at 20:19):

Why?

Eric Conlon (Sep 27 2023 at 20:26):

Why \not?

Kyle Miller (Sep 27 2023 at 20:47):

I don't think Not has an ASCII notation -- you can see the notation defined here: https://github.com/leanprover/lean4/blob/a62d2fd4979671b76b8ab13ccbe4fdf410ec0d9d/src/Init/Notation.lean#L330

It's just notation for the docs#Not function, so the "ASCII" version is the function Not. It will pretty print using the Unicode notation.

Kyle Miller (Sep 27 2023 at 20:49):

If you want, you can define your own ASCII-only notations, but come join the Unicode party :-)

Eric Conlon (Sep 27 2023 at 20:54):

Thanks! Notation.lean is helpful. I don't see "not equals" there but I can get by.

Damiano Testa (Sep 27 2023 at 21:01):

docs#Ne is a tricky one: docs#≠.

Eric Wieser (Sep 27 2023 at 21:04):

If you have lean open in vscode, you can hover over the notation and it will tell you its ascii name. (edit: not all names are ascii!)

Adam Topaz (Sep 28 2023 at 01:30):

I’ve seen ~ for not in some old symbolic logic texts. You could add this as custom notation in your project quite easily


Last updated: Dec 20 2023 at 11:08 UTC