class_docstr: Represents the polyhedral symmetry group (PSG).
  
  Explanation
  ===========
  
  The PSG is one of the symmetry groups of the Platonic solids.
  There are three polyhedral groups: the tetrahedral group
  of order 12, the octahedral group of order 24, and the
  icosahedral group of order 60.
  
  All doctests have been given in the docstring of the
  constructor of the object.
  
  References
  ==========
  
  .. [1] https://mathworld.wolfram.com/PolyhedralGroup.html
class_docstr_tok: ["Represents","the","polyhedral","symmetry","group","(","PSG",")",".","Explanation","===========","The","PSG","is","one","of","the","symmetry","groups","of","the","Platonic","solids",".","There","are","three","polyhedral","groups",":","the","tetrahedral","group","of","order","12",",","the","octahedral","group","of","order","24",",","and","the","icosahedral","group","of","order","60",".","All","doctests","have","been","given","in","the","docstring","of","the","constructor","of","the","object",".","References","==========","..","[","1","]","https",":","\/\/mathworld.wolfram.com\/PolyhedralGroup.html"]
docstr: Apply a permutation to the polyhedron *in place*. The permutation
  may be given as a Permutation instance or an integer indicating
  which permutation from pgroup of the Polyhedron should be
  applied.
  
  This is an operation that is analogous to rotation about
  an axis by a fixed increment.
  
  Notes
  =====
  
  When a Permutation is applied, no check is done to see if that
  is a valid permutation for the Polyhedron. For example, a cube
  could be given a permutation which effectively swaps only 2
  vertices. A valid permutation (that rotates the object in a
  physical way) will be obtained if one only uses
  permutations from the ``pgroup`` of the Polyhedron. On the other
  hand, allowing arbitrary rotations (applications of permutations)
  gives a way to follow named elements rather than indices since
  Polyhedron allows vertices to be named while Permutation works
  only with indices.
  
  Examples
  ========
  
  >>> from sympy.combinatorics import Polyhedron, Permutation
  >>> from sympy.combinatorics.polyhedron import cube
  >>> cube = cube.copy()
  >>> cube.corners
  (0, 1, 2, 3, 4, 5, 6, 7)
  >>> cube.rotate(0)
  >>> cube.corners
  (1, 2, 3, 0, 5, 6, 7, 4)
  
  A non-physical "rotation" that is not prohibited by this method:
  
  >>> cube.reset()
  >>> cube.rotate(Permutation([[1, 2]], size=8))
  >>> cube.corners
  (0, 2, 1, 3, 4, 5, 6, 7)
  
  Polyhedron can be used to follow elements of set that are
  identified by letters instead of integers:
  
  >>> shadow = h5 = Polyhedron(list('abcde'))
  >>> p = Permutation([3, 0, 1, 2, 4])
  >>> h5.rotate(p)
  >>> h5.corners
  (d, a, b, c, e)
  >>> _ == shadow.corners
  True
  >>> copy = h5.copy()
  >>> h5.rotate(p)
  >>> h5.corners == copy.corners
  False
docstr_tok: ["Apply","a","permutation","to","the","polyhedron","*","in","place","*",".","The","permutation","may","be","given","as","a","Permutation","instance","or","an","integer","indicating","which","permutation","from","pgroup","of","the","Polyhedron","should","be","applied",".","This","is","an","operation","that","is","analogous","to","rotation","about","an","axis","by","a","fixed","increment",".","Notes","=====","When","a","Permutation","is","applied",",","no","check","is","done","to","see","if","that","is","a","valid","permutation","for","the","Polyhedron",".","For","example",",","a","cube","could","be","given","a","permutation","which","effectively","swaps","only","2","vertices",".","A","valid","permutation","(","that","rotates","the","object","in","a","physical","way",")","will","be","obtained","if","one","only","uses","permutations","from","the","``","pgroup","``","of","the","Polyhedron",".","On","the","other","hand",",","allowing","arbitrary","rotations","(","applications","of","permutations",")","gives","a","way","to","follow","named","elements","rather","than","indices","since","Polyhedron","allows","vertices","to","be","named","while","Permutation","works","only","with","indices",".","Examples","========",">",">",">","from","sympy.combinatorics","import","Polyhedron",",","Permutation",">",">",">","from","sympy.combinatorics.polyhedron","import","cube",">",">",">","cube","=","cube.copy","(",")",">",">",">","cube.corners","(","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",")",">",">",">","cube.rotate","(","0",")",">",">",">","cube.corners","(","1",",","2",",","3",",","0",",","5",",","6",",","7",",","4",")","A","non-physical","``","rotation","''","that","is","not","prohibited","by","this","method",":",">",">",">","cube.reset","(",")",">",">",">","cube.rotate","(","Permutation","(","[","[","1",",","2","]","]",",","size=8",")",")",">",">",">","cube.corners","(","0",",","2",",","1",",","3",",","4",",","5",",","6",",","7",")","Polyhedron","can","be","used","to","follow","elements","of","set","that","are","identified","by","letters","instead","of","integers",":",">",">",">","shadow","=","h5","=","Polyhedron","(","list","(","'abcde","'",")",")",">",">",">","p","=","Permutation","(","[","3",",","0",",","1",",","2",",","4","]",")",">",">",">","h5.rotate","(","p",")",">",">",">","h5.corners","(","d",",","a",",","b",",","c",",","e",")",">",">",">","_","==","shadow.corners","True",">",">",">","copy","=","h5.copy","(",")",">",">",">","h5.rotate","(","p",")",">",">",">","h5.corners","==","copy.corners","False"]
code: def rotate(self, perm):
      """
      Apply a permutation to the polyhedron *in place*. The permutation
      may be given as a Permutation instance or an integer indicating
      which permutation from pgroup of the Polyhedron should be
      applied.
  
      This is an operation that is analogous to rotation about
      an axis by a fixed increment.
  
      Notes
      =====
  
      When a Permutation is applied, no check is done to see if that
      is a valid permutation for the Polyhedron. For example, a cube
      could be given a permutation which effectively swaps only 2
      vertices. A valid permutation (that rotates the object in a
      physical way) will be obtained if one only uses
      permutations from the ``pgroup`` of the Polyhedron. On the other
      hand, allowing arbitrary rotations (applications of permutations)
      gives a way to follow named elements rather than indices since
      Polyhedron allows vertices to be named while Permutation works
      only with indices.
  
      Examples
      ========
  
      >>> from sympy.combinatorics import Polyhedron, Permutation
      >>> from sympy.combinatorics.polyhedron import cube
      >>> cube = cube.copy()
      >>> cube.corners
      (0, 1, 2, 3, 4, 5, 6, 7)
      >>> cube.rotate(0)
      >>> cube.corners
      (1, 2, 3, 0, 5, 6, 7, 4)
  
      A non-physical "rotation" that is not prohibited by this method:
  
      >>> cube.reset()
      >>> cube.rotate(Permutation([[1, 2]], size=8))
      >>> cube.corners
      (0, 2, 1, 3, 4, 5, 6, 7)
  
      Polyhedron can be used to follow elements of set that are
      identified by letters instead of integers:
  
      >>> shadow = h5 = Polyhedron(list('abcde'))
      >>> p = Permutation([3, 0, 1, 2, 4])
      >>> h5.rotate(p)
      >>> h5.corners
      (d, a, b, c, e)
      >>> _ == shadow.corners
      True
      >>> copy = h5.copy()
      >>> h5.rotate(p)
      >>> h5.corners == copy.corners
      False
      """
      if not isinstance(perm, Perm):
          perm = self.pgroup[perm]
          # and we know it's valid
      else:
          if perm.size != self.size:
              raise ValueError(
                  "Polyhedron and Permutation sizes differ."
              )
      a = perm.array_form
      corners = [self.corners[a[i]] for i in range(len(self.corners))]
      self._corners = tuple(corners)
  
file_path: sympy/sympy/combinatorics/polyhedron.py
imports: from sympy.combinatorics import Permutation
  from sympy.combinatorics.perm_groups import PermutationGroup
  from sympy.core import Basic, Tuple, default_sort_key
  from sympy.sets import FiniteSet
  from sympy.utilities.iterables import minlex, unflatten, flatten
  from sympy.utilities.misc import as_int
label_desc: Use image node_id 9 for calling the Polyhedron obj's underlying member method code with example usage: obj.rotate(perm) without return types