Changeset 4077:96ed94d32305
- Timestamp:
- 04/23/07 01:50:08 (6 years ago)
- Branch:
- default
- Children:
- 4078:3cee4b64bf26, 4079:0f2ffefcfa13, 4099:543dba25c40e, 4103:bf0311ec7662, 4136:1578cb90808d, 4804:2c23e747fbb7, 4806:3bf6690d9871
- Location:
- sage
- Files:
-
- 11 edited
-
ext/interactive_constructors_c.pyx (modified) (1 diff)
-
rings/groebner_fan.py (modified) (2 diffs)
-
rings/ideal.py (modified) (3 diffs)
-
rings/morphism.py (modified) (1 diff)
-
rings/multi_polynomial_element.py (modified) (1 diff)
-
rings/multi_polynomial_ideal.py (modified) (5 diffs)
-
rings/number_field/number_field_ideal.py (modified) (1 diff)
-
rings/quotient_ring.py (modified) (2 diffs)
-
rings/quotient_ring_element.py (modified) (1 diff)
-
rings/ring.pyx (modified) (3 diffs)
-
schemes/generic/divisor.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/ext/interactive_constructors_c.pyx
r3973 r4077 194 194 sage: S = quo(R, (x^3, x^2 + y^2), 'a,b') 195 195 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) 197 197 sage: a^2 198 198 -1*b^2 -
sage/rings/groebner_fan.py
r4007 r4077 105 105 sage: G = I.groebner_fan(); G 106 106 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 Field107 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 108 108 """ 109 109 self.__is_groebner_basis = is_groebner_basis … … 206 206 sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan() 207 207 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}' 209 209 """ 210 210 try: -
sage/rings/ideal.py
r4059 r4077 60 60 sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2]) 61 61 sage: I 62 Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over Integer Ring62 Ideal (x^2 + 3*x + 4, x^2 + 1) of Univariate Polynomial Ring in x over Integer Ring 63 63 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 Ring64 Ideal (x^2 + 3*x + 4, x^2 + 1) of Univariate Polynomial Ring in x over Integer Ring 65 65 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 Ring66 Ideal (x^2 + 3*x + 4, x^2 + 1) of Univariate Polynomial Ring in x over Integer Ring 67 67 68 68 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 Ring69 Ideal (x^2 - 1, x^2 - 2*x + 1) of Univariate Polynomial Ring in x over Integer Ring 70 70 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 76 73 77 74 This example illustrates how SAGE finds a common ambient ring for the ideal, even though … … 80 77 sage: i = ideal(1,t,t^2) 81 78 sage: i 82 Ideal ( 1, t, t^2) of Univariate Polynomial Ring in t over Integer Ring79 Ideal (t, 1, t^2) of Univariate Polynomial Ring in t over Integer Ring 83 80 sage: i = ideal(1/2,t,t^2) 84 81 Traceback (most recent call last): … … 164 161 if coerce: 165 162 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 180 164 self.__gens = tuple(gens) 181 165 MonoidElement.__init__(self, ring.ideal_monoid()) -
sage/rings/morphism.py
r4057 r4077 345 345 sage: S.lift() 346 346 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) 348 348 To: Polynomial Ring in x, y over Rational Field 349 349 Defn: Choice of lifting map -
sage/rings/multi_polynomial_element.py
r4061 r4077 1111 1111 sage: M = f.lift(I) 1112 1112 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] 1114 1114 sage: sum( map( mul , zip( M, I.gens() ) ) ) == f 1115 1115 True -
sage/rings/multi_polynomial_ideal.py
r4057 r4077 177 177 sage: S = I._singular_() 178 178 sage: S 179 y,180 x^3+y179 x^3+y, 180 y 181 181 """ 182 182 if singular is None: singular = singular_default … … 439 439 Ideal (y^2, x*y, x^2) of Polynomial Ring in x, y over Rational Field 440 440 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 Field441 Ideal (x^2*y^2, x^3, y^3, x*y) of Polynomial Ring in x, y over Rational Field 442 442 sage: IJ == K 443 443 False … … 463 463 sage: I = (p*q^2, y-z^2)*R 464 464 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] 466 466 467 467 ALGORITHM: Uses Singular. … … 531 531 sage: I = ideal([x^2,x*y^4,y^5]) 532 532 sage: I.integral_closure() 533 [x^2, y^5, x*y^3]533 [x^2, y^5, -1*x*y^3] 534 534 535 535 ALGORITHM: Use Singular … … 830 830 sage: R.<x,y> = PolynomialRing(IntegerRing(), 2, order='lex') 831 831 sage: R.ideal([x, y]) 832 Ideal ( y, x) of Polynomial Ring in x, y over Integer Ring832 Ideal (x, y) of Polynomial Ring in x, y over Integer Ring 833 833 sage: R.<x0,x1> = GF(3)[] 834 834 sage: R.ideal([x0^2, x1^3]) -
sage/rings/number_field/number_field_ideal.py
r4019 r4077 235 235 sage: J = K.ideal([i+1, 2]) 236 236 sage: J.gens() 237 ( 2, i + 1)237 (i + 1, 2) 238 238 sage: J.gens_reduced() 239 239 (i + 1,) -
sage/rings/quotient_ring.py
r4059 r4077 69 69 sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2]) 70 70 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) 72 72 73 73 sage: R.<x,y> = PolynomialRing(QQ) … … 135 135 sage: l = pi.lift(); l 136 136 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) 138 138 To: Polynomial Ring in x, y over Rational Field 139 139 Defn: Choice of lifting map -
sage/rings/quotient_ring_element.py
r4059 r4077 38 38 sage: R.<x> = PolynomialRing(ZZ) 39 39 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) 41 41 sage: v = S.gens(); v 42 42 (xbar,) -
sage/rings/ring.pyx
r4057 r4077 164 164 sage: R.<x,y> = QQ[] 165 165 sage: R.ideal((x,y)) 166 Ideal ( y, x) of Polynomial Ring in x, y over Rational Field166 Ideal (x, y) of Polynomial Ring in x, y over Rational Field 167 167 sage: R.ideal(x+y^2) 168 168 Ideal (y^2 + x) of Polynomial Ring in x, y over Rational Field … … 671 671 sage: S.<a,b> = R.quotient((x^2, y)) 672 672 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) 674 674 sage: S.gens() 675 675 (a, 0) … … 694 694 sage: S.<a,b> = R.quo((x^2, y)) 695 695 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) 697 697 sage: S.gens() 698 698 (a, 0) -
sage/schemes/generic/divisor.py
r2147 r4077 18 18 True 19 19 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) 21 21 sage: D[1][0] 22 22 3 23 23 sage: D[1][1] 24 Ideal ( y, x) of Polynomial Ring in x, y, z over Finite Field of size 524 Ideal (x, y) of Polynomial Ring in x, y, z over Finite Field of size 5 25 25 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) 27 27 """ 28 28 #******************************************************************************* … … 99 99 [(0, 0), (2, 2), (2, 3), (3, 1), (3, 4)] 100 100 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) 102 102 sage: D.scheme() 103 103 Affine Curve over Finite Field of size 5 defined by y^2 + 4*x + 4*x^9 … … 130 130 sage: D = E.divisor(P) 131 131 sage: D 132 ( y, x)132 (x, y) 133 133 sage: 10*D 134 10*( y, x)134 10*(x, y) 135 135 sage: E.divisor([P, P]) 136 2*( y, x)136 2*(x, y) 137 137 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) 139 139 """ 140 140 def __init__(self, v, check=True, reduce=True, parent=None): … … 222 222 [(0, 0), (2, 2), (2, 3), (3, 1), (3, 4)] 223 223 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) 225 225 sage: D.support() 226 226 [(0, 0), (2, 2)] … … 248 248 1 249 249 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) 251 251 sage: D.coeff(pts[0]) 252 252 3
Note: See TracChangeset
for help on using the changeset viewer.
