Changeset 4077:96ed94d32305


Ignore:
Timestamp:
04/23/07 01:50:08 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Children:
4078:3cee4b64bf26, 4079:0f2ffefcfa13, 4099:543dba25c40e, 4103:bf0311ec7662, 4136:1578cb90808d, 4804:2c23e747fbb7, 4806:3bf6690d9871
Message:

Martin's patch.

Location:
sage
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • sage/ext/interactive_constructors_c.pyx

    r3973 r4077  
    194194        sage: S = quo(R, (x^3, x^2 + y^2), 'a,b') 
    195195        sage: S 
    196         Quotient of Polynomial Ring in x, y over Rational Field by the ideal (y^2 + x^2, x^3) 
     196        Quotient of Polynomial Ring in x, y over Rational Field by the ideal (x^3, y^2 + x^2) 
    197197        sage: a^2 
    198198        -1*b^2 
  • sage/rings/groebner_fan.py

    r4007 r4077  
    105105            sage: G = I.groebner_fan(); G 
    106106            Groebner fan of the ideal: 
    107             Ideal (y^2*z - x, -1*y + x*z^2, -1*z + x^2*y) of Polynomial Ring in x, y, z over Rational Field 
     107            Ideal (-1*z + x^2*y, y^2*z - x, -1*y + x*z^2) of Polynomial Ring in x, y, z over Rational Field 
    108108        """ 
    109109        self.__is_groebner_basis = is_groebner_basis 
     
    206206            sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan() 
    207207            sage: G._gfan_ideal() 
    208             '{-1*b + a*c^2, b^2*c - a, -1*c + a^2*b}' 
     208            '{-1*c + a^2*b, b^2*c - a, -1*b + a*c^2}' 
    209209        """ 
    210210        try: 
  • sage/rings/ideal.py

    r4059 r4077  
    6060        sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2]) 
    6161        sage: I 
    62         Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over Integer Ring 
     62        Ideal (x^2 + 3*x + 4, x^2 + 1) of Univariate Polynomial Ring in x over Integer Ring 
    6363        sage: Ideal(R, [4 + 3*x + x^2, 1 + x^2]) 
    64         Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over Integer Ring 
     64        Ideal (x^2 + 3*x + 4, x^2 + 1) of Univariate Polynomial Ring in x over Integer Ring 
    6565        sage: Ideal((4 + 3*x + x^2, 1 + x^2)) 
    66         Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over Integer Ring 
     66        Ideal (x^2 + 3*x + 4, x^2 + 1) of Univariate Polynomial Ring in x over Integer Ring 
    6767         
    6868        sage: ideal(x^2-2*x+1, x^2-1) 
    69         Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over Integer Ring 
     69        Ideal (x^2 - 1, x^2 - 2*x + 1) of Univariate Polynomial Ring in x over Integer Ring 
    7070        sage: ideal([x^2-2*x+1, x^2-1]) 
    71         Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over Integer Ring 
    72         sage: ideal(x^2-2*x+1, x^2-1) 
    73         Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over Integer Ring 
    74         sage: ideal([x^2-2*x+1, x^2-1]) 
    75         Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over Integer Ring 
     71        Ideal (x^2 - 1, x^2 - 2*x + 1) of Univariate Polynomial Ring in x over Integer Ring 
     72 
    7673 
    7774    This example illustrates how SAGE finds a common ambient ring for the ideal, even though 
     
    8077        sage: i = ideal(1,t,t^2) 
    8178        sage: i 
    82         Ideal (1, t, t^2) of Univariate Polynomial Ring in t over Integer Ring 
     79        Ideal (t, 1, t^2) of Univariate Polynomial Ring in t over Integer Ring 
    8380        sage: i = ideal(1/2,t,t^2) 
    8481        Traceback (most recent call last): 
     
    164161        if coerce: 
    165162            gens = [ring(x) for x in gens] 
    166         gens = list(set(gens)) 
    167          
    168         # Regarding the "important" comment below: Otherwise the 
    169         # generators will be in a completely random order, given the 
    170         # code that comes before that line.  A basic design choice in 
    171         # SAGE is that as much as possible lists of objects (e.g., 
    172         # list(R), where R is finite), should not be in a random 
    173         # order.  Feel free to add this as a comment.  It would be 
    174         # fine to replace the sort by something else, if it yields the 
    175         # same answer.  However, I don't think randomizing the orders 
    176         # of things, e.g., lists of generators, for no reason, is a 
    177         # good idea in SAGE.  This is another "rule of thumb" for the 
    178         # programmer's guide. 
    179         gens.sort()    # important! 
     163 
    180164        self.__gens = tuple(gens) 
    181165        MonoidElement.__init__(self, ring.ideal_monoid()) 
  • sage/rings/morphism.py

    r4057 r4077  
    345345        sage: S.lift() 
    346346        Set-theoretic ring morphism: 
    347           From: Quotient of Polynomial Ring in x, y over Rational Field by the ideal (y, y^2 + x^2) 
     347          From: Quotient of Polynomial Ring in x, y over Rational Field by the ideal (y^2 + x^2, y) 
    348348          To:   Polynomial Ring in x, y over Rational Field 
    349349          Defn: Choice of lifting map 
  • sage/rings/multi_polynomial_element.py

    r4061 r4077  
    11111111            sage: M = f.lift(I) 
    11121112            sage: M 
    1113             [y^4 + x*y^5 + x^2*y^3 + x^3*y^4 + x^4*y^2 + x^5*y^3 + x^6*y + x^7*y^2 + x^8, y^7] 
     1113            [y^7, y^4 + x*y^5 + x^2*y^3 + x^3*y^4 + x^4*y^2 + x^5*y^3 + x^6*y + x^7*y^2 + x^8] 
    11141114            sage: sum( map( mul , zip( M, I.gens() ) ) ) == f 
    11151115            True 
  • sage/rings/multi_polynomial_ideal.py

    r4057 r4077  
    177177            sage: S = I._singular_() 
    178178            sage: S 
    179             y, 
    180             x^3+y 
     179            x^3+y, 
     180            y 
    181181        """ 
    182182        if singular is None: singular = singular_default 
     
    439439            Ideal (y^2, x*y, x^2) of Polynomial Ring in x, y over Rational Field 
    440440            sage: IJ = I*J; IJ 
    441             Ideal (y^3, x*y, x^2*y^2, x^3) of Polynomial Ring in x, y over Rational Field 
     441            Ideal (x^2*y^2, x^3, y^3, x*y) of Polynomial Ring in x, y over Rational Field 
    442442            sage: IJ == K 
    443443            False 
     
    463463            sage: I = (p*q^2, y-z^2)*R 
    464464            sage: I.minimal_associated_primes () 
    465             [Ideal (-1*z^2 + y, 2 + z^3) of Polynomial Ring in x, y, z over Rational Field, Ideal (-1*z^2 + y, 1 + z^2) of Polynomial Ring in x, y, z over Rational Field] 
     465            [Ideal (2 + z^3, -1*z^2 + y) of Polynomial Ring in x, y, z over Rational Field, Ideal (1 + z^2, -1*z^2 + y) of Polynomial Ring in x, y, z over Rational Field] 
    466466         
    467467        ALGORITHM: Uses Singular. 
     
    531531            sage: I = ideal([x^2,x*y^4,y^5]) 
    532532            sage: I.integral_closure() 
    533             [x^2, y^5, x*y^3] 
     533            [x^2, y^5, -1*x*y^3] 
    534534 
    535535        ALGORITHM: Use Singular 
     
    830830            sage: R.<x,y> = PolynomialRing(IntegerRing(), 2, order='lex') 
    831831            sage: R.ideal([x, y]) 
    832             Ideal (y, x) of Polynomial Ring in x, y over Integer Ring 
     832            Ideal (x, y) of Polynomial Ring in x, y over Integer Ring 
    833833            sage: R.<x0,x1> = GF(3)[] 
    834834            sage: R.ideal([x0^2, x1^3]) 
  • sage/rings/number_field/number_field_ideal.py

    r4019 r4077  
    235235            sage: J = K.ideal([i+1, 2]) 
    236236            sage: J.gens() 
    237             (2, i + 1) 
     237            (i + 1, 2) 
    238238            sage: J.gens_reduced() 
    239239            (i + 1,) 
  • sage/rings/quotient_ring.py

    r4059 r4077  
    6969        sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2]) 
    7070        sage: S = R.quotient_ring(I); S 
    71         Quotient of Univariate Polynomial Ring in x over Integer Ring by the ideal (x^2 + 1, x^2 + 3*x + 4) 
     71        Quotient of Univariate Polynomial Ring in x over Integer Ring by the ideal (x^2 + 3*x + 4, x^2 + 1) 
    7272 
    7373        sage: R.<x,y> = PolynomialRing(QQ) 
     
    135135            sage: l = pi.lift(); l 
    136136            Set-theoretic ring morphism: 
    137               From: Quotient of Polynomial Ring in x, y over Rational Field by the ideal (y^2, x^2) 
     137              From: Quotient of Polynomial Ring in x, y over Rational Field by the ideal (x^2, y^2) 
    138138              To:   Polynomial Ring in x, y over Rational Field 
    139139              Defn: Choice of lifting map 
  • sage/rings/quotient_ring_element.py

    r4059 r4077  
    3838        sage: R.<x> = PolynomialRing(ZZ) 
    3939        sage: S.<xbar> = R.quo((4 + 3*x + x^2, 1 + x^2)); S 
    40         Quotient of Univariate Polynomial Ring in x over Integer Ring by the ideal (x^2 + 1, x^2 + 3*x + 4) 
     40        Quotient of Univariate Polynomial Ring in x over Integer Ring by the ideal (x^2 + 3*x + 4, x^2 + 1) 
    4141        sage: v = S.gens(); v 
    4242        (xbar,) 
  • sage/rings/ring.pyx

    r4057 r4077  
    164164            sage: R.<x,y> = QQ[] 
    165165            sage: R.ideal((x,y)) 
    166             Ideal (y, x) of Polynomial Ring in x, y over Rational Field 
     166            Ideal (x, y) of Polynomial Ring in x, y over Rational Field 
    167167            sage: R.ideal(x+y^2) 
    168168            Ideal (y^2 + x) of Polynomial Ring in x, y over Rational Field 
     
    671671            sage: S.<a,b> = R.quotient((x^2, y)) 
    672672            sage: S 
    673             Quotient of Polynomial Ring in x, y over Rational Field by the ideal (y, x^2) 
     673            Quotient of Polynomial Ring in x, y over Rational Field by the ideal (x^2, y) 
    674674            sage: S.gens() 
    675675            (a, 0) 
     
    694694            sage: S.<a,b> = R.quo((x^2, y)) 
    695695            sage: S 
    696             Quotient of Polynomial Ring in x, y over Rational Field by the ideal (y, x^2) 
     696            Quotient of Polynomial Ring in x, y over Rational Field by the ideal (x^2, y) 
    697697            sage: S.gens() 
    698698            (a, 0) 
  • sage/schemes/generic/divisor.py

    r2147 r4077  
    1818    True 
    1919    sage: D = D1 - D2 + D3; D 
    20     10*(z + y, 2*z + x) + 3*(y, x) - (z, x) 
     20    10*(2*z + x, z + y) + 3*(x, y) - (x, z) 
    2121    sage: D[1][0] 
    2222    3 
    2323    sage: D[1][1] 
    24     Ideal (y, x) of Polynomial Ring in x, y, z over Finite Field of size 5 
     24    Ideal (x, y) of Polynomial Ring in x, y, z over Finite Field of size 5 
    2525    sage: C.divisor([(3, pts[0]), (-1, pts[1]), (10,pts[5])]) 
    26     10*(z + y, 2*z + x) + 3*(y, x) - (z, x) 
     26    10*(2*z + x, z + y) + 3*(x, y) - (x, z) 
    2727""" 
    2828#******************************************************************************* 
     
    9999            [(0, 0), (2, 2), (2, 3), (3, 1), (3, 4)] 
    100100            sage: D = C.divisor(pts[0])*3 - C.divisor(pts[1]); D 
    101             -(3 + y, 3 + x) + 3*(y, x) 
     101            -(3 + x, 3 + y) + 3*(x, y) 
    102102            sage: D.scheme() 
    103103            Affine Curve over Finite Field of size 5 defined by y^2 + 4*x + 4*x^9 
     
    130130        sage: D = E.divisor(P) 
    131131        sage: D 
    132         (y, x) 
     132        (x, y) 
    133133        sage: 10*D 
    134         10*(y, x) 
     134        10*(x, y) 
    135135        sage: E.divisor([P, P]) 
    136         2*(y, x) 
     136        2*(x, y) 
    137137        sage: E.divisor([(3,P), (-4,5*P)]) 
    138         -4*(5/8*z + y, -1/4*z + x) + 3*(y, x) 
     138        -4*(-1/4*z + x, 5/8*z + y) + 3*(x, y) 
    139139    """ 
    140140    def __init__(self, v, check=True, reduce=True, parent=None): 
     
    222222            [(0, 0), (2, 2), (2, 3), (3, 1), (3, 4)] 
    223223            sage: D = C.divisor([(3,pts[0]), (-1, pts[1])]); D 
    224             -(3 + y, 3 + x) + 3*(y, x) 
     224            -(3 + x, 3 + y) + 3*(x, y) 
    225225            sage: D.support() 
    226226            [(0, 0), (2, 2)] 
     
    248248            1 
    249249            sage: D = C.divisor([(3,pts[0]), (-1,pts[1])]); D 
    250             -(3 + y, 3 + x) + 3*(y, x) 
     250            -(3 + x, 3 + y) + 3*(x, y) 
    251251            sage: D.coeff(pts[0]) 
    252252            3 
Note: See TracChangeset for help on using the changeset viewer.