SETUP::
- sage: from mjo.cone.rearrangement import rearrangement_cone
+ sage: from mjo.cone.nonnegative_orthant import nonnegative_orthant
sage: from mjo.cone.permutation_invariant import is_permutation_invariant
+ sage: from mjo.cone.rearrangement import rearrangement_cone
+
+ EXAMPLES:
- EXAMPLES::
+ The rearrangement cone is permutation-invariant::
sage: all( is_permutation_invariant(rearrangement_cone(p,n))
....: for n in range(3, 6)
....: for p in range(1, n) )
True
+ As is the nonnegative orthant::
+
+ sage: set_random_seed()
+ sage: K = nonnegative_orthant(ZZ.random_element(5))
+ sage: is_permutation_invariant(K)
+ True
+
"""
# We'll need this to turn rays into vectors so that we can permute
# them with permutation matrices.