{u,X\subseteq R(u)}\\
        \forall v\neq w\in X,\  v{\cancel S}w
    \end{smallmatrix}} |X|$.

For each $v\in T(u)$, we can find a word $v'\in f^{-1}(v)$ (for instance the minimum word in the lexicographic order). Let $X$ be the set of these words, we have by construction $|X|=|T(u)|$. Moreover, for each pair of distinct words $v',w'\in X$, we have $f(v')\neq f(w')$ and thus in particular $v' {{\cancel S}} w'$. Thus we have shown $|T(u)|\leq\max_{\begin{smallmatrix} 
        {u,X\subseteq R(u)}\\
        \forall v\neq w\in X,\  v{\cancel S}w
    \end{smallmatrix}} |X|$.

Hence the index of $S$ with respect to $R$ is equal to the valuedness of $T$. Since finite valuedness can be decided in [<span style="font-variant:small-caps;">PTime</span>]{}[@Weber89 Thm. 3.1], then one can decide if $S$ has finite index with respect to $R$, also in [<span style="font-variant:small-caps;">PTime</span>]{}.

\[cor:dec-finite-index\] Let $R\in {{\bf RatEq}\xspace}^{{lp}}$, one can decide if its syntactic congruence $S_R$ has finite index with respect to it.

From Prop. \[prop:comp-synt\] we can compute a transducer realizing $S_R$. According to [@Johnson85 Thm. 5.1], we can even compute a transducer realizing a function whose kernel is $S_R$. Hence from Prop. \[prop:dec-fin-index\] we can decide the finiteness of the index of $S_R$ with respect to $R$.

Prefix closure {#subsec:pref-close}
--------------

Here we consider a second necessary condition of relations in ${{\bf KerSeq }\xspace}^{{ll}}$, namely that they are prefix-closed.

The *prefix closure* of a relation $R$ is the relation $P_R$ defined by $uP
{ u, X\subseteq R(u)}\\ 
         \forall v\neq w\in X,\   v{\cancel S}w 
     \end{smallmatrix } } |X|$. 

 For each $ v\in T(u)$, we can find a word $ v'\in f^{-1}(v)$ (for instance the minimum parole in the lexicographic decree). Let $ X$ be the set of these words, we own by construction $ |X|=|T(u)|$. Moreover, for each couple of distinct words $ v',w'\in X$, we have $ f(v')\neq f(w')$ and therefore in especial $ v' { { \cancel S } } w'$. therefore we have shown $ |T(u)|\leq\max_{\begin{smallmatrix } 
         { u, X\subseteq R(u)}\\ 
         \forall v\neq w\in X,\   v{\cancel S}w 
     \end{smallmatrix } } |X|$. 

 Hence the index of $ S$ with regard to $ R$ is equal to the valuedness of $ T$. Since finite valuedness can be decide in [ < span style="font - variant: small - caps;">PTime</span>]{}[@Weber89 Thm.   3.1 ], then one can decide if $ S$ accept finite index with respect to $ R$, besides in [ < span style="font - variant: small - caps;">PTime</span > ] { }. 

 \[cor: dec - finite - index\ ] permit $ R\in { { \bf RatEq}\xspace}^{{lp}}$, one can decide if its syntactic congruence $ S_R$ has finite exponent with respect to it. 

 From Prop.   \[prop: comprehensive examination - synt\ ] we can compute a transducer realizing $ S_R$. According to [ @Johnson85 Thm.   5.1 ], we can even compute a transducer understand a function whose kernel is $ S_R$. Hence from Prop.   \[prop: dec - fin - index\ ] we can decide the finiteness of the index of $ S_R$ with respect to $ R$. 

 Prefix closure { # subsec: pref - cheeseparing } 
 -------------- 

 Here we consider a second necessary condition of relations in $ { { \bf KerSeq } \xspace}^{{ll}}$, namely that they are prefix - closed. 

 The * prefix closure * of a relation $ R$ is the relation $ P_R$ defined by $ uP
{u,X\skbseteq R(u)}\\
        \forall v\neq w\in X,\  v{\ccbcel S}x
    \ens{smallmagrix}} |X|$.

For each $v\in T(u)$, we can fund a word $v'\in f^{-1}(v)$ (for instavce the mpnimum woed ii the lexicograpijc ordev). Let $W$ be chx set of these eords, we hdve by construwtkou $|X|=|T(u)|$. Moreover, for each pair of distynct wotdd $v',w'\in X$, we hade $f(n')\nqq f(s')$ and thus in particular $v' {{\cancel A}} w'$. Thuv we have shoen $|T(u)|\leq\max_{\begin{smallmatrid} 
        {u,X\subseteq R(k)}\\
        \fotzll c\neq w\in X,\  x{\cancel S}w
    \end{smalljatrix}} |X|$.

Hence the index of $S$ wigh rexpect to $R$ iw eeoal to the veluednvss of $T$. Sincc finita valuecness can be dccidev in [<span style="font-varianv:small-caps;">PTime</span>]{}[@Wgber89 Thm. 3.1], tveu one can decide if $S$ hqs fitite inddz wkth rxspsct to $R$, elso in [<spah style="font-cariant:small-caps;">PTike</fisn>]{}.

\[cor:dec-finife-indev\] Jet $R\in {{\bf RatEq}\xspace}^{{lp}}$, one can decide if its syntactic congruenxe $S_R$ has finite inded with refpect to it.

From Prop. \[prop:comp-synt\] we can compute a tranaauctr realkzijg $S_R$. According to [@Johnson85 Thm. 5.1], we can even coiluue s transducer rcalizing a functiom ahpfe kernel is $R_R$. Henes rrom Prop. \[prop:dec-fij-index\] re cab decide uhe foniteness of the index of $S_E$ with respebt ti $R$.

Prefix closure {#dubsec:pref-cuose}
--------------

Nere ee consider a second neeessarg condition of relatjuns in ${{\bf KerSeq }\xsiace}^{{nl}}$, namely that they are prqfix-closev.

The *'refix cuosute* of a relation $G$ is bve relation $P_R$ deflned yy $uP
{u,X\subseteq R(u)}\\ \forall v\neq w\in X,\ v{\cancel |X|$. each $v\in we can find instance minimum word in lexicographic order). Let be the set of these words, have by construction $|X|=|T(u)|$. Moreover, for each pair of distinct words $v',w'\in X$, have $f(v')\neq f(w')$ and thus in particular $v' {{\cancel S}} w'$. Thus we shown {u,X\subseteq \forall w\in X,\ v{\cancel S}w \end{smallmatrix}} |X|$. Hence the index of $S$ with respect to $R$ is to the valuedness of $T$. Since finite valuedness be decided in [<span Thm. 3.1], then one can if has finite with to also in [<span \[cor:dec-finite-index\] Let $R\in {{\bf RatEq}\xspace}^{{lp}}$, one can decide if its syntactic congruence $S_R$ has finite index with to it. \[prop:comp-synt\] we compute transducer $S_R$. According to 5.1], we can even compute a function whose kernel is $S_R$. Hence from Prop. we can the finiteness of the index of with respect to $R$. Prefix closure {#subsec:pref-close} -------------- we consider a second necessary condition of relations in ${{\bf KerSeq }\xspace}^{{ll}}$, namely that they The *prefix closure* of relation $R$ is relation defined $uP
{u,X\subseteq R(u)}\\
        \forall v\neq w\in x,\  v{\cancel S}w
    \End{smAllMatRiX}} |X|$.

FoR eacH $v\in T(u)$, we can finD A worD $v'\in f^{-1}(v)$ (for instance the miNimum WoRD in tHE lExicoGraphic ORdER). let $x$ bE tHe sEt OF tHese wOrdS, we have By construcTioN $|X|=|t(u)|$. Moreover, foR EaCh pair of diStiNct words $v',w'\in x$, we Have $f(v')\NeQ f(w')$ ANd thuS in PartiCular $v' {{\CAncel S}} W'$. Thus we haVe SHown $|T(u)|\LEq\max_{\beGIN{sMallMatrix} 
        {u,X\subseteq R(U)}\\
        \FoRAll v\neq w\in X,\  v{\caNcel S}w
    \EnD{SmALLmaTriX}} |X|$.

Hence the InDex of $s$ With resPEcT TO $r$ is EQual to the valuEdness of $T$. SiNCe fInite vAlUedNEss can Be decIdED in [<Span style="foNt-vaRiant:smalL-caps;">PtIme</span>]{}[@wEber89 Thm. 3.1], Then onE caN deCide IF $S$ HaS fiNiTE inDEx WitH ResPect to $R$, aLsO iN [<span StylE="FONT-varIanT:smaLl-capS;">PTime</span>]{}.

\[cor:Dec-FiniTE-inDex\] LeT $R\in {{\bF Rateq}\XspacE}^{{lp}}$, one Can deCiDe if its syntactiC conGruence $S_R$ Has FiNitE iNdex wITh respEct To iT.

From PrOp. \[prop:cOMp-sYnT\] WE CaN compute a transduceR rEALiZing $S_R$. AcCordinG To [@joHNson85 Thm. 5.1], wE cAn eVen cOMPute a TranSDuCer realiZing a fUNcTiOn whose KeRnel is $s_R$. henCe fRom PrOP. \[proP:dec-fiN-index\] we Can deCIde the finiteneSS of the index of $s_r$ wITH rESpecT to $r$.

Prefix closUre {#sUBsec:Pref-CLoSe}
--------------

HERe we cOnsidEr A SeCOnd necessary conditiOn Of relaTions In ${{\bf KerSeq }\xspAce}^{{ll}}$, namelY THAt they arE preFIx-CLosed.

The *prefix ClosuRe* of a relatIOn $R$ is the RelatIon $P_R$ defIned by $uP
{u,X\subseteq R(u)}\\
       \foral l v\n eqw\i nX,\ v{\ cancel S}w
  \end {smallmatrix}} |X|$.
For e ac h  $v\ i nT(u)$ , we ca n  f i n d a  w or d $ v' \ in  f^{- 1}( v)$ (fo r instance  th eminimum word in  the lexic ogr aphic order) . L et $X$  b e t h e set  of  thes e word s , we h ave by co ns t ructio n  $|X|=| T ( u) |$.Moreover, for eac h  p a ir of distinct  words  $ v ', w ' \in  X$ , we have$f (v')\ n eq f(w' ) $a n d  th u s in particul ar $v' {{\c a nce l S}}w' $.T hus we  have  s h own  $|T(u)|\le q\ma x_{\begin {small m atrix}       {u,X\ sub set eq R ( u) }\ \
   \f ora l l v \neq w\i nX, \  v{ \can c e l S}w   \en d{sma llmatrix}} |X |$. 

He n cethe i ndexof $ S$  with  respe ct to  $ R$ is equal tothevaluednes s o f$T$ .Since finite  va lue dness c an be d e cid ed i n  [ <span style="font- va r i an t:small- caps;" > PT im e </span>] {} [@W eber 8 9  Thm.  3.1 ] ,then one  can d e ci de  if $S$  h as fin it e i nde x wit h  res pect t o $R$, a lso i n  [<span style= " font-variant: s ma l l -c a ps;" >PT ime</span>] {}.\[co r:de c -f ini t e-ind ex\]Le t  $ R \in {{\bf RatEq}\xs pa ce}^{{ lp}}$ , one can dec ide if its s y ntacticcong r ue n ce $S_R$ has f inite  index wit h  respect  to i t.

From  Prop. \[ p r op:comp- syn t\]  we  ca n co mpute a trans d u cerre alizing  $S _R$. Ac cor din g t o [ @J ohnson85Thm. 5.1 ],  w eca n e ven c o mpute atr ans du cer  real i zing a  func tion  w ho s e k ernel i s  $ S _ R$.He nc e fr omPr op. \ [pro p :de c-fin-i ndex\] we  ca n  dec id ethe fin iteness of th eindex of $ S_ R$with r e s pect to$R$.

Prefix closure {# s ubsec:p ref -clos e}
- --------- --- -

Her e w e  consi der asecon dnec e s saryc o nd iti on  of relati o n s i n ${{ \b f Ke rSeq }\ xspace}^{{ll}}$, n a mel y that they a repref i x -c los e d. 
Th e* pre f i x closure* of a  relation$R $  i s the rela t ion  $ P_R$ de fined b y $uP 
{u,X\subseteq R(u)}\\
_ _   _ \forall_v\neq_w\in X,\__v{\cancel S}w
 _  \end{smallmatrix}}_|X|$.

For each $v\in T(u)$,_we can find_a_word $v'\in f^{-1}(v)$ (for instance the minimum word in the lexicographic order). Let $X$_be_the set_of_these_words, we have by construction_$|X|=|T(u)|$. Moreover, for each pair_of distinct_words $v',w'\in X$, we have $f(v')\neq f(w')$ and_thus_in particular $v'_{{\cancel S}} w'$. Thus we have shown $|T(u)|\leq\max_{\begin{smallmatrix} 
_     _ {u,X\subseteq R(u)}\\
___   _ \forall v\neq w\in X,\ _v{\cancel S}w
    \end{smallmatrix}}_|X|$.

Hence the index of $S$ with respect_to $R$ is equal to the_valuedness of $T$. Since finite_valuedness can_be decided in [<span style="font-variant:small-caps;">PTime</span>]{}[@Weber89_Thm. 3.1], then one_can decide_if $S$ has_finite index with respect to $R$,_also in [<span_style="font-variant:small-caps;">PTime</span>]{}.

\[cor:dec-finite-index\] Let $R\in {{\bf RatEq}\xspace}^{{lp}}$, one_can_decide if its_syntactic_congruence_$S_R$ has_finite index with_respect_to it.

From_Prop. \[prop:comp-synt\]_we can compute a transducer realizing_$S_R$._According to [@Johnson85 Thm. 5.1], we can even_compute a transducer realizing_a_function whose kernel is_$S_R$. Hence from Prop. \[prop:dec-fin-index\] we_can decide the finiteness of the_index of_$S_R$ with_respect to $R$.

Prefix closure {#subsec:pref-close}
--------------

Here we consider a second necessary condition_of relations in ${{\bf KerSeq }\xspace}^{{ll}}$,_namely that they are_prefix-closed.

The *prefix_closure*_of a relation_$R$_is the_relation $P_R$ defined by $uP