+
    i	                     .     ! R  R4      t  ! R R4      tR# )c                   4   a  ] tR t^t o RtRR ltR tRtV tR# )Statea  
A representation of a state managed by a ``StateMachine``.

Attributes:
    name (instance of FreeGroupElement or string) -- State name which is also assigned to the Machine.
    transisitons (OrderedDict) -- Represents all the transitions of the state object.
    state_type (string) -- Denotes the type (accept/start/dead) of the state.
    rh_rule (instance of FreeGroupElement) -- right hand rule for dead state.
    state_machine (instance of StateMachine object) -- The finite state machine that the state belongs to.
Nc                T    Wn         / V n        W n        V^ ,          V n        W@n        R# )    N)nametransitionsstate_machine
state_typerh_rule)selfr   r   r	   r
   s   &&&&&e/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/combinatorics/rewritingsystem_fsm.py__init__State.__init__   s%    	*$Q-    c                "    W P                   V&   R# )a2  
Add a transition from the current state to a new state.

Keyword Arguments:
    letter -- The alphabet element the current state reads to make the state transition.
    state -- This will be an instance of the State object which represents a new state after in the transition after the alphabet is read.

N)r   )r   letterstates   &&&r   add_transitionState.add_transition   s     $) r   )r   r
   r   r	   r   NN)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     		) 	)r   r   c                   :   a  ] tR t^t o RtR tRR ltR tRtV t	R# )StateMachinez
Representation of a finite state machine the manages the states and the transitions of the automaton.

Attributes:
    states (dictionary) -- Collection of all registered `State` objects.
    name (str) -- Name of the state machine.
c                R    Wn         W n        / V n        V P                  R RR7       R# )starts)r	   N)r   automaton_alphabetstates	add_state)r   r   r$   s   &&&r   r   StateMachine.__init__(   s$    	"4w3/r   Nc                :    \        WW#4      pW@P                  V&   R# )aH  
Instantiate a state object and stores it in the 'states' dictionary.

Arguments:
    state_name (instance of FreeGroupElement or string) -- name of the new states.
    state_type (string) -- Denotes the type (accept/start/dead) of the state added.
    rh_rule (instance of FreeGroupElement) -- right hand rule for dead state.

N)r   r%   )r   
state_namer	   r
   	new_states   &&&& r   r&   StateMachine.add_state.   s     *J@	"+Jr   c                (    R V P                   ,          # )z%s)r   )r   s   &r   __repr__StateMachine.__repr__;   s    tyy!!r   )r$   r   r%   r   )
r   r   r   r   r   r   r&   r-   r   r   r   s   @r   r    r       s     0," "r   r    N)r   r     r   r   <module>r0      s   ) )<" "r   