class_docstr: A class implementing rewriting systems for `FpGroup`s.
  
  References
  ==========
  .. [1] Epstein, D., Holt, D. and Rees, S. (1991).
         The use of Knuth-Bendix methods to solve the word problem in automatic groups.
         Journal of Symbolic Computation, 12(4-5), pp.397-414.
  
  .. [2] GAP's Manual on its KBMAG package
         https://www.gap-system.org/Manuals/pkg/kbmag-1.5.3/doc/manual.pdf
class_docstr_tok: ["A","class","implementing","rewriting","systems","for","`","FpGroup","`","s",".","References","==========","..","[","1","]","Epstein",",","D.",",","Holt",",","D.","and","Rees",",","S.","(","1991",")",".","The","use","of","Knuth-Bendix","methods","to","solve","the","word","problem","in","automatic","groups",".","Journal","of","Symbolic","Computation",",","12","(","4-5",")",",","pp.397-414",".","..","[","2","]","GAP","'s","Manual","on","its","KBMAG","package","https",":","\/\/www.gap-system.org\/Manuals\/pkg\/kbmag-1.5.3\/doc\/manual.pdf"]
code: def __init__(self, group):
      self.group = group
      self.alphabet = group.generators
      self._is_confluent = None
  
      # these values are taken from [2]
      self.maxeqns = 32767  # max rules
      self.tidyint = 100  # rules before tidying
  
      # _max_exceeded is True if maxeqns is exceeded
      # at any point
      self._max_exceeded = False
  
      # Reduction automaton
      self.reduction_automaton = None
      self._new_rules = {}
  
      # dictionary of reductions
      self.rules = {}
      self.rules_cache = deque([], 50)
      self._init_rules()
  
      # All the transition symbols in the automaton
      generators = list(self.alphabet)
      generators += [gen**-1 for gen in generators]
      # Create a finite state machine as an instance of the StateMachine object
      self.reduction_automaton = StateMachine(
          "Reduction automaton for " + repr(self.group), generators
      )
      self.construct_automaton()
  
file_path: sympy/sympy/combinatorics/rewritingsystem.py
imports: from collections import deque
  from sympy.combinatorics.rewritingsystem_fsm import StateMachine
label_desc: Use image node_id 1 to create a new RewritingSystem object  with example: obj = RewritingSystem(group)