Zulip Chat Archive

Stream: mathlib4

Topic: algebra.category.Module.algebra


Lars Ericson (May 27 2023 at 12:33):

algebra.category.Module.algebra shows an empty dependency graph.

The code shows an import

import Mathbin.Algebra.Category.Module.Basic

The imported file is marked as a ported file .

However, it is not present in the Mathlib4 github (no Module directory here. When I do a git clone of mathlib4, it is not present.

Question: Should a file marked as Ported be present in Mathlib4 master branch?

Apurva Nakade (May 27 2023 at 12:38):

It has probably been renamed to ModuleCat.Basic

Eric Wieser (May 27 2023 at 12:43):

Lars Ericson said:

The imported file is marked as a ported file .

The page you link to tells you what the new name is at the top of the page

Eric Wieser (May 27 2023 at 12:43):

(it is indeed Mathlib.Algebra.Category.ModuleCat.Basic)

Lars Ericson (May 27 2023 at 12:45):

Thanks @Apurva Nakade and @Eric Wieser, I will look for those renames going forward.

Lars Ericson (May 27 2023 at 12:55):

Does this mean that every file in the Algebrra.Category.Module folder should be in ModuleCat and probably doesn't need to be ported? This would seem to be the case for algebra.category.Module.algebra. which refers to the moved file Module.basic.

I am looking at Unported files in mathlib port status for short unported files with no dependencies. That's why I'm looking at this one, but the move of Module to ModuleCat results in some sort of false positives in the unported file list.

Eric Wieser (May 27 2023 at 12:58):

There should be no false positives in the unported files list

Eric Wieser (May 27 2023 at 12:59):

Which one looks like a false positive?

Lars Ericson (May 27 2023 at 13:10):

@Eric Wieser false positive in the sense that algebra.category.Module.algebra is marked as unported and refers to Algebra.Category.Module.Basic which got moved to Algebra.Category.ModuleCat.Basic but is still present in the porting directory as a file in Module, not ModuleCat. By analogy it makes me wonder if Module.Algebra should really be in ModuleCat.Algebra. I guess that's an incorrect analogy.

Lars Ericson (May 27 2023 at 13:13):

Perhaps the underlying problem is that Lean 3 is a moving target so you can't manually adjust mathlib3port to remove files already ported but ported to a new choice of directory. I.e. I assume you regenerate mathlib3port all the time from the latest Lean 3 source, so you can't adjust the porting directory to reflect folder reorganization in the new version?

Eric Wieser (May 27 2023 at 13:16):

Lars Ericson said:

and refers to Algebra.Category.Module.Basic

Refers in what way?

Mauricio Collares (May 27 2023 at 13:16):

When you say "[it] refers to Algebra.Category.Module.Basic", "it" means the mathport output for algebra.category.Module.algebra, right?

Lars Ericson (May 27 2023 at 13:21):

@Mauricio Collares it means that line 13 of the mathlib3port of Algebra.Category.Module.Algebra is

import Mathbin.Algebra.Category.Module.Basic

but this has been relocated to ModuleCat in math4lib.

Eric Wieser (May 27 2023 at 13:48):

This is not a false positive; the dependencies are truly ported. One of your jobs when porting is to fix renamed imports.


Last updated: Dec 20 2023 at 11:08 UTC