Skip to content

Commit 79a1283

Browse files
committed
feat(FractionRing): add algHom_commutes (#29907)
Add a version of `algHom.commutes` and `algEquiv.commutes` for fraction fields and use them to simplify some proofs.
1 parent e38a194 commit 79a1283

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

Mathlib/RingTheory/DedekindDomain/Different.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,8 @@ lemma map_equiv_traceDual [IsDomain A] [IsFractionRing B L] [IsDomain B]
144144
rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
145145
(FractionRing.algEquiv B L).toRingEquiv]
146146
swap
147-
· apply IsLocalization.ringHom_ext (M := A⁰); ext
148-
simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
149-
RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
150-
rw [IsScalarTower.algebraMap_apply A B (FractionRing B), AlgEquiv.commutes,
151-
← IsScalarTower.algebraMap_apply]
147+
· ext
148+
exact IsFractionRing.algEquiv_commutes (FractionRing.algEquiv A K) (FractionRing.algEquiv B L) _
152149
simp only [AlgEquiv.toRingEquiv_eq_coe, map_mul, AlgEquiv.coe_ringEquiv,
153150
AlgEquiv.apply_symm_apply, ← AlgEquiv.symm_toRingEquiv, AlgEquiv.algebraMap_eq_apply]
154151

Mathlib/RingTheory/IntegralClosure/IntegralRestrict.lean

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,8 @@ lemma Algebra.algebraMap_intTrace (x : B) :
272272
← AlgEquiv.commutes (FractionRing.algEquiv B L)]
273273
apply Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
274274
(FractionRing.algEquiv B L).toRingEquiv
275-
apply IsLocalization.ringHom_ext A⁰
276-
simp only [AlgEquiv.toRingEquiv_eq_coe, ← AlgEquiv.coe_ringHom_commutes, RingHom.comp_assoc,
277-
AlgHom.comp_algebraMap_of_tower, ← IsScalarTower.algebraMap_eq, RingHom.comp_assoc]
275+
ext
276+
exact IsFractionRing.algEquiv_commutes (FractionRing.algEquiv A K) (FractionRing.algEquiv B L) _
278277

279278
lemma Algebra.algebraMap_intTrace_fractionRing (x : B) :
280279
algebraMap A (FractionRing A) (Algebra.intTrace A B x) =
@@ -399,9 +398,8 @@ lemma Algebra.algebraMap_intNorm (x : B) :
399398
← AlgEquiv.commutes (FractionRing.algEquiv B L)]
400399
apply Algebra.norm_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
401400
(FractionRing.algEquiv B L).toRingEquiv
402-
apply IsLocalization.ringHom_ext A⁰
403-
simp only [AlgEquiv.toRingEquiv_eq_coe, ← AlgEquiv.coe_ringHom_commutes, RingHom.comp_assoc,
404-
AlgHom.comp_algebraMap_of_tower, ← IsScalarTower.algebraMap_eq, RingHom.comp_assoc]
401+
ext
402+
exact IsFractionRing.algEquiv_commutes (FractionRing.algEquiv A K) (FractionRing.algEquiv B L) _
405403

406404
@[simp]
407405
lemma Algebra.algebraMap_intNorm_fractionRing (x : B) :

Mathlib/RingTheory/Localization/FractionRing.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,27 @@ theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x
221221
rw [IsFractionRing.mk'_eq_div, div_eq_one_iff_eq hy] at hxy
222222
exact IsFractionRing.injective A K hxy
223223

224+
section commutes
225+
226+
variable [Algebra A B] {K₁ K₂ : Type*} [Field K₁] [Field K₂] [Algebra A K₁] [Algebra A K₂]
227+
[IsFractionRing A K₁] {L₁ L₂ : Type*} [Field L₁] [Field L₂] [Algebra B L₁] [Algebra B L₂]
228+
[Algebra K₁ L₁] [Algebra K₂ L₂] [Algebra A L₁] [Algebra A L₂] [IsScalarTower A K₁ L₁]
229+
[IsScalarTower A K₂ L₂] [IsScalarTower A B L₁] [IsScalarTower A B L₂]
230+
231+
omit [IsDomain B]
232+
233+
theorem algHom_commutes (e : K₁ →ₐ[A] K₂) (f : L₁ →ₐ[B] L₂) (x : K₁) :
234+
algebraMap K₂ L₂ (e x) = f (algebraMap K₁ L₁ x) := by
235+
obtain ⟨r, s, hs, rfl⟩ := IsFractionRing.div_surjective (A := A) x
236+
simp_rw [map_div₀, AlgHom.commutes, ← IsScalarTower.algebraMap_apply,
237+
IsScalarTower.algebraMap_apply A B L₁, AlgHom.commutes, ← IsScalarTower.algebraMap_apply]
238+
239+
theorem algEquiv_commutes (e : K₁ ≃ₐ[A] K₂) (f : L₁ ≃ₐ[B] L₂) (x : K₁) :
240+
algebraMap K₂ L₂ (e x) = f (algebraMap K₁ L₁ x) := by
241+
exact algHom_commutes e.toAlgHom f.toAlgHom _
242+
243+
end commutes
244+
224245
section Subfield
225246

226247
variable (A K) in

0 commit comments

Comments
 (0)