def _verify_bsgs(group, base, gens):
 from sympy.combinatorics.perm_groups import PermutationGroup
 strong_gens_distr = _distribute_gens_by_base(base, gens)
 current_stabilizer = group
 for i in range(len(base)):
  candidate = PermutationGroup(strong_gens_distr[i])
  if (current_stabilizer.order() != candidate.order()):
   return False
  current_stabilizer = current_stabilizer.stabilizer(base[i])
 if (current_stabilizer.order() != 1):
  return False
 return True

def _verify_bsgs ( group , base , gens ) : from sympy . combinatorics . perm_groups import PermutationGroup strong_gens_distr = _distribute_gens_by_base ( base , gens ) current_stabilizer = group for i in range ( len ( base ) ) : candidate = PermutationGroup ( strong_gens_distr [ i ] ) if ( current_stabilizer . order ( ) != candidate . order ( ) ) : return False current_stabilizer = current_stabilizer . stabilizer ( base [ i ] ) if ( current_stabilizer . order ( ) != 1 ) : return False return True
verify the correctness of a base and strong generating set .