test for memory leak
document output
adding _an_element_ method for Words
#9683: pretty_print clobbers _ (history)
matrix*vector and vector*matrix: do not treat zero coefficients specially
I couldn't count parentheses correctly during merge resolution.
Trac #15240: Switch lattice polytopes to point collections

The goals of this ticket are:
 * make the code of `LatticePolytope` less interdependent for easier
maintenance and backend switch;
 * use `PointCollection` container internally to unify it with other
classes for toric geometry (`Cone` and `Fan`);
 * deprecate current methods returning points as matrices so that their
output can be changed in the future.

URL: http://trac.sagemath.org/15240
Reported by: novoselt
Ticket author(s): Andrey Novoseltsev
Reviewer(s): Volker Braun
Trac #8198: p-adic precision in vector multiplication

Trying to resolve #4656, I found the following unpleasant bug.

this looks good :
{{{
sage: R = Qp(5,5)
sage: x = R(5).add_bigoh(1)
sage: x
O(5)
sage: x*R(1)
O(5)
}}}

But when multiplied with the identity matrix the precision is lost
{{{
sage: I = matrix(R, [[1,0],[0,1]])
sage: v = vector([R(1),x])
sage: v
(1 + O(5^5), O(5))
sage: v*I
(1 + O(5^5), 0)
sage: v[0]*I[1,0] + v[1]*I[1,1]
O(5)
}}}

This causes things like
{{{
sage: M = matrix(R,[[1,2],[3,4]])
sage: M*v
(1 + O(5^5), 3 + O(5^5))
sage: v[0]*M[0,0] + v[1]*M[0,1]
1 + O(5)
sage: v[0]*M[1,0] + v[1]*M[1,1]
3 + O(5)
}}}

This is an even worse example, which could be a different bug
{{{
sage: vv = vector(x)
sage: vv
(0)
sage: vv[0]
0
sage: x
O(5)
}}}

URL: http://trac.sagemath.org/8198
Reported by: wuthrich
Ticket author(s): Peter Bruin
Reviewer(s): Chris Wuthrich
Trac #9129: sqrt memory leaks

cf http://groups.google.com/group/sage-
support/browse_thread/thread/8c18b2b91004c35a#
{{{
m = get_memory_usage()
i=0
while True:
    i+=1
    a = 2.sqrt()
    if i%1000==0:
        print get_memory_usage(m)
}}}

URL: http://trac.sagemath.org/9129
Reported by: zimmerma
Ticket author(s): Volker Braun
Reviewer(s): Marc Mezzarobba
Trac #9683: pretty_print clobbers _ (history)

After using `pretty_print`, the first history variable (`_`) no longer
updates.

{{{
----------------------------------------------------------------------
| Sage Version 4.5.1, Release Date: 2010-07-19                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Loading Sage library. Current Mercurial branch is: combinat
sage: 17
17
sage: _
17
sage: 23
23
sage: _
23
sage: pretty_print(17)
<html><span
class="math">\newcommand{\Bold}[1]{\mathbf{#1}}17</span></html>
sage: _
17
sage: 23
23
sage: _
17
}}}

The relevant function seems to be `pretty_print` in
`/sage/misc/latex.py`, but I don't know the right way to fix it. The
function and `pretty_print_default` in same file, and the functions
`displayhook` and `install` in `/sage/misc/displayhook.py` may also be
relevant.

URL: http://trac.sagemath.org/9683
Reported by: mguaypaq
Ticket author(s): Mike Hansen
Reviewer(s): Volker Braun
Trac #16125: Implement method _an_element_ for Words

{{{
sage: W = Words(4)
sage: w = W([3,1,2,1])
sage: w in ZZ
NotImplementedError                       Traceback (most recent call
last)
[...]
NotImplementedError: please implement _an_element_ for Words over {1, 2,
3, 4}
}}}

URL: http://trac.sagemath.org/16125
Reported by: virmaux
Ticket author(s): Aladin Virmaux
Reviewer(s): Frédéric Chapoton