Zulip Chat Archive

Stream: mathlib4

Topic: not allowed to import modules starting with Mathlib.Geometry


Bjørn Kjos-Hanssen (Apr 08 2025 at 18:18):

While working on #18711 I was surprised to get this linter message:

Modules starting with Mathlib.Topology are not allowed to import modules starting with Mathlib.Geometry

In my case, proving that one-point compactification of Euclidean space is homeomorphic to the sphere, I wanted to import the material on stereographic projection from Mathlib.Geometry.Manifold.Instances.Sphere. What to do?

Jon Eugster (Apr 08 2025 at 18:22):

This is a very new linter and there should be a file somewhere where the "allowed" dependencies of mathlib subdirectories can be adjusted.

Jon Eugster (Apr 08 2025 at 18:24):

It's aimed to help getting a more modular mathlib but I don't think anybody expects the current list to be final. (sorry on mobile, I'm sure somebody can fill in the details)

Bjørn Kjos-Hanssen (Apr 08 2025 at 18:27):

Sounds good @Jon Eugster I'll just add a line to overrideAllowedImportDirs (even if that means a lot of olean's have to be rebuilt locally)

Johan Commelin (Apr 09 2025 at 04:02):

The other option is to move the definition of the stereographic projection and all its topological properties out of the geometry folder.

Jz Pan (Apr 09 2025 at 06:58):

... or move your one-point compactification result to Geometry folder.


Last updated: May 02 2025 at 03:31 UTC