def get_minimal_bsgs(base, gens):
 G = PermutationGroup(gens)
 (base, gens) = G.schreier_sims_incremental()
 if (not _is_minimal_bsgs(base, gens)):
  return None
 return (base, gens)

def get_minimal_bsgs ( base , gens ) : G = PermutationGroup ( gens ) ( base , gens ) = G . schreier_sims_incremental ( ) if ( not _is_minimal_bsgs ( base , gens ) ) : return None return ( base , gens )
compute a minimal gsgs base .