  
  [1m[4m[31m5. User friendly ways to give semigroups and automata[0m
  
  This  chapter  describes two Tcl/Tk graphical interfaces that can be used to
  define and edit semigroups and automata.
  
  
  [1m[4m[31m5.1 Finite automata[0m
  
  [1m[4m[31m5.1-1 XAutomaton[0m
  
  [1m[34m> XAutomaton( [0m[22m[34m[A][0m[1m[34m ) ________________________________________________[0mfunction
  
  The  function  [22m[32m  Xautomaton  [0m  without arguments opens a new window where an
  automaton  may  be  specified. A finite automaton (which may then be edited)
  may be given as argument.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> XAutomaton();[0m
    [22m[35m      [0m
  [22m[35m------------------------------------------------------------------[0m
  
  It opens a window like the following:
  
  [22m[32m  Var  [0m is the [1mGAP[0m name of the automaton, [22m[32m States [0m is the number of states, [22m[32m
  Alphabet  [0m  represents  the  alphabet  and  may  be given through a positive
  integer  (in  this  case  the  alphabet  is understood to be [22m[32m a,b,c,... [0m) or
  through a string whose symbols, in order, being the letters of the alphabet.
  The  numbers corresponding to the initial and accepting states are placed in
  the  respective  boxes.  The automaton may be specified to be deterministic,
  non   deterministic  or  with  epsilon  transitions.  After  pressing  the  [1m[46m
  transition  matrix  [0m button the window gets larger and the transition matrix
  of the automaton may be given. A non deterministic automaton may be given as
  follows:
  
  By  pressing  the  button [1m[46m Ok [0m the [1mGAP[0m shell aquires the aspect shown in the
  following  picture and the automaton [22m[32m ndAUT [0m may be used to do computations.
  Some  computations  such  as  getting a rational expression representing the
  language of the automaton, the (complete) minimal automaton representing the
  same  language  or  the  transition  semigroup of the automaton, may be done
  directly after pressing the [1m[46m Functions[0m button.
  
  By  pressing  the  button  [1m[46m  View  [0m  an  image representing the automaton is
  displayed  in  a  new  window.  An automaton with epsilon transitions may be
  given  as  follows  shown  in  the following picture. The last letter of the
  alphabet  is  always  considered  to  be  the  epsilon.  In the images it is
  represented by @.
  
  A  new  window  with  an image representing the automaton may be obtained by
  pressing the button [1m[46m View [0m.
  
  In the next example it is given an argument to the function [22m[32mXAutomaton[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> A := RandomAutomaton("det",2,2);[0m
    [22m[35m< deterministic automaton on 2 letters with 2 states >[0m
    [22m[35mgap> XAutomaton(A);[0m
    [22m[35m      [0m
  [22m[35m------------------------------------------------------------------[0m
  
  It opens a window like the following:
  
  
  [1m[4m[31m5.2 Finite semigroups[0m
  
  The  most  common  ways  to  give  a semigroup to are through generators and
  relations,  a  set  of  (partial)  transformations  as generating set and as
  syntactic semigroups of automata or rational languages.
  
  [1m[4m[31m5.2-1 XSemigroup[0m
  
  [1m[34m> XSemigroup( [0m[22m[34m[S][0m[1m[34m ) ________________________________________________[0mfunction
  
  The  function  [22m[32m  XSemigroup  [0m  without  arguments opens a new window where a
  semigroup  (or  monoid) may be specified. A finite semigroup (which may then
  be edited) may be given as argument.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> XSemigroup();[0m
    [22m[35m      [0m
  [22m[35m------------------------------------------------------------------[0m
  
  It  opens  a window like the following: where one may choose how to give the
  semigroup.
  
  
  [1m[4m[31m5.2-2 Semigroups given through generators and relations[0m
  
  In  the  window  opened  by  [22m[32mXSemigroup[0m,  by pressing the button [1m[46mProceed[0m the
  window should enlarge and have the following aspect. (If the window does not
  enlarge automatically, use the mouse to do it.)
  
  [22m[32m GAP variable [0m is the [1mGAP[0m name of the semigroup. One has then to specify the
  number  of  generators, the number of relations (which does not to be exact)
  and whether one wants to produce a monoid or a semigroup.
  
  
  [1m[4m[31m5.2-3 Semigroups given by partial transformations[0m
  
  [22m[32mXSemigroup(poi3);[0m would pop up the following window, where everything should
  be clear:
  
  
  [1m[4m[31m5.2-4 Syntatic semigroups[0m
  
  [22m[32mXSemigroup();[0m  would  pop  up  the  following  window, where we would select
  "Syntatic  semigroup",  press  the  [1m[46mProceed[0m button and then choose either to
  give  a  "Rational  expression"  or  an "Automaton" by pressing one of those
  buttons:
  
