Zulip Chat Archive
Stream: new members
Topic: New user, planning to do some homological algebra
Liran Shaul (Nov 04 2025 at 15:46):
Hi, I am Liran Shaul, an homological algebraist from Prague. I have some plans to try to add some major results in Homological algebra to Lean. As a small test, I just added to the injective module file in matlab a result showing that direct product of injectives is injective. I think I was able to push this to the github, but it was not yet approved. I am not sure if I need to do anything for it to be approved.
Bryan Gin-ge Chen (Nov 04 2025 at 16:04):
Welcome! Looks like your PR is at #31263 and is waiting for CI to finish seeing if the code compiles and passes linting, etc. You probably have already seen it but our guide for contributors is here and describes the contribution flow in some detail.
Liran Shaul (Nov 04 2025 at 16:28):
Bryan Gin-ge Chen said:
Welcome! Looks like your PR is at #31263 and is waiting for CI to finish seeing if the code compiles and passes linting, etc. You probably have already seen it but our guide for contributors is here and describes the contribution flow in some detail.
Thank you! I did not see this before. It is helpful.
Axel Boldt (Nov 04 2025 at 21:01):
It seems that in the rest of Injective.lean, they consider slightly more general situations where the ring R can belong to any universe, not just to Type like in your addition. Also, they seem to have certain naming conventions for their theorems which you aren't following. Maybe that's why the pull request is held up.
Liran Shaul (Nov 04 2025 at 22:11):
I hope someone could help me. I accepted some suggestions for imporvements, but after accepting one of them, it stopped compiling. I tried to revert back to last known version, but it still seem to suggest an error on github, despite working earlier. Can anyone take a look? thank you.
Michael Rothgang (Nov 04 2025 at 22:12):
I can take a look at your PR and give you some style feedback; hopefully tomorrow.
Andrew Yang (Nov 04 2025 at 22:30):
Have you tried to open the file locally? It should tell you the error.
Liran Shaul (Feb 19 2026 at 10:59):
I am now pleased to announce that I was able to get to zero sorries on my project. I will put the full details on the arxiv soon once I finish writing the paper describing it. Here are the highlights of the project:
1. Pushouts of modules
The project develops from scratch the theory of pushouts in the category of -modules. Given linear maps and , the pushout is constructed as the quotient , together with its universal property. Key results include the identification of with , and, crucially, a base-change compatibility: .
2. Universal injectivity
A linear map is called universally injective (or pure) if is injective for every -module . The file establishes:
- A universally injective map is in particular injective.
- (Stacks 058K, (1) (4)) If is universally injective, it has the right lifting property against maps between finite free modules: given a commutative square with a map of finite free modules and , with , there exists with .
- Universal exactness and lifting for finitely presented modules: If is a short exact sequence with universally injective, then any map from a finitely presented module to lifts to .
- Descent of universal injectivity along faithfully flat base change: If is faithfully flat over and is universally injective (as an -module map), then is universally injective over . This uses the natural isomorphism .
3. Domination and the pushout criterion
Given linear maps and , one says dominates (written ) if , i.e., factors through the image of . The file proves:
- Domination is a preorder (reflexive and transitive) and is preserved by composition on the right.
- The canonical map into the pushout is universally injective if and only if dominates (Stacks 0ASL / Lemma 10.88.4). The proof proceeds via an explicit analysis of and its behavior under tensor product.
- A universally injective short exact sequence splits: the universally injective map is a split monomorphism.
- An equivalent characterization: dominates if and only if factors through some module that factors .
4. The Mittag-Leffler condition
Inverse systems. A projective system of sets over a directed poset satisfies the Mittag-Leffler condition if for every there exists such that for all (the images eventually stabilize). The file proves:
- The Mittag-Leffler condition is equivalent to eventually stable images.
- If a system has surjective transition maps, it satisfies Mittag-Leffler.
- The non-emptiness of the inverse limit for Mittag-Leffler systems indexed by a countable directed set.
-
The Mittag-Leffler exactness theorem: a short exact sequence of Mittag-Leffler inverse systems gives an exact sequence on inverse limits.
Modules. An -module is Mittag-Leffler if for every directed system of -modules with colimit , the inverse system satisfies the Mittag-Leffler condition. Several equivalent reformulations are proved, including one in terms of finitely presented test modules (the definition matching Stacks 059M). Stability properties include: -
Finitely presented modules are Mittag-Leffler.
- Free modules are Mittag-Leffler.
- Direct summands of Mittag-Leffler modules are Mittag-Leffler.
- Projective modules are Mittag-Leffler (since they are direct summands of free modules).
- A countably generated Mittag-Leffler module has a presentation as a colimit of a countable system.
5. Kaplansky's theorem and devissage
This file contains the transfinite devissage machinery. A Kaplansky devissage of an -module indexed by an ordinal is a filtration (indexed by ) such that: it starts at , has union , is continuous at limit ordinals, and each successive quotient is countably generated. The key results are:
- Kaplansky devissage direct sum decomposition (
kaplansky_devissage_iff_direct_sum): admits a Kaplansky devissage if and only if where each is countably generated. This is proved by a transfinite induction constructing the devissage from a given decomposition and vice versa. - Direct summands inherit decomposability (
dirsummand_of_dirSumCountable): If is a direct sum of countably generated modules and is a direct summand of , then is also a direct sum of countably generated modules. This is proved by a long transfinite induction building a Kaplansky devissage for from the one on via the retraction.
6. Lazard's theorem
This file establishes Lazard's theorem: a flat module is a filtered colimit of finitely generated free modules. The key steps are:
- Every finitely presented module is a compact object in the category of -modules (maps from it into a filtered colimit factor through a finite stage).
- Direct limits of flat modules are flat.
- Flat modules can be enlarged to free modules: if is flat, there is a free module such that is a direct summand of (locally), enabling the construction of a filtered system of free modules approximating .
- Lazard's theorem (
Module.Flat.Lazard): is flat if and only if it is a filtered (direct) colimit of finite free modules.
7. Base change and the main result (basechange.lean, dirlimitchange.lean)
The final assembly. The file dirlimitchange.lean establishes the key commutation: as an -linear isomorphism, compatibly with the natural maps.
The file basechange.lean then proves:
- Free modules base change projectively (trivially).
- Projectivity is preserved under faithful flat base change in the easy direction: if is projective over , then is projective over .
-
Projectivity countable flat + Mittag-Leffler (for finitely or countably generated modules): a countably generated flat Mittag-Leffler module is projective (using Lazard's theorem plus the Kaplansky/devissage machinery).
-
The Main Theorem (
proj_faithfullyFlat): if is a faithfully flat map of commutative rings, and is an -module such that is projective over then is projective over .
Martin Dvořák (Feb 19 2026 at 17:54):
Hello! I am happy to see another person working with Lean in Czechia! But what is the wall of text you just pasted here?
Liran Shaul (Feb 19 2026 at 18:12):
Hi, thank you! sorry for the wall of text. It was an attempt to summerize the formalization project I just finished, but I guess it might be too massive for such a post. I hope to post the arxiv version in about a week.
Last updated: Feb 28 2026 at 14:05 UTC