All rearrangement cones are proper::
sage: all( rearrangement_cone(p,n).is_proper()
- ....: for n in range(10)
- ....: for p in range(n) )
+ ....: for n in xrange(10)
+ ....: for p in xrange(n) )
True
The Lyapunov rank of the rearrangement cone of order ``p`` in ``n``
dimensions is ``n`` for ``p == 1`` or ``p == n`` and one otherwise::
sage: all( rearrangement_cone(p,n).lyapunov_rank() == n
- ....: for n in range(2, 10)
+ ....: for n in xrange(2, 10)
....: for p in [1, n-1] )
True
sage: all( rearrangement_cone(p,n).lyapunov_rank() == 1
- ....: for n in range(3, 10)
- ....: for p in range(2, n-1) )
+ ....: for n in xrange(3, 10)
+ ....: for p in xrange(2, n-1) )
True
TESTS:
return v
V = VectorSpace(QQ, n)
- G = V.basis() + [ d(j) for j in range(n) ]
+ G = V.basis() + [ d(j) for j in xrange(n) ]
return Cone(G)
....: rearrangement_cone(p,n).random_element(),
....: p
....: )
- ....: for n in range(2, 10)
- ....: for p in range(1, n-1)
+ ....: for n in xrange(2, 10)
+ ....: for p in xrange(1, n-1)
....: )
True