@@ -67,21 +67,20 @@ universes u v
67
67
/-- An R-module is projective if it is a direct summand of a free module, or equivalently
68
68
if maps from the module lift along surjections. There are several other equivalent
69
69
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]
71
71
[module R P] : Prop :=
72
72
(out : ∃ s : P →ₗ[R] (P →₀ R), function.left_inverse (finsupp.total P P R id) s)
73
73
74
74
namespace module
75
75
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
-
81
76
section semiring
82
77
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⟩⟩
85
84
86
85
/-- A projective R-module has the property that maps from it lift along surjections. -/
87
86
theorem projective_lifting_property [h : projective R P] (f : M →ₗ[R] N) (g : P →ₗ[R] N)
@@ -106,9 +105,37 @@ begin
106
105
simp [φ, finsupp.total_apply, function.surj_inv_eq hf],
107
106
end
108
107
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
+
109
135
/-- A module which satisfies the universal property is projective. Note that the universe variables
110
136
in `huniv` are somewhat restricted. -/
111
137
theorem projective_of_lifting_property'
138
+ {R : Type u} [semiring R] {P : Type (max u v)} [add_comm_monoid P] [module R P]
112
139
-- If for all surjections of `R`-modules `M →ₗ N`, all maps `P →ₗ N` lift to `P →ₗ M`,
113
140
(huniv : ∀ {M : Type (max v u)} {N : Type (max u v)} [add_comm_monoid M] [add_comm_monoid N],
114
141
by exactI
@@ -131,15 +158,10 @@ begin
131
158
simp },
132
159
end
133
160
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
-
140
161
/-- A variant of `of_lifting_property'` when we're working over a `[ring R]`,
141
162
which only requires quantifying over modules with an `add_comm_group` instance. -/
142
163
theorem projective_of_lifting_property
164
+ {R : Type u} [ring R] {P : Type (max u v)} [add_comm_group P] [module R P]
143
165
-- If for all surjections of `R`-modules `M →ₗ N`, all maps `P →ₗ N` lift to `P →ₗ M`,
144
166
(huniv : ∀ {M : Type (max v u)} {N : Type (max u v)} [add_comm_group M] [add_comm_group N],
145
167
by exactI
@@ -165,22 +187,6 @@ begin
165
187
simp },
166
188
end
167
189
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
185
191
186
192
end module
0 commit comments