  
  [1X6 Finite regular languages[0X
  
  This chapter describes some functions to deal with finite regular languages.
  
  
  [1X6.1 Dealing with finite regular languages[0X
  
  [1X6.1-1 IsFiniteRegularLanguage[0m
  
  [2X> IsFiniteRegularLanguage( [0X[3XL[0X[2X ) _____________________________________[0Xfunction
  
  [3XL[0m  is an automaton or a rational expression. This function tests whether its
  argument represents a finite language or not.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> RandomRatExp(2);[0X
    [4Xb*(aU@)[0X
    [4Xgap> IsFiniteRegularLanguage(last);[0X
    [4Xfalse[0X
    [4Xgap> RandomRatExp(2);[0X
    [4XaUbU@[0X
    [4Xgap> IsFiniteRegularLanguage(last);[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.1-2 FiniteRegularLanguageToListOfWords[0m
  
  [2X> FiniteRegularLanguageToListOfWords( [0X[3XL[0X[2X ) __________________________[0Xfunction
  
  [3XL[0m  is  an  automaton  or  a  rational  expression. This function outputs the
  recognized language as a list of words.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> r:=RationalExpression("aaUx(aUb)");   [0X
    [4XaaUx(aUb)[0X
    [4Xgap>  FiniteRegularLanguageToListOfWords(r);[0X
    [4X[ "aa", "xa", "xb" ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.1-3 ListOfWordsToAutomaton[0m
  
  [2X> ListOfWordsToAutomaton( [0X[3Xalph, L[0X[2X ) ________________________________[0Xfunction
  
  Given  an  alphabet  [3Xalph[0m  (a list) and a list of words [3XL[0m (a list of lists),
  outputs an automaton that recognizes the given list of words.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> ListOfWordsToAutomaton("ab",["aaa","bba",""]);[0X
    [4X< deterministic automaton on 2 letters with 6 states >[0X
    [4Xgap> FAtoRatExp(last);[0X
    [4X(bbUaa)aU@[0X
  [4X------------------------------------------------------------------[0X
  
