def _orbits_transversals_from_bsgs(base, strong_gens_distr, transversals_only=False):
 from sympy.combinatorics.perm_groups import _orbit_transversal
 base_len = len(base)
 degree = strong_gens_distr[0][0].size
 transversals = ([None] * base_len)
 if (transversals_only is False):
  basic_orbits = ([None] * base_len)
 for i in range(base_len):
  transversals[i] = dict(_orbit_transversal(degree, strong_gens_distr[i], base[i], pairs=True))
  if (transversals_only is False):
   basic_orbits[i] = list(transversals[i].keys())
 if transversals_only:
  return transversals
 else:
  return (basic_orbits, transversals)

def _orbits_transversals_from_bsgs ( base , strong_gens_distr , transversals_only = False ) : from sympy . combinatorics . perm_groups import _orbit_transversal base_len = len ( base ) degree = strong_gens_distr [ 0 ] [ 0 ] . size transversals = ( [ None ] * base_len ) if ( transversals_only is False ) : basic_orbits = ( [ None ] * base_len ) for i in range ( base_len ) : transversals [ i ] = dict ( _orbit_transversal ( degree , strong_gens_distr [ i ] , base [ i ] , pairs = True ) ) if ( transversals_only is False ) : basic_orbits [ i ] = list ( transversals [ i ] . keys ( ) ) if transversals_only : return transversals else : return ( basic_orbits , transversals )
compute basic orbits and transversals from a base and strong generating set .