Skip to content

Commit 2b976da

Browse files
committed
upgrade in-place
1 parent df8391a commit 2b976da

1 file changed

Lines changed: 33 additions & 44 deletions

File tree

Mathlib/RingTheory/Localization/AtPrime/Basic.lean

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -526,59 +526,48 @@ theorem equivQuotMaximalIdeal_symm_apply_mk (x : R) (s : p.primeCompl) :
526526
@[deprecated (since := "2025-11-13")] alias _root_.equivQuotMaximalIdealOfIsLocalization :=
527527
equivQuotMaximalIdeal
528528

529-
/-- The isomorphism `R ⧸ p ^ n ≃+* Rₚ ⧸ maximalIdeal Rₚ ^ n`, where `Rₚ` satisfies
529+
/-- The isomorphism `R ⧸ p ^ n ≃ₐ[R] Rₚ ⧸ maximalIdeal Rₚ ^ n`, where `Rₚ` satisfies
530530
`IsLocalization.AtPrime Rₚ p`. -/
531531
noncomputable
532-
def equivQuotMaximalIdealPow (n : ℕ) : R ⧸ p ^ n ≃+* Rₚ ⧸ IsLocalRing.maximalIdeal Rₚ ^ n := by
533-
refine Subring.topEquiv.symm.trans <| -- R ⧸ p ^ n ≃ (⊤ : Subring (R ⧸ p ^ n))
534-
(RingEquiv.subringCongr ?_).trans <| -- ⊤ = (R ⧸ p ^ n ← Rₚ / ker).range
535-
(IsLocalization.lift fun (u : p.primeCompl) ↦ -- (R ⧸ p ^ n ← Rₚ) => R ⧸ p ^ n ← Rₚ / ker
536-
Ideal.Quotient.isUnit_mk_pow_of_notMem _
537-
(mem_primeCompl_iff.mp u.prop)).quotientKerEquivRange.symm.trans <|
538-
quotEquivOfEq ?_ -- ker = maximalIdeal ^ n
539-
· symm
540-
rw [RingHom.range_eq_top, IsLocalization.lift_surjective_iff]
541-
intro u
542-
obtain ⟨x, hx⟩ := Ideal.Quotient.mk_surjective u
543-
exact ⟨⟨x, 1⟩, by simp [hx]⟩
544-
· ext x
545-
obtain ⟨a, b, rfl⟩ := IsLocalization.exists_mk'_eq p.primeCompl x
546-
suffices a ∈ p ^ n ↔ algebraMap R Rₚ a ∈ IsLocalRing.maximalIdeal Rₚ ^ n by
547-
simpa [Ideal.Quotient.eq_zero_iff_mem, IsLocalization.mk'_mem_iff]
548-
rw [← map_eq_maximalIdeal p Rₚ, ← Ideal.map_pow,
549-
algebraMap_mem_map_algebraMap_iff p.primeCompl Rₚ]
550-
refine ⟨fun h ↦ ⟨1, by simp, by simp [h]⟩, fun ⟨m, hm, h⟩ ↦ ?_⟩
551-
exact (IsMaximal.mul_mem_pow _ h).resolve_left (mem_primeCompl_iff.mp hm)
532+
def equivQuotMaximalIdealPow (n : ℕ) : (R ⧸ p ^ n) ≃ₐ[R] Rₚ ⧸ IsLocalRing.maximalIdeal Rₚ ^ n where
533+
__ : (R ⧸ p ^ n) ≃+* Rₚ ⧸ IsLocalRing.maximalIdeal Rₚ ^ n := by
534+
refine Subring.topEquiv.symm.trans <| -- R ⧸ p ^ n ≃ (⊤ : Subring (R ⧸ p ^ n))
535+
(RingEquiv.subringCongr ?_).trans <| -- ⊤ = (R ⧸ p ^ n ← Rₚ / ker).range
536+
(IsLocalization.lift fun (u : p.primeCompl) ↦ -- (R ⧸ p ^ n ← Rₚ) => R ⧸ p ^ n ← Rₚ / ker
537+
Ideal.Quotient.isUnit_mk_pow_of_notMem _
538+
(mem_primeCompl_iff.mp u.prop)).quotientKerEquivRange.symm.trans <|
539+
quotEquivOfEq ?_ -- ker = maximalIdeal ^ n
540+
· symm
541+
rw [RingHom.range_eq_top, IsLocalization.lift_surjective_iff]
542+
intro u
543+
obtain ⟨x, hx⟩ := Ideal.Quotient.mk_surjective u
544+
exact ⟨⟨x, 1⟩, by simp [hx]⟩
545+
· ext x
546+
obtain ⟨a, b, rfl⟩ := IsLocalization.exists_mk'_eq p.primeCompl x
547+
suffices a ∈ p ^ n ↔ algebraMap R Rₚ a ∈ IsLocalRing.maximalIdeal Rₚ ^ n by
548+
simpa [Ideal.Quotient.eq_zero_iff_mem, IsLocalization.mk'_mem_iff]
549+
rw [← map_eq_maximalIdeal p Rₚ, ← Ideal.map_pow,
550+
algebraMap_mem_map_algebraMap_iff p.primeCompl Rₚ]
551+
refine ⟨fun h ↦ ⟨1, by simp, by simp [h]⟩, fun ⟨m, hm, h⟩ ↦ ?_⟩
552+
exact (IsMaximal.mul_mem_pow _ h).resolve_left (mem_primeCompl_iff.mp hm)
553+
commutes' x := by
554+
rw [IsScalarTower.algebraMap_apply R Rₚ (Rₚ ⧸ maximalIdeal Rₚ ^ n)]
555+
simp only [Ideal.Quotient.algebraMap_eq, RingEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe,
556+
EquivLike.coe_coe, RingEquiv.coe_trans, Function.comp_apply]
557+
rw [← RingEquiv.eq_symm_apply, RingEquiv.symm_apply_eq]
558+
simp only [RingHom.quotientKerEquivRange, Ideal.quotEquivOfEq_symm, Ideal.quotEquivOfEq_mk,
559+
RingEquiv.coe_trans, Function.comp_apply, RingHom.quotientKerEquivOfSurjective_apply_mk]
560+
rw [← RingEquiv.eq_symm_apply]
561+
ext
562+
simp
552563

553564
@[simp]
554565
theorem equivQuotMaximalIdealPow_apply_mk (n : ℕ) (x : R) :
555566
equivQuotMaximalIdealPow p Rₚ n (Ideal.Quotient.mk _ x) =
556567
Ideal.Quotient.mk _ (algebraMap R Rₚ x) := by
557-
simp only [equivQuotMaximalIdealPow, RingEquiv.coe_trans, Function.comp_apply]
558-
rw [← RingEquiv.eq_symm_apply, RingEquiv.symm_apply_eq]
559-
simp only [RingHom.quotientKerEquivRange, Ideal.quotEquivOfEq_symm, Ideal.quotEquivOfEq_mk,
560-
RingEquiv.coe_trans, Function.comp_apply, RingHom.quotientKerEquivOfSurjective_apply_mk]
561-
rw [← RingEquiv.eq_symm_apply]
562-
ext
568+
rw [← Ideal.Quotient.algebraMap_eq, AlgEquiv.commutes]
563569
simp
564570

565-
/-- `IsLocalization.AtPrime.equivQuotMaximalIdealPow p Rₚ n` as an `R`-algebra isomorphism. -/
566-
noncomputable
567-
def equivQuotMaximalIdealPowₐ (n : ℕ) : (R ⧸ p ^ n) ≃ₐ[R] Rₚ ⧸ IsLocalRing.maximalIdeal Rₚ ^ n
568-
where
569-
__ := equivQuotMaximalIdealPow p Rₚ n
570-
commutes' r := by simp
571-
572-
@[simp]
573-
theorem equivQuotMaximalIdealPowₐ_toRingEquiv (n : ℕ) :
574-
(equivQuotMaximalIdealPowₐ p Rₚ n).toRingEquiv = equivQuotMaximalIdealPow p Rₚ n :=
575-
rfl
576-
577-
@[simp]
578-
theorem coe_equivQuotMaximalIdealPowₐ (n : ℕ) :
579-
⇑(equivQuotMaximalIdealPowₐ p Rₚ n) = ⇑(equivQuotMaximalIdealPow p Rₚ n) :=
580-
rfl
581-
582571
variable {Sₚ : Type*} [CommRing S] [Algebra R S] [CommRing Sₚ] [Algebra S Sₚ] [Algebra R Sₚ]
583572
variable [Algebra Rₚ Sₚ] [IsLocalization (Algebra.algebraMapSubmonoid S p.primeCompl) Sₚ]
584573
variable [IsScalarTower R S Sₚ]

0 commit comments

Comments
 (0)