FUNCTION: InvSchensted - inverse Schensted correspondence
 
CALLING SEQUENCE:
-   InvSchensted(pair)
-   InvSchensted(pair, 'left')
-   InvSchensted(pair, 'nil')
-   TAB[InvSchensted](pair)
-   TAB[InvSchensted](pair, 'left')
-   TAB[InvSchensted](pair, 'nil')
-  
       
PARAMETERS:
- pair =  any list of one tableau and one standard tableau
 
 
SYNOPSIS:
-  The InvSchensted function gives the bijection between pairs of  tableaux
  and words. The argument pair is a list of two tableaux of the same shape,
  the second one being standard and called the (right)  insertion  tableau.
  The result is the word corresponding to this pair of tableaux.
 
 
-  When called with a second argument 'left', the  standard tableau is  the
  left insertion tableau.
 
 
-  When called with  a  second  argument  'nil', the  first  tableau  is  a
  nil-plactic tableau.
 
 
-  Whenever there  is a conflict between the function name InvSchensted and
  another   name   used   in   the   same  session, use   the   long  form
  TAB['InvSchensted'].
 
 
EXAMPLES:
> with(TAB):
> r := Schensted(w[1,4,2,4,2]);
 
             r := [[[4, 4], [1, 2, 2]], [[3, 5], [1, 2, 4]]]
 
> InvSchensted(r);
 
                              w[1, 4, 2, 4, 2]
 
> InvSchensted(r, 'left');
 
                              w[4, 1, 4, 2, 2]
 
> InvSchensted([[[4],[2,5],[1,2,3]], [[6],[3,4],[1,2,5]]], 'nil');
 
                             w[4, 5, 1, 2, 3, 1]
 
SEE ALSO: Schensted