Zulip Chat Archive

Stream: mathlib4

Topic: Adding files to Mathlib.Init


Yaël Dillies (May 09 2025 at 17:45):

What is the correct procedure for adding files to Mathlib.Init ? I am trying to add Mathlib.Tactic.MinImports to it, but the obvious thing fails in #24722 with

error: the following 1 module(s) do not import Mathlib.Init: #[Mathlib.Tactic.MinImports]

Aaron Liu (May 09 2025 at 17:59):

I think you have to have Mathlib.Tactic.MinImports import Mathlib.Tactic.Linter.Header or add it as an exception in the script

Damiano Testa (May 09 2025 at 18:03):

The general intention is that Mathlib.Init is the "first import", but Mathlib.Tactic.Linter.Header is the "really first". Plus some mechanism for preventing more imports to Init.

Michael Rothgang (May 09 2025 at 19:49):

Aaron Liu said:

I think you have to have Mathlib.Tactic.MinImports import Mathlib.Tactic.Linter.Header or add it as an exception in the script

Indeed! You shouldn't need to add an exception.

Damiano Testa (May 09 2025 at 20:57):

I wonder though whether ImportGraph is a better place for minImports.


Last updated: Dec 20 2025 at 21:32 UTC