Merge branch 'develop' into public/monoids/15289-indexed
Merge branch 'develop' into u/tscrim/rc_bij_pdf
trac #10534 removed unused imports
trac #16391: Removing the holes
trac #16391: bugfix
16007: make doctest test intended case
Made get_predecessors a hidden function
Used list comprehensions in marginal contributions
Made marginal_of_pi hidden
Tidied some doc issues with regards to max cols
tidies up docs
minor changes to docs
Changed _element_constructor_ on Braid groups
Trac #16438: Use d3js package if available

The aim of this ticket is to use the package provided by #16434 when
drawing graphs, instead of fetching `d3.min.js` online (see #14953).

URL: http://trac.sagemath.org/16438
Reported by: tmonteil
Ticket author(s): Thierry Monteil
Reviewer(s): Nathann Cohen
Trac #16383: Can't evaluate a polynomial on a finite field if representation is not "poly"

Evaluating a polynomial on a finite field does not work if the finite
field was created with a 'repr' argument in the constructor different
than the default one (poly).

Curently using sage 6.1.1 on ubuntu 12.04 but same behaviour in 6.2.

Here is the code that works :

{{{
sage: F.<a>=GF(2**8)
sage: PR.<x>=PolynomialRing(F)
sage: f=PR.random_element(9)
sage: b=F.random_element()
sage: f(b)
a^6 + a^5 + a^4 + a^3 + a^2 + 1
}}}

And the same code with the repr parameter changed (same behaviour with
repr="int") :

{{{
sage: F.<a>=GF(2**8, repr="log")
sage: PR.<x>=PolynomialRing(F)
sage: f=PR.random_element(9)
sage: b=F.random_element()
sage: f(b)
------------------------------------------------------------------------
---
NameError                                 Traceback (most recent call
last)
<ipython-input-5-a6714ffdcf66> in <module>()
----> 1 f(b)

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/rings/polynomial/polynomial_zz_pex.so in
sage.rings.polynomial.polynomial_zz_pex.Polynomial_ZZ_pEX.__call__
(sage/rings/polynomial/polynomial_zz_pex.cpp:14427)()

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:8858)()

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:4206)()

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:4113)()

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/rings/finite_rings/finite_field_givaro.pyc in
_element_constructor_(self, e)
    355             2*a4^3 + 2*a4^2 + 1
    356         """
--> 357         return self._cache.element_from_data(e)
    358
    359     def gen(self, n=0):

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/rings/finite_rings/element_givaro.so in
sage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data
(sage/rings/finite_rings/element_givaro.cpp:6459)()

/home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-
packages/sage/rings/finite_rings/element_givaro.so in
sage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data
(sage/rings/finite_rings/element_givaro.cpp:5381)()

<string> in <module>()
}}}

URL: http://trac.sagemath.org/16383
Reported by: landais
Ticket author(s): Peter Bruin
Reviewer(s): Ralf Stephan
trac #16391: doc clean + remove some list construction
Added an_element, some_elements and a TestSuite doctest to braid groups
trac #16391: Typo
Corrected typo
Trac #16458: Braid group creates elements in wrong class

Right now we have this inconsistency.

{{{
sage: B=BraidGroup(4)
sage: b=B([1,2,3])
sage: type(b)
<class 'sage.groups.braid.Braid'>
sage: type(b*b)
<class 'sage.groups.braid.BraidGroup_class_with_category.element_class'>
}}}

Both should be in the same class.

URL: http://trac.sagemath.org/16458
Reported by: mmarco
Ticket author(s): Miguel Marco
Reviewer(s): Vincent Delecroix