code: def SymmetricGroup(n):
      """
      Generates the symmetric group on ``n`` elements as a permutation group.
  
      Explanation
      ===========
  
      The generators taken are the ``n``-cycle
      ``(0 1 2 ... n-1)`` and the transposition ``(0 1)`` (in cycle notation).
      (See [1]). After the group is generated, some of its basic properties
      are set.
  
      Examples
      ========
  
      >>> from sympy.combinatorics.named_groups import SymmetricGroup
      >>> G = SymmetricGroup(4)
      >>> G.is_group
      True
      >>> G.order()
      24
      >>> list(G.generate_schreier_sims(af=True))
      [[0, 1, 2, 3], [1, 2, 3, 0], [2, 3, 0, 1], [3, 1, 2, 0], [0, 2, 3, 1],
      [1, 3, 0, 2], [2, 0, 1, 3], [3, 2, 0, 1], [0, 3, 1, 2], [1, 0, 2, 3],
      [2, 1, 3, 0], [3, 0, 1, 2], [0, 1, 3, 2], [1, 2, 0, 3], [2, 3, 1, 0],
      [3, 1, 0, 2], [0, 2, 1, 3], [1, 3, 2, 0], [2, 0, 3, 1], [3, 2, 1, 0],
      [0, 3, 2, 1], [1, 0, 3, 2], [2, 1, 0, 3], [3, 0, 2, 1]]
  
      See Also
      ========
  
      CyclicGroup, DihedralGroup, AlternatingGroup
  
      References
      ==========
  
      .. [1] https://en.wikipedia.org/wiki/Symmetric_group#Generators_and_relations
  
      """
      if n == 1:
          G = PermutationGroup([Permutation([0])])
      elif n == 2:
          G = PermutationGroup([Permutation([1, 0])])
      else:
          a = list(range(1, n))
          a.append(0)
          gen1 = _af_new(a)
          a = list(range(n))
          a[0], a[1] = a[1], a[0]
          gen2 = _af_new(a)
          G = PermutationGroup([gen1, gen2])
      set_symmetric_group_properties(G, n, n)
      G._is_sym = True
      return G
  
file_path: sympy/sympy/combinatorics/named_groups.py
imports: from sympy.combinatorics.group_constructs import DirectProduct
  from sympy.combinatorics.perm_groups import PermutationGroup
  from sympy.combinatorics.permutations import Permutation
label_desc: Use image node_id 6 for calling a global function with example usage: SymmetricGroup(n) and returns: G