class_docstr: Properties
  ==========
  
  [1] `0 \in \Omega` and `\tau(1) = \epsilon`
  [2] `\alpha^x = \beta \Leftrightarrow \beta^{x^{-1}} = \alpha`
  [3] If `\alpha^x = \beta`, then `H \tau(\alpha)x = H \tau(\beta)`
  [4] `\forall \alpha \in \Omega, 1^{\tau(\alpha)} = \alpha`
  
  References
  ==========
  
  .. [1] Holt, D., Eick, B., O'Brien, E.
         "Handbook of Computational Group Theory"
  
  .. [2] John J. Cannon; Lucien A. Dimino; George Havas; Jane M. Watson
         Mathematics of Computation, Vol. 27, No. 123. (Jul., 1973), pp. 463-490.
         "Implementation and Analysis of the Todd-Coxeter Algorithm"
class_docstr_tok: ["Properties","==========","[","1","]","`","0","\\in","\\Omega","`","and","`","\\tau","(","1",")","=","\\epsilon","`","[","2","]","`","\\alpha^x","=","\\beta","\\Leftrightarrow","\\beta^","{","x^","{","-1","}","}","=","\\alpha","`","[","3","]","If","`","\\alpha^x","=","\\beta","`",",","then","`","H","\\tau","(","\\alpha",")","x","=","H","\\tau","(","\\beta",")","`","[","4","]","`","\\forall","\\alpha","\\in","\\Omega",",","1^","{","\\tau","(","\\alpha",")","}","=","\\alpha","`","References","==========","..","[","1","]","Holt",",","D.",",","Eick",",","B.",",","O'Brien",",","E.","``","Handbook","of","Computational","Group","Theory","''","..","[","2","]","John","J.","Cannon",";","Lucien","A.","Dimino",";","George","Havas",";","Jane","M.","Watson","Mathematics","of","Computation",",","Vol",".","27",",","No",".","123",".","(","Jul.",",","1973",")",",","pp",".","463-490",".","``","Implementation","and","Analysis","of","the","Todd-Coxeter","Algorithm","''"]
docstr: This routine is used in the relator-based strategy of Todd-Coxeter
  algorithm if some `\alpha^x` is undefined. We check whether there is
  space available for defining a new coset. If there is enough space
  then we remedy this by adjoining a new coset `\beta` to `\Omega`
  (i.e to set of live cosets) and put that equal to `\alpha^x`, then
  make an assignment satisfying Property[1]. If there is not enough space
  then we halt the Coset Table creation. The maximum amount of space that
  can be used by Coset Table can be manipulated using the class variable
  ``CosetTable.coset_table_max_limit``.
  
  See Also
  ========
  
  define_c
docstr_tok: ["This","routine","is","used","in","the","relator-based","strategy","of","Todd-Coxeter","algorithm","if","some","`","\\alpha^x","`","is","undefined",".","We","check","whether","there","is","space","available","for","defining","a","new","coset",".","If","there","is","enough","space","then","we","remedy","this","by","adjoining","a","new","coset","`","\\beta","`","to","`","\\Omega","`","(","i.e","to","set","of","live","cosets",")","and","put","that","equal","to","`","\\alpha^x","`",",","then","make","an","assignment","satisfying","Property","[","1","]",".","If","there","is","not","enough","space","then","we","halt","the","Coset","Table","creation",".","The","maximum","amount","of","space","that","can","be","used","by","Coset","Table","can","be","manipulated","using","the","class","variable","``","CosetTable.coset_table_max_limit","``",".","See","Also","========","define_c"]
code: def define(self, alpha, x, modified=False):
      r"""
      This routine is used in the relator-based strategy of Todd-Coxeter
      algorithm if some `\alpha^x` is undefined. We check whether there is
      space available for defining a new coset. If there is enough space
      then we remedy this by adjoining a new coset `\beta` to `\Omega`
      (i.e to set of live cosets) and put that equal to `\alpha^x`, then
      make an assignment satisfying Property[1]. If there is not enough space
      then we halt the Coset Table creation. The maximum amount of space that
      can be used by Coset Table can be manipulated using the class variable
      ``CosetTable.coset_table_max_limit``.
  
      See Also
      ========
  
      define_c
  
      """
      A = self.A
      table = self.table
      len_table = len(table)
      if len_table >= self.coset_table_limit:
          # abort the further generation of cosets
          raise ValueError(
              "the coset enumeration has defined more than "
              "%s cosets. Try with a greater value max number of cosets "
              % self.coset_table_limit
          )
      table.append([None] * len(A))
      self.P.append([None] * len(self.A))
      # beta is the new coset generated
      beta = len_table
      self.p.append(beta)
      table[alpha][self.A_dict[x]] = beta
      table[beta][self.A_dict_inv[x]] = alpha
      # P[alpha][x] = epsilon, P[beta][x**-1] = epsilon
      if modified:
          self.P[alpha][self.A_dict[x]] = self._grp.identity
          self.P[beta][self.A_dict_inv[x]] = self._grp.identity
          self.p_p[beta] = self._grp.identity
  
imports: from sympy.combinatorics.free_groups import free_group
  from sympy.printing.defaults import DefaultPrinting
  from itertools import chain, product
  from bisect import bisect_left
label_desc: Use image node_id 7 for calling the CosetTable obj's underlying member method code with example usage: obj.define(alpha, x, modified) without return types