Package sage :: Package rings :: Package polynomial :: Module pbori :: Class BooleanMonomial
[hide private]
[frames] | no frames]

Class BooleanMonomial



                      object --+            
                               |            
structure.sage_object.SageObject --+        
                                   |        
           structure.element.Element --+    
                                       |    
         structure.element.MonoidElement --+
                                           |
                                          BooleanMonomial

Instance Methods [hide private]
 
__add__(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1731) Addition operator.
 
__call__(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1496) Evaluate this monomial.
 
__eq__(x, y)
x==y
 
__ge__(x, y)
x>=y
 
__gt__(x, y)
x>y
 
__hash__(x)
hash(x)
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__iter__(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1671) Return an iterator over the variables in this monomial.
 
__le__(x, y)
x<=y
 
__len__(x)
len(x)
 
__lt__(x, y)
x<y
 
__ne__(x, y)
x!=y
 
__new__(T, S, ...)
 
__radd__(x, y)
y+x
 
_eval(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1474) Evaluate this monomial.
 
_repr_(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1458) Return a string representing self.
 
deg(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1558) Return degree of this monomial.
 
degree(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1574) Return degree of this monomial.
 
divisors(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1587) Return a set of boolean monomials with all divisors of this monomial.
 
index(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1544) Return the variable index of the first variable in this monomial.
 
iterindex(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1684) Return an iterator over the indicies of the variables in self.
 
multiples(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1601) Return a set of boolean monomials with all multiples of this monomial up the bound \var{rhs}.
 
reducibleBy(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1626) Return \code{True} if \code{self} is reducible by \var{rhs}.
 
set(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1644) Return a boolean set of variables in this monomials.
 
stableHash(...)
File: sage/rings/polynomial/pbori.pyx (starting at line 1541)

Inherited from structure.element.MonoidElement: __mul__, __nonzero__, __pow__, __rmul__, __rpow__, _mul_, multiplicative_order, order

Inherited from structure.element.Element: __cmp__, __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, _richcmp_, base_base_extend, base_base_extend_canonical_sym, base_extend, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, base_ring, category, is_zero, n, parent, subs, substitute

Inherited from structure.sage_object.SageObject: __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__add__(...)
(Addition operator)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1731)

Addition operator. Returns a boolean polynomial.

EXAMPLES:
    sage: from polybori import BooleanMonomialMonoid
    sage: P.<x,y,z> = BooleanPolynomialRing(3)
    sage: M = BooleanMonomialMonoid(P)
    sage: x = M(x); xy = M(x*y)
    sage: x + xy
    x*y + x

    sage: x+0
    x
    sage: 0+x   # todo: not implemented
    x

    sage: x+1
    x + 1
    sage: 1 + x     # todo: not implemented
    x + 1

__call__(...)
(Call operator)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1496)

Evaluate this monomial.

EXAMPLE:
    sage: B.<x,y,z> = BooleanPolynomialRing(3)
    sage: f = x*y
    sage: m = f.lm()
    sage: m(B(0),B(1))
    0
    sage: m(x=B(1))
    y

__eq__(x, y)
(Equality operator)

 
x==y

Overrides: structure.element.Element.__eq__

__ge__(x, y)
(Greater-than-or-equals operator)

 
x>=y

Overrides: structure.element.Element.__ge__

__gt__(x, y)
(Greater-than operator)

 
x>y

Overrides: structure.element.Element.__gt__

__hash__(x)
(Hashing function)

 
hash(x)

Overrides: structure.element.Element.__hash__

__init__(...)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: structure.element.Element.__init__

__iter__(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1671)

Return an iterator over the variables in this monomial.

EXAMPLES:
    sage: from polybori import BooleanMonomialMonoid
    sage: P.<x,y,z> = BooleanPolynomialRing(3)
    sage: M = BooleanMonomialMonoid(P)
    sage: list(M(x*z)) # indirect doctest
    [x, z]

__le__(x, y)
(Less-than-or-equals operator)

 
x<=y

Overrides: structure.element.Element.__le__

__lt__(x, y)
(Less-than operator)

 
x<y

Overrides: structure.element.Element.__lt__

__ne__(x, y)

 
x!=y

Overrides: structure.element.Element.__ne__

__new__(T, S, ...)

 


Returns:
a new object with type S, a subtype of T

Overrides: structure.element.MonoidElement.__new__

_eval(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1474)

Evaluate this monomial.

INPUT:
    d -- dictionary with integer indicies

EXAMPLES:
    sage: P.<x,y,z> = BooleanPolynomialRing(3)
    sage: m = P._monom_monoid(x*y)
    sage: m._eval({0:y,1:z})
    y*z

_repr_(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1458)

Return a string representing self.

EXAMPLES:
    sage: P.<x,y> = BooleanPolynomialRing(2)
    sage: M = sage.rings.polynomial.pbori.BooleanMonomialMonoid(P)
    sage: M(x*y) # indirect doctest
    x*y

    sage: R.<t,u> = BooleanPolynomialRing(2)
    sage: M(x*y)
    x*y

Overrides: structure.element.Element._repr_

deg(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1558)

Return degree of this monomial.

EXAMPLES:
    sage: from polybori import BooleanMonomialMonoid
    sage: P.<x,y,z> = BooleanPolynomialRing(3)
    sage: M = BooleanMonomialMonoid(P)
    sage: M(x*y).deg()
    2
    
    sage: M(x*x*y*z).deg()
    3

degree(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1574)

Return degree of this monomial.

EXAMPLES:
    sage: from polybori import BooleanMonomialMonoid
    sage: P.<x,y,z> = BooleanPolynomialRing(3)
    sage: M = BooleanMonomialMonoid(P)
    sage: M(x*y).degree()
    2

divisors(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1587)

Return a set of boolean monomials with all divisors of this
monomial.

EXAMPLE:
    sage: B.<x,y,z> = BooleanPolynomialRing(3)
    sage: f = x*y
    sage: m = f.lm()
    sage: m.divisors()
    {{x,y}, {x}, {y}, {}}

index(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1544)

Return the variable index of the first variable in this
monomial.

EXAMPLE:
    sage: B.<x,y,z> = BooleanPolynomialRing(3)
    sage: f = x*y
    sage: m = f.lm()
    sage: m.index()
    0

iterindex(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1684)

Return an iterator over the indicies of the variables in self.

EXAMPLES:
    sage: from polybori import BooleanMonomialMonoid
    sage: P.<x,y,z> = BooleanPolynomialRing(3)
    sage: M = BooleanMonomialMonoid(P)
    sage: list(M(x*z).iterindex())
    [0, 2]

multiples(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1601)

Return a set of boolean monomials with all multiples of this
monomial up the bound \var{rhs}.

INPUT:
    rhs -- a boolean monomial

EXAMPLE:
    sage: B.<x,y,z> = BooleanPolynomialRing(3)
    sage: f = x
    sage: m = f.lm()
    sage: g = x*y*z
    sage: n = g.lm()
    sage: m.multiples(n)
    {{x,y,z}, {x,y}, {x,z}, {x}}
    sage: n.multiples(m)
    {{x,y,z}}

NOTE: The returned set always contains \code{self} even if the
bound \var{rhs} is smaller than \code{self}.

reducibleBy(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1626)

Return \code{True} if \code{self} is reducible by \var{rhs}.

INPUT:
    rhs -- a boolean monomial

EXAMPLE:
    sage: B.<x,y,z> = BooleanPolynomialRing(3)
    sage: f = x*y
    sage: m = f.lm()
    sage: m.reducibleBy((x*y).lm())
    True
    sage: m.reducibleBy((x*z).lm())
    False

set(...)

 
File: sage/rings/polynomial/pbori.pyx (starting at line 1644)

Return a boolean set of variables in this monomials.

EXAMPLE:
    sage: B.<x,y,z> = BooleanPolynomialRing(3)
    sage: f = x*y
    sage: m = f.lm()
    sage: m.set()
    {{x,y}}