Just keep one limit examples notebook
Speed up cache decorator

This makes all cache retrievals faster, eg:

before
In [1]: %timeit Pow(y, 2)
100000 loops, best of 3: 9.8 us per loop

after
In [1]: %timeit Pow(y, 2)
100000 loops, best of 3: 7.5 us per loop
added Trace expression for MatrixExprs
added test_args test for Trace object
added trace simplifications
Trace raises error when called on non-matrices
cover Trace.arg
Handle the --no-colors option only in the write() function

This fixes the problem where [OK] was not being printed with --no-colors and
many colored text was (see also issue 3349).
Add minimum numpy version for matrixlib to a test

See issue 3348.
Start the diagram_drawing module.

This commit adds the new module, a docstring, and the declaration of
DiagramOutline.  The class itself will be implemented later.
Add _GrowableGrid and corresponding tests.

This class represents a simple grid (two-dimensional array) which can be
grown in any of the four directions by appending empty rows and columns.
Have Diagram add components of composite morphisms automatically.

Previously, diagram would not add the components of composite morphisms.
This leaved some subtle ambiguities as to how to handle composite
morphisms which had some components not included into the diagram.  This
commit fixes those ambiguities.
Add some rudimentary tests for DiagramGrid.

The goal of having this tests is assuring that DiagramGrid.__new__ is
invoked.  Further tests will come together the corresponding
functionality.
DiagramGrid: Simplify the premises and conclusions and merge them.

At the drawing stage, the separation between the premises and
conclusions of the diagram is not relevant; DiagramGrid discards this
separation.  If a morphism is included both in premises and in
conclusions, after the merging the morphism will have the properties it
had in conclusions.
DiagramGrid: Build the undirected skeleton.

The skeleton of a diagram is the (undirected) graph whose vertices are
the objects of the diagram and which contains an edge between any pair
of objects between which in (the simplified, cf. previous commit)
diagram there is at least one morphism.  The skeleton also includes
edges between vertices A and C, such that there exists and object B
which is connected by at least one morphism with A and at least one
morphism with C.

The construction of this skeleton is one of the core tricks of the
layouting functionality.  The skeleton is constructed in such a way that
it can always be split into triangles.

Note that the term "skeleton" as used in the code, is defined ad-hoc.
DiagramGrid: Build meaningful triangles from the skeleton of the diagram.

DiagramGrid now sees which triangles are there in the skeleton, but also
discards the triangles which have less than 2 edges corresponding to
morphisms.  Such triangles may appear because of the how the skeleton is
constructed (cf. previous commit) and are irrelevant to laying the
diagram out, because only one edge of them will eventually be shown.
Note that such triangles are actually redundant in the sense that the
objects and morphisms they refer to will eventually be pulled into the
grid by other, more meaningful triangles.  This redundancy arises from
how the triangles are built and may be a point of further improvement
and/or optimisation.
DiagramGrid: Add some triangle utility functions.

This commit adds _triangle_objects which returns the set of vertices
of a triangle and _other_vertex, which, given a triangle and an edge,
returns the vertex which opposes the edge.
DiagramGrid: Lay down the beginnings of the main construction loop.

This commit enables DiagramGrid to add the first edge to the layout and
introduces the (currently empty) function _weld_triangle, which welds
one triangle to the current fringe.

All triangles which are relevant to the plot are assumed to form a
prefix of the list of triangles.  Whether this is true will be later
revealed by further tests and the details of functionality.
DiagramGrid: Find the place to attach a triangle to the existing fringe.

This commit adds and utilises _find_triangle_welding, which finds a
place in the fringe to weld the supplied triangle to.
DiagramGrid: Prepare to fixing some of the degenerate situations in the fringe.

This commit adds _fix_degenerate which, given an edge from the fringe
and two points, checks whether one of the two points defines an edge,
which is in the fringe, and which is perpendicular on the given edge.
If such a situation is found, _fix_degenerate drops the two edges and
adds the corresponding diagonal to the fringe.