Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 08bb56f

Browse files
committed
feat(algebra/module/projective): weaken assumptions in lifting_property (#16750)
These `add_comm_group` structures are not necessary, nor is the universe restriction on `M`.
1 parent 8818d82 commit 08bb56f

File tree

1 file changed

+37
-31
lines changed

1 file changed

+37
-31
lines changed

src/algebra/module/projective.lean

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,20 @@ universes u v
6767
/-- An R-module is projective if it is a direct summand of a free module, or equivalently
6868
if maps from the module lift along surjections. There are several other equivalent
6969
definitions. -/
70-
class module.projective (R : Type u) [semiring R] (P : Type (max u v)) [add_comm_monoid P]
70+
class module.projective (R : Type*) [semiring R] (P : Type*) [add_comm_monoid P]
7171
[module R P] : Prop :=
7272
(out : ∃ s : P →ₗ[R] (P →₀ R), function.left_inverse (finsupp.total P P R id) s)
7373

7474
namespace module
7575

76-
lemma projective_def {R : Type u} [semiring R] {P : Type (max u v)} [add_comm_monoid P]
77-
[module R P] : projective R P ↔
78-
(∃ s : P →ₗ[R] (P →₀ R), function.left_inverse (finsupp.total P P R id) s) :=
79-
⟨λ h, h.1, λ h, ⟨h⟩⟩
80-
8176
section semiring
8277

83-
variables {R : Type u} [semiring R] {P : Type (max u v)} [add_comm_monoid P] [module R P]
84-
{M : Type (max u v)} [add_comm_group M] [module R M] {N : Type*} [add_comm_group N] [module R N]
78+
variables {R : Type*} [semiring R] {P : Type*} [add_comm_monoid P] [module R P]
79+
{M : Type*} [add_comm_monoid M] [module R M] {N : Type*} [add_comm_monoid N] [module R N]
80+
81+
lemma projective_def : projective R P ↔
82+
(∃ s : P →ₗ[R] (P →₀ R), function.left_inverse (finsupp.total P P R id) s) :=
83+
⟨λ h, h.1, λ h, ⟨h⟩⟩
8584

8685
/-- A projective R-module has the property that maps from it lift along surjections. -/
8786
theorem projective_lifting_property [h : projective R P] (f : M →ₗ[R] N) (g : P →ₗ[R] N)
@@ -106,9 +105,37 @@ begin
106105
simp [φ, finsupp.total_apply, function.surj_inv_eq hf],
107106
end
108107

108+
end semiring
109+
110+
section ring
111+
112+
variables {R : Type*} [ring R] {P : Type*} [add_comm_group P] [module R P]
113+
114+
/-- Free modules are projective. -/
115+
theorem projective_of_basis {ι : Type*} (b : basis ι R P) : projective R P :=
116+
begin
117+
-- need P →ₗ (P →₀ R) for definition of projective.
118+
-- get it from `ι → (P →₀ R)` coming from `b`.
119+
use b.constr ℕ (λ i, finsupp.single (b i) (1 : R)),
120+
intro m,
121+
simp only [b.constr_apply, mul_one, id.def, finsupp.smul_single', finsupp.total_single,
122+
linear_map.map_finsupp_sum],
123+
exact b.total_repr m,
124+
end
125+
126+
@[priority 100]
127+
instance projective_of_free [module.free R P] : module.projective R P :=
128+
projective_of_basis $ module.free.choose_basis R P
129+
130+
end ring
131+
132+
--This is in a different section because special universe restrictions are required.
133+
section of_lifting_property
134+
109135
/-- A module which satisfies the universal property is projective. Note that the universe variables
110136
in `huniv` are somewhat restricted. -/
111137
theorem projective_of_lifting_property'
138+
{R : Type u} [semiring R] {P : Type (max u v)} [add_comm_monoid P] [module R P]
112139
-- If for all surjections of `R`-modules `M →ₗ N`, all maps `P →ₗ N` lift to `P →ₗ M`,
113140
(huniv : ∀ {M : Type (max v u)} {N : Type (max u v)} [add_comm_monoid M] [add_comm_monoid N],
114141
by exactI
@@ -131,15 +158,10 @@ begin
131158
simp },
132159
end
133160

134-
end semiring
135-
136-
section ring
137-
138-
variables {R : Type u} [ring R] {P : Type (max u v)} [add_comm_group P] [module R P]
139-
140161
/-- A variant of `of_lifting_property'` when we're working over a `[ring R]`,
141162
which only requires quantifying over modules with an `add_comm_group` instance. -/
142163
theorem projective_of_lifting_property
164+
{R : Type u} [ring R] {P : Type (max u v)} [add_comm_group P] [module R P]
143165
-- If for all surjections of `R`-modules `M →ₗ N`, all maps `P →ₗ N` lift to `P →ₗ M`,
144166
(huniv : ∀ {M : Type (max v u)} {N : Type (max u v)} [add_comm_group M] [add_comm_group N],
145167
by exactI
@@ -165,22 +187,6 @@ begin
165187
simp },
166188
end
167189

168-
/-- Free modules are projective. -/
169-
theorem projective_of_basis {ι : Type*} (b : basis ι R P) : projective R P :=
170-
begin
171-
-- need P →ₗ (P →₀ R) for definition of projective.
172-
-- get it from `ι → (P →₀ R)` coming from `b`.
173-
use b.constr ℕ (λ i, finsupp.single (b i) (1 : R)),
174-
intro m,
175-
simp only [b.constr_apply, mul_one, id.def, finsupp.smul_single', finsupp.total_single,
176-
linear_map.map_finsupp_sum],
177-
exact b.total_repr m,
178-
end
179-
180-
@[priority 100]
181-
instance projective_of_free [module.free R P] : module.projective R P :=
182-
projective_of_basis $ module.free.choose_basis R P
183-
184-
end ring
190+
end of_lifting_property
185191

186192
end module

0 commit comments

Comments
 (0)