Opened 10 years ago

# Check doctest examples using QuotientRings, which do not fulfill the assumptions made on the ideal — at Version 2

Reported by: Owned by: tfeulner mvngu major sage-6.4 doctest coverage mstreng N/A

The following files use quotient rings in their doctest examples, which contradict the assumption on the defining ideal:

ASSUMPTION:

I has a method I.reduce(x) returning the normal form of elements x\in R. In other words, it is required that I.reduce(x)==I.reduce(y) \iff x-y \in I, and x-I.reduce(x) in I, for all x,y\in R.

• sage/categories/pushout.py :
• QuotientFunctor?.cmp
            sage: P.<x> = QQ[]
sage: F = P.quo([(x^2+1)^2*(x^2-3),(x^2+1)^2*(x^5+3)]).construction()[0]
True
sage: P2.<x,y> = QQ[]
sage: F == P2.quo([(x^2+1)^2*(x^2-3),(x^2+1)^2*(x^5+3)]).construction()[0]
False
sage: P3.<x> = ZZ[]
sage: F == P3.quo([(x^2+1)^2*(x^2-3),(x^2+1)^2*(x^5+3)]).construction()[0]
True

• sage/categories/rings.py :
• Rings.quotient
                sage: F.<x,y,z> = FreeAlgebra(QQ, 3)
sage: I = F*[x*y+y*z,x^2+x*y-y*x-y^2]*F
sage: Q = Rings().parent_class.quotient(F,I); Q

• Rings.quo
                sage: MS = MatrixSpace(QQ,2)
sage: MS.full_category_initialisation()
sage: I = MS*MS.gens()*MS
sage: MS.quo(I,names = ['a','b','c','d'])

• Rings.quotient_ring
                sage: MS = MatrixSpace(QQ,2)
sage: I = MS*MS.gens()*MS
sage: MS.quotient_ring(I,names = ['a','b','c','d'])

• sage/structure/category_object.pyx :
• CategoryObject?.temporarily_change_names
            sage: MS = MatrixSpace(GF(5),2,2)
sage: I = MS*[MS.0*MS.1,MS.2+MS.3]*MS
sage: Q.<a,b,c,d> = MS.quo(I)

• sage/rings/quotient_ring_element.py :
• QuotientRingElement?
        sage: R.<x> = PolynomialRing(ZZ)
sage: S.<xbar> = R.quo((4 + 3*x + x^2, 1 + x^2)); S

• QuotientRingElement?.init
            sage: R.<x> = PolynomialRing(ZZ)
sage: S.<xbar> = R.quo((4 + 3*x + x^2, 1 + x^2)); S

• QuotientRingElement?._repr_
            sage: S = SteenrodAlgebra(2)
sage: I = S*[S.0+S.1]*S
sage: Q = S.quo(I)

• sage/rings/morphism.pyx :
• RingMap_lift
        sage: MS = MatrixSpace(GF(5),2,2)
sage: I = MS*[MS.0*MS.1,MS.2+MS.3]*MS
sage: Q = MS.quo(I)

• sage/rings/ring.pyx:
• Ring.ideal_monoid
            sage: F.<x,y,z> = FreeAlgebra(ZZ, 3)
sage: I = F*[x*y+y*z,x^2+x*y-y*x-y^2]*F
sage: Q = sage.rings.ring.Ring.quotient(F,I)

• Ring.quotient
            sage: R.<x> = PolynomialRing(ZZ)
sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2])
sage: S = R.quotient(I, 'a')

• Ring.quotient_ring
            sage: R.<x> = PolynomialRing(ZZ)
sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2])
sage: S = R.quotient_ring(I, 'a')
sage: S.gens()


These examples have to be modified, one possibility is that they use quotient rings which fulfill the assumption or the reduce function of the corresponding ideal class must be provided.

### comment:1 Changed 10 years ago by mstreng

• Description modified (diff)

Wow, that's a long list of faulty quotient rings in the documentation! Can you add the examples themselves, as line numbers tend to change a lot as Sage evolves?

### comment:2 Changed 10 years ago by tfeulner

• Description modified (diff)
Note: See TracTickets for help on using tickets.