#13347: Check doctest examples using QuotientRings, which do not fulfill the
assumptions made on the ideal
------------------------------------+------------------------
       Reporter:  tfeulner          |        Owner:  mvngu
           Type:  task              |       Status:  new
       Priority:  major             |    Milestone:  sage-6.4
      Component:  doctest coverage  |   Resolution:
       Keywords:                    |    Merged in:
        Authors:                    |    Reviewers:
Report Upstream:  N/A               |  Work issues:
         Branch:                    |       Commit:
   Dependencies:                    |     Stopgaps:
------------------------------------+------------------------
Description changed by saraedum:

Old description:

> 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]
>             sage: F == loads(dumps(F))
>             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.
>
> See also ticket:13345 and https://groups.google.com/d/topic/sage-
> devel/s5y604ZPiQ8/discussion.

New description:

 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]
             sage: F == loads(dumps(F))
             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.

 See also ticket:13345 and https://groups.google.com/d/topic/sage-
 devel/s5y604ZPiQ8/discussion.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/13347#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to