Closed dselsam closed 3 years ago
This is intentional. We generate concise names for notation based on their actual definition. We want to have concise names because we want to be able to use the name to selectively activate/deactivate notation in the future. The generated names can be easily guessed by users. Example:
infix:65 "+" => Nat.add
#check «term_+_»
Note that, we have scoped notation, and including the full module name will create problems for activating this kind of notation. I don't think this is an issue for people using Lean 4 directly. It is equivalent to getting an error because you wrote the same function in different files. The default solution is to use namespaces, and the same works here too.
Whoops, I will update mathport
to put the notation inside a namespace and revert the commit above.
There are currently auto-generated names in lean4 that do not depend on the module and so may clash across modules. A fix is implemented here: https://github.com/dselsam/lean4/commit/91e1f6cba9fa989ad1db9c2e5a6edf997f74f7eb