@@ -3,11 +3,9 @@ Copyright (c) 2021 Kevin Buzzard. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Kevin Buzzard, Antoine Labelle
5
5
-/
6
- import Mathlib.Algebra.Module.Defs
7
- import Mathlib.LinearAlgebra.Finsupp.SumProd
8
- import Mathlib.LinearAlgebra.FreeModule.Basic
6
+ import Mathlib.Algebra.Equiv.TransferInstance
9
7
import Mathlib.LinearAlgebra.TensorProduct.Basis
10
- import Mathlib.LinearAlgebra.TensorProduct.Tower
8
+ import Mathlib.Logic.UnivLE
11
9
12
10
/-!
13
11
@@ -61,7 +59,7 @@ projective module
61
59
62
60
-/
63
61
64
- universe u v
62
+ universe w v u
65
63
66
64
open LinearMap hiding id
67
65
open Finsupp
@@ -205,12 +203,26 @@ variable {R : Type u} [Semiring R] {P : Type v} [AddCommMonoid P] [Module R P]
205
203
variable {R₀ M N} [CommSemiring R₀] [Algebra R₀ R] [AddCommMonoid M] [Module R₀ M] [Module R M]
206
204
variable [IsScalarTower R₀ R M] [AddCommMonoid N] [Module R₀ N]
207
205
206
+ /-- A variant of `Projective.iff_split` allowing for a more flexible selection of the universe
207
+ for the free module `M`. -/
208
+ theorem Projective.iff_split' [Small.{w} R] [Small.{w} P] : Module.Projective R P ↔
209
+ ∃ (M : Type w) (_ : AddCommMonoid M) (_ : Module R M) (_ : Module.Free R M)
210
+ (i : P →ₗ[R] M) (s : M →ₗ[R] P), s.comp i = LinearMap.id := by
211
+ let e : (Shrink.{w, v} P →₀ Shrink.{w, u} R) ≃ₗ[R] P →₀ R :=
212
+ Finsupp.mapDomain.linearEquiv _ R (equivShrink P).symm ≪≫ₗ
213
+ Finsupp.mapRange.linearEquiv (Shrink.linearEquiv R R)
214
+ refine ⟨fun ⟨i, hi⟩ ↦ ⟨(Shrink.{w} P) →₀ (Shrink.{w} R), _, _, Free.of_basis ⟨e⟩,
215
+ e.symm.toLinearMap ∘ₗ i, (linearCombination R id) ∘ₗ e.toLinearMap, ?_⟩,
216
+ fun ⟨_, _, _, _, i, s, H⟩ ↦ Projective.of_split i s H⟩
217
+ apply LinearMap.ext
218
+ simp only [coe_comp, LinearEquiv.coe_coe, Function.comp_apply, e.apply_symm_apply]
219
+ exact hi
220
+
208
221
/-- A module is projective iff it is the direct summand of a free module. -/
209
222
theorem Projective.iff_split : Module.Projective R P ↔
210
223
∃ (M : Type max u v) (_ : AddCommMonoid M) (_ : Module R M) (_ : Module.Free R M)
211
224
(i : P →ₗ[R] M) (s : M →ₗ[R] P), s.comp i = LinearMap.id :=
212
- ⟨fun ⟨i, hi⟩ ↦ ⟨P →₀ R, _, _, inferInstance, i, Finsupp.linearCombination R id, LinearMap.ext hi⟩,
213
- fun ⟨_, _, _, _, i, s, H⟩ ↦ Projective.of_split i s H⟩
225
+ Projective.iff_split'.{max u v}
214
226
215
227
open TensorProduct in
216
228
instance Projective.tensorProduct [hM : Module.Projective R M] [hN : Module.Projective R₀ N] :
@@ -230,34 +242,36 @@ instance Projective.tensorProduct [hM : Module.Projective R M] [hN : Module.Proj
230
242
231
243
end Ring
232
244
233
- --This is in a different section because special universe restrictions are required.
234
245
section OfLiftingProperty
235
246
236
- -- Porting note (https://github.com/leanprover-community/mathlib4/issues/11215): TODO: generalize to `P : Type v`?
237
- /-- A module which satisfies the universal property is projective. Note that the universe variables
238
- in `huniv` are somewhat restricted. -/
239
- theorem Projective.of_lifting_property' {R : Type u} [Semiring R] {P : Type max u v}
240
- [AddCommMonoid P] [Module R P]
247
+ /-- A module which satisfies the universal property is projective. -/
248
+ theorem Projective.of_lifting_property' {R : Type u} [Semiring R] {P : Type v}
249
+ [AddCommMonoid P] [Module R P] [Small.{v} R]
241
250
-- If for all surjections of `R`-modules `M →ₗ N`, all maps `P →ₗ N` lift to `P →ₗ M`,
242
- (huniv : ∀ {M : Type max v u } {N : Type max u v} [AddCommMonoid M] [AddCommMonoid N]
251
+ (h : ∀ {M : Type v } {N : Type v} [AddCommMonoid M] [AddCommMonoid N]
243
252
[Module R M] [Module R N] (f : M →ₗ[R] N) (g : P →ₗ[R] N),
244
253
Function.Surjective f → ∃ h : P →ₗ[R] M, f.comp h = g) :
245
254
-- then `P` is projective.
246
- Projective R P :=
247
- .of_lifting_property'' (huniv · _)
255
+ Projective R P := by
256
+ refine of_lifting_property'' (fun p hp ↦ ?_)
257
+ let e := Finsupp.mapRange.linearEquiv (α := P) (Shrink.linearEquiv R R)
258
+ rcases h (p ∘ₗ e.toLinearMap) LinearMap.id (hp.comp e.surjective) with ⟨g, hg⟩
259
+ exact ⟨e.toLinearMap ∘ₗ g, hg⟩
248
260
249
- -- Porting note (https://github.com/leanprover-community/mathlib4/issues/11215): TODO: generalize to `P : Type v`?
250
261
/-- A variant of `of_lifting_property'` when we're working over a `[Ring R]`,
251
- which only requires quantifying over modules with an `AddCommGroup` instance. -/
252
- theorem Projective.of_lifting_property {R : Type u} [Ring R] {P : Type max u v} [AddCommGroup P]
253
- [Module R P]
262
+ which only requires quantifying over modules with an `AddCommGroup` instance. -/
263
+ theorem Projective.of_lifting_property {R : Type u} [Ring R] {P : Type v} [AddCommGroup P]
264
+ [Module R P] [Small.{v} R]
254
265
-- If for all surjections of `R`-modules `M →ₗ N`, all maps `P →ₗ N` lift to `P →ₗ M`,
255
- (huniv : ∀ {M : Type max v u } {N : Type max u v} [AddCommGroup M] [AddCommGroup N]
266
+ (h : ∀ {M : Type v } {N : Type v} [AddCommGroup M] [AddCommGroup N]
256
267
[Module R M] [Module R N] (f : M →ₗ[R] N) (g : P →ₗ[R] N),
257
268
Function.Surjective f → ∃ h : P →ₗ[R] M, f.comp h = g) :
258
269
-- then `P` is projective.
259
- Projective R P :=
260
- .of_lifting_property'' (huniv · _)
270
+ Projective R P := by
271
+ refine of_lifting_property'' (fun p hp ↦ ?_)
272
+ let e := Finsupp.mapRange.linearEquiv (α := P) (Shrink.linearEquiv R R)
273
+ rcases h (p ∘ₗ e.toLinearMap) LinearMap.id (hp.comp e.surjective) with ⟨g, hg⟩
274
+ exact ⟨e.toLinearMap ∘ₗ g, hg⟩
261
275
262
276
end OfLiftingProperty
263
277
0 commit comments