SETUP::
- 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
+ sage: from mjo.cone.permutation_invariant import (
+ ....: is_permutation_invariant
+ ....: )
EXAMPLES:
The rearrangement cone is permutation-invariant::
- sage: all( is_permutation_invariant(rearrangement_cone(p,n))
+ sage: all( is_permutation_invariant(cones.rearrangement(p,n))
....: for n in range(3, 6)
....: for p in range(1, n) )
True
As is the nonnegative orthant::
- sage: K = nonnegative_orthant(ZZ.random_element(5))
+ sage: K = cones.nonnegative_orthant(ZZ.random_element(5))
sage: is_permutation_invariant(K)
True