Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
343 stars 230 forks source link

Coefficient ring of a local ring #1625

Closed mahrud closed 3 years ago

mahrud commented 3 years ago

It's unclear to me what the correct answer should be. Specifically, I believe coefficientRing localRing(ZZ[x], ideal x) should be QQ, not ZZ:

i1 : needsPackage "LocalRings"

o1 = LocalRings

o1 : Package

i2 : RP = localRing(ZZ[x], ideal x)

o2 = RP

o2 : LocalRing, maximal ideal x

i3 : f=2_RP; g=3_RP

o4 = 3

o4 : RP

i5 : f/g

     2
o5 = -
     3

o5 : RP

On the other hand, per @DanGrayson:

It's not correct to take the fraction field here, as not all nonzero elements of the coefficient ring of R become invertible in R_P. Example:

i1 : needsPackage "LocalRings";

i3 : R = ZZ[x];

i4 : I = ideal(2,x)

o4 = ideal (2, x)

o4 : Ideal of R

i5 : S = localRing (R,I)

o5 = S

o5 : LocalRing, maximal ideal (2, x)

i6 : coefficientRing S

o6 = QQ

o6 : Ring


Also, normally the coefficient ring is one of the base rings:
```m2

i17 : S.baseRings

o17 = {ZZ, R}

o17 : List

_Originally posted by @DanGrayson in https://github.com/Macaulay2/M2/pull/1385#discussion_r531232374_

DanGrayson commented 3 years ago

I think the coefficient ring of a local ring R_P should be the coefficient ring of R.

mahrud commented 3 years ago

I think I appreciate the simplicity of leaving it this way, and I don't have a specific reason why this could make doing math harder.

DanGrayson commented 3 years ago

The example with (2,x) in ZZ[x] shows the result returned is wrong mathematically, so it should be fixed.

mahrud commented 3 years ago

It's returning ZZ now, is that wrong?

DanGrayson commented 3 years ago

So it is, I didn't know it had changed, closing, thanks.


+ M2 --no-readline --print-width 195
Macaulay2, version 1.16.99
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone

i1 : needsPackage "LocalRings";

i2 : R = ZZ[x];

i3 : I = ideal(2,x)

o3 = ideal (2, x)

o3 : Ideal of R

i4 : S = localRing (R,I)

o4 = S

o4 : LocalRing, maximal ideal (2, x)

i5 : coefficientRing S

o5 = ZZ

o5 : Ring