@@ -238,7 +238,7 @@ instance IsLocalization.tensor (M : Submonoid R) [IsLocalization M A] :
238238 rw [Algebra.isLocalization_iff_isPushout _ A]
239239 infer_instance
240240
241- attribute [local instance ] Algebra.TensorProduct.rightAlgebra
241+ attribute [local instance ] Algebra.TensorProduct.rightAlgebra in
242242instance IsLocalization.tensorRight (M : Submonoid R) [IsLocalization M A] :
243243 IsLocalization (Algebra.algebraMapSubmonoid S M) (A ⊗[R] S) := by
244244 rw [Algebra.isLocalization_iff_isPushout _ A]
@@ -254,6 +254,7 @@ lemma IsLocalization.tmul_mk' (M : Submonoid R) [IsLocalization M A] (s : S) (x
254254 IsLocalization.mk'_spec', algebraMap_apply, Algebra.algebraMap_self, RingHom.id_apply,
255255 ← Algebra.smul_def, smul_tmul, Algebra.smul_def, mul_one]
256256
257+ attribute [local instance ] Algebra.TensorProduct.rightAlgebra in
257258open Algebra.TensorProduct in
258259lemma IsLocalization.mk'_tmul (M : Submonoid R) [IsLocalization M A] (s : S) (x : R) (y : M) :
259260 IsLocalization.mk' A x y ⊗ₜ s =
@@ -318,7 +319,7 @@ end Localization
318319variable (R S) {A} in
319320/-- `A[M⁻¹] ⊗[R] S` is the localization of `A ⊗[R] S` at `M`. -/
320321lemma IsLocalization.tensorProduct_tensorProduct (M : Submonoid A)
321- (B : Type *) [CommRing B] [Algebra R B] [Algebra A B] [IsScalarTower R A B]
322+ (B : Type *) [CommSemiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B]
322323 [IsLocalization M B]
323324 [Algebra (A ⊗[R] S) (B ⊗[R] S)] [IsScalarTower A (A ⊗[R] S) (B ⊗[R] S)]
324325 (H : (algebraMap (A ⊗[R] S) (B ⊗[R] S)).comp Algebra.TensorProduct.includeRight.toRingHom =
@@ -327,6 +328,88 @@ lemma IsLocalization.tensorProduct_tensorProduct (M : Submonoid A)
327328 (Algebra.isLocalization_iff_isPushout M _).mpr
328329 (Algebra.IsPushout.tensorProduct_tensorProduct R S A B H).symm
329330
331+ attribute [local instance ] Algebra.TensorProduct.rightAlgebra in
332+ variable (R S) {A} in
333+ /-- `S ⊗[R] A[M⁻¹]` is the localization of `S ⊗[R] A` at `M`. -/
334+ lemma IsLocalization.tensorProduct_tensorProduct_right (M : Submonoid A)
335+ (B : Type *) [CommSemiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B]
336+ [IsLocalization M B]
337+ [Algebra (S ⊗[R] A) (S ⊗[R] B)] [IsScalarTower S (S ⊗[R] A) (S ⊗[R] B)]
338+ (H : (algebraMap (S ⊗[R] A) (S ⊗[R] B)).comp Algebra.TensorProduct.includeRight.toRingHom =
339+ Algebra.TensorProduct.includeRight.toRingHom.comp (algebraMap A B)) :
340+ IsLocalization (M.map (Algebra.TensorProduct.includeRight (R := R) (A := S))) (S ⊗[R] B) := by
341+ change IsLocalization (Algebra.algebraMapSubmonoid _ M) (S ⊗[R] B)
342+ let : Algebra A (S ⊗[R] B) := .compHom _ (algebraMap A B)
343+ have : IsScalarTower A (S ⊗[R] A) (S ⊗[R] B) := .of_algebraMap_eq' H.symm
344+ have : IsScalarTower R A (S ⊗[R] B) :=
345+ .of_algebraMap_eq' <| by
346+ rw [Algebra.compHom_algebraMap_eq, RingHom.comp_assoc, ← IsScalarTower.algebraMap_eq,
347+ IsScalarTower.algebraMap_eq R B]
348+ have : IsScalarTower R (S ⊗[R] A) (S ⊗[R] B) := .to₁₃₄ _ A _ _
349+ have : IsScalarTower A B (S ⊗[R] B) := .of_algebraMap_eq' rfl
350+ rw [Algebra.isLocalization_iff_isPushout _ B, Algebra.IsPushout.comm,
351+ ← Algebra.IsPushout.comp_iff R _ S]
352+ infer_instance
353+
354+ variable (R S) {A} in
355+ /-- The natural isomorphism `S ⊗[R] A[M⁻¹] ≃ (S ⊗[R] A)[M⁻¹]`. -/
356+ noncomputable
357+ def IsLocalization.tensorProductEquivOfMapIncludeRight (M : Submonoid A)
358+ (B : Type *) [CommSemiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B]
359+ [IsLocalization M B]
360+ (C : Type *) [CommSemiring C] [Algebra S C] [Algebra (S ⊗[R] A) C] [IsScalarTower S (S ⊗[R] A) C]
361+ [IsLocalization (M.map (Algebra.TensorProduct.includeRight (R := R) (A := S))) C] :
362+ S ⊗[R] B ≃ₐ[S] C :=
363+ letI M' : Submonoid (S ⊗[R] A) := M.map (Algebra.TensorProduct.includeRight (R := R) (A := S))
364+ letI : Algebra (S ⊗[R] A) (S ⊗[R] B) :=
365+ (Algebra.TensorProduct.map (AlgHom.id R S) (IsScalarTower.toAlgHom R _ _)).toAlgebra
366+ haveI : IsScalarTower S (S ⊗[R] A) (S ⊗[R] B) :=
367+ .of_algebraMap_eq <| by intro; simp [RingHom.algebraMap_toAlgebra]
368+ haveI := IsLocalization.tensorProduct_tensorProduct_right R S M B
369+ (by ext; simp [RingHom.algebraMap_toAlgebra])
370+ (IsLocalization.algEquiv M' _ _).restrictScalars S
371+
372+ set_option backward.isDefEq.respectTransparency false in
373+ @[simp]
374+ lemma IsLocalization.tensorProductEquivOfMapIncludeRight_tmul (M : Submonoid A)
375+ (B : Type *) [CommSemiring B] [Algebra R B] [Algebra A B]
376+ [IsScalarTower R A B] [IsLocalization M B]
377+ (C : Type *) [CommSemiring C] [Algebra S C] [Algebra (S ⊗[R] A) C] [IsScalarTower S (S ⊗[R] A) C]
378+ [IsLocalization (M.map (Algebra.TensorProduct.includeRight (R := R) (A := S))) C]
379+ (x : S) (a : A) :
380+ IsLocalization.tensorProductEquivOfMapIncludeRight R S M B C (x ⊗ₜ algebraMap A B a) =
381+ algebraMap _ _ (x ⊗ₜ[R] a) := by
382+ letI : Algebra (S ⊗[R] A) (S ⊗[R] B) :=
383+ (Algebra.TensorProduct.map (AlgHom.id R S) (IsScalarTower.toAlgHom R _ _)).toAlgebra
384+ have heq : x ⊗ₜ[R] (algebraMap A B) a = algebraMap _ _ (x ⊗ₜ[R] a) := rfl
385+ simp [heq, IsLocalization.tensorProductEquivOfMapIncludeRight]
386+
387+ variable (R S) {A} in
388+ /-- The natural isomorphism `S ⊗[R] A[1/g] ≃ (S ⊗[R] A)[1/g]`. -/
389+ noncomputable
390+ def IsLocalization.Away.tensorProductEquivTMulRight (g : A) (B : Type *) [CommSemiring B]
391+ [Algebra R B] [Algebra A B] [IsScalarTower R A B] [IsLocalization.Away g B] :
392+ S ⊗[R] B ≃ₐ[S] Localization.Away ((1 : S) ⊗ₜ[R] g) :=
393+ haveI : IsLocalization
394+ ((Submonoid.powers g).map (Algebra.TensorProduct.includeRight (R := R) (A := S)))
395+ (Localization.Away ((1 : S) ⊗ₜ[R] g)) := by
396+ simp only [Submonoid.map_powers, Algebra.TensorProduct.includeRight_apply]
397+ infer_instance
398+ IsLocalization.tensorProductEquivOfMapIncludeRight _ _ (.powers g) _ _
399+
400+ @[simp]
401+ lemma IsLocalization.Away.tensorProductEquivTMulRight_tmul (g : A) (B : Type *) [CommSemiring B]
402+ [Algebra R B] [Algebra A B] [IsScalarTower R A B] [IsLocalization.Away g B]
403+ (x : S) (a : A) :
404+ IsLocalization.Away.tensorProductEquivTMulRight R S g B (x ⊗ₜ algebraMap _ _ a) =
405+ algebraMap _ _ (x ⊗ₜ[R] a) :=
406+ haveI : IsLocalization
407+ ((Submonoid.powers g).map (Algebra.TensorProduct.includeRight (R := R) (A := S)))
408+ (Localization.Away ((1 : S) ⊗ₜ[R] g)) := by
409+ simp only [Submonoid.map_powers, Algebra.TensorProduct.includeRight_apply]
410+ infer_instance
411+ IsLocalization.tensorProductEquivOfMapIncludeRight_tmul _ _ _ _ _ _
412+
330413namespace IsLocalization.Away
331414
332415instance tensor [IsLocalization.Away r A] :
0 commit comments