Zulip Chat Archive

Stream: mathlib4

Topic: Diamond with FractionRing of Localization.AtPrime


Xavier Roblot (Aug 01 2025 at 08:09):

I think the following is a diamond:

import Mathlib.RingTheory.DedekindDomain.Instances

variable {R S : Type*} [CommRing R] [CommSemiring S] [IsDedekindDomain R] (p : Ideal R) [p.IsPrime]

local notation "Rₚ" => Localization.AtPrime p

instance : FaithfulSMul R Rₚ := sorry

example :
  (OreLocalization.instAlgebra : Algebra Rₚ (FractionRing Rₚ)) =
    (instAlgebraAtPrimeFractionRing _ : Algebra Rₚ (FractionRing Rₚ)) := rfl -- fails

Note that the instance that says that FaithfulSMul R Rₚ is not in Mathlib yet but it is direct to prove (it is proved in #27152 for example).

Junyan Xu (Aug 01 2025 at 08:33):

docs#instAlgebraAtPrimeFractionRing should probably be an abbrev just like FractionRing.liftAlgebra

Kevin Buzzard (Aug 02 2025 at 17:35):

Is this related to #21344 ? Just mentioning it because this is definitely a diamond in OreLocalization

Kevin Buzzard (Aug 02 2025 at 17:36):

Oh no that looks like something different, it's Int-specific

Xavier Roblot (Aug 17 2025 at 13:36):

I am pinging @Riccardo Brasca who added docs#instAlgebraAtPrimeFractionRing. Riccardo, should we change this instance into an abbrev?

Riccardo Brasca (Aug 17 2025 at 14:26):

Oh yes, why not!

Xavier Roblot (Aug 17 2025 at 15:44):

#28551

Riccardo Brasca (Aug 17 2025 at 15:47):

I am very busy with non lean things, but feel free to ask my review


Last updated: Dec 20 2025 at 21:32 UTC