@@ -182,7 +182,7 @@ instance [algebra S R] (r : R → R → Prop) : algebra S (ring_quot r) :=
182
182
/--
183
183
The quotient map from a ring to its quotient, as a homomorphism of rings.
184
184
-/
185
- def mk_ring_hom (r : R → R → Prop ) : R →+* ring_quot r :=
185
+ @[irreducible] def mk_ring_hom (r : R → R → Prop ) : R →+* ring_quot r :=
186
186
{ to_fun := λ x, ⟨quot.mk _ x⟩,
187
187
map_one' := by simp [← one_quot],
188
188
map_mul' := by simp [mul_quot],
@@ -211,7 +211,7 @@ variables {T : Type u₄} [semiring T]
211
211
Any ring homomorphism `f : R →+* T` which respects a relation `r : R → R → Prop`
212
212
factors uniquely through a morphism `ring_quot r →+* T`.
213
213
-/
214
- def lift {r : R → R → Prop } :
214
+ @[irreducible] def lift {r : R → R → Prop } :
215
215
{f : R →+* T // ∀ ⦃x y⦄, r x y → f x = f y} ≃ (ring_quot r →+* T) :=
216
216
{ to_fun := λ f', let f := (f' : R →+* T) in
217
217
{ to_fun := λ x, quot.lift f
@@ -228,13 +228,13 @@ def lift {r : R → R → Prop} :
228
228
map_one' := by simp [← one_quot, f.map_one],
229
229
map_mul' := by { rintros ⟨⟨x⟩⟩ ⟨⟨y⟩⟩, simp [mul_quot, f.map_mul x y] }, },
230
230
inv_fun := λ F, ⟨F.comp (mk_ring_hom r), λ x y h, by { dsimp, rw mk_ring_hom_rel h, }⟩,
231
- left_inv := λ f, by { ext, simp, refl },
232
- right_inv := λ F, by { ext, simp, refl } }
231
+ left_inv := λ f, by { ext, simp [mk_ring_hom] },
232
+ right_inv := λ F, by { ext, simp [mk_ring_hom] } }
233
233
234
234
@[simp]
235
235
lemma lift_mk_ring_hom_apply (f : R →+* T) {r : R → R → Prop } (w : ∀ ⦃x y⦄, r x y → f x = f y) (x) :
236
236
lift ⟨f, w⟩ (mk_ring_hom r x) = f x :=
237
- rfl
237
+ by { simp_rw [lift, mk_ring_hom], refl }
238
238
239
239
-- note this is essentially `lift.symm_apply_eq.mp h`
240
240
lemma lift_unique (f : R →+* T) {r : R → R → Prop } (w : ∀ ⦃x y⦄, r x y → f x = f y)
@@ -243,7 +243,12 @@ by { ext, simp [h], }
243
243
244
244
lemma eq_lift_comp_mk_ring_hom {r : R → R → Prop } (f : ring_quot r →+* T) :
245
245
f = lift ⟨f.comp (mk_ring_hom r), λ x y h, by { dsimp, rw mk_ring_hom_rel h, }⟩ :=
246
- (lift.apply_symm_apply f).symm
246
+ begin
247
+ conv_lhs { rw ← lift.apply_symm_apply f },
248
+ rw lift,
249
+ refl,
250
+ end
251
+
247
252
248
253
section comm_ring
249
254
/-!
@@ -261,7 +266,11 @@ lift
261
266
λ x y h, ideal.quotient.eq.2 $ submodule.mem_Inf.mpr (λ p w, w ⟨x, y, h, sub_add_cancel x y⟩)⟩
262
267
263
268
@[simp] lemma ring_quot_to_ideal_quotient_apply (r : B → B → Prop ) (x : B) :
264
- ring_quot_to_ideal_quotient r (mk_ring_hom r x) = ideal.quotient.mk _ x := rfl
269
+ ring_quot_to_ideal_quotient r (mk_ring_hom r x) = ideal.quotient.mk _ x :=
270
+ begin
271
+ simp_rw [ring_quot_to_ideal_quotient, lift, mk_ring_hom],
272
+ refl
273
+ end
265
274
266
275
/-- The universal ring homomorphism from `B ⧸ ideal.of_rel r` to `ring_quot r`. -/
267
276
def ideal_quotient_to_ring_quot (r : B → B → Prop ) :
@@ -287,7 +296,20 @@ The ring equivalence between `ring_quot r` and `(ideal.of_rel r).quotient`
287
296
def ring_quot_equiv_ideal_quotient (r : B → B → Prop ) :
288
297
ring_quot r ≃+* B ⧸ ideal.of_rel r :=
289
298
ring_equiv.of_hom_inv (ring_quot_to_ideal_quotient r) (ideal_quotient_to_ring_quot r)
290
- (by { ext, refl, }) (by { ext, refl, })
299
+ (begin
300
+ ext,
301
+ simp_rw [ring_quot_to_ideal_quotient, lift, mk_ring_hom],
302
+ dsimp,
303
+ rw [mk_ring_hom],
304
+ refl
305
+ end )
306
+ (begin
307
+ ext,
308
+ simp_rw [ring_quot_to_ideal_quotient, lift, mk_ring_hom],
309
+ dsimp,
310
+ rw [mk_ring_hom],
311
+ refl
312
+ end )
291
313
292
314
end comm_ring
293
315
@@ -331,20 +353,20 @@ variables (S)
331
353
/--
332
354
The quotient map from an `S`-algebra to its quotient, as a homomorphism of `S`-algebras.
333
355
-/
334
- def mk_alg_hom (s : A → A → Prop ) : A →ₐ[S] ring_quot s :=
335
- { commutes' := λ r, rfl ,
356
+ @[irreducible] def mk_alg_hom (s : A → A → Prop ) : A →ₐ[S] ring_quot s :=
357
+ { commutes' := λ r, by { simp [mk_ring_hom], refl } ,
336
358
..mk_ring_hom s }
337
359
338
360
@[simp]
339
361
lemma mk_alg_hom_coe (s : A → A → Prop ) : (mk_alg_hom S s : A →+* ring_quot s) = mk_ring_hom s :=
340
- rfl
362
+ by { simp_rw [mk_alg_hom, mk_ring_hom], refl }
341
363
342
364
lemma mk_alg_hom_rel {s : A → A → Prop } {x y : A} (w : s x y) :
343
365
mk_alg_hom S s x = mk_alg_hom S s y :=
344
366
by simp [mk_alg_hom, mk_ring_hom, quot.sound (rel.of w)]
345
367
346
368
lemma mk_alg_hom_surjective (s : A → A → Prop ) : function.surjective (mk_alg_hom S s) :=
347
- by { dsimp [mk_alg_hom], rintro ⟨⟨a⟩⟩, use a, refl, }
369
+ by { dsimp [mk_alg_hom, mk_ring_hom ], rintro ⟨⟨a⟩⟩, use a, refl, }
348
370
349
371
variables {B : Type u₄} [semiring B] [algebra S B]
350
372
361
383
Any `S`-algebra homomorphism `f : A →ₐ[S] B` which respects a relation `s : A → A → Prop`
362
384
factors uniquely through a morphism `ring_quot s →ₐ[S] B`.
363
385
-/
364
- def lift_alg_hom {s : A → A → Prop } :
365
- { f : A →ₐ[S] B // ∀ ⦃x y⦄, s x y → f x = f y} ≃ (ring_quot s →ₐ[S] B) :=
386
+ @[irreducible] def lift_alg_hom {s : A → A → Prop } :
387
+ {f : A →ₐ[S] B // ∀ ⦃x y⦄, s x y → f x = f y} ≃ (ring_quot s →ₐ[S] B) :=
366
388
{ to_fun := λ f', let f := (f' : A →ₐ[S] B) in
367
389
{ to_fun := λ x, quot.lift f
368
390
begin
@@ -379,14 +401,14 @@ def lift_alg_hom {s : A → A → Prop} :
379
401
map_mul' := by { rintros ⟨⟨x⟩⟩ ⟨⟨y⟩⟩, simp [mul_quot, f.map_mul x y], },
380
402
commutes' := by { rintros x, simp [← one_quot, smul_quot, algebra.algebra_map_eq_smul_one] } },
381
403
inv_fun := λ F, ⟨F.comp (mk_alg_hom S s), λ _ _ h, by { dsimp, erw mk_alg_hom_rel S h }⟩,
382
- left_inv := λ f, by { ext, simp, refl },
383
- right_inv := λ F, by { ext, simp, refl } }
404
+ left_inv := λ f, by { ext, simp [mk_alg_hom, mk_ring_hom] },
405
+ right_inv := λ F, by { ext, simp [mk_alg_hom, mk_ring_hom] } }
384
406
385
407
@[simp]
386
408
lemma lift_alg_hom_mk_alg_hom_apply (f : A →ₐ[S] B) {s : A → A → Prop }
387
409
(w : ∀ ⦃x y⦄, s x y → f x = f y) (x) :
388
410
(lift_alg_hom S ⟨f, w⟩) ((mk_alg_hom S s) x) = f x :=
389
- rfl
411
+ by { simp_rw [lift_alg_hom, mk_alg_hom, mk_ring_hom], refl, }
390
412
391
413
-- note this is essentially `(lift_alg_hom S).symm_apply_eq.mp h`
392
414
lemma lift_alg_hom_unique (f : A →ₐ[S] B) {s : A → A → Prop } (w : ∀ ⦃x y⦄, s x y → f x = f y)
@@ -395,10 +417,12 @@ by { ext, simp [h], }
395
417
396
418
lemma eq_lift_alg_hom_comp_mk_alg_hom {s : A → A → Prop } (f : ring_quot s →ₐ[S] B) :
397
419
f = lift_alg_hom S ⟨f.comp (mk_alg_hom S s), λ x y h, by { dsimp, erw mk_alg_hom_rel S h, }⟩ :=
398
- ((lift_alg_hom S).apply_symm_apply f).symm
420
+ begin
421
+ conv_lhs { rw ← ((lift_alg_hom S).apply_symm_apply f) },
422
+ rw lift_alg_hom,
423
+ refl,
424
+ end
399
425
400
426
end algebra
401
427
402
- attribute [irreducible] mk_ring_hom mk_alg_hom lift lift_alg_hom
403
-
404
428
end ring_quot
0 commit comments