Skip to content

Commit d925b89

Browse files
committed
feat(Algebra/ModuleCat): exactness of restrictScalars for general universe level (leanprover-community#39133)
Currently exactness of `ModuleCat.restrictScalars` is synth via being adjoint functor, however this needs the universe level to be some `max u v` where `u` is the universe level of the ring. Here we provide exactness of restrictScalars for general universe level using it preserves short exact sequence.
1 parent b657502 commit d925b89

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public import Mathlib.Algebra.Category.ModuleCat.Algebra
154154
public import Mathlib.Algebra.Category.ModuleCat.Basic
155155
public import Mathlib.Algebra.Category.ModuleCat.Biproducts
156156
public import Mathlib.Algebra.Category.ModuleCat.ChangeOfRings
157+
public import Mathlib.Algebra.Category.ModuleCat.ChangeOfRingsExact
157158
public import Mathlib.Algebra.Category.ModuleCat.Colimits
158159
public import Mathlib.Algebra.Category.ModuleCat.Descent
159160
public import Mathlib.Algebra.Category.ModuleCat.Differentials.Basic
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/-
2+
Copyright (c) 2025 Nailin Guan. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Nailin Guan
5+
-/
6+
module
7+
8+
public import Mathlib.Algebra.Category.ModuleCat.ChangeOfRings
9+
public import Mathlib.Algebra.Homology.ShortComplex.ExactFunctor
10+
public import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
11+
12+
/-!
13+
14+
# Exactness of functors for change of rings.
15+
16+
In this file we provide exactness of restrictScalars for general universe level using it preserves
17+
short exact sequences.
18+
Note : previously exactness of `ModuleCat.restrictScalars` is synthesized via being adjoint functor,
19+
however this needs the universe level to be some `max u v`, where `u` is the universe level
20+
of the ring.
21+
22+
-/
23+
24+
@[expose] public section
25+
26+
universe v u u'
27+
28+
variable {R : Type u} [CommRing R] {R' : Type u'} [CommRing R']
29+
30+
open CategoryTheory
31+
32+
section
33+
34+
variable (f : R →+* R')
35+
36+
lemma ModuleCat.restrictScalars_map_exact (S : ShortComplex (ModuleCat.{v} R')) (h : S.Exact) :
37+
(S.map (ModuleCat.restrictScalars.{v} f)).Exact := by
38+
rw [CategoryTheory.ShortComplex.ShortExact.moduleCat_exact_iff_function_exact] at h ⊢
39+
exact h
40+
41+
instance : Limits.PreservesFiniteLimits (ModuleCat.restrictScalars.{v} f) := by
42+
have := ((CategoryTheory.Functor.exact_tfae (ModuleCat.restrictScalars.{v} f)).out 1 3).mp
43+
(ModuleCat.restrictScalars_map_exact f)
44+
exact this.1
45+
46+
instance : Limits.PreservesFiniteColimits (ModuleCat.restrictScalars.{v} f) := by
47+
have := ((CategoryTheory.Functor.exact_tfae (ModuleCat.restrictScalars.{v} f)).out 1 3).mp
48+
(ModuleCat.restrictScalars_map_exact f)
49+
exact this.2
50+
51+
end

0 commit comments

Comments
 (0)