Zulip Chat Archive
Stream: mathlib4
Topic: Notation error for norm
Anatole Dedecker (Jun 26 2023 at 18:33):
Is there a good reason for the following to fail?
import Mathlib.Analysis.NormedSpace.Basic
example (x : ℝ) : ‖x ‖ = 0 := sorry -- expected term
Jireh Loreaux (Jun 26 2023 at 18:56):
I guess for human parsing (and maybe Lean too?) it's helpful if there is no space between the norm symbols and the stuff inside it.
Anatole Dedecker (Jun 26 2023 at 19:00):
Well it's definitely cleaner, but this is really annoying for beginners who don't have this kind of style rules in mind.
Jireh Loreaux (Jun 26 2023 at 19:09):
fair point. Is \norm
a valid abbreviation in the Lean 4 extension yet? (EDIT: seems not, that would have helped with cursor placement)
Anatole Dedecker (Jun 26 2023 at 19:22):
I think it is :thinking:
Jireh Loreaux (Jun 26 2023 at 19:31):
Lol, I have a very old version of lean-m17n that was hijacking the Lean 4 extension and not doing the replacement.
Patrick Massot (Jun 26 2023 at 19:50):
I guess this is the price to pay for having a reasonable notation. Here, as often, reasonable means the same token is a delimiter on both sides.
Kevin Buzzard (Jun 26 2023 at 20:59):
AKA "unreasonable", as far as some computer scientists are concerned :-)
Patrick Massot (Jun 26 2023 at 21:11):
I know, hence my emphasis.
Sebastian Ullrich (Jun 26 2023 at 21:24):
There is workable syntax, and then there is workaroundable syntax
Last updated: Dec 20 2023 at 11:08 UTC