%----------------------------------------------------------------------------
% HANPAPER_no     = 40 
% HANPAPER_type   = divers 
% PUBPAPER_author = D. Foata, G.-N. Han
% PUBPAPER_title  = Signed words and permutations,~II;\\
%                   The Euler-Mahonian polynomials 
% PUBPAPER_journal= ?? 
% PUBPAPER_year   = 2005
% PUBPAPER_volume = ?? 
% PUBPAPER_pp     = ???--???
% PUBPAPER_pages  = 19 
% MAKEPAPER_output= ps pdf 
% MAKEPAPER_mpost = no 
% MAKEPAPER_4up   = "-m30 -b-40"
%----------------------------------------------------------------------------

\magnification=\magstep1
\baselineskip=12pt
\hsize=6.3truein
\vsize=8.7truein
\font\footsc=cmcsc10 at 8truept
\font\footbf=cmbx10 at 8truept
\font\footrm=cmr10 at 10truept
\footline={\footsc the electronic journal of combinatorics
   {\footbf 12} (2005), \#R00\hfil\footrm\folio}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The further structure of the front page need not be exactly as below,
%% but the header must contain the names and addresses of the authors
%% as well as the submission and acceptance dates.


\catcode'32=9

\frenchspacing
\font\tenpc=cmcsc10

% Charge des fontes de 8 et 6 points :
\font\eightrm=cmr8
\font\eighti=cmmi8
\font\eightsy=cmsy8
\font\eightbf=cmbx8
\font\eighttt=cmtt8
\font\eightit=cmti8
\font\eightsl=cmsl8
\font\sixrm=cmr6
\font\sixi=cmmi6
\font\sixsy=cmsy6
\font\sixbf=cmbx6

\skewchar\eighti='177 \skewchar\sixi='177
\skewchar\eightsy='60 \skewchar\sixsy='60

% Chargement des fontes AMS

\font\tengoth=eufm10
\font\tenbboard=msbm10
\font\eightgoth=eufm7 at 8pt
\font\eightbboard=msbm10 at 8pt
\font\sevengoth=eufm7
\font\sevenbboard=msbm7
\font\sixgoth=eufm7 at 6pt
\font\fivegoth=eufm5

\newfam\gothfam
\newfam\bboardfam

\catcode`\@=11

\def\raggedbottom{\topskip 10pt plus 36pt
\r@ggedbottomtrue}
\def\pc#1#2|{{\bigf@ntpc #1\penalty
\@MM\hskip\z@skip\smallf@ntpc #2}}

\def\tenpoint{%
  \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
  \def\rm{\fam\z@\tenrm}%
  \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
  \def\oldstyle{\fam\@ne\teni}%
  \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
  \textfont\gothfam=\tengoth \scriptfont\gothfam=\sevengoth
  \scriptscriptfont\gothfam=\fivegoth
  \def\goth{\fam\gothfam\tengoth}%
  \textfont\bboardfam=\tenbboard \scriptfont\bboardfam=\sevenbboard
  \scriptscriptfont\bboardfam=\sevenbboard
  \def\bboard{\fam\bboardfam}%
  \textfont\itfam=\tenit
  \def\it{\fam\itfam\tenit}%
  \textfont\slfam=\tensl
  \def\sl{\fam\slfam\tensl}%
  \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
  \scriptscriptfont\bffam=\fivebf
  \def\bf{\fam\bffam\tenbf}%
  \textfont\ttfam=\tentt
  \def\tt{\fam\ttfam\tentt}%
  \abovedisplayskip=12pt plus 3pt minus 9pt
  \abovedisplayshortskip=0pt plus 3pt
  \belowdisplayskip=12pt plus 3pt minus 9pt
  \belowdisplayshortskip=7pt plus 3pt minus 4pt
  \smallskipamount=3pt plus 1pt minus 1pt
  \medskipamount=6pt plus 2pt minus 2pt
  \bigskipamount=12pt plus 4pt minus 4pt
  \normalbaselineskip=12pt
  \setbox\strutbox=\hbox{\vrule height5pt depth3.5pt
width0pt}%
  \let\bigf@ntpc=\tenrm \let\smallf@ntpc=\sevenrm
  \let\petcap=\tenpc
  \normalbaselines\rm}
\def\eightpoint{%
  \textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
  \def\rm{\fam\z@\eightrm}%
  \textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei
  \def\oldstyle{\fam\@ne\eighti}%
  \textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
  \textfont\gothfam=\eightgoth \scriptfont\gothfam=\sixgoth
  \scriptscriptfont\gothfam=\fivegoth
  \def\goth{\fam\gothfam\eightgoth}%
  \textfont\bboardfam=\eightbboard \scriptfont\bboardfam=\sevenbboard
  \scriptscriptfont\bboardfam=\sevenbboard
  \def\bboard{\fam\bboardfam}%
  \textfont\itfam=\eightit
  \def\it{\fam\itfam\eightit}%
  \textfont\slfam=\eightsl
  \def\sl{\fam\slfam\eightsl}%
  \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
  \scriptscriptfont\bffam=\fivebf
  \def\bf{\fam\bffam\eightbf}%
  \textfont\ttfam=\eighttt
  \def\tt{\fam\ttfam\eighttt}%
  \abovedisplayskip=9pt plus 2pt minus 6pt
  \abovedisplayshortskip=0pt plus 2pt
  \belowdisplayskip=9pt plus 2pt minus 6pt
  \belowdisplayshortskip=5pt plus 2pt minus 3pt
  \smallskipamount=2pt plus 1pt minus 1pt
  \medskipamount=4pt plus 2pt minus 1pt
  \bigskipamount=9pt plus 3pt minus 3pt
  \normalbaselineskip=9pt
  \setbox\strutbox=\hbox{\vrule height7pt depth2pt width0pt}%
  \let\bigf@ntpc=\eightrm \let\smallf@ntpc=\sixrm
  \normalbaselines\rm}

\let\bb=\bboard

\tenpoint

\newif\ifpagetitre
\newtoks\auteurcourant \auteurcourant={\hfil}
\newtoks\titrecourant \titrecourant={\hfil}

\def\appeln@te{}
\def\vfootnote#1{\def\@parameter{#1}\insert\footins\bgroup\eightpoint
  \interlinepenalty\interfootnotelinepenalty
  \splittopskip\ht\strutbox % top baseline for broken footnotes
  \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
  \leftskip\z@skip \rightskip\z@skip
  \ifx\appeln@te\@parameter\indent \else{\noindent #1\ }\fi
  \footstrut\futurelet\next\fo@t}

\pretolerance=500 \tolerance=1000 \brokenpenalty=5000

\let\rmpc=\sevenrm
\def\pd#1#2 {\pc#1#2| }

\def\pointir{\discretionary{.}{}{.\kern.35em---\kern.7em}\nobreak
\hskip 0em plus .3em minus .4em }

\def\resume#1{\vbox{\eightpoint \pc R\'ESUM\'E|\pointir #1}}
\def\abstract#1{\vbox{\eightpoint \pc ABSTRACT|\pointir #1}}

\def\titre#1|{\message{#1}
              \par\vskip 30pt plus 24pt minus 3pt\penalty -1000
              \vskip 0pt plus -24pt minus 3pt\penalty -1000
              \centerline{\bf #1}
              \vskip 5pt
              \penalty 10000 }

\def\section#1|{\par\vskip .3cm
                {\bf #1}\pointir}

\def\ssection#1|{\par\vskip .2cm
                {\it #1}.\quad}


\def\cf{{\it cf}}

\def\rem#1|{\par\medskip
            {{\it #1}.\quad}}

\def\rema#1|{\par\medskip
             {{\it #1.}\par\nobreak }}



%reference pour un article :
\def\article#1|#2|#3|#4|#5|#6|#7|
    {{\leftskip=7mm\noindent
     \hangindent=2mm\hangafter=1
     \llap{[#1]\hskip.35em}{#2},\quad
     #3, {\sl #4}, vol.\nobreak\ {\bf #5}, {\oldstyle #6},
     p.\nobreak\ #7.\par}}
%reference pour un livre :
\def\livre#1|#2|#3|#4|
    {{\leftskip=7mm\noindent
    \hangindent=2mm\hangafter=1
    \llap{[#1]\hskip.35em}{#2},\quad
    {\sl #3}.\ #4.\par}}
%reference complementaire :
\def\divers#1|#2|#3|
    {{\leftskip=7mm\noindent
    \hangindent=2mm\hangafter=1
     \llap{[#1]\hskip.35em}{#2},\hskip5pt
     #3.\par}}
%
\mathchardef\conj="0365
\def\dem{\par{\it Proof}.\quad}
\def\qed{\quad\raise -2pt\hbox{\vrule\vbox to 10pt{\hrule width 4pt
\vfill\hrule}\vrule}}

\def\virg{\raise 2pt\hbox{,}}   % virgule apr�s une fraction

\def\cqfd{\penalty 500 \hbox{\qed}\par\smallskip}

\long\def\entourer#1{\hbox{\vrule\vbox{\hrule\hbox{\kern15pt\vbox{\kern5pt
{#1}\kern5pt}\kern15pt}\hrule}\vrule}}
\def\\S {\vskip 5pt\hskip .5cm plus .1cm minus .1cm\relax}

%les differents retraits, voir aussi \item
\def\enonce#1|#2\finenonce{{\par\leftskip=36pt
\noindent\hbox to 0pt{\kern-\leftskip#1\hfill}{#2}\par}}

\def\senonce#1|#2\finsenonce{{\par\leftskip=36pt
\noindent\hbox to 0pt{\kern-24pt #1\hfill}{#2}\par}}

\def\ssenonce#1|#2\finssenonce{{\par\leftskip=48pt
\noindent\hbox to 0pt{\kern-24pt #1\hfill}{#2}\par}}

\def\decale#1|{\par\noindent\hskip 28pt\llap{#1}\kern 5pt}
\def\decaledecale#1|{\par\noindent\hskip 34pt\llap{#1}\kern 5pt}
% pour les titres en deux lignes et les sections sans point-tiret :
\def\titrea#1|#2|{\message{#1 #2}
  \par\vskip.5cm plus .1cm minus .1cm\penalty -1000
  \centerline{\bf #1}
  \centerline{\bf #2}
  \vskip 5pt
  \penalty 10000 }
\def\sectiona#1|{\par\vskip .3cm
  {\bf #1.}
  \par\nobreak\vskip 3pt }
\def\ssectiona#1|{\par\vskip .2cm
  {\it #1.}
  \par\nobreak\vskip 2pt }

\def\rest#1{\ifinner\setbox1=\hbox{$\textstyle{#1}$}
            \else\setbox1=\hbox{$\displaystyle{#1}$}\fi
            \dimen1=\ht1
            \advance\dimen1 by\dp1
            \divide\dimen1 by 2
            \box1\lower 2pt\hbox{$\left|\vbox to\dimen1{}\right.$}}

\def\displaylinesno#1{\displ@y\halign{
\hbox to\displaywidth{$\@lign\hfil\displaystyle##\hfil$}&
\llap{$##$}\crcr#1\crcr}}

\def\ldisplaylinesno#1{\displ@y\halign{
\hbox to\displaywidth{$\@lign\hfil\displaystyle##\hfil$}&
\kern-\displaywidth\rlap{$##$}\tabskip\displaywidth\crcr#1\crcr}}

\def\Eqalign#1{\null\,\vcenter{\openup\jot\m@th\ialign{
\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
&&\quad\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
\crcr#1\crcr}}\,}


% matrice justifi\'ee \`a droite : \hfil coef dans chaque ligne

\def\matrixd#1{\null \,\vcenter {\normalbaselines \m@th
\ialign {\hfil $##$&&\quad \hfil $##$\crcr
\mathstrut \crcr \noalign {\kern -\baselineskip } #1\crcr
\mathstrut \crcr \noalign {\kern -\baselineskip }}}\,}

\def\pmatrixd#1{\left(\matrixd{#1}\right)}


\def\system#1{\left\{\null\,\vcenter{\openup1\jot\m@th
\ialign{\strut$##$     &\hfil$##$&$##$\hfil&&
       \enskip$##$\enskip&\hfil$##$&$##$\hfil\crcr
        #1\crcr}}\right.}

\def\lfq{\leavevmode\raise.3ex\hbox{$\scriptscriptstyle
\langle\!\langle$}\thinspace}
\def\rfq{\leavevmode\thinspace\raise.3ex\hbox{$\scriptscriptstyle
\rangle\!\rangle$}}


\catcode`\@=12

%%%%%%%%%% fin du format

\def\notenmarge#1{\vadjust{\hskip
-2.66cm\smash{\vtop{\eightpoint \hfuzz 15pt
\noindent \hsize=1.66cm
#1}}}}

\def\sep{\,|\,} \def\cond{\,|\,}
\def\divpas{\mathbin{\,|\kern-5pt-}} %ne divise pas

\def\sgn{\mathop{\rm sgn}\nolimits}

\def\card{\mathop{\rm card}\nolimits}

\def\exc{\mathop{\rm exc}\nolimits}
\def\des{\mathop{\rm des}\nolimits}
\def\dess{\mathop{\rm dess}\nolimits}

\def\ides{\mathop{\rm ides}\nolimits}

\def\inv{\mathop{\rm inv}\nolimits}
\def\imv{\mathop{\overline{\rm inv}}\nolimits}
\def\coinv{\mathop{\rm coinv}\nolimits}
\def\maj{\mathop{\rm maj}\nolimits}
\def\rmaj{\mathop{\rm rmaj}\nolimits}
\def\irmaj{\mathop{\rm irmaj}\nolimits}
\def\comaj{\mathop{\rm comaj}\nolimits}
\def\icomaj{\mathop{\rm icomaj}\nolimits}
\def\Iligne{\mathop{\rm Iligne}\nolimits}
\def\Ligne{\mathop{\rm Ligne}\nolimits}
\def\imaj{\mathop{\rm imaj}\nolimits}
\def\sgn{\mathop{\rm sgn}}
\def\SE{\mathop{\rm SE}\nolimits}
\def\tot{\mathop{\rm tot}\nolimits}
\def\expand{\mathop{\rm expand}\nolimits}
\def\fmaj{\mathop{\rm fmaj}\nolimits}
\def\finv{\mathop{\rm finv}\nolimits}
\def\ifmaj{\mathop{\rm ifmaj}\nolimits}
\def\fdes{\mathop{\rm fdes}\nolimits}
\def\ifdes{\mathop{\rm ifdes}\nolimits}
\def\evenlower{\mathop{\rm evenlower}\nolimits}
\def\oddlower{\mathop{\rm oddlower}\nolimits}
\def\odd{\mathop{\rm odd}\nolimits}
\def\NIW{\mathop{\rm NIW}\nolimits}

\def\Lower{\mathop{\rm Lower}\nolimits}
\def\lowerr{\mathop{\rm lower}\nolimits}
\def\lowerp{\mathop{\rm lowerp}\nolimits}
\def\lowern{\mathop{\rm lowern}\nolimits}
\def\upper{\mathop{\rm upper}\nolimits}
\def\upper{\mathop{\rm upper}\nolimits}
\def\abs{\mathop{\rm abs}\nolimits}
\def\negg{\mathop{\rm neg}\nolimits}
\def\mark{\mathop{\rm mark}\nolimits}


\def\rise{\mathop{\rm rise}\nolimits}
\def\irise{\mathop{\rm irise}\nolimits}

\def\Rmil{\mathop{\rm Rmil}\nolimits}
\def\Rmip{\mathop{\rm Rmip}\nolimits}
\def\Rmals{\mathop{\rm Rmals}\nolimits}
\def\Rmap{\mathop{\rm Rmap}\nolimits}
\def\Lmil{\mathop{\rm Lmil}\nolimits}
\def\Lmals{\mathop{\rm Lmals}\nolimits}
\def\Lmip{\mathop{\rm Lmip}\nolimits}
\def\Lmap{\mathop{\rm Lmap}\nolimits}
\def\Last{\mathop{\rm Last}\nolimits}

\def\il{\bigl]\kern-.25em\bigl]}
\def\ir{\bigr]\kern-.25em\bigr]}
\def\[{{ [\![ }}
\def\]{{ ]\!] }}
\def \bfa{{\bf a}}
\def\bfm{{\bf m}}
\def\bfu{{\bf u}}
\def\bfn{{\bf n}}
\def\bfr{{\bf r}}
\def\bfc{{\bf c}}
\def\bfs{{\bf s}}
\def\bfsun{{\bf s}_{\bf 1}}
\def\bfi{{\bf i}}
\def\bfb{{\bf b}}
\def\bfB{{\bf B}}
\def\bfq{{\bf q}}
\def\bfQ{{\bf Q}}
\def\bfJ{{\bf J}}
\def\bfj{{\bf j}}
\def\bfp{{\bf p}}
\def\bft{{\bf t}}

\catcode`\@=11
\def\matrice#1{\null \,\vcenter {\normalbaselines \m@th
\ialign {\hfil $##$\hfil &&\  \hfil $##$\hfil\crcr
\mathstrut \crcr \noalign {\kern -\baselineskip } #1\crcr
\mathstrut \crcr \noalign {\kern -\baselineskip }}}\,}

\def\petitematrice#1{\left(\null\vcenter {\normalbaselines \m@th
\ialign {\hfil $##$\hfil &&\thinspace  \hfil $##$\hfil\crcr
\mathstrut \crcr \noalign {\kern -\baselineskip } #1\crcr
\mathstrut \crcr \noalign {\kern -\baselineskip }}}\right)}

\catcode`\@=12

\def\section#1|{\par\vskip .4cm plus .05cm
\centerline{\bf #1}
  \par\nobreak\vskip 3pt }

\def\hyper#1|#2|#3|#4|#5|%
{\mathop{{}_{#1}F_{#2}\Bigl({#3\atop#4};#5\Bigr)}\nolimits}

\def\smashtop#1{\setbox0=\hbox{#1}\ht0=0pt\box0}
\def\smashbot#1{\setbox0=\hbox{#1}\dp0=0pt\box0}

\vglue 1cm

\centerline{\bf SIGNED WORDS AND PERMUTATIONS, II;}
\smallskip
\centerline{\bf THE EULER-MAHONIAN POLYNOMIALS}
\bigskip
\centerline{\hbox{{\qquad\vtop{\halign{\hfil#\hfil\cr
{\bf Dominique Foata}\cr
\noalign{\smallskip}
Institut Lothaire, 1, rue Murner\cr
F-67000 Strasbourg, France\cr
{\tt foata@math.u-strasbg.fr}\cr}}
}}}
\bigskip
\centerline{\hbox{{\qquad\vtop{\halign{\hfil#\hfil\cr
{\bf Guo-Niu Han}\cr
\noalign{\smallskip}
I.R.M.A. UMR 7501, Universit\'e Louis Pasteur et CNRS\cr
7, rue Ren\'e-Descartes, F-67084 Strasbourg, France\cr
{\tt guoniu@math.u-strasbg.fr}\cr}}
}}}
\bigskip

\centerline{\footrm 
Submitted: May 6, 2005; Accepted: Oct. 28, 2005; Published: Nov. 08, 2005}
\centerline{\footrm Mathematics Subject Classifications: 05A15, 05A30, 05E15}

\bigskip\bigskip


\line{\hskip 55mm\hbox{\vbox{\eightpoint
\eightsl\vbox{\hsize=7cm\noindent
Dans la th\'eorie de Morse, quand on veut \'etudier un
espace, on introduit une fonction num\'e\-rique; puis on
aplatit cet espace sur l'axe de la valeur de cette fonction.
Dans cette op\'eration d'aplatissement, on cr\'ee des
singularit\'es de la fonction et celles-ci sont
en quelque  sorte les vestiges
de la topologie qu'on a tu\'ee.

\smallskip
\noindent
{\eightrm Ren\'e Thom,} Logos et Th\'eorie des
catastrophes, {\oldstyle 1982}.
\medskip
\noindent
Dedicated to Richard Stanley,\par
\noindent
on the occasion of his sixtieth birthday.}}}\hfil}

\bigskip\bigskip
\centerline{\bf Abstract}
\smallskip
{\narrower\noindent
As for the symmetric group of ordinary permutations there is
also a statistical study of the group of signed permutations,
that consists of calculating multivariable generating functions for
this group by statistics involving record values and the length
function. Two approaches are here systematically explored, using
the flag-major index on the one hand, and the flag-inversion number
on the other hand. The MacMahon Verfahren appears as  
a powerful tool throughout.\par}

\bigskip

\centerline{\bf 1. Introduction}

\medskip
The elements of the hyperoctahedral group~$B_n$ $(n\ge 0)$,
usually called {\it signed permutations}, may be viewed as words
$w=x_1x_2\ldots x_n$, where the letters~$x_i$ are positive or
negative integers and where $|x_1|\,|x_2|\,\ldots\,|x_n|$ is a
permutation of $1\,2\,\ldots\,n$ (see [Bo68] p.~252--253). For
typographical reasons we shall use the notation $\overline
i:=-i$ in the sequel. Using the $\chi$-notation that maps each
statement~$A$ onto the value $\chi(A)=1$ or~0 depending on
whether~$A$ is true or not, we recall that the usual
{\it inversion number}, $\inv w$,  of the signed permutation
$w=x_1x_2\ldots x_n$ is defined by
$$\leqalignno{
\inv w&:=\sum_{1\le j\le n}\sum_{i<j}\chi(x_i>x_j).\cr
\noalign{\hbox{It also makes sense to introduce}}
\imv w&:=\sum_{1\le j\le n}\;\sum_{i<j}\chi(\overline
x_i>x_j),\cr}
$$
and verify that the {\it length function} (see [Bo68, p.~7], [Hu90,
p.~12]), that will be denoted by ``finv" ({\it flag-inversion
number}) in the whole paper, can be defined, using the notation
$\negg w:=\smash{\sum\limits_{1\le j\le n}}\chi(x_j<0)$, by
$$
\finv w:=\inv w+\imv w+\negg w.
$$
Another equivalent definition will be given in (7.1).
The {\it flag-major index} ``fmaj" and the {\it flag descent
number} ``fdes" were introduced by Adin and Roichman~[AR01]
and read:
$$\leqalignno{\noalign{\vskip-5pt}
\fmaj w&:=2\maj w+\negg w;\cr
\fdes w&:=2\des w+\chi(x_1<0);\cr
%\noalign{\vskip-5pt}
}
$$
where $\maj w:=\sum_jj\,\chi(x_j>x_{j+1})$ denotes the
usual {\it major index} of~$w$ and $\des w$ the
{\it number of descents}
$\des w:=\sum_j\chi(x_j>x_{j+1})$.

Another class of statistics needed here is the class of {\it lower
records}. A letter~$x_i$ $(1\le i\le n)$ is said to be a {\it lower
record} of the signed permutation~$w=x_1x_2\ldots x_n$, if
$|x_i|<|x_j|$ for all~$j$ such that
$i+1\le j\le n$. When reading the lower records of~$w$ from left
to right we get a {\it signed subword}, called the {\it lower
record subword}, denoted by $\Lower w$. Denote the number of
{\it positive} (resp. {\it negative\/}) letters in~$\Lower w$ by
$\lowerp w$ (resp. $\lowern w$).

In our previous paper [FoHa05] we gave the construction of
a transformation $\Psi$ on (arbitrary) signed words, that is,
words, whose letters are positive or negative with 
repetitions allowed. When applied to the group~$B_n$, the
transformation~$\Psi$ has the following properties:

\decale {\rm (a)}|$\fmaj w=\finv \Psi(w)$ for every signed
permutation~$w$;

\decale{\rm (b)}|$\Psi$ is a bijection of $B_n$ onto
itself, so that ``$\fmaj$" and ``$\finv$" are equidistrib\-uted
over the hyperoctahedral group $B_n$;

\decale{\rm (c)}|$\Lower w=\Lower \Psi(w)$, so that $\lowerp
w=\lowerp\Psi(w)$ and  $\lowern w=\lowern \Psi(w)$.

Actually, the transformation~$\Psi$ has stronger properties than
those stated above, but these restrictive properties will
suffice for the following derivation. Having properties (a)--(c) in
mind, we see that the two three-variable statistics
$(\fmaj,\lowerp,\lowern)$ and
$(\finv,\lowerp,\lowern)$ are equidistrib\-uted over~$B_n$.
Hence, the two generating polynomials
$$\leqalignno{%\noalign{\vskip-2pt}
{}^{\fmaj\kern-2pt}B_n(q,X,Y)&:=\sum_{w\in B_n}
q^{\fmaj}X^{\lowerp w}Y^{\lowern w}\cr
{}^{\finv\kern-2pt}B_n(q,X,Y)&:=
\sum_{w\in B_n}
q^{\finv}X^{\lowerp w}Y^{\lowern w}\cr
%\noalign{\vskip-2pt}
}
$$
are {\it identical}. To derive the analytical
expression for the common polynomial we have two
approaches, using the ``fmaj" interpretation, on the one hand, and
the ``finv" geometry, on the other. In each case we will go beyond
the three-variable case, as we consider the generating
polynomial for the group~$B_n$ by the five-variable statistic
$(\fdes,\fmaj,\lowerp,\lowern,\negg)$
$$
{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z):=\sum_{w\in B_n} t^{\fdes
w}q^{\fmaj w} X^{\lowerp w}Y^{\lowern w}Z^{{\rm neg}\,w}
\leqno(1.1)
$$
and the generating polynomial for the group~$B_n$ by the
four-variable statistic\hfil\break
$(\finv,\lowerp, \lowern, \negg)$
$$
{}^{\finv\kern-2pt}B_n(q,X,Y,Z):=\sum_{w\in B_n} q^{\finv
w}X^{\lowerp w}Y^{\lowern w}Z^{{\rm neg}\,w}.\leqno(1.2)
$$

Using the usual notations
for the $q$-{\it ascending factorial}
$$\leqalignno{\noalign{\vskip-3pt}
(a;q)_n&:=\cases{1,&if $n=0$;\cr
(1-a)(1-a q)\,\ldots\,(1-a q^{n-1}),&if
$n\geq 1$;\cr} &(1.3)\cr
\noalign{\hbox{in its {\it finite} form and}}
(a;q)_{\infty }&:=\lim\nolimits_n(a;q)_n=
{\textstyle \prod\limits _{n\geq 0}(1-a
q^n)};&(1.4)\cr
\noalign{\vskip-5pt}}
$$
in its {\it infinite} form, we consider the products
$$\displaylines{\noalign{\vskip -2pt}
\rlap{(1.5)}\hfill 
H_\infty(u):={\displaystyle\Bigl(uq\Bigl({Z+q\over
1-q^2}-ZY\Bigr);q^2\Bigr)_\infty
\over \displaystyle\Bigl(u{\Bigl({q(Z+q)\over
1-q^2}+X\Bigr)};q^2\Bigr)_\infty}, \hfill
\cr
\noalign{\hbox{in its infinite version, and}}
\noalign{\vskip -2pt}
(1.6)\  
H_{2s}(u)\!:=\!{1-q^2\over 1-q^2+uq^{2s+1}(Z+q)}
{\displaystyle\Bigl(uq\displaystyle{Z+q-ZY(1-q^2)\over
1-q^2+uq^{2s+1}(Z+q)};q^2\Bigr)_{\kern-2pt s}\over
\displaystyle\Bigl(u{q(Z+q)+X(1-q^2)\over
1-q^2+uq^{2s+1}(Z+q)};q^2\Bigr)_{\kern-3pt s+1}},
\hfill\cr
\noalign{\hbox{as well as}}
\noalign{\vskip -2pt}
\rlap{(1.7)}\hfill 
H_{2s+1}(u):=
{\displaystyle\Bigl(uq\displaystyle{Z+q-ZY(1-q^2)\over
1-q^2+uq^{2s+2}(Zq+1)};q^2\Bigr)_{s+1}\over
\displaystyle\Bigl(u{q(Z+q)+X(1-q^2)\over
1-q^2+uq^{2s+2}(Zq+1)};q^2\Bigr)_{s+1}},\
\hfill\cr}
$$
in its graded version under the form
$\sum\limits_{s\ge0} t^sH_s(u)$.

The purpose of this paper is to prove the following two theorems
and derive several applications regarding statistical
distributions over~$B_n$.

\proclaim Theorem 1.1 {\rm (the ``fmaj" approach)}. Let
${}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)
$
be the generating polynomial for the group~$B_n$ by the
five-variable statistic
$(\fdes,\fmaj,\lowerp,\lowern,\negg)$ as defined in $(1.1)$. Then
$$
\sum_{n\ge 0}(1+t)\,{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z){u^n\over
(t^2;q^2)_{n+1}}
=\sum_{s\ge 0}t^sH_s(u),\leqno(1.8)
$$
where $H_s(u)$ is the finite product introduced in $(1.6)$ and
$(1.7)$.

\goodbreak
\proclaim Theorem 1.2 {\rm (the ``finv" approach)}. Let
${}^{\finv\kern-2pt}B_n(q,X,Y,Z)$
be the generating polynomial for the group~$B_n$ by the
four-variable statistic\hfil\break
$(\finv,\lowerp, \lowern, \negg)$, as defined in $(1.2)$. Then
$$
\displaylines{(1.9)\quad {}^{\finv\kern-2pt}B_n(q,X,Y,Z)
=(X+q+\cdots+q^{n-1}+q^nZ+\cdots+q^{2n-2}Z+q^{2n-1}YZ)\hfill
\cr
\hfill{}\cdots \times(X+q+q^2+q^3Z+q^4Z+q^5YZ)
(X+q+q^2Z+q^3YZ)(X+qYZ).\cr
}
$$

The proofs of those two theorems are very different in nature.
For proving Theorem~1.1 we re-adapt the {\it MacMahon
Verfahren} to make it work for {\it signed} permutations. Ren\'e
Thom's quotation that~appears~as an epigraph to this paper
illustrates the essence of the {\it MacMahon Verfahren}. The
topology of the signed permutations measured by the various
statistics, ``fdes", ``fmaj", \dots\ must be reconstructed when the
group of the signed permutations is mapped onto a
set of plain words for which the calculation of the associated
statistic is easy. There is then a combinatorial
bijection between signed permutations and plain words
 that describes the ``flattening" (``aplatissement") process. This is
the content of Theorem~4.1.

Another approach might have been to make use of the
$P$-partition technique introduced by Stanley [St72] and
successfully employed by~Reiner [Re93a, Re93b, Re93c, Re95a, Re95b]
in his statistical study of the hyper\-octahedral group.

Theorem~1.2 is based upon another definition of the length
function for~$B_n$ (see formula (7.1)). Notice that in the two
theorems we have included a variable~$Z$, which takes the
number ``neg" of {\it negative} letters into account. This allows
us to re-obtain the classical results on the symmetric group by
letting $Z=0$.

In the next section we show that the infinite product $H_s(u)$
first appears as the generating function for a class of
{\it plain} words by a four-variable statistic (see Theorem~2.2).
This theorem will be an essential tool in section~4 in the
MacMahon Verfahren for signed permutations to handle the
five-variable polynomial ${}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)$.
Section~3 contains an axiomatic definition of the 
{\it Record-Signed-Euler-Mahonian Polynomials}
$B_n(t,q,X,Y,Z)$. They are defined, not only by (1.8) (with~$B_n$
replacing ${}^{\fmaj\kern-2pt}B_n$), but also by a recurrence
relation. The proof of Theorem~1.1 using the MacMahon Verfahren
is found in Section~4. In Section~5 we show how to prove that
the polynomials ${}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)$ satisfy the
same recurrence as the polynomials
$B_n(t,q,X,Y,Z)$, using an insertion technique.
The specializations of Theorem~1.1 are numerous and described in
section~6. We end the paper with the proof of Theorem~1.2 and
its specializations.

\vfill\eject
\bigskip
\centerline{\bf 2. Lower Records on Words}

\medskip
As mentioned in the introduction, Theorem~2.2 below, dealing with
{\it ordinary words}, appears to be a {\it preparation lemma} for
Theorem~1.1, that takes the geometry of {\it signed
permutations} into account. Consider an ordinary word
$c=c_1c_2\ldots c_n$, whose letters belong to the alphabet
$\{0,1,\ldots, s\}$, that is, a word from the free monoid
$\{0,1,\ldots,s\}^*$. A letter~$c_i$ $(1\le i\le n)$ is said to be
an {\it even lower record\/} (resp. {\it odd lower record\/})
of~$c$, if $c_i$ is even (resp. odd) and if  $c_j\ge c_i$ (resp.
$c_j>c_i$) for all~$j$ such that $1\le j\le i-1$. Notice the
discrepancy between even and odd letters. 
Also, to define those even and odd lower records for words
the reading is made {\it from left to right}, while for signed permutations,
the lower records are read from {\it right to left} (see Sections~1 and 4).
We could have
considered a totally ordered alphabet with two kinds of letters,
but playing with the parity of the nonnegative integers is more
convenient for our applications. For instance, the even (resp.
odd) lower records of the word $c={\it 5}\, {\bf 4}\,{\bf 4}\,{\it
1}\,5\, 2\, 1\, {\bf0}\,4\,{\bf 0}\,3$ are reproduced in boldface
(resp. in italic).

For each word~$c$ let $\evenlower c$ (resp. $\oddlower c$) be the
number of even (resp. odd) lower records of~$c$. Also let $\tot c$
(``tot" stands for ``total") be the {\it sum}
$c_1+c_2+\cdots+ c_n$ of the letters of~$c$ and $\odd c$ be the
{\it number} of its odd letters. Also denote its {\it length} by $|c|$
and let $|c|_k$ be the number of letters in~$c$ equal to~$k$.
Our purpose is to calculate the generating function for
$\{0,1,\ldots,s\}^*$ by the four-variable statistic
$(\tot, \evenlower, \oddlower, \odd)$.

Say that~$c=c_1c_2\ldots c_n$ is of {\it minimal index}~$k$
$(0\le k\le s/2)$, if $\min c:=\min\{c_1,\ldots, c_n\}$ is
equal to~$2k$ or
$2k+1$. Let $c_j$ be the leftmost letter of~$c$ equal to $2k$ or
$2k+1$.
Then, $c$ admits a unique factorization
$$\displaylines{\rlap{(2.1)}\hfill
c=c'c_jc'',\hfill\cr
\noalign{\hbox{having the following
properties: }}
c'\in \{2k+2,2k+3,\ldots,s\}^{*},\ c_j=2k\ {\rm or}\ 2k+1,\
c''\in \{2k,2k+1,\ldots,s\}^{*}.\cr}
$$

With the forementioned example we have the factorization
$c'=5\,4\,4$, $c_j=1$, $c''=5\,2\,1\,0\,4\,0\,3$. In this example
notice that
$c_j=1\not=\min c=0$.

\proclaim Lemma 2.1. The numbers of even and odd lower records of
a word~$c$ can be calculated by induction as follows:
$\evenlower c=\oddlower c:=0$ if~$c$ is empty; otherwise,
let $c=c'c_jc''$ be its minimal index
factorization (defined in $(2.1)$). Then
$$
\leqalignno{
\evenlower c&=\evenlower c'+\chi(c_j=2k)+|c''|_{2k};&(2.2)\cr
\oddlower c&=\oddlower c'+\chi(c_j=2k+1).&(2.3)\cr}
$$

\dem
Keep the same notations as in (2.1). If $c_j=2k$, then~$c_j$
is an even lower record, as well as all the letters equal to~$2k$ to
the right of~$c_j$. On the other hand, there is no even lower
record equal to~$2k$ to the left of~$c_j$, so that (2.2) holds. If
$c_j=2k+1$, then~$c_j$ is an odd lower record and there is
no odd lower record equal to~$2k+1$ to the right of~$c_j$.
Moreover, there is no odd lower record to the left of~$c_j$ equal
to~$c_j$. Again (2.3) holds.\cqfd

\goodbreak
\medskip
It is straightforward to verify that the fraction $H_s(u)$
displayed in (1.6) and (1.7) can also be expressed as
$$\leqalignno{
\qquad H_{2s}(u)&=
\prod_{0\le k\le s}\kern-5pt
{1-u([q^{2k+1}(1-Y)Z+q^{2k+2}+\cdots+q^{2s-2}+
q^{2s-1}Z+q^{2s}])\over
1-u(q^{2k}X+[q^{2k+1}Z+q^{2k+2}+\cdots+q^{2s-2}
+q^{2s-1}Z+q^{2s}])}&(2.4)\cr
\qquad H_{2s+1}(u)&=
\prod_{0\le k\le s}\kern-5pt
{1-u(q^{2k+1}(1-Y)Z+[q^{2k+2}+\cdots+
q^{2s}+q^{2s+1}Z])\over
1-u(q^{2k}X+q^{2k+1}Z+[q^{2k+2}+\cdots+q^{2s}+q^{2s+1}Z])},&(2.5)\cr
}$$
where the expression between brackets vanishes whenever $k=s$,
and that the $H_s(u)$'s satisfy the recurrence formula
$$\displaylines{
\rlap{(2.6)}\hfill H_0(u)={1\over 1- uX};\quad
H_1(u)={1-uqZ(1-Y)\over 1-u(X+qZ)};\quad
{\rm and\ for}\ s\ge 1\hfill\cr
H_{2s}(u)={1-u(q(1-Y)Z+q^2+q^3Z+\cdots+q^{2s-1}Z+q^{2s})\over
1-u(X+qZ+q^2+q^3Z+\cdots+q^{2s-1}Z+q^{2s})}
H_{2s-2}(uq^2);\cr
H_{2s+1}(u)\!=\!{1-u(q(1-Y)Z+q^2+q^3Z
\!+\!\cdots\!+\!q^{2s}+q^{2s+1}Z)\over
1-u(X+qZ+q^2+q^3Z+\cdots+q^{2s}+q^{2s+1}Z)}
H_{2s-1}(uq^2).\cr}
$$

\proclaim Theorem 2.2. The generating function for the free
monoid $\{0,1,\ldots, s\}^*$ by the four-variable statistic
$(\tot,\evenlower,\oddlower,\odd)$ is equal to $H_s(u)$, that is
to say,
$$ 
\sum_{c\in \{0,1,\ldots, s\}^*}\kern-10pt
u^{|c|}q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}
=H_s(u).\leqno(2.7)
$$

\dem
Let $H^*_s(u)$ denote the left-hand side of (2.7). Then,
$$
H^*_0(u)=\sum_{c\in\{0\}^*}
u^{|c|}q^{0}X^{|c|}Y^0Z^0={1\over 1-uX}.
$$
When $s=1$ the minimal index factorization of each
nonempty word~$c$ reads $c=c_jc''$, so that
$$\leqalignno{
H^*_1(u)&=1+u(X+qYZ)\sum_{c''\in \{0,1\}^*}
u^{|c''|}q^{|c''|_1}X^{|c''|_0}Y^0Z^{|c''|_1}\cr
&=1+u(X+qYZ){1\over 1-u(X+qZ)}={1-uqZ(1-Y)\over
1-u(X+qZ)}.\cr}
$$
Consequently, $H^*_s(u)=H_s(u)$ for $s=0,1$.
For $s\ge 2$ we write
$$\eqalignno{
H^*_s(u)&=\sum_{0\le k\le s/2}H^*_{s,k}(u)\cr
\noalign{\vskip -12pt}\noalign{\hbox{with}}
H^*_{s,k}(u)&:=\kern-.5cm\sum_{\scriptstyle c\in \{0,1,\ldots,
s\}^*
\atop\scriptstyle
\min_ic_i=2k\ {\rm or}\ 2k+1}\kern-20pt
u^{|c|}q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}.\cr}
$$
\goodbreak
\noindent
{}From Lemma 2.1 it follows that
$$\leqalignno{
H^*_{s,0}(u)&=\kern-10pt \sum_{c'\in \{2,\ldots, s\}^*}
\kern-10pt 
u^{|c'|}q^{\tot c'}X^{\evenlower c'}
Y^{\oddlower c'}Z^{\odd c'}\times u(X+qYZ)\cr
\noalign{\vskip-10pt}
&\hskip3cm{}
\times\kern-10pt 
\sum_{c''\in \{0,\ldots, s\}^*}\kern-10pt
u^{|c''|}q^{\tot c''}X^{|c''|_{0}}Z^{\odd c''}\cr
&=\kern-15pt
\sum_{c'\in \{0,\ldots, s-2\}^*}
\kern-18pt 
(uq^{2})^{|c'|}q^{\tot c'}X^{\evenlower c'}Y^{\oddlower
c'}Z^{\odd c'}\kern-3pt\times u(X+qYZ)\cr
&\hskip.5cm{}\times\kern-15pt
\sum_{c''\in \{0,\ldots, s\}^*}\kern-15pt
(uX)^{|c''|_0}(uqZ)^{|c''|_{1}}
(uq^2)^{|c''|_2}(uq^3Z)^{|c''|_3}(uq^4)^{|c''|_4}\cdots
\cr
&=H^*_{s-2}(uq^{2}) u(X+qYZ)
{1\over 1-u(X+qZ+q^2+q^3Z+q^4+\cdots\,)}, \cr
}
$$
the polynomial in the denominator ending with
${}\cdots+q^{s-1}Z+q^s$ or
${}\cdots+q^{s-1}+q^sZ$ depending on whether~$s$ is even or odd.

On the other hand,
$$
\eqalignno{
\sum_{1\le k\le s/2}\kern-10pt H^*_{s,k}(u)
&=\sum_{c\in \{2,3,\ldots, s\}^*}
u^{|c|}q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}\cr
&=\sum_{c\in \{0,1,\ldots, s-2\}^*}\kern-10pt
(uq^2)^{|c|}q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}\cr
&=H^*_{s-2}(uq^2).\cr
\noalign{\vskip-10pt}}
$$
Hence,
$$\leqalignno{\noalign{\vskip-10pt}
H^*_s(u)&=
\Bigl(1+{u(X+qYZ)\over 1-u(X+qZ+q^2+q^3Z+q^4+\cdots\,)}\Bigr)
H^*_{s-2}(uq^2)\cr
&={1-u(qZ(1-Y)+q^2+q^3Z+q^4+\cdots\,)\over
1-u(X+qZ+q^2+q^3Z+q^4+\cdots\,)} H^*_{s-2}(uq^2).\cr}
$$
As the fractions $H^*_s(u)$ satisfy the same induction relation as the
$H_s(u)$'s, we conclude that $H^*_s(u)=H_s(u)$ for all~$s$.\cqfd

\medskip
When $s$ tends to infinity, then $H_s(u)$ tends to
$H_\infty(u)$, whose expression is shown in (1.5). In particular,
we have the identity:
$$
\sum_{c\in \{0,1,2,\ldots \,\}^*}\kern-10pt
u^{|c|}q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}
=H_\infty(u).\leqno(2.8)
$$

\bigskip
\centerline{\bf 3. The Record-Signed-Euler-Mahonian Polynomials}

\medskip
Our next step is to form the series $\sum_{s\ge 0}t^sH_s(u)$ and
show that the series can be expanded as a series in the
variable~$u$ in the form
$$
\sum_{n\ge 0}C_n(t,q,X,Y,Z){u^{n}\over (t^2;q^2)_{n+1}}=\sum_{s\ge
0}t^s H_s(u),\leqno(3.1)
$$
where $B_n(t,q,X,Y,Z):=C_n(t,q,X,Y,Z)/(1+t)$  is a
{\it polynomial} with nonnegative integral coefficients such that
$B_n(1,1,1,1,1)=2^nn!\,$.
\goodbreak

\rem Definition|A sequence
$\Bigl(B_n(t,q,X,Y,Z)=\sum \limits_{k\ge 0} t^k
B_{n,k}(q,X,Y,Z)\Bigr)$ $(n\ge 0$) of polynomials in five
variables~$t$, $q$, $X$, $Y$ and~$Z$ is said to
be {\it record-signed-Euler-Mahonian}, if one of the following  {\it
equivalent} three conditions holds:

\medskip
(1) The $(t^2,q^2)$-factorial generating function for the
polynomials 
$$
C_n(t,q,X,Y,Z):=(1+t)B_n(t,q,X,Y,Z)\leqno(3.2)
$$
is given by identity (3.1).

\goodbreak
\medskip
(2) For $n\ge 2$ the recurrence relation holds:
$$\displaylines{(3.3)\
(1-q^2)B_n(t,q,X,Y,Z)\hfill\cr
\hfill{}\!\!=\!\!
\Bigl(\!X(1-q^2)+(Zq+q^2)(1-t^2q^{2n-2})+t^2q^{2n-1}(1-q^2)ZY
\Bigr)B_{n-1}(t,q,X,Y,Z)\hfill\cr
\kern1.6cm{}-{1\over
2}(1-t)q(1+q)(1+tq)(1+Z)B_{n-1}(tq,q,X,Y,Z)\hfill\cr
\kern1.6cm{}+{1\over 2}
(1-t)q(1-q)(1-tq)(1-Z)B_{n-1}(-tq,q,X,Y,Z),\hfill\cr}$$
while $B_0(t,q,X,Y,Z)=1$,\quad
$B_1(t,q,X,Y,Z)=X+tqYZ$.


\medskip
(3) The recurrence relation holds for the coefficients
$B_{n,k}(q,X,Y,Z)$:
$$\displaylines{(3.4)\hfill
B_{0,0}(q,X,Y,Z)=1,\quad  B_{0,k}(q,X,Y,Z)=0\ {\rm for\ all\ }k\not=0;
\hfill\cr
B_{1,0}(q,X,Y,Z)=X,\quad  B_{1,1}(q,X,Y,Z)=qYZ,\cr
B_{1,k}(q,X,Y,Z)=0\ {\rm for\ all\ }k\not=0,1;\cr
B_{n,2k}(q,X,Y,Z)=(X+qZ+q^2+q^3Z
+\cdots+q^{2k})B_{n-1,2k}(q,X,Y,Z)\hfill\cr
\kern2.6cm{}+q^{2k}B_{n-1,2k-1}(q,X,Y,Z)\hfill\cr
\kern2.6cm{}+(q^{2k}+q^{2k+1}Z
+\cdots+q^{2n-1}YZ)B_{n-1,2k-2}(q,X,Y,Z),\hfill\cr
B_{n,2k+1}(q,X,Y,Z)\!=\!(X+qZ+q^2
+\cdots+q^{2k}+q^{2k+1}Z)B_{n-1,2k+1}(q,X,Y,Z)\hfill\cr
\kern2.83cm{}+q^{2k+1}ZB_{n-1,2k}(q,X,Y,Z)\hfill\cr
\kern2.83cm{}+(q^{2k+1}Z+q^{2k+2}
+\cdots+q^{2n-2}+q^{2n-1}YZ)B_{n-1,2k-1}(q,X,Y,Z),\hfill\cr
}
$$
for $n\ge 2$ and $0\le 2k+1\le 2n-1$.

\proclaim Theorem 3.1. The conditions $(1)$, $(2)$ and $(3)$ in
the previous definition are equivalent.

\dem
The equivalence
$(2)\Leftrightarrow (3)$ requires a lengthy but elementary
algebraic argument and will be omitted. The other equivalence
$(1)\Leftrightarrow (2)$ involves a more elaborate
$q$-series technique, which is now developed.
Let $G_s(u):=H_s(u^2)$; then
$$\displaylines{
G_0(u)={1\over 1-u^2X};\quad
G_1(u)={1-u^2qZ(1-Y)\over 1-u^2(X+qZ)};\cr
}$$
$$\eqalignno{
\noalign{\hbox{and by (2.6)}}
G_{2s}(u)&=
{1-u^2(qZ(1-Y)+q^2+q^3Z+\cdots+q^{2s-1}Z+q^{2s})\over
1-u^2(X+qZ+q^2+q^3Z+\cdots+q^{2s-1}Z+q^{2s})}
G_{2s-2}(uq),\cr
G_{2s+1}(u)&=
{1-u^2(qZ(1-Y)\!+\!q^2\!+\!q^3Z\!+\!\cdots\!+\!q^{2s}\!+\!q^{2s+1}Z)\over
1-u^2(X+qZ+q^2+q^3Z+\cdots+q^{2s}+q^{2s+1}Z)}
G_{2s-1}(uq),\cr}
$$
for $s\ge 1$. Working with the series $\sum\limits_{s\ge
0}t^sG_s(u)$ we obtain
$$\displaylines{
\sum_{s\ge 0}t^{2s}G_{2s}(u)\Bigl(1-u^2\bigl(X+{Zq+q^2\over
1-q^2}-{q^{2s}\over 1-q^2}(Zq+q^2)\bigr)\Bigr)\hfill\cr
\noalign{\vskip-8pt}
\kern1.6cm{}+\sum_{s\ge 0}
t^{2s+1}G_{2s+1}(u)\Bigl(1-u^2\bigl(X+{Zq+q^2\over
1-q^2}-{q^{2s+2}\over 1-q^2}(Zq+1)\bigr)\Bigr)\hfill\cr
\quad{}=1+t(1-u^2qZ(1-Y))\hfill\cr
\kern1.6cm{}+\sum_{s\ge 1}t^{2s}G_{2s-2}(qu)
\Bigl(1-u^2\bigl(-qZY+{Zq+q^2\over 1-q^2}
-{q^{2s}\over 1-q^2}(Zq+q^2)\bigr)\Bigr)\ \hfill\cr
\kern1.6cm{}+\sum_{s\ge 1}t^{2s+1}G_{2s-1}(qu)
\Bigl(1-u^2\bigl(-qZY+{Zq+q^2\over 1-q^2}
-{q^{2s+2}\over 1-q^2}(Zq+1)\bigr)\Bigr),\hfill\cr
\noalign{\hbox{which may be rewritten as}}
\sum_{s\ge 0}t^{s}G_{s}(u)\Bigl(1-u^2\bigl(X+{Zq+q^2\over
1-q^2}\bigr)\Bigr)=1+t(1-u^2qZ(1-Y))\hfill\cr
\kern1.6cm{}
+\sum_{s\ge 0}t^{s+2}G_{s}(qu)
\Bigl(1-u^2\bigl(-qZY+{Zq+q^2\over 1-q^2}\bigr)\Bigr)\hfill\cr
\kern1.6cm{}
-\sum_{s\ge 0}(tq)^{2s}\bigl(G_{2s}(u)-t^2q^2G_{2s}(qu)\bigr)
u^2{Zq+q^2\over 1-q^2}\hfill\cr
\kern1.6cm{}
-\sum_{s\ge
0}(tq)^{2s+1}\bigl(G_{2s+1}(u)-t^2q^2G_{2s+1}(qu)\bigr)
u^2q{Zq+1\over 1-q^2}.\hfill\cr}
$$
Now let 
$
{\sum_{n\ge 0}} b_n(t)u^{2n}
:=
{\sum_{s\ge 0}}t^sG_s(u)
$. 
This gives:
$$
\displaylines{
\sum_{n\ge 0}b_n(t)u^{2n}\Bigl(1-u^2\bigl(X+{Zq+q^2\over
1-q^2}\bigr)\Bigr)=1+t(1-u^2qZ(1-Y))\hfill\cr
\kern1.6cm{}
+\sum_{n\ge 0}b_n(t)t^2q^{2n}u^{2n}
\Bigl(1-u^2\bigl(-qZY+{Zq+q^2\over 1-q^2}\bigr)\Bigr)\hfill\cr
\kern1.6cm{}
-\sum_{n\ge 0}{b_n(tq)+b_n(-tq)\over 2}(1-t^2q^{2n+2})
u^{2n+2}{Zq+q^2\over 1-q^2}\hfill\cr
\kern1.6cm{}
-\sum_{n\ge 0}{b_n(tq)-b_n(-tq)\over 2}(1-t^2q^{2n+2})
u^{2n+2}q{Zq+1\over 1-q^2}.\hfill\cr
}
$$
We then have $b_0(t)=\displaystyle{1\over 1-t}$,\quad
$b_1(t)=\displaystyle {X+tqYZ\over (1-t)(1-t^2q^2)}$ and for
$n\ge 2$
$$\displaylines{
b_n(t)(1-t^2q^{2n})=
\Bigl(X+{Zq+q^2\over 1-q^2}+t^2q^{2n-1}ZY
-t^2q^{2n-2}{Zq+q^2\over 1-q^2}\Bigr)b_{n-1}(t)\hfill\cr
\qquad{}-{b_{n-1}(tq)\over 2(1-q^2)}
(1-t^2q^{2n})q(1+q)(1+Z)
+{b_{n-1}(-tq)\over 2(1-q^2)}
(1-t^2q^{2n})q(1-q)(1-Z).
\hfill
\cr}
$$
Because of the presence of the factors of the form $(1-t^2q^{2n})$
we are led to introduce the
coefficients $C_n(t,q,X,Y,Z):=b_n(t)(t^2;q^2)_{n+1}$
$(n\ge 0)$. By multiplying the latter equation by $(t^2;q^2)_n$ we
get for $n\ge 2$
$$
\displaylines{(3.5)\
(1-q^2)C_n(t,q,X,Y,Z)\hfill\cr
\hfill{}\!\!=\!\!
\Bigl(\!X(1-q^2)+(Zq+q^2)(1-t^2q^{2n-2})+t^2q^{2n-1}(1-q^2)ZY
\Bigr)C_{n-1}(t,q,X,Y,Z)\hfill\cr
\kern1.6cm{}-{1\over 2}(1-t^2)q(1+q)(1+Z)C_{n-1}(tq,q,X,Y,Z)\hfill\cr
\kern1.6cm{}+{1\over 2}
(1-t^2)q(1-q)(1-Z)C_{n-1}(-tq,q,X,Y,Z),\hfill\cr}$$
while $C_0(t,q,X,Y,Z)=1+t$,\quad
$C_1(t,q,X,Y,Z)=(1+t)(X+tqYZ)$.

Finally, with $C_n(t,q,X,Y,Z):=(1+t)B_n(t,q,X,Y,Z)$ $(n\ge 0)$ we get
the recurrence formula (3.3), knowing that the factorial generating
function for the polynomials $C_n(t,q,X,Y,Z)=(1+t)B_n(t,q,X,Y,Z)$ is
given by (3.1). As all the steps are perfectly reversible, the
equivalence holds.\cqfd

\bigskip
\centerline{\bf 4. The MacMahon Verfahren}

\medskip
Now having three equivalent definitions for the
record-signed-Euler-Mahonian polynomial $B_n(t,q,X,Y,Z)$, our
next task is to prove the identity
$$
{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)=B_n(t,q,X,Y,Z).\leqno(4.1)
$$

\goodbreak

Let ${\bboard N}^n$ (resp. $\NIW(n)$) be the set of all the words
(resp. all the nonincreasing words) of length~$n$, whose letters are
nonnegative integers. As we have seen in section~2 (Theorem 2.2),
we know how to calculate the generating function for words by a
certain four-variable statistic. The next step is to map each
pair $(b,w)\in \NIW(n)\times B_n$ onto $c\in {\bboard N}^n$ in such
a way that the geometry
on~$w$ can be derived from the latter statistic on~$c$.

For the construction we proceed as follows. Write the signed
permutation~$w$ as the linear word
$w=x_1x_2\ldots x_n$, where
$x_k$ is the image of the integer~$k$ $(1\le k\le n)$. For
each
$k=1,2,\ldots,n$ let $z_k$ be the number of descents in the right
factor $x_kx_{k+1}\ldots x_n$ and $\epsilon_k$
be equal to~0 or~1 depending on whether $x_k$ is positive
or negative.  Next, form the words
$z=z_1z_2\ldots z_n$ and
$\epsilon=\epsilon_1\epsilon_2\ldots\epsilon_n$.

Now, take a nonincreasing word $b=b_1b_2\ldots b_n$ and define
$a_k:=b_k+z_k$, $c'_k:=2a_k+\epsilon_k$
$(1\le k\le n)$, then $a:=a_1a_2\ldots a_n$
and $c':=c'_1 c'_2\ldots c'_n$.
Finally, form the two-matrix
$\left(\matrice{c'_1& c'_2&\ldots&c'_n\cr
|x_1|&|x_2|&\ldots&|x_n|\cr}\right)$.
Its bottom row is a permutation of $1\,2\,\ldots\,n$;
rearrange the columns in such a way that the
bottom row is precisely $1\,2\,\ldots\,n$. Then the word
$c=c_1c_2\ldots c_n$ which corresponds to the pair $(b,w)$ is
defined to be the top row in the resulting matrix.

\medskip
{\it Example}.\quad Start with the pair $(b,w)$ below and
calculate all the necessary ingredients:
$$
\matrice{b&=&1&1&1&0&0&0&0\cr
w&=&6
&\overline 5&\overline 4&1&7&\overline 3&\overline 2\cr
z&=&2&1&1&1&1&0&0\cr
\epsilon&=&0&1&1&0&0&1&1\cr
a&=&3&2&2&1&1&0&0\cr
c'&=&6&5&5&2&2&1&1\cr
c&=&2&1&1&5&5&6&2\cr}
$$

\proclaim Theorem 4.1. For each nonnegative integer $r$ the above
mapping is a bijection of the set of all the pairs
$(b,w)=(b_1b_2\ldots b_n,\,x_1x_2\ldots x_n)
\in \NIW(n)\times B_n$ such that $2b_1+\fdes w=r$ onto the set
of the words~$c=c_1c_2\ldots c_n\in {\bboard N}^n$ such that
$\max c=r$. Moreover,
$$\displaylines{\rlap{\rm (4.2)}\hfill
2b_1+\fdes w=\max c;\quad
2\tot b+\fmaj w=\tot c;\hfill\cr
(4.3)\qquad \lowerp w=\evenlower c;\quad
\lowern w=\oddlower c;\quad
{\rm neg}\, w=\odd c.\hfill\cr}
$$

Before giving the proof of Theorem~4.1 we derive its analytic
consequences.
First, it is $q$-routine to prove the three
identities, where $b_1$ is the first letter of~$b$,
$$
\leqalignno{
{1\over (u;q)_N}&=\sum_{n\ge 0} {N+n-1\brack
n}_q\,u^n;&(4.4)\cr
{N+n\brack n}_q&=\sum_{b\in \NIW(N),\,b_1\le
n}q^{\tot b};&(4.5)\cr
{1\over (u;q)_{N+1}}&=\sum_{n\ge 0}u^n
\sum_{b\in \NIW(N),\,b_1\le
n}q^{\tot b}.&(4.6)\cr
}
$$
We then consider
$$\displaylines{
{1+t\over (t^2;q^2)_{n+1}}{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z),\cr
\noalign{\hbox{where}}
{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z):=\sum_{w\in B_n} t^{\fdes
w}q^{\fmaj w} X^{\lowerp w}Y^{\lowern w}Z^{{\rm neg}\,w},\cr}
$$
which we rewrite as
$$\eqalignno{
&
\sum_{r'\ge 0}(t^{2r'}+t^{2r'+1}){n+r'\brack r'}_{q^2}
{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)
\qquad\qquad\qquad&\hbox{[by (4.4)]}\cr
&=\sum_{r\ge 0}t^r{n+\lfloor r/2\rfloor \brack \lfloor
r/2\rfloor}_{q^2}{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)
&\hbox{[and by (4.5)]}\cr
&=\sum_{r\ge 0}t^r
\sum_{b\in \NIW(n),\,2b_1\le r}\kern-12pt q^{2\tot b}
\sum_{w\in B_n} t^{\fdes w}q^{\fmaj w}
X^{\lowerp w}Y^{\lowern w}Z^{{\rm neg}\,w}\cr
&=\sum_{s\ge 0}t^s
\sum_{\scriptstyle b\in \NIW(n),\,w\in B_n
\atop \scriptstyle
2b_1+\fdes w\le s}
\kern-12pt q^{2\tot b+\fmaj w}X^{\lowerp w}Y^{\lowern w}Z^{{\rm
neg}\,w}.
\cr
}
$$
By Theorem 4.1 the set $\{(b,w):b\in \NIW(n),\,w\in B_n,\,
2b_1+\fdes w\le s\}$ is in bijection with the set
$\{0,1,\ldots, s\}^n$ and (4.2) and (4.3) hold.
Hence,
$$\displaylines{\quad
{1+t\over
(t^2;q^2)_{n+1}}\,{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)
=\sum_{s\ge 0}t^s\kern-9pt\sum_{c\in \{0,\ldots, s\}^n}\kern-14pt
q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}.\quad\cr
\noalign{\hbox{Now use Theorem 2.2:}}
\eqalign{
\sum_{s\ge 0}t^sH_s(u)
&=\sum_{s\ge 0}t^s\kern-8pt\sum_{c\in \{0,1,\ldots,
s\}^*}\kern-10pt u^{|c|}q^{\tot c}X^{\evenlower c}Y^{\oddlower
c}Z^{\odd c}\cr 
&=\sum_{n\ge0}u^n\sum_{s\ge 0}t^s\kern-8pt
\sum_{c\in \{0,1,\ldots, s\}^n}\kern-12pt
q^{\tot c}X^{\evenlower c}Y^{\oddlower c}Z^{\odd c}\cr
&=\sum_{n\ge 0}(1+t)\,{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z){u^n\over
(t^2;q^2)_{n+1}}.\cr}\cr}
$$
Thus, identity (4.1) is proved, as well as Theorem~1.1.

\goodbreak
Let us now complete the proof of Theorem 4.1.
First, $\max c=c'_1=2a_1+\epsilon_1=2b_1+2z_1+\epsilon_1
=2b_1+\fdes w$; also
$\tot c=\tot c'=2\tot a+\tot\epsilon
=2\tot b+2\tot z+\tot\epsilon=2\tot b+\fmaj w$. Hence (4.2)
holds.

Next, prove that $(b,w)\mapsto c$ is bijective. As both
sequences $b$ and~$z$ are nonincreasing, $a=b+z$ is also
nonincreasing. If $x_k>x_{k+1}$, then
$z_k=z_{k+1}+1$ and $a_k\ge a_{k+1}+1$, then
$c'_k=2a_k+\epsilon_k\ge 2a_{k+1}+2+\epsilon_k
\ge 2a_{k+1}+2>2a_{k+1}+\epsilon_{k+1}=c'_{k+1}$.
Thus,
$$
x_k>x_{k+1}\Rightarrow
c'_k>c'_{k+1}.\leqno(4.7)
$$

To construct the reverse bijection we proceed as follows. Start
with a sequence $c=c_1c_2\ldots c_n$; form the word
$\delta=\delta_1\delta_2\ldots \delta_n$, where
$\delta_i:=\chi(c_i\ {\rm even})-\chi(c_i\ {\rm odd})$ $(1\le
i\le n)$ and the two-row matrix
$$
\left(\matrice{c_1&c_2&\ldots&c_n\cr
1\delta_1&2\delta_2&\ldots&n\delta_n\cr}\right).
$$
Rearrange the columns in such a way that
$c_i\choose i$ occurs to the left of $c_j\choose j$,
if either $c_i>c_j$, or $c_i=c_j$, $i<j$.  The bottom of the new
matrix is a {\it signed}
permutation~$ w$. 
After those two transformations the new matrix reads
$$
{c'\choose w}=\left(\matrice{c'_1&c'_2&\ldots&c'_n\cr
x_1&x_2&\ldots&x_n\cr}\right).
$$

The sequences $\epsilon$ and $z$ are defined as above, as well as
the sequence $a:=(c'-\epsilon)/2$. As the
sequence~$c'$ is nonincreasing, the inequality
$c'_k-\epsilon_k\ge c'_{k+1}-\epsilon_{k+1}$
holds if $\epsilon_k=0$ or if $\epsilon_k=\epsilon_{k+1}=1$.
It also holds when $\epsilon_k=1$ and $\epsilon_{k+1}=0$,
because in such a case
$c'_k$ is odd and
$c'_{k+1}$ even and then $c'_k\ge 1+c'_{k+1}$.  Hence, $a$ is also
nonincreasing.

Finally, define  $b:=a-z$. Because of (4.7) we have
$z_k=z_{k+1}+1\Rightarrow c'_k>c'_{k+1}$.
If $c'_k$ and  $c'_{k+1}$ are of the same
parity, then $c'_k>c'_{k+1}\Rightarrow
a_k>a_{k+1}$. If $c'_k>c'_{k+1}$ holds and
the two terms are of different parity, then
$c'_k$ is even and $c'_{k+1}$ odd. Hence,
$a_k=c'_k/2>(c'_{k+1}-\epsilon_{k+1})/2
=a_{k+1}$. Thus 
$z_k=z_{k+1}+1\Rightarrow a_k>a_{k+1}$. As $z_n=0$, we
conclude by a decreasing induction that
$b_k=a_k-z_k\ge a_{k+1}-z_{k+1}=b_{k+1}$, so that~$b$ is a
nonincreasing sequence of nonnegative integers.

\medskip
There remains to prove (4.3). First, the letter~$c_j$ of~$c$ is
odd, if and only if~$j$ occurs with the minus sign in~$w$, so
that ${\rm neg}\,w=\odd c$.
Next, suppose that $x_j$ is a positive lower record of
$w=x_1x_2\ldots x_n$. {}For $j<i$ we have $x_j<|x_i|$. Hence,
the following implications hold: 
$|x_i|<x_j\Rightarrow i<j
\Rightarrow c'_i\ge c'_j\Rightarrow c_{|x_j|}\le c_{|x_i|}$ and
$c_{x_i}$ is an even lower record of~$c$. If $x_j$ is a negative
lower record of~$w$, then $j<i\Rightarrow -x_j<|x_i|$, so that
$|x_i|<-x_j\Rightarrow i<j\Rightarrow c'_i>c'_j
\Rightarrow c_{|x_j|}< c_{|x_i|}$ and $c_{|x_i|}$ is an odd
lower record of~$c$.\cqfd

\goodbreak

\bigskip
\centerline{\bf 5. The Insertion Method}
\medskip
Another method for proving
identity (4.1) is to make use of the insertion method.
Each signed permutation
$w' =x'_1\ldots x'_{n-1}$ of order $(n-1)$
gives rise to~$2n$ signed permutations of order~$n$ when~$n$
or $-n$ is inserted to the left or to the right~$w'$, or
between two letters of~$w'$. Assuming that~$w'$ has a flag descent
number equal to $\fdes w'=k$, our duty is then to watch how
the statistics ``fmaj", ``lowerp", ``lowern", ``neg" are modified after
the insertion of $n$ or $-n$ into the possible~$n$ slots. Such a
method has already been used by
Adin et al. [ABR01], Chow and Gessel [ChGe04], Haglund et al.
[HLR04], for ``fmaj" only. They all have observed that
for each $j=0,1,\ldots, 2n-1$ there is one and only one signed
permutation of order~$n$ derived by the insertion of~$n$ or~$-n$
whose flag-major index is increased by~$j$.

In our case we observe that the number of positive (resp. negative)
lower records remains alike, except when~$n$ (resp. $-n$)
is inserted to the right of~$w'$, where it increases by~1. The
number of negative letters increases only when $-n$ is inserted.
For controlling ``fdes" we make a distinction between the signed
permutations having an even flag descent number and those having
an odd one. For the former ones the first letter is positive.
When~$n$ (resp. $-n$) is inserted to the left of~$w'$, the flag
descent number increases by~2 (resp. by~1). For the latter ones the
first letter is negative. When~$n$ (resp. $-n$) is inserted to the
left of~$w'$, the flag descent number increases by~1 (resp. remains
invariant).  
\goodbreak

For $n\ge 2$, $0\le k\le 2n-1$ let
$$
{}^{\fmaj\kern-2pt}B_{n,k}
:=\sum_{w\in B_n,\,\fdes w=k} q^{\fmaj w}
X^{\lowerp w} Y^{\lowern w}Z^{{\rm neg}\,w},
$$ 
and ${}^{\fmaj\kern-2pt}B_{0,0}:=1$,
${}^{\fmaj\kern-2pt}B_{0,k}:=0$ when
$k\not=0$; ${}^{\fmaj\kern-2pt}B_{1,0}=X$,
${}^{\fmaj\kern-2pt}B_{1,1}=qYZ$. Making use of the observations
above we easily see that the polynomials
${}^{\fmaj\kern-2pt}B_{n,k}$ satisfy the same recurrence relation,
displayed in (3.4), as the $B_{n,k}(q,Y,Y,Z)$.

\rem Remark|How to compare the MacMahon Verfahren and the
insertion method? Recurrence relations may be difficult to be truly
verified. The first procedure has the advantage of giving both a new
identity on ordinary words (Theorem~2.1) and a closed expression
for the factorial generating function for the polynomials
${}^{\fmaj\kern-2pt}B_n(t,q,X,Y,Z)$ (formula (1.8)).

\bigskip
\centerline{\bf 6. Specializations}

\medskip
When a variable has been deleted in the following
specializations of the polynomials $B_n(t,q,X,Y,Z)$, this
means that the variable has been given the value~1. For
instance, $B_n(q,X,Y,Z):=B_n(1,q,X,Y,Z)$.

When $s$ tends to infinity, then $H_s(u)$ tends to
$H_\infty(u)$ given in (1.1).
Hence, when identity (3.1) is multiplied by $(1-t)$ and~$t$ is
replaced by~1, identity (3.1) specializes into
$$
\sum_{n\ge 0}B_n(q,X,Y,Z){u^n\over (q^2;q^2)_n}\!=\!H_\infty(u)
\!=\!{\displaystyle\Bigl(uq\Bigl({Z+q\over
1-q^2}-ZY\Bigr);q^2\Bigr)_\infty
\over \displaystyle\Bigl(u{\Bigl({q(Z+q)\over
1-q^2}+X\Bigr)};q^2\Bigr)_\infty}.
\leqno(6.1)
$$
Now expand $H_\infty(u)$ by means of the $q$-binomial theorem
[GaRa90,~chap.\kern 1pt1]. We get:
$$
H_\infty(u)=\sum_{n\ge 0}
\Biggl({\displaystyle q\Bigl({Z+q\over 1-q^2}-YZ\Bigr)
\over
\displaystyle {q(Z+q)\over 1-q^2}+X}
;q^2\Biggr)_{\kern-3pt n}
\Bigl(u\Bigl({q(Z+q)\over
1-q^2}+X\Bigr)\Bigr)^n
\kern-3pt\Bigm/\kern-3pt
(q^2;q^2)_n.
$$
By identification
$$\displaylines{\noalign{\vskip-12 pt}
B_n(q,X,Y,Z)
=\Biggl({\displaystyle q\Bigl({Z+q\over 1-q^2}-YZ\Bigr)
\over
\displaystyle {q(Z+q)\over 1-q^2}+X}
;q^2\Biggr)_{\kern-3pt n}
\Bigl({q(Z+q)\over
1-q^2}+X\Bigr)^n,\cr
\noalign{\hbox{which can also be written as}}
(6.2)\quad B_n(q,X,Y,Z)
=(X+qZ+q^2+q^3Z+\cdots+q^{2n-2}+YZq^{2n-1})\hfill
\cr
\hfill{}\cdots \times(X+qZ+q^2+q^3Z+q^4+q^5YZ)
(X+qZ+q^2+q^3YZ)(X+qYZ),\cr
\noalign{\hbox{or, by induction,}}
(6.3)\quad
B_n(q,X,Y,Z)
=(X+qZ+q^2+q^3Z+\cdots+q^{2n-2}+YZq^{2n-1})B_{n-1}(q,X,Y,Z)\cr
\hbox{for $n\ge 2$ and\quad}B_1(q,X,Y,Z)=X+qYZ.\hfill
\cr }
$$
\goodbreak
In particular, the polynomial ${}^{\fmaj\kern-2pt}B_n(q,X,Y)$
defined in the introduction is equal to
$$\displaylines{(6.4)\quad
B_n(q,X,Y)=(X+q+q^2+q^3+\cdots+q^{2n-2}+Yq^{2n-1})\hfill
\cr
\hfill{}\cdots \times(X+q+q^2+q^3+q^4+q^5Y)
(X+q+q^2+q^3Y)(X+qY).\cr}
$$
Finally, when $X=Y=Z:=1$, identity (6.4) reads
$$
\sum_{n\ge 0}(1+t)B_n(t,q){u^n\over
(t^2;q^2)_{n+1}}=\sum_{s\ge 0}t^{s}{1\over
1-u(1+q+q^2+\cdots+q^{s})},
\leqno(6.5)
$$
an identity derived by several authors (Adin et al. [ABR01], Chow
\& Gessel [ChGe04], Haglund et al. [HLR04]) with {\it ad hoc}
methods. Also~notice that for $X=Y=Z:=1$ formula (6.2) yields
$B_n(q)=(q^2;q^2)_n/(1-q)^n$.

\medskip
{}For $Z=0$ we get
$$
{}^{\fmaj\kern-2pt}B_n(t,q,X,Y,0)
=\sum_{w\in {\goth S}_n}
t^{\fdes w}q^{\fmaj w}X^{\lowerp w},
$$
since the monomials corresponding to signed permutations having
negative letters vanish. The summation is then over the {\it
ordinary permutations}. Also notice that
${}^{\fmaj\kern-2pt}B_n(t,q,X,Y,0)
={}^{\fmaj\kern-2pt}B_n(t,q,X,0,0)$. Moreover, for each ordinary
permutation~$w$ we have: $\fdes w=2\des w$ and
$\fmaj w=2\maj w$. When $Y=Z=0$ we also have
$$\displaylines{\noalign{\vskip-5pt}
H_{2+1}(u)=H_{2s}(u)=
{\displaystyle\Bigl({uq^2\over 1-q^2+uq^{2(s+1)}};q^2\Bigr)_{s+1}
\over \displaystyle \Bigl({u{X(1-q^2)+q^2\over
1-q^2+uq^{2(s+1)}}};q^2\Bigr)_{s+1}}\cr
\noalign{\hbox{and}}
\sum_{n\ge 0} (1+t)\;{}^{\fmaj\kern-2pt}B_n(t,q,X,0,0){u^n\over
(t^2;q^2)_{n+1}}=\sum_{s\ge 0}(t^{2s}+t^{2s+1})H_{2s}(u).\cr}
$$
With $A_n(t,q,X):={}^{\fmaj\kern-2pt}B_n(t^{1/2},q^{1/2},X,0,0)
=\smash{\sum\limits_{w\in {\goth S}_n}}
t^{\des w}q^{\maj w}X^{\lowerp w}$ we obtain the identity
$$
\sum_{n\ge 0}A_n(t,q,X){u^n\over (t;q)_{n+1}}
=\sum_{s\ge 0} t^s
{{\displaystyle\Bigl({uq\over 1-q+uq^{s+1}};q\Bigr)_{s+1}}
\over \displaystyle \Bigl({u{X(1-q)+q\over
1-q+uq^{s+1}}};q\Bigr)_{s+1}},\leqno(6.7)
$$
apparently a new identity for the generating function for the
symmetric groups~${\goth S}_n$ by the three-variable statistic
$(\des,\maj,\lowerp)$, as well as the following one obtained by
multiplying the identity by $(1-t)$ and
letting $t$ go to infinity:
$$
\sum_{n\ge 0}A_n(q,X){u^n\over (q;q)_n}
={\displaystyle\Bigl({uq\over 1-q};q\Bigr)_\infty
\over \displaystyle\Bigl({uX+{uq\over 1-q}};q\Bigr)_\infty}.
\leqno(6.8)
$$

\medskip
\centerline{\bf 7. Lower Records and Flag-inversion Number}

\nobreak
\medskip
The purpose of this section is prove Theorem~1.2. We proceed as
follows. For each (ordinary) permutation
$\sigma=\sigma_1\sigma_2\ldots \sigma_n$ of order~$n$ and
for each $i=1,2,\ldots,n$ let
$b_i(\sigma)$ denote the number of letters~$\sigma_j$ {\it to the
left of} $\sigma_i$ such that $\sigma_j<\sigma_i$.
On the other hand, for each {\it signed} permutation
$w=x_1x_2\ldots x_n$ of order~$n$ let $\abs w$ denote the
(ordinary) permutation
$\left|x_1\right|\left|x_2\right|\ldots \left|x_n\right|$.
It is straightforward to see that another expression for the
flag-inversion number (or the length function), $\finv w$, of~$w$ is
the following
$$
\finv w=\inv \abs w+\sum_{1\le i\le n}(2b_i(\abs w)+1)
\chi(x_i<0).\leqno(7.1)
$$
The generating polynomial ${}^{\finv\kern-2pt}B_n(q,X,Y)$ can be
derived as follows. Let $\Lower\sigma$ denote the set of the
(necessarily positive) records of the ordinary
permutation~$\sigma$. By (7.1) we have
$$
\leqalignno{{}^{\finv\kern-2pt}B_n(q,X,Y,Z)
&=\kern-6pt\sum_{w\in B_n}
q^{\finv w}X^{\lowerp w}Y^{\lowern w}Z^{{\rm neg}\,w}\cr
&=\kern-6pt\sum_{\sigma\in {\goth S}_n}\sum_{\abs w=\sigma}
q^{\finv w}X^{\lowerp w}Y^{\lowern w}Z^{{\rm neg}\,w}\cr
&=\kern-6pt\sum_{\sigma\in {\goth S}_n}q^{\inv
\sigma}\kern-10pt
\prod_{\sigma_i\in \Lower
\sigma}\kern-10pt(X+YZq^{2b_i(\sigma)+1})\kern-15pt
\prod_{\sigma_i\not\in \Lower
\sigma}\kern-10pt(1+Zq^{2b_i(\sigma)+1})\cr
&:=\kern-6pt\sum_{\sigma\in {\goth S}_n}f(\sigma),
}
$$
showing that ${}^{\finv\kern-2pt}B_n(q,X,Y,Z)$ is simply a
generating polynomial for the group~${\goth S}_n$ itself.

But ${\goth S}_n$ can be generated from~${\goth S}_{n-1}$
by inserting the letter~$n$ into the possible~$n$ slots of each
permutation of order~$n-1$. Let
$\sigma'=\sigma'_1\sigma'_2\ldots\sigma'_{n-1}$ be such a
permutation. Then
$$\leqalignno{
f(\sigma'_1\sigma'_2\ldots\sigma'_{n-2}\sigma'_{n-1}n)
&=f(\sigma')(X+YZq^{2n-1});\cr
f(\sigma'_1\sigma'_2\ldots\sigma'_{n-2}
n\sigma'_{n-1})&=f(\sigma')q(1+Zq^{2n-3});\cr
\cdots\quad&\qquad\cdots\cr
f(\sigma'_1n\sigma'_2\ldots\sigma'_{n-2}
\sigma'_{n-1})&=f(\sigma')q^{n-2}(1+Zq^{3});\cr
f(n\sigma'_1\sigma'_2\ldots\sigma'_{n-2}
\sigma'_{n-1})&=f(\sigma')q^{n-1}(1+Zq).\cr
}
$$
Hence, ${}^{\finv\kern-2pt}B_n(q,X,Y,Z)
={}^{\finv\kern-2pt}B_{n-1}(q,X,Y,Z)
(X+q+\cdots+q^{n-1}+q^nZ+\cdots+q^{2n-2}Z+q^{2n-1}YZ)$
($n\ge 2$). As
${}^{\finv\kern-2pt}B_1(q,X,Y,Z)=X+qYZ$, we get
the expression displayed in (1.9).\cqfd

\medskip
Comparing (6.2) with (1.9) we see that the two polynomials
${}^{\finv\kern-2pt}B_n(q,Z)$ and $B_n(q,Z)$ are
different as soon as $n\ge 2$, while
${}^{\finv\kern-2pt}B_n(q,X,Y)=B_n(q,X,Y)$ for all~$n$.
This means that any bijection~$\Psi$ of the group~$B_n$
onto itself having the property that
$$
\fmaj w=\finv \Psi(w)
$$
does not leave the number of negative letters ``neg" invariant.
It was, in particular, the case for the bijection constructed
in our previous paper [FoHa05].
\goodbreak

\rem Remark $1$|Instead of considering lower records from right to
left we can introduce lower records {\it from left to right}. Let
$\lowerp' w$ and $\lowern' w$ denote the numbers of such records,
positive and negative, respectively and introduce
$$
{}^{\finv\kern-2pt}B_n(q,X,Y,X',Y')\!\!:=\kern-4pt
\sum_{w\in B_n}\kern-4ptq^{\finv w}X^{\lowerp w}Y^{\lowern w}
X'^{\lowerp' w}Y'^{\lowern' w}.$$
Using the method developed in the proof of the
previous theorem we can calculate this polynomial in the form
$$\displaylines{
{}^{\finv\kern-2pt}B_n(q,X,Y,X',Y')\hfill\cr
{}
\quad{}=(X+q+\cdots+q^{n-2}+q^{n-1}X'+q^nY'+q^{n+1}+\cdots+q^{2n-2}+q^{2n-1}Y)
\hfill
\cr
\hfill{}\cdots \times(X+q+q^2X'+q^3Y'+q^4+q^5Y)
(X+qX'+q^2Y'+q^3Y)(XX'+qYY').\cr
}
$$

\rem Remark $2$|The same method may be used for ordinary
permutations. For each permutation~$\sigma$ let $\upper\sigma$
denote the number of its {\it upper} records {\it from right to
left} and define:
$$\displaylines{
{}^{\inv\kern-3pt}A_n(q,X,V):=
\sum_{\sigma\in {\goth S}_n}q^{\inv \sigma}
X^{\lowerp\sigma}V^{\upper\sigma}.\cr
\noalign{\vskip-8pt}
\noalign{\hbox{Then}}
{}^{\inv\kern-3pt}A_n(q,X,V)=XV(X+qV)(X+q+q^2V)\cdots
(X+q+q^2+\cdots +q^{n-1}V),\cr
\noalign{\hbox{an identity which can be put into the form}}
(7.2)\quad \sum_{n\ge 0}{}^{\inv\kern-3pt}A_n(q,X,V){u^n\over
(q;q)_n}
=1-{XV\over X+V-1}+{XV\over X+V-1}
{\displaystyle\Bigl({u\over 1-q}-ux;q\Bigr)_\infty
\over \displaystyle\Bigl({uX+{uq\over
1-q}};q\Bigr)_\infty},\quad\cr
\noalign{\hbox{which specializes into}}
(7.3)\qquad
\sum_{n\ge 0}{}^{\inv\kern-3pt}A_n(q,X){u^n\over (q;q)_n}
={\displaystyle\Bigl({uq\over 1-q};q\Bigr)_\infty
\over \displaystyle\Bigl({uX+{uq\over 1-q}};q\Bigr)_\infty};\hfill\cr
(7.4)\qquad\sum_{n\ge 0}{}^{\inv\kern-3pt}A_n(q,V){u^n\over
(q;q)_n} ={\displaystyle\Bigl({u\over 1-q}-uV;q\Bigr)_\infty
\over \displaystyle\Bigl({{u\over 1-q}};q\Bigr)_\infty}.\hfill\cr
}
$$
Comparing (7.3) with (6.8) we then see that
$A_n(q,X)={}^{\inv\kern-3pt}A_n(q,X)$. In other words, the
generating polynomial for~${\goth S}_n$ by
$(\maj,\lowerp)$ is the same as the generating polynomial by
$(\inv,\lowerp)$. A combinatorial proof of this result is due to
Bj\"orner and Wachs [BjW88], who have made use of the
transformation constructed in [Fo68].
Finally, the expression of ${}^{\inv\kern-3pt}A_n(q,X,V)$ for $q=1$ was derived
by David and Barton ([DaBa62], chap.~10).

\bigskip
{\bf Acknowledgements}. The authors should like to thank the referee for
his careful reading and his knowledgeable remarks.
%\vfill\eject

%\goodbreak
\bigskip\bigskip
\centerline{\bf References}
\medskip
{\eightpoint


\article AR01|Ron M. Adin and Yuval Roichman|The flag major index
and group actions on polynomial rings|Europ. J.
Combin.|22|2001|431--446|

\article ABR01|Ron M. Adin, Francesco Brenti and Yuval Roichman|Descent
Numbers and Major Indices for the Hyperoctahedral
Group|Adv. in Appl. Math.|27|2001|210--224|

\article BjW88|Anders Bj\"orner and
Michelle L. Wachs|Permutation Statistics and Linear
Extensions of Posets|J. Combin. Theory, Ser.~A|58|1991|85--114|

\livre Bo68|N. Bourbaki|Groupes et alg\`ebres de Lie, chap.~4, 5,
6|Hermann, Paris, {\oldstyle 1968}|

\divers ChGe04|Chak-On Chow and Ira M. Gessel|On the Descent
Numbers and Major Indices for the Hyperoctahedral Group,
Manuscript, 18~p., {\oldstyle 2004}|

\livre DaBa62|F. N. David and D. E. Barton|Combinatorial
Chance|London, Charles Griffin, {\oldstyle 1962}|

\article Fo68|Dominique Foata|On the Netto inversion of a
sequence|Proc. Amer. Math. Soc.|19|1968|236--240|
\divers FoHa05|Dominique Foata and Guo-Niu Han|Signed Words and
Permutations, I; a Fundamental Transformation, {\oldstyle 2005}|

\livre GaRa90|George Gasper and
Mizan Rahman|Basic Hypergeometric Series|London,
Cambridge Univ. Press, {\oldstyle 1990}  ({\sl Encyclopedia of
Math. and Its Appl.}, {\bf 35})|

\divers HLR04|J. Haglund, N. Loehr and J. B. Remmel|Statistics on
Wreath Products, Perfect Matchings and Signed Words, Manuscript,
49~p., {\oldstyle 2004}|

\livre Hu90|James E. Humphreys|Reflection Groups and Coxeter
Groups|Cambridge Univ. Press, Cambridge (Cambridge Studies in
Adv. Math., {\bf 29}), {\oldstyle 1990}|




\article Re93a|V. Reiner|Signed permutation statistics|Europ. J.
Combinatorics|14|1993|553--567|

\article Re93b|V. Reiner|Signed permutation statistics and cycle
type|Europ. J. Combinatorics|14|1993|569--579|

\article Re93c|V. Reiner|Upper binomial posets and signed
permutation statistics|Europ. J.
Combinatorics|14|1993|581--588|

\article Re95a|V. Reiner|Descents and one-dimensional characters for
classical Weyl groups|Discrete Math.|140|1995|129--140|

\divers Re95b|V. Reiner|The distribution of descents and length
in a Coxeter group, {\sl Electronic J. Combinatorics}, vol.~{\bf 2},
{\oldstyle 1995}, \# R25|

\divers St72|Richard P. Stanley|{\sl Ordered structures and partitions}.
Mem. Amer. Math. Soc. no. 119, Amer. Math. Soc., Providence, {\oldstyle
1972}| 



}


\bigskip\bigskip


\bye


