@@ -367,19 +367,23 @@ noncomputable def algebraOfLiesOver
367367
368368@ [deprecated (since := "2026-04-24" )] alias instAlgebraOfLiesOver := algebraOfLiesOver
369369
370- /-- A predicate expressing that `Localization.AtPrime P` is an algebra over `Localization.AtPrime p`
371- in the natural way when `P` lies over `p`. -/
372- class IsLiesOverAlgebra (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p]
373- [Algebra (Localization.AtPrime p) (Localization.AtPrime P)] : Prop where
374- algebraMap_eq : algebraMap (Localization.AtPrime p) (Localization.AtPrime P) =
375- Localization.localRingHom p P (algebraMap A B) Ideal.LiesOver.over
376-
377- instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p] :
378- letI := algebraOfLiesOver p P; IsLiesOverAlgebra p P :=
379- letI := algebraOfLiesOver p P; ⟨rfl⟩
370+ @ [deprecated "Use `IsScalarTower` instead." (since := "2026-06-27" )]
371+ abbrev IsLiesOverAlgebra (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime]
372+ [Algebra (Localization.AtPrime p) (Localization.AtPrime P)] :=
373+ IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)
374+
375+ theorem IsLiesOverAlgebra.algebraMap_eq (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime]
376+ [Algebra (Localization.AtPrime p) (Localization.AtPrime P)]
377+ [IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)] [P.LiesOver p] :
378+ algebraMap (Localization.AtPrime p) (Localization.AtPrime P) =
379+ Localization.localRingHom p P (algebraMap A B) Ideal.LiesOver.over := by
380+ symm
381+ apply localRingHom_unique
382+ simp [← IsScalarTower.algebraMap_apply]
380383
381384instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p]
382- [Algebra (Localization.AtPrime p) (Localization.AtPrime P)] [IsLiesOverAlgebra p P] :
385+ [Algebra (Localization.AtPrime p) (Localization.AtPrime P)]
386+ [IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)] :
383387 IsScalarTower R (Localization.AtPrime p) (Localization.AtPrime P) :=
384388 .of_algebraMap_eq <| by
385389 simp [IsScalarTower.algebraMap_apply R A (Localization.AtPrime p),
@@ -388,9 +392,12 @@ instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p]
388392
389393instance (p : Ideal A) [p.IsPrime] (P : Ideal B) [P.IsPrime] [P.LiesOver p] (Q : Ideal C)
390394 [Q.IsPrime] [Q.LiesOver P] [Q.LiesOver p]
391- [Algebra (Localization.AtPrime p) (Localization.AtPrime P)] [IsLiesOverAlgebra p P]
392- [Algebra (Localization.AtPrime P) (Localization.AtPrime Q)] [IsLiesOverAlgebra P Q]
393- [Algebra (Localization.AtPrime p) (Localization.AtPrime Q)] [IsLiesOverAlgebra p Q] :
395+ [Algebra (Localization.AtPrime p) (Localization.AtPrime P)]
396+ [Algebra (Localization.AtPrime P) (Localization.AtPrime Q)]
397+ [Algebra (Localization.AtPrime p) (Localization.AtPrime Q)]
398+ [IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime P)]
399+ [IsScalarTower B (Localization.AtPrime P) (Localization.AtPrime Q)]
400+ [IsScalarTower A (Localization.AtPrime p) (Localization.AtPrime Q)] :
394401 IsScalarTower (Localization.AtPrime p) (Localization.AtPrime P) (Localization.AtPrime Q) :=
395402 .of_algebraMap_eq' <| by
396403 simp [IsLiesOverAlgebra.algebraMap_eq, ← localRingHom_comp, ← IsScalarTower.algebraMap_eq]
@@ -423,8 +430,10 @@ section localAlg
423430open AtPrime
424431
425432variable {S} [Algebra R P] (J : Ideal S) (K : Ideal P) [J.IsPrime] [K.IsPrime]
426- [J.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime J)] [IsLiesOverAlgebra I J]
427- [K.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime K)] [IsLiesOverAlgebra I K]
433+ [J.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime J)]
434+ [K.LiesOver I] [Algebra (Localization.AtPrime I) (Localization.AtPrime K)]
435+ [IsScalarTower R (Localization.AtPrime I) (Localization.AtPrime J)]
436+ [IsScalarTower R (Localization.AtPrime I) (Localization.AtPrime K)]
428437
429438/-- For an `R`-algebra homomorphism `f : S →ₐ[R] P` and prime ideals `J = f⁻¹(K)` lying over `I`,
430439the induced algebra homomorphism from the localization of `S` at `J` to the localization of `P` at
0 commit comments