Added doctests to matrix_space.py.
trac #9494: marked mpoly_all() as not tested
trac 10218: improve dev man sections on reviewing
 #5383: isinstance(PrincipalIdealDomain) should be replaced with a method .is_principal_ideal_domain()
Merge branch 'develop' into ticket/9494
Merge branch 'develop' into ticket/5383
trac 14720 pade approximation of formal power series
trac #14720 minor changes
trac #14720 enhancements, to be continued
trac #14720 truncation added to handle the case of real coefficients
pade(): minor docstring changes

* Formatting
* Broken link
* Make one test more robust against numerical noise
Trac #5383: isinstance(PrincipalIdealDomain) should be replaced with a method .is_principal_ideal_domain()

This is the cause of things like:

{{{
sage: R.<x, y> = QQ[]
sage: M = R^2
sage: span(R, vector([1, 0]))
------------------------------------------------------------------------
---
TypeError                                 Traceback (most recent call
last)

/Users/ncalexan/.sage/temp/dhcp_v009_038.mobile.uci.edu/301/_Users_ncale
xan_Documents_School_rumely_polynomial_ring_as_module2_sage_142.py in
<module>()

/Users/ncalexan/sage-3.3.rc0/local/lib/python2.5/site-
packages/sage/modules/free_module.pyc in span(gens, base_ring, check,
already_echelonized)
    408
    409     if not isinstance(R,
principal_ideal_domain.PrincipalIdealDomain):
--> 410         raise TypeError, "The base_ring (= %s) must be a
principal ideal domain."%R
    411     if len(gens) == 0:
    412         return FreeModule(R, 0)

TypeError: The base_ring (= Multivariate Polynomial Ring in x, y over
Rational Field) must be a principal ideal domain.
}}}

Surprisingly few places where this bites us:

{{{
sage: search_src('PrincipalIdealDomain')
modules/free_module.py:        elif isinstance(base_ring,
principal_ideal_domain.PrincipalIdealDomain):
modules/free_module.py:    if not isinstance(R,
principal_ideal_domain.PrincipalIdealDomain):
modules/free_module.py:        if not isinstance(base_ring,
principal_ideal_domain.PrincipalIdealDomain):
modules/free_quadratic_module.py:    elif isinstance(base_ring,
principal_ideal_domain.PrincipalIdealDomain):
rings/all.py:from principal_ideal_domain import PrincipalIdealDomain,
is_PrincipalIdealDomain
rings/all.py:from principal_ideal_domain_element import
PrincipalIdealDomainElement, is_PrincipalIdealDomainElement
rings/ideal.py:    if isinstance(R,
sage.rings.principal_ideal_domain.PrincipalIdealDomain):
<snip>
}}}

URL: http://trac.sagemath.org/5383
Reported by: ncalexan
Ticket author(s): Mike Hansen
Reviewer(s): Ralf Stephan
Trac #10218: enhance dev manual on reviewing tickets

As the subject says. This is a follow-up to #10201. From
[https://groups.google.com/group/sage-
devel/browse_thread/thread/d83f8d87962f8a9f/ sage-devel], William Stein
announced this blog entry:

http://sagemath.blogspot.com/2010/10/how-to-referee-sage-trac-
tickets.html

It would be a shame if new developers of Sage could not easily find it.

With the switch to git, both sections on reviewing were streamlined. The
link to William's blog made in #10201 was presumably removed because it
talks about mercurial.

We make the following changes:
* add a short summary on top of the walkthrough section (see
https://en.wikipedia.org/wiki/Inverted_pyramid)
* add a paragraph about reviewer's patches to in-depth section
* refer with caveat to blog post, again, literature style

I will discuss these changes on the grounds of me having been bitten by
the absence of them.

URL: http://trac.sagemath.org/10218
Reported by: mvngu
Ticket author(s): Ralf Stephan
Reviewer(s): Jean-Pierre Flori
Trac #10095: Linear algebra with large integer matrices fails with RuntimeError

On my laptop (Ubuntu 64 bit, Intel T4400 CPU), integer matrices
(solving, calculating determinant, etc.) appear to be broken when they
get sufficiently large. I can't reproduce the problem on sage.math.

With a fresh install of the 4.5.3 release:

{{{
sage: MatrixSpace(ZZ,20,20)(1) \ MatrixSpace(ZZ,20,1).random_element()
20 x 1 dense matrix over Rational Field
sage: MatrixSpace(ZZ,200,200)(1) \
MatrixSpace(ZZ,200,1).random_element()
------------------------------------------------------------------------
---
RuntimeError                              Traceback (most recent call
last)

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/<ipython console> in <module>()

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/preparser.py in
__mul__(self, right)
   1358             (0.0, 0.5, 1.0, 1.5, 2.0)
   1359         """
-> 1360         return self.left._backslash_(right)
   1361
   1362

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/matrix/matrix2.so in
sage.matrix.matrix2.Matrix._backslash_ (sage/matrix/matrix2.c:2641)()

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/matrix/matrix2.so in
sage.matrix.matrix2.Matrix.solve_right (sage/matrix/matrix2.c:3550)()

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/local/lib/python2.6/site-
packages/sage/matrix/matrix_rational_dense.so in
sage.matrix.matrix_rational_dense.Matrix_rational_dense.rank
(sage/matrix/matrix_rational_dense.c:20600)()

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/local/lib/python2.6/site-
packages/sage/matrix/matrix_integer_dense.so in
sage.matrix.matrix_integer_dense.Matrix_integer_dense.rank
(sage/matrix/matrix_integer_dense.c:24534)()

/home/fredrik/sage-4.5.3-linux-64bit-ubuntu_10.04.1_lts-
x86_64-Linux/local/lib/python2.6/site-
packages/sage/matrix/matrix_integer_dense.so in
sage.matrix.matrix_integer_dense.Matrix_integer_dense._rank_modp
(sage/matrix/matrix_integer_dense.c:24821)()

RuntimeError:
}}}

URL: http://trac.sagemath.org/10095
Reported by: fredrik.johansson
Ticket author(s): Travis Scrimshaw
Reviewer(s): Marc Mezzarobba
Trac #9494: marked mpoly_all() as not tested

Demo at SD23.5, also increases coverage!

----

Apply [attachment:trac_9494-doctest_mpoly_all.2.patch] to the Sage
library.

URL: http://trac.sagemath.org/9494
Reported by: demosd235
Ticket author(s): Robert Miller
Reviewer(s): Rob Beezer, Benjamin Jones, Ralf Stephan
Trac #14720: Pade approximants

It would be good to have Padé approximants for formal power series

{{{
sage: z = PowerSeriesRing(QQ, 'z').gen()
sage: exp(z).pade(4,0)
1/24*z^4 + 1/6*z^3 + 1/2*z^2 + z + 1
sage: exp(z).pade(3,1)
(1/144*z^3 + 1/24*z^2 + 1/8*z + 1/6)/(-1/24*z + 1/6)
}}}

Apply:

* [attachment:trac_14720_pade_approximants-fc.patch]

URL: http://trac.sagemath.org/14720
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): Marc Mezzarobba