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 RR -modules. Given linear maps f:ABf: A \to B and g:ACg: A \to C , the pushout BACB \sqcup_A C is constructed as the quotient (BC)/(f(a),g(a))aA(B \oplus C)/\langle (f(a), -g(a)) \mid a \in A \rangle , together with its universal property. Key results include the identification of coker(inr)\operatorname{coker}(\mathtt{inr}) with coker(f)\operatorname{coker}(f) , and, crucially, a base-change compatibility: SR(BAC)(SRB)SRA(SRC)S \otimes_R (B \sqcup_A C) \cong (S \otimes_R B) \sqcup_{S \otimes_R A} (S \otimes_R C) .

2. Universal injectivity

A linear map f:MNf: M \to N is called universally injective (or pure) if fRidQ:MRQNRQf \otimes_R \mathrm{id}_Q: M \otimes_R Q \to N \otimes_R Q is injective for every RR -module QQ . The file establishes:

  • A universally injective map is in particular injective.
  • (Stacks 058K, (1)\Rightarrow (4)) If ff is universally injective, it has the right lifting property against maps between finite free modules: given a commutative square with k:FGk: F \to G a map of finite free modules and h:GNh: G \to N , g:FMg: F \to M with hk=fgh \circ k = f \circ g , there exists φ:GM\varphi: G \to M with φk=g\varphi \circ k = g .
  • Universal exactness and lifting for finitely presented modules: If 0X1fX2X300 \to X_1 \xrightarrow{f} X_2 \to X_3 \to 0 is a short exact sequence with ff universally injective, then any map from a finitely presented module PP to X3X_3 lifts to X2X_2 .
  • Descent of universal injectivity along faithfully flat base change: If SS is faithfully flat over RR and fS:MRSNRSf \otimes S: M \otimes_R S \to N \otimes_R S is universally injective (as an SS -module map), then ff is universally injective over RR . This uses the natural isomorphism SR(MRQ)(SRM)S(SRQ)S \otimes_R (M \otimes_R Q) \cong (S \otimes_R M) \otimes_S (S \otimes_R Q) .

3. Domination and the pushout criterion

Given linear maps f:MNf: M \to N and g:MMg: M \to M' , one says gg dominates ff (written fgf \preceq g ) if kerfkerg\ker f \subseteq \ker g , i.e., gg factors through the image of ff . The file proves:

  • Domination is a preorder (reflexive and transitive) and is preserved by composition on the right.
  • The canonical map inr:MMMN\mathtt{inr}: M' \to M' \sqcup_M N into the pushout is universally injective if and only if gg dominates ff (Stacks 0ASL / Lemma 10.88.4). The proof proceeds via an explicit analysis of ker(inr)\ker(\mathtt{inr}) and its behavior under tensor product.
  • A universally injective short exact sequence splits: the universally injective map is a split monomorphism.
  • An equivalent characterization: gg dominates ff if and only if gg factors through some module that factors ff .

4. The Mittag-Leffler condition

Inverse systems. A projective system of sets (Fi,fij)(F_i, f_{ij}) over a directed poset satisfies the Mittag-Leffler condition if for every ii there exists jij \geq i such that Im(fij:FjFi)=Im(fkj:FkFi)\mathrm{Im}(f_{ij}: F_j \to F_i) = \mathrm{Im}(f_{kj}: F_k \to F_i) for all kjk \geq j (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 0AiBiCi00 \to A_i \to B_i \to C_i \to 0 of Mittag-Leffler inverse systems gives an exact sequence 0limAilimBilimCi00 \to \varprojlim A_i \to \varprojlim B_i \to \varprojlim C_i \to 0 on inverse limits.
    Modules. An RR -module MM is Mittag-Leffler if for every directed system of RR -modules (Ni,fij)(N_i, f_{ij}) with colimit NN , the inverse system (HomR(M,Ni))(\mathrm{Hom}_R(M, N_i)) 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 RR -module MM indexed by an ordinal SS is a filtration M0M1M_0 \subseteq M_1 \subseteq \cdots (indexed by α<S\alpha < S ) such that: it starts at 00 , has union MM , is continuous at limit ordinals, and each successive quotient Mα+1/MαM_{\alpha+1}/M_\alpha is countably generated. The key results are:

  • Kaplansky devissage \Leftrightarrow direct sum decomposition (kaplansky_devissage_iff_direct_sum): MM admits a Kaplansky devissage if and only if MiIMiM \cong \bigoplus_{i \in I} M_i where each MiM_i 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 MM is a direct sum of countably generated modules and NN is a direct summand of MM , then NN is also a direct sum of countably generated modules. This is proved by a long transfinite induction building a Kaplansky devissage for NN from the one on MM 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 RR -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 MM is flat, there is a free module FMF \supseteq M such that MM is a direct summand of FF (locally), enabling the construction of a filtered system of free modules approximating MM .
  • Lazard's theorem (Module.Flat.Lazard): MM 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: SRlimiGilimi(SRGi)S \otimes_R \varinjlim_i G_i \cong \varinjlim_i (S \otimes_R G_i) as an SS -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 PP is projective over RR , then SRPS \otimes_R P is projective over SS .
  • Projectivity \Leftrightarrow 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 RSR\to S is a faithfully flat map of commutative rings, and PP is an RR-module such that SRPS \otimes_R P is projective over SS then PP is projective over RR .

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