+ The smallest ``p`` components of every element of the rearrangement
+ cone should sum to a nonnegative number (this tests that the
+ generators really are what we think they are)::
+
+ sage: set_random_seed()
+ sage: def _has_rearrangement_property(v,p):
+ ....: return sum( sorted(v)[0:p] ) >= 0
+ sage: all( _has_rearrangement_property(
+ ....: rearrangement_cone(p,n).random_element(),
+ ....: p
+ ....: )
+ ....: for n in xrange(2, 10)
+ ....: for p in xrange(1, n-1)
+ ....: )
+ True
+
+ The rearrangenent cone of order ``p`` is contained in the
+ rearrangement cone of order ``p + 1``::
+
+ sage: set_random_seed()
+ sage: n = ZZ.random_element(2,10)
+ sage: p = ZZ.random_element(1,n)
+ sage: K1 = rearrangement_cone(p,n)
+ sage: K2 = rearrangement_cone(p+1,n)
+ sage: all( x in K2 for x in K1 )
+ True
+
+ The order ``p`` should be between ``1`` and ``n``, inclusive::
+
+ sage: rearrangement_cone(0,3)
+ Traceback (most recent call last):
+ ...
+ ValueError: order p=0 should be between 1 and n=3, inclusive
+ sage: rearrangement_cone(5,3)
+ Traceback (most recent call last):
+ ...
+ ValueError: order p=5 should be between 1 and n=3, inclusive
+