| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
MPolynomialSystem_generic
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Construct a new system of multivariate polynomials. That is, a
set of multivariate polynomials with at least one common root.
INPUT:
arg1 -- a multivariate polynomial ring or an ideal
arg2 -- an iterable object of rounds, preferable MPolynomialRoundSystem,
or polynomials (default:None)
EXAMPLES:
sage: P.<a,b,c,d> = PolynomialRing(GF(127),4)
sage: I = sage.rings.ideal.Katsura(P)
If a list of MPolynomialRoundSystems is provided those
form the rounds.
sage: mq.MPolynomialSystem(I.ring(), [mq.MPolynomialRoundSystem(I.ring(),I.gens())])
Polynomial System with 4 Polynomials in 4 Variables
If an ideal is provided the generators are used.
sage: mq.MPolynomialSystem(I)
Polynomial System with 4 Polynomials in 4 Variables
If a list of polynomials is provided the system has only
one round.
sage: mq.MPolynomialSystem(I.ring(), I.gens())
Polynomial System with 4 Polynomials in 4 Variables
|
Return a copy of self. While this is not a deep copy only
mutable members of this system are copied.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: copy(F) # indirect doctest
Polynomial System with 40 Polynomials in 20 Variables
|
Compare the ring and rounds of self and other.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: F == copy(F) # indirect doctest
True
|
Return base ring.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: print F.ring().repr_long()
Polynomial Ring
Base Ring : Finite Field of size 2
Size : 20 Variables
Block 0 : Ordering : degrevlex
Names : k100, k101, k102, k103, x100, x101, x102, x103, w100, w101, w102, w103, s000, s001, s002, s003
Block 1 : Ordering : degrevlex
Names : k000, k001, k002, k003
|
Return number polynomials in self
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: F.ngens()
56
|
Return list of polynomials in self
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: l = F.gens()
sage: len(l), type(l)
(40, <type 'tuple'>)
|
Return an element of self.
INPUT:
ij -- tuple, slice, integer
EXAMPLES:
sage: P.<a,b,c,d> = PolynomialRing(GF(127),4)
sage: F = mq.MPolynomialSystem(sage.rings.ideal.Katsura(P))
$ij$-th polynomial overall
sage: F[0] # indirect doctest
a + 2*b + 2*c + 2*d - 1
$i$-th to $j$-th polynomial overall
sage: F[0:2]
[a + 2*b + 2*c + 2*d - 1, a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a]
$i$-th round, $j$-th polynomial
sage: F[0,1]
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a
|
Return number of rounds of self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: F.nrounds()
4
|
Return list of rounds of self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: l = F.rounds()
sage: len(l)
4
|
Return $i$-th round of self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: R0 = F.round(1)
sage: R0
[k000^2 + k001, k001^2 + k002, k002^2 + k003, k003^2 + k000]
|
Return SAGE ideal spanned by self.gens()
EXAMPLE:
These computations use pseudo-random numbers, so we set the
seed for reproducible testing.
sage: set_random_seed(0)
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: P = F.ring()
sage: I = F.ideal()
sage: I.elimination_ideal(P('s000*s001*s002*s003*w100*w101*w102*w103*x100*x101*x102*x103'))
Ideal (k002 + (a^2)*k003 + 1, (a^3)*k001 + (a^3 + a^2)*k003 +
(a^3 + a + 1), k000 + (a^3 + a^2 + a)*k003 + (a^3 + a^2 + a),
(a^2)*k103 + (a^2 + a)*k003 + (a^2 + a + 1), (a^3)*k102 +
(a^3 + 1)*k003 + (a^2), (a^3)*k101 + (a^3)*k003 + (a^2 + 1),
(a^3)*k100 + (a^2 + a)*k003 + (a^2 + 1), k003^2 +
(a^3 + a^2 + a)*k003 + (a^3 + a^2 + a)) of Multivariate
Polynomial Ring in k100, k101, k102, k103, x100, x101, x102,
x103, w100, w101, w102, w103, s000, s001, s002, s003,
k000, k001, k002, k003 over Finite Field in a of size 2^4
|
Compute and return a Groebner basis for self.
INPUT:
args -- list of arguments passed to MPolynomialIdeal.groebner_basis call
kwargs -- dictionary of arguments passed to MPolynomialIdeal.groebner_basis call
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: gb = F.groebner_basis()
sage: Ideal(gb).basis_is_groebner()
True
|
Return a list of monomials in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: len(F.monomials())
49
|
Return the number of monomials present in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: F.nmonomials()
49
|
Return all variables present in self. This list may or may not
be equal to the generators of the ring of self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: F.variables()[:10] # this output ordering depends on a hash and so might change if __hash__ changes
[s000, k101, k100, s003, x102, x103, s002, w103, w102, x100] # 32-bit
[k101, k100, s003, x102, x103, s002, w103, w102, x100, x101] # 64-bit
|
Return number of variables present in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: F.nvariables()
20
|
Return tuple (A,v) where A is the coefficent matrix of self
and v the matching monomial vector. Monomials are order w.r.t.
the term ordering of self.ring() in reverse order.
INPUT:
sparse -- construct a sparse matrix (default: True)
EXAMPLE:
sage: P.<a,b,c,d> = PolynomialRing(GF(127),4)
sage: I = sage.rings.ideal.Katsura(P)
sage: I.gens()
(a + 2*b + 2*c + 2*d - 1, a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a, 2*a*b + 2*b*c
+ 2*c*d - b, b^2 + 2*a*c + 2*b*d - c)
sage: F = mq.MPolynomialSystem(I)
sage: A,v = F.coefficient_matrix()
sage: A
[ 0 0 0 0 0 0 0 0 0 1 2 2 2 126]
[ 1 0 2 0 0 2 0 0 2 126 0 0 0 0]
[ 0 2 0 0 2 0 0 2 0 0 126 0 0 0]
[ 0 0 1 2 0 0 2 0 0 0 0 126 0 0]
sage: v
[a^2]
[a*b]
[b^2]
[a*c]
[b*c]
[c^2]
[b*d]
[c*d]
[d^2]
[ a]
[ b]
[ c]
[ d]
[ 1]
sage: A*v
[ a + 2*b + 2*c + 2*d - 1]
[a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a]
[ 2*a*b + 2*b*c + 2*c*d - b]
[ b^2 + 2*a*c + 2*b*d - c]
|
Substitute variables for every polynomial in self. See
MPolynomial.subs for calling convention.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system(); F
Polynomial System with 40 Polynomials in 20 Variables
sage: F.subs(s); F
Polynomial System with 40 Polynomials in 16 Variables
INPUT:
args -- arguments to be passed to MPolynomial.subs
kwargs -- keyword arguments to be passed to MPolynomial.subs
|
Return SINGULAR ideal representation of this system.
EXAMPLE:
sage: P.<a,b,c,d> = PolynomialRing(GF(127))
sage: I = sage.rings.ideal.Katsura(P)
sage: F = mq.MPolynomialSystem(I); F
Polynomial System with 4 Polynomials in 4 Variables
sage: F._singular_()
a+2*b+2*c+2*d-1,
a^2+2*b^2+2*c^2+2*d^2-a,
2*a*b+2*b*c+2*c*d-b,
b^2+2*a*c+2*b*d-c
|
Return MAGMA ideal representation of this system as an ideal.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True)
sage: F,s = sr.polynomial_system()
sage: F._magma_() # optional, requires MAGMA
|
Return a string representation of this system.
EXAMPLE:
sage: P.<a,b,c,d> = PolynomialRing(GF(127))
sage: I = sage.rings.ideal.Katsura(P)
sage: F = mq.MPolynomialSystem(I); F # indirect doctest
Polynomial System with 4 Polynomials in 4 Variables
|
Add polynomial systems together, i.e. create a union of their
polynomials.
EXAMPLE:
sage: P.<a,b,c,d> = PolynomialRing(GF(127))
sage: I = sage.rings.ideal.Katsura(P)
sage: F = mq.MPolynomialSystem(I)
sage: F + [a^127 + a]
Polynomial System with 5 Polynomials in 4 Variables
sage: F + P.ideal([a^127 + a])
Polynomial System with 5 Polynomials in 4 Variables
sage: F + mq.MPolynomialSystem(P,[a^127 + a])
Polynomial System with 5 Polynomials in 4 Variables
|
See \code{self.gen()}.
EXAMPLE:
sage: P.<a,b,c,d> = PolynomialRing(GF(127),4)
sage: F = mq.MPolynomialSystem(sage.rings.ideal.Katsura(P))
$ij$-th polynomial overall
sage: F[0] # indirect doctest
a + 2*b + 2*c + 2*d - 1
$i$-th to $j$-th polynomial overall
sage: F[0:2]
[a + 2*b + 2*c + 2*d - 1, a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a]
$i$-th round, $j$-th polynomial
sage: F[0,1]
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a
|
Return \code{True} if element is in \code{self} or
\code{False} else. This method does not return an answer for
the ideal spanned by the generators of this system but
literately whether a polynomial is in the list of generators.
EXAMPLE:
sage: P.<x0,x1,x2,x3> = PolynomialRing(GF(37))
sage: I = sage.rings.ideal.Katsura(P)
sage: F = mq.MPolynomialSystem(I)
sage: f = x0 + 2*x1 + 2*x2 + 2*x3 -1
sage: f in F
True
sage: x0*f in F
False
sage: x0*f in F.ideal()
True
|
Return an iterator for \code{self} where all polynomials in
\code{self} are yielded in order as they appear in \code{self}.
EXAMPLE:
sage: P.<x0,x1,x2,x3> = PolynomialRing(GF(37))
sage: I = sage.rings.ideal.Katsura(P)
sage: F = mq.MPolynomialSystem(P,I.gens())
sage: list(F)
[x0 + 2*x1 + 2*x2 + 2*x3 - 1,
x0^2 + 2*x1^2 + 2*x2^2 + 2*x3^2 - x0,
2*x0*x1 + 2*x1*x2 + 2*x2*x3 - x1,
x1^2 + 2*x0*x2 + 2*x1*x3 - x2]
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:38 2008 | http://epydoc.sourceforge.net |