Multivariate Power Series Rings¶
Construct a multivariate power series ring (in finitely many variables) over a given (commutative) base ring.
EXAMPLES:
Construct rings and elements:
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
Multivariate Power Series Ring in t, u, v over Rational Field
sage: TestSuite(R).run()
sage: p = -t + 1/2*t^3*u - 1/4*t^4*u + 2/3*v^5 + R.O(6); p
-t + 1/2*t^3*u - 1/4*t^4*u + 2/3*v^5 + O(t, u, v)^6
sage: p in R
True
sage: g = 1 + v + 3*u*t^2 - 2*v^2*t^2; g
1 + v + 3*t^2*u - 2*t^2*v^2
sage: g in R
True
>>> from sage.all import *
>>> R = PowerSeriesRing(QQ, names=('t', 'u', 'v',)); (t, u, v,) = R._first_ngens(3); R
Multivariate Power Series Ring in t, u, v over Rational Field
>>> TestSuite(R).run()
>>> p = -t + Integer(1)/Integer(2)*t**Integer(3)*u - Integer(1)/Integer(4)*t**Integer(4)*u + Integer(2)/Integer(3)*v**Integer(5) + R.O(Integer(6)); p
-t + 1/2*t^3*u - 1/4*t^4*u + 2/3*v^5 + O(t, u, v)^6
>>> p in R
True
>>> g = Integer(1) + v + Integer(3)*u*t**Integer(2) - Integer(2)*v**Integer(2)*t**Integer(2); g
1 + v + 3*t^2*u - 2*t^2*v^2
>>> g in R
True
Add big O as with single variable power series:
sage: g.add_bigoh(3)
1 + v + O(t, u, v)^3
sage: g = g.O(5); g
1 + v + 3*t^2*u - 2*t^2*v^2 + O(t, u, v)^5
>>> from sage.all import *
>>> g.add_bigoh(Integer(3))
1 + v + O(t, u, v)^3
>>> g = g.O(Integer(5)); g
1 + v + 3*t^2*u - 2*t^2*v^2 + O(t, u, v)^5
Sage keeps track of total-degree precision:
sage: f = (g-1)^2 - g + 1; f
-v + v^2 - 3*t^2*u + 6*t^2*u*v + 2*t^2*v^2 + O(t, u, v)^5
sage: f in R
True
sage: f.prec()
5
sage: ((g-1-v)^2).prec()
8
>>> from sage.all import *
>>> f = (g-Integer(1))**Integer(2) - g + Integer(1); f
-v + v^2 - 3*t^2*u + 6*t^2*u*v + 2*t^2*v^2 + O(t, u, v)^5
>>> f in R
True
>>> f.prec()
5
>>> ((g-Integer(1)-v)**Integer(2)).prec()
8
Construct multivariate power series rings over various base rings.
sage: M = PowerSeriesRing(QQ, 4, 'k'); M
Multivariate Power Series Ring in k0, k1, k2, k3 over Rational Field
sage: loads(dumps(M)) is M
True
sage: TestSuite(M).run()
sage: H = PowerSeriesRing(PolynomialRing(ZZ, 3, 'z'), 4, 'f'); H
Multivariate Power Series Ring in f0, f1, f2, f3
over Multivariate Polynomial Ring in z0, z1, z2 over Integer Ring
sage: TestSuite(H).run()
sage: loads(dumps(H)) is H
True
sage: z = H.base_ring().gens()
sage: f = H.gens()
sage: h = 4*z[1]^2 + 2*z[0]*z[2] + z[1]*z[2] + z[2]^2 \
+ (-z[2]^2 - 2*z[0] + z[2])*f[0]*f[2] \
+ (-22*z[0]^2 + 2*z[1]^2 - z[0]*z[2] + z[2]^2 - 1955*z[2])*f[1]*f[2] \
+ (-z[0]*z[1] - 2*z[1]^2)*f[2]*f[3] \
+ (2*z[0]*z[1] + z[1]*z[2] - z[2]^2 - z[1] + 3*z[2])*f[3]^2 \
+ H.O(3)
sage: h in H
True
sage: h
4*z1^2 + 2*z0*z2 + z1*z2 + z2^2 + (-z2^2 - 2*z0 + z2)*f0*f2
+ (-22*z0^2 + 2*z1^2 - z0*z2 + z2^2 - 1955*z2)*f1*f2
+ (-z0*z1 - 2*z1^2)*f2*f3 + (2*z0*z1 + z1*z2 - z2^2 - z1 + 3*z2)*f3^2
+ O(f0, f1, f2, f3)^3
>>> from sage.all import *
>>> M = PowerSeriesRing(QQ, Integer(4), 'k'); M
Multivariate Power Series Ring in k0, k1, k2, k3 over Rational Field
>>> loads(dumps(M)) is M
True
>>> TestSuite(M).run()
>>> H = PowerSeriesRing(PolynomialRing(ZZ, Integer(3), 'z'), Integer(4), 'f'); H
Multivariate Power Series Ring in f0, f1, f2, f3
over Multivariate Polynomial Ring in z0, z1, z2 over Integer Ring
>>> TestSuite(H).run()
>>> loads(dumps(H)) is H
True
>>> z = H.base_ring().gens()
>>> f = H.gens()
>>> h = Integer(4)*z[Integer(1)]**Integer(2) + Integer(2)*z[Integer(0)]*z[Integer(2)] + z[Integer(1)]*z[Integer(2)] + z[Integer(2)]**Integer(2) \
+ (-z[2]^2 - 2*z[0] + z[2])*f[0]*f[2] \
+ (-22*z[0]^2 + 2*z[1]^2 - z[0]*z[2] + z[2]^2 - 1955*z[2])*f[1]*f[2] \
+ (-z[0]*z[1] - 2*z[1]^2)*f[2]*f[3] \
+ (2*z[0]*z[1] + z[1]*z[2] - z[2]^2 - z[1] + 3*z[2])*f[3]^2 \
+ H.O(3)
>>> h in H
True
>>> h
4*z1^2 + 2*z0*z2 + z1*z2 + z2^2 + (-z2^2 - 2*z0 + z2)*f0*f2
+ (-22*z0^2 + 2*z1^2 - z0*z2 + z2^2 - 1955*z2)*f1*f2
+ (-z0*z1 - 2*z1^2)*f2*f3 + (2*z0*z1 + z1*z2 - z2^2 - z1 + 3*z2)*f3^2
+ O(f0, f1, f2, f3)^3
Use angle-bracket notation:
sage: # needs sage.rings.finite_rings sage: S.<x,y> = PowerSeriesRing(GF(65537)); S Multivariate Power Series Ring in x, y over Finite Field of size 65537 sage: s = -30077*x + 9485*x*y - 6260*y^3 + 12870*x^2*y^2 - 20289*y^4 + S.O(5); s -30077*x + 9485*x*y - 6260*y^3 + 12870*x^2*y^2 - 20289*y^4 + O(x, y)^5 sage: s in S True sage: TestSuite(S).run() sage: loads(dumps(S)) is S True
>>> from sage.all import * >>> # needs sage.rings.finite_rings >>> S = PowerSeriesRing(GF(Integer(65537)), names=('x', 'y',)); (x, y,) = S._first_ngens(2); S Multivariate Power Series Ring in x, y over Finite Field of size 65537 >>> s = -Integer(30077)*x + Integer(9485)*x*y - Integer(6260)*y**Integer(3) + Integer(12870)*x**Integer(2)*y**Integer(2) - Integer(20289)*y**Integer(4) + S.O(Integer(5)); s -30077*x + 9485*x*y - 6260*y^3 + 12870*x^2*y^2 - 20289*y^4 + O(x, y)^5 >>> s in S True >>> TestSuite(S).run() >>> loads(dumps(S)) is S True
Use double square bracket notation:
sage: ZZ[['s,t,u']] Multivariate Power Series Ring in s, t, u over Integer Ring sage: GF(127931)[['x,y']] # needs sage.rings.finite_rings Multivariate Power Series Ring in x, y over Finite Field of size 127931
>>> from sage.all import * >>> ZZ[['s,t,u']] Multivariate Power Series Ring in s, t, u over Integer Ring >>> GF(Integer(127931))[['x,y']] # needs sage.rings.finite_rings Multivariate Power Series Ring in x, y over Finite Field of size 127931
Variable ordering determines how series are displayed.
sage: T.<a,b> = PowerSeriesRing(ZZ,order='deglex'); T
Multivariate Power Series Ring in a, b over Integer Ring
sage: TestSuite(T).run()
sage: loads(dumps(T)) is T
True
sage: T.term_order()
Degree lexicographic term order
sage: p = - 2*b^6 + a^5*b^2 + a^7 - b^2 - a*b^3 + T.O(9); p
a^7 + a^5*b^2 - 2*b^6 - a*b^3 - b^2 + O(a, b)^9
sage: U = PowerSeriesRing(ZZ,'a,b',order='negdeglex'); U
Multivariate Power Series Ring in a, b over Integer Ring
sage: U.term_order()
Negative degree lexicographic term order
sage: U(p)
-b^2 - a*b^3 - 2*b^6 + a^7 + a^5*b^2 + O(a, b)^9
>>> from sage.all import *
>>> T = PowerSeriesRing(ZZ,order='deglex', names=('a', 'b',)); (a, b,) = T._first_ngens(2); T
Multivariate Power Series Ring in a, b over Integer Ring
>>> TestSuite(T).run()
>>> loads(dumps(T)) is T
True
>>> T.term_order()
Degree lexicographic term order
>>> p = - Integer(2)*b**Integer(6) + a**Integer(5)*b**Integer(2) + a**Integer(7) - b**Integer(2) - a*b**Integer(3) + T.O(Integer(9)); p
a^7 + a^5*b^2 - 2*b^6 - a*b^3 - b^2 + O(a, b)^9
>>> U = PowerSeriesRing(ZZ,'a,b',order='negdeglex'); U
Multivariate Power Series Ring in a, b over Integer Ring
>>> U.term_order()
Negative degree lexicographic term order
>>> U(p)
-b^2 - a*b^3 - 2*b^6 + a^7 + a^5*b^2 + O(a, b)^9
Change from one base ring to another:
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
Multivariate Power Series Ring in t, u, v over Rational Field
sage: R.base_extend(RR) # needs sage.rings.real_mpfr
Multivariate Power Series Ring in t, u, v
over Real Field with 53 bits of precision
sage: R.change_ring(IntegerModRing(10))
Multivariate Power Series Ring in t, u, v
over Ring of integers modulo 10
sage: S = PowerSeriesRing(GF(65537),2,'x,y'); S # needs sage.rings.finite_rings
Multivariate Power Series Ring in x, y over Finite Field of size 65537
sage: S.change_ring(GF(5)) # needs sage.rings.finite_rings
Multivariate Power Series Ring in x, y over Finite Field of size 5
>>> from sage.all import *
>>> R = PowerSeriesRing(QQ, names=('t', 'u', 'v',)); (t, u, v,) = R._first_ngens(3); R
Multivariate Power Series Ring in t, u, v over Rational Field
>>> R.base_extend(RR) # needs sage.rings.real_mpfr
Multivariate Power Series Ring in t, u, v
over Real Field with 53 bits of precision
>>> R.change_ring(IntegerModRing(Integer(10)))
Multivariate Power Series Ring in t, u, v
over Ring of integers modulo 10
>>> S = PowerSeriesRing(GF(Integer(65537)),Integer(2),'x,y'); S # needs sage.rings.finite_rings
Multivariate Power Series Ring in x, y over Finite Field of size 65537
>>> S.change_ring(GF(Integer(5))) # needs sage.rings.finite_rings
Multivariate Power Series Ring in x, y over Finite Field of size 5
Coercion from polynomial ring:
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
Multivariate Power Series Ring in t, u, v over Rational Field
sage: A = PolynomialRing(ZZ,3,'t,u,v')
sage: g = A.gens()
sage: a = 2*g[0]*g[2] - 2*g[0] - 2; a
2*t*v - 2*t - 2
sage: R(a)
-2 - 2*t + 2*t*v
sage: R(a).O(4)
-2 - 2*t + 2*t*v + O(t, u, v)^4
sage: a.parent()
Multivariate Polynomial Ring in t, u, v over Integer Ring
sage: a in R
True
>>> from sage.all import *
>>> R = PowerSeriesRing(QQ, names=('t', 'u', 'v',)); (t, u, v,) = R._first_ngens(3); R
Multivariate Power Series Ring in t, u, v over Rational Field
>>> A = PolynomialRing(ZZ,Integer(3),'t,u,v')
>>> g = A.gens()
>>> a = Integer(2)*g[Integer(0)]*g[Integer(2)] - Integer(2)*g[Integer(0)] - Integer(2); a
2*t*v - 2*t - 2
>>> R(a)
-2 - 2*t + 2*t*v
>>> R(a).O(Integer(4))
-2 - 2*t + 2*t*v + O(t, u, v)^4
>>> a.parent()
Multivariate Polynomial Ring in t, u, v over Integer Ring
>>> a in R
True
Coercion from polynomial ring in subset of variables:
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
Multivariate Power Series Ring in t, u, v over Rational Field
sage: A = PolynomialRing(QQ,2,'t,v')
sage: g = A.gens()
sage: a = -2*g[0]*g[1] - 1/27*g[1]^2 + g[0] - 1/2*g[1]; a
-2*t*v - 1/27*v^2 + t - 1/2*v
sage: a in R
True
>>> from sage.all import *
>>> R = PowerSeriesRing(QQ, names=('t', 'u', 'v',)); (t, u, v,) = R._first_ngens(3); R
Multivariate Power Series Ring in t, u, v over Rational Field
>>> A = PolynomialRing(QQ,Integer(2),'t,v')
>>> g = A.gens()
>>> a = -Integer(2)*g[Integer(0)]*g[Integer(1)] - Integer(1)/Integer(27)*g[Integer(1)]**Integer(2) + g[Integer(0)] - Integer(1)/Integer(2)*g[Integer(1)]; a
-2*t*v - 1/27*v^2 + t - 1/2*v
>>> a in R
True
Coercion from symbolic ring:
sage: # needs sage.symbolic
sage: x,y = var('x,y')
sage: S = PowerSeriesRing(GF(11),2,'x,y'); S
Multivariate Power Series Ring in x, y over Finite Field of size 11
sage: type(x)
<class 'sage.symbolic.expression.Expression'>
sage: type(S(x))
<class 'sage.rings.multi_power_series_ring.MPowerSeriesRing_generic_with_category.element_class'>
sage: f = S(2/7 -100*x^2 + 1/3*x*y + y^2).O(3); f
5 - x^2 + 4*x*y + y^2 + O(x, y)^3
sage: f.parent()
Multivariate Power Series Ring in x, y over Finite Field of size 11
sage: f.parent() == S
True
>>> from sage.all import *
>>> # needs sage.symbolic
>>> x,y = var('x,y')
>>> S = PowerSeriesRing(GF(Integer(11)),Integer(2),'x,y'); S
Multivariate Power Series Ring in x, y over Finite Field of size 11
>>> type(x)
<class 'sage.symbolic.expression.Expression'>
>>> type(S(x))
<class 'sage.rings.multi_power_series_ring.MPowerSeriesRing_generic_with_category.element_class'>
>>> f = S(Integer(2)/Integer(7) -Integer(100)*x**Integer(2) + Integer(1)/Integer(3)*x*y + y**Integer(2)).O(Integer(3)); f
5 - x^2 + 4*x*y + y^2 + O(x, y)^3
>>> f.parent()
Multivariate Power Series Ring in x, y over Finite Field of size 11
>>> f.parent() == S
True
The implementation of the multivariate power series ring uses a combination of multivariate polynomials and univariate power series. Namely, in order to construct the multivariate power series ring \(R[[x_1, x_2, \cdots, x_n]]\), we consider the univariate power series ring \(S[[T]]\) over the multivariate polynomial ring \(S := R[x_1, x_2, \cdots, x_n]\), and in it we take the subring formed by all power series whose \(i\)-th coefficient has degree \(i\) for all \(i \geq 0\). This subring is isomorphic to \(R[[x_1, x_2, \cdots, x_n]]\). This is how \(R[[x_1, x_2, \cdots, x_n]]\) is implemented in this class. The ring \(S\) is called the foreground polynomial ring, and the ring \(S[[T]]\) is called the background univariate power series ring.
AUTHORS:
Niles Johnson (2010-07): initial code
Simon King (2012-08, 2013-02): Use category and coercion framework, Issue #13412 and Issue #14084
- class sage.rings.multi_power_series_ring.MPowerSeriesRing_generic(base_ring, num_gens, name_list, order='negdeglex', default_prec=10, sparse=False)[source]¶
Bases:
PowerSeriesRing_generic
,Nonexact
A multivariate power series ring. This class is implemented as a single variable power series ring in the variable
T
over a multivariable polynomial ring in the specified generators. Each generatorg
of the multivariable polynomial ring (called the “foreground ring”) is mapped tog*T
in the single variable power series ring (called the “background ring”). The background power series ring is used to do arithmetic and track total-degree precision. The foreground polynomial ring is used to display elements.For usage and examples, see above, and
PowerSeriesRing()
.- Element[source]¶
alias of
MPowerSeries
- O(prec)[source]¶
Return big oh with precision
prec
. This function is an alias forbigoh
.EXAMPLES:
sage: T.<a,b> = PowerSeriesRing(ZZ,2); T Multivariate Power Series Ring in a, b over Integer Ring sage: T.O(10) 0 + O(a, b)^10 sage: T.bigoh(10) 0 + O(a, b)^10
>>> from sage.all import * >>> T = PowerSeriesRing(ZZ,Integer(2), names=('a', 'b',)); (a, b,) = T._first_ngens(2); T Multivariate Power Series Ring in a, b over Integer Ring >>> T.O(Integer(10)) 0 + O(a, b)^10 >>> T.bigoh(Integer(10)) 0 + O(a, b)^10
- bigoh(prec)[source]¶
Return big oh with precision
prec
. The functionO
does the same thing.EXAMPLES:
sage: T.<a,b> = PowerSeriesRing(ZZ,2); T Multivariate Power Series Ring in a, b over Integer Ring sage: T.bigoh(10) 0 + O(a, b)^10 sage: T.O(10) 0 + O(a, b)^10
>>> from sage.all import * >>> T = PowerSeriesRing(ZZ,Integer(2), names=('a', 'b',)); (a, b,) = T._first_ngens(2); T Multivariate Power Series Ring in a, b over Integer Ring >>> T.bigoh(Integer(10)) 0 + O(a, b)^10 >>> T.O(Integer(10)) 0 + O(a, b)^10
- change_ring(R)[source]¶
Return the power series ring over \(R\) in the same variable as
self
. This function ignores the question of whether the base ring of self is or can extend to the base ring of \(R\); for the latter, usebase_extend
.EXAMPLES:
sage: R.<t,u,v> = PowerSeriesRing(QQ); R Multivariate Power Series Ring in t, u, v over Rational Field sage: R.base_extend(RR) # needs sage.rings.real_mpfr Multivariate Power Series Ring in t, u, v over Real Field with 53 bits of precision sage: R.change_ring(IntegerModRing(10)) Multivariate Power Series Ring in t, u, v over Ring of integers modulo 10 sage: R.base_extend(IntegerModRing(10)) Traceback (most recent call last): ... TypeError: no base extension defined sage: S = PowerSeriesRing(GF(65537),2,'x,y'); S # needs sage.rings.finite_rings Multivariate Power Series Ring in x, y over Finite Field of size 65537 sage: S.change_ring(GF(5)) # needs sage.rings.finite_rings Multivariate Power Series Ring in x, y over Finite Field of size 5
>>> from sage.all import * >>> R = PowerSeriesRing(QQ, names=('t', 'u', 'v',)); (t, u, v,) = R._first_ngens(3); R Multivariate Power Series Ring in t, u, v over Rational Field >>> R.base_extend(RR) # needs sage.rings.real_mpfr Multivariate Power Series Ring in t, u, v over Real Field with 53 bits of precision >>> R.change_ring(IntegerModRing(Integer(10))) Multivariate Power Series Ring in t, u, v over Ring of integers modulo 10 >>> R.base_extend(IntegerModRing(Integer(10))) Traceback (most recent call last): ... TypeError: no base extension defined >>> S = PowerSeriesRing(GF(Integer(65537)),Integer(2),'x,y'); S # needs sage.rings.finite_rings Multivariate Power Series Ring in x, y over Finite Field of size 65537 >>> S.change_ring(GF(Integer(5))) # needs sage.rings.finite_rings Multivariate Power Series Ring in x, y over Finite Field of size 5
- characteristic()[source]¶
Return characteristic of base ring, which is characteristic of
self
.EXAMPLES:
sage: H = PowerSeriesRing(GF(65537),4,'f'); H # needs sage.rings.finite_rings Multivariate Power Series Ring in f0, f1, f2, f3 over Finite Field of size 65537 sage: H.characteristic() # needs sage.rings.finite_rings 65537
>>> from sage.all import * >>> H = PowerSeriesRing(GF(Integer(65537)),Integer(4),'f'); H # needs sage.rings.finite_rings Multivariate Power Series Ring in f0, f1, f2, f3 over Finite Field of size 65537 >>> H.characteristic() # needs sage.rings.finite_rings 65537
- construction()[source]¶
Return a functor \(F\) and base ring \(R\) such that
F(R) == self
.EXAMPLES:
sage: M = PowerSeriesRing(QQ, 4, 'f'); M Multivariate Power Series Ring in f0, f1, f2, f3 over Rational Field sage: (c,R) = M.construction(); (c,R) (Completion[('f0', 'f1', 'f2', 'f3'), prec=12], Multivariate Polynomial Ring in f0, f1, f2, f3 over Rational Field) sage: c Completion[('f0', 'f1', 'f2', 'f3'), prec=12] sage: c(R) Multivariate Power Series Ring in f0, f1, f2, f3 over Rational Field sage: c(R) == M True
>>> from sage.all import * >>> M = PowerSeriesRing(QQ, Integer(4), 'f'); M Multivariate Power Series Ring in f0, f1, f2, f3 over Rational Field >>> (c,R) = M.construction(); (c,R) (Completion[('f0', 'f1', 'f2', 'f3'), prec=12], Multivariate Polynomial Ring in f0, f1, f2, f3 over Rational Field) >>> c Completion[('f0', 'f1', 'f2', 'f3'), prec=12] >>> c(R) Multivariate Power Series Ring in f0, f1, f2, f3 over Rational Field >>> c(R) == M True
- gen(n=0)[source]¶
Return the \(n\)-th generator of
self
.EXAMPLES:
sage: M = PowerSeriesRing(ZZ, 10, 'v') sage: M.gen(6) v6
>>> from sage.all import * >>> M = PowerSeriesRing(ZZ, Integer(10), 'v') >>> M.gen(Integer(6)) v6
- gens()[source]¶
Return the generators of this ring.
EXAMPLES:
sage: M = PowerSeriesRing(ZZ, 3, 'v') sage: M.gens() (v0, v1, v2)
>>> from sage.all import * >>> M = PowerSeriesRing(ZZ, Integer(3), 'v') >>> M.gens() (v0, v1, v2)
- is_dense()[source]¶
Is
self
dense? (opposite of sparse)EXAMPLES:
sage: M = PowerSeriesRing(ZZ, 3, 's,t,u'); M Multivariate Power Series Ring in s, t, u over Integer Ring sage: M.is_dense() True sage: N = PowerSeriesRing(ZZ, 3, 's,t,u', sparse=True); N Sparse Multivariate Power Series Ring in s, t, u over Integer Ring sage: N.is_dense() False
>>> from sage.all import * >>> M = PowerSeriesRing(ZZ, Integer(3), 's,t,u'); M Multivariate Power Series Ring in s, t, u over Integer Ring >>> M.is_dense() True >>> N = PowerSeriesRing(ZZ, Integer(3), 's,t,u', sparse=True); N Sparse Multivariate Power Series Ring in s, t, u over Integer Ring >>> N.is_dense() False
- is_integral_domain(proof=False)[source]¶
Return
True
if the base ring is an integral domain; otherwise return False.EXAMPLES:
sage: M = PowerSeriesRing(QQ,4,'v'); M Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field sage: M.is_integral_domain() True
>>> from sage.all import * >>> M = PowerSeriesRing(QQ,Integer(4),'v'); M Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field >>> M.is_integral_domain() True
- is_noetherian(proof=False)[source]¶
Power series over a Noetherian ring are Noetherian.
EXAMPLES:
sage: M = PowerSeriesRing(QQ,4,'v'); M Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field sage: M.is_noetherian() True sage: W = PowerSeriesRing(InfinitePolynomialRing(ZZ,'a'),2,'x,y') sage: W.is_noetherian() False
>>> from sage.all import * >>> M = PowerSeriesRing(QQ,Integer(4),'v'); M Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field >>> M.is_noetherian() True >>> W = PowerSeriesRing(InfinitePolynomialRing(ZZ,'a'),Integer(2),'x,y') >>> W.is_noetherian() False
- is_sparse()[source]¶
Check whether
self
is sparse.EXAMPLES:
sage: M = PowerSeriesRing(ZZ, 3, 's,t,u'); M Multivariate Power Series Ring in s, t, u over Integer Ring sage: M.is_sparse() False sage: N = PowerSeriesRing(ZZ, 3, 's,t,u', sparse=True); N Sparse Multivariate Power Series Ring in s, t, u over Integer Ring sage: N.is_sparse() True
>>> from sage.all import * >>> M = PowerSeriesRing(ZZ, Integer(3), 's,t,u'); M Multivariate Power Series Ring in s, t, u over Integer Ring >>> M.is_sparse() False >>> N = PowerSeriesRing(ZZ, Integer(3), 's,t,u', sparse=True); N Sparse Multivariate Power Series Ring in s, t, u over Integer Ring >>> N.is_sparse() True
- laurent_series_ring()[source]¶
Laurent series not yet implemented for multivariate power series rings.
- ngens()[source]¶
Return number of generators of
self
.EXAMPLES:
sage: M = PowerSeriesRing(ZZ, 10, 'v') sage: M.ngens() 10
>>> from sage.all import * >>> M = PowerSeriesRing(ZZ, Integer(10), 'v') >>> M.ngens() 10
- prec_ideal()[source]¶
Return the ideal which determines precision; this is the ideal generated by all of the generators of our background polynomial ring.
EXAMPLES:
sage: A.<s,t,u> = PowerSeriesRing(ZZ) sage: A.prec_ideal() Ideal (s, t, u) of Multivariate Polynomial Ring in s, t, u over Integer Ring
>>> from sage.all import * >>> A = PowerSeriesRing(ZZ, names=('s', 't', 'u',)); (s, t, u,) = A._first_ngens(3) >>> A.prec_ideal() Ideal (s, t, u) of Multivariate Polynomial Ring in s, t, u over Integer Ring
- remove_var(*var)[source]¶
Remove given variable or sequence of variables from
self
.EXAMPLES:
sage: A.<s,t,u> = PowerSeriesRing(ZZ) sage: A.remove_var(t) Multivariate Power Series Ring in s, u over Integer Ring sage: A.remove_var(s,t) Power Series Ring in u over Integer Ring sage: M = PowerSeriesRing(GF(5),5,'t'); M Multivariate Power Series Ring in t0, t1, t2, t3, t4 over Finite Field of size 5 sage: M.remove_var(M.gens()[3]) Multivariate Power Series Ring in t0, t1, t2, t4 over Finite Field of size 5
>>> from sage.all import * >>> A = PowerSeriesRing(ZZ, names=('s', 't', 'u',)); (s, t, u,) = A._first_ngens(3) >>> A.remove_var(t) Multivariate Power Series Ring in s, u over Integer Ring >>> A.remove_var(s,t) Power Series Ring in u over Integer Ring >>> M = PowerSeriesRing(GF(Integer(5)),Integer(5),'t'); M Multivariate Power Series Ring in t0, t1, t2, t3, t4 over Finite Field of size 5 >>> M.remove_var(M.gens()[Integer(3)]) Multivariate Power Series Ring in t0, t1, t2, t4 over Finite Field of size 5
Removing all variables results in the base ring:
sage: M.remove_var(*M.gens()) Finite Field of size 5
>>> from sage.all import * >>> M.remove_var(*M.gens()) Finite Field of size 5
- term_order()[source]¶
Print term ordering of
self
. Term orderings are implemented by the TermOrder class.EXAMPLES:
sage: M.<x,y,z> = PowerSeriesRing(ZZ,3) sage: M.term_order() Negative degree lexicographic term order sage: m = y*z^12 - y^6*z^8 - x^7*y^5*z^2 + x*y^2*z + M.O(15); m x*y^2*z + y*z^12 - x^7*y^5*z^2 - y^6*z^8 + O(x, y, z)^15 sage: N = PowerSeriesRing(ZZ,3,'x,y,z', order='deglex') sage: N.term_order() Degree lexicographic term order sage: N(m) -x^7*y^5*z^2 - y^6*z^8 + y*z^12 + x*y^2*z + O(x, y, z)^15
>>> from sage.all import * >>> M = PowerSeriesRing(ZZ,Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = M._first_ngens(3) >>> M.term_order() Negative degree lexicographic term order >>> m = y*z**Integer(12) - y**Integer(6)*z**Integer(8) - x**Integer(7)*y**Integer(5)*z**Integer(2) + x*y**Integer(2)*z + M.O(Integer(15)); m x*y^2*z + y*z^12 - x^7*y^5*z^2 - y^6*z^8 + O(x, y, z)^15 >>> N = PowerSeriesRing(ZZ,Integer(3),'x,y,z', order='deglex') >>> N.term_order() Degree lexicographic term order >>> N(m) -x^7*y^5*z^2 - y^6*z^8 + y*z^12 + x*y^2*z + O(x, y, z)^15
- sage.rings.multi_power_series_ring.is_MPowerSeriesRing(x)[source]¶
Return
True
if input is a multivariate power series ring.
- sage.rings.multi_power_series_ring.unpickle_multi_power_series_ring_v0(base_ring, num_gens, names, order, default_prec, sparse)[source]¶
Unpickle (deserialize) a multivariate power series ring according to the given inputs.
EXAMPLES:
sage: P.<x,y> = PowerSeriesRing(QQ) sage: loads(dumps(P)) == P # indirect doctest True
>>> from sage.all import * >>> P = PowerSeriesRing(QQ, names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> loads(dumps(P)) == P # indirect doctest True