Zulip Chat Archive
Stream: mathlib4
Topic: First pull request
Jonas van der Schaaf (Nov 29 2025 at 17:04):
I wrote my first pull request yesterday, but it doesn't pass the CI tests. I get the following warning:
warning: Mathlib/ModelTheory/Types.lean:13:0: Modules starting with Mathlib.ModelTheory are not allowed to import modules starting with Mathlib.Topology. This module depends on Mathlib.Topology.Defs.Basic
Why is importing files from Topology not allowed in ModelTheory?
Of course, any feedback on the lean code is also welcome. I'm sure my code is less than optimal :innocent:.
Ruben Van de Velde (Nov 29 2025 at 18:08):
The goal is to avoid every part of mathlib depending on every other part like a bowl of spaghetti. I don't know much about this particular case though. Would you say the dependency on topology is fundamental to what you're doing?
Kevin Buzzard (Nov 29 2025 at 18:15):
The simplest approach might be to put the material in the Topology directory rather than where you have currently put it.
For example the reals are defined in Data/Real/Basic.lean but the topological space structure on it is defined (via the metric space structure) in Topology/MetricSpace/Pseudo/Defs.lean rather than in Data/Real.
Aaron Liu (Nov 29 2025 at 18:20):
I feel like this is definitely model theory and I would be confused if I was looking for it and found it under topology instead of model theory
Aaron Liu (Nov 29 2025 at 18:21):
like for example docs#krullTopology is in FieldTheory/KrullTopology it's not under Topology
Kevin Buzzard (Nov 29 2025 at 18:23):
It's model theory but it's also topology!
Aaron Liu (Nov 29 2025 at 18:25):
I've seen the real numbers come up naturally in topology
Aaron Liu (Nov 29 2025 at 18:26):
I've never seen the model-theory types come up in topology
Aaron Liu (Nov 29 2025 at 18:26):
but well :shrug: I'm not a model theorist maybe this is secretly topology
Kevin Buzzard (Nov 29 2025 at 18:36):
yeah Topology/Instances does seem to be about concrete types rather than things like CompleteType T α. I don't know how much topology model theorists need. If they need a bunch of facts from topology then we might have to revisit the restriction (which was added in #23088 in the file Mathlib/Tactic/Linter/DirectoryDependency.lean by @Anne Baanen ).
Jonas van der Schaaf (Nov 29 2025 at 19:09):
I won't dare say how much topology is needed. I think it's better to let more seasoned model theorists than me weigh in on this (I think I spotted a few, can I just tag people in here?).
Matthew Ballard (Nov 29 2025 at 19:23):
At the least there should be a new file/folder, I don’t know how smart the linter is though…
Ruben Van de Velde (Nov 29 2025 at 19:40):
Yeah, we could exempt ModelTheory/Topology, for example
Last updated: Dec 20 2025 at 21:32 UTC