@@ -309,27 +309,27 @@ section
309309variables (R) [comm_ring R] [local_ring R] [comm_ring S] [local_ring S] [comm_ring T] [local_ring T]
310310
311311/-- The residue field of a local ring is the quotient of the ring by its maximal ideal. -/
312+ @[derive [ring, comm_ring, inhabited] ]
312313def residue_field := R ⧸ maximal_ideal R
313314
314315noncomputable instance residue_field.field : field (residue_field R) :=
315316ideal.quotient.field (maximal_ideal R)
316317
317- noncomputable instance : inhabited (residue_field R) := ⟨37 ⟩
318-
319318/-- The quotient map from a local ring to its residue field. -/
320319def residue : R →+* (residue_field R) :=
321320ideal.quotient.mk _
322321
323- noncomputable
324- instance residue_field.algebra : algebra R (residue_field R) := (residue R).to_algebra
322+ instance residue_field.algebra : algebra R (residue_field R) :=
323+ ideal.quotient.algebra _
324+
325+ lemma residue_field.algebra_map_eq : algebra_map R (residue_field R) = residue R := rfl
325326
326327variables {R}
327328
328329namespace residue_field
329330
330331/-- The map on residue fields induced by a local homomorphism between local rings -/
331- noncomputable def map (f : R →+* S) [is_local_ring_hom f] :
332- residue_field R →+* residue_field S :=
332+ def map (f : R →+* S) [is_local_ring_hom f] : residue_field R →+* residue_field S :=
333333ideal.quotient.lift (maximal_ideal R) ((ideal.quotient.mk _).comp f) $
334334λ a ha,
335335begin
@@ -359,8 +359,7 @@ fun_like.congr_fun (map_comp f g).symm x
359359
360360/-- A ring isomorphism defines an isomorphism of residue fields. -/
361361@[simps apply]
362- noncomputable def map_equiv (f : R ≃+* S) :
363- local_ring.residue_field R ≃+* local_ring.residue_field S :=
362+ def map_equiv (f : R ≃+* S) : local_ring.residue_field R ≃+* local_ring.residue_field S :=
364363{ to_fun := map (f : R →+* S),
365364 inv_fun := map (f.symm : S →+* R),
366365 left_inv := λ x, by simp only [map_map, ring_equiv.symm_comp, map_id, ring_hom.id_apply],
@@ -379,7 +378,7 @@ ring_equiv.to_ring_hom_injective map_id
379378
380379/-- The group homomorphism from `ring_aut R` to `ring_aut k` where `k`
381380is the residue field of `R`. -/
382- @[simps] noncomputable def map_aut : ring_aut R →* ring_aut (local_ring.residue_field R) :=
381+ @[simps] def map_aut : ring_aut R →* ring_aut (local_ring.residue_field R) :=
383382{ to_fun := map_equiv,
384383 map_mul' := λ e₁ e₂, map_equiv_trans e₂ e₁,
385384 map_one' := map_equiv_refl }
0 commit comments