 such that $\forall L: subterm(L,A_i^1)=\underline{I_p} \Longrightarrow 
subterm(L,A_j^1)=t_p, 1 \leq p \leq n$, then *$replace(LHS,N_i,N_j)$* is obtained by applying $\lbrace \underline{I_1} \setminus t_1, \ldots, \underline{I_n} \setminus t_n\rbrace$ to all constraints in $LHS$. $\hfill \square$

In Example \[example:apply\_cons\], we generated the precondition of the implication, $\underline{M1} > \underline{N}$. To obtain the consequence, $replace(\underline{M1} > \underline{N},N_5,N_9)$ is applied, yielding $\underline{M2} > \underline{N}$. Then, the integer variable of $N_9$, $\underline{M_2}$, is expressed in terms of the integer variables of $N_5$ using $apply\_cons(\underline{M2} > \underline{N},N_5,N_9)=\underline{M_1}+1 > \underline{N}$.

Adding the domains to the pre- and postcondition yields the desired implication: $\exists Dom_N, Dom_{M1} \subset {{\mathbb{Z}}}, \forall N,M1 \in {{\mathbb{Z}}}: M1 > N,~N \in Dom_N,~M1 \in Dom_{M1} \Longrightarrow$\
$~~~~~~~~~M1+1 > N,~N \in Dom_N,~M1+1 \in Dom_M$ $\hfill \square$

Adding these constraints to the class of queries detected by Theorem \[th:analysis1\], yields a class of non-terminating queries.

Proving that the constraints on integers are solvable
-----------------------------------------------------

The previous subsection introduced constraints, implying that all integer conditions in a considered derivation succeed. In this subsection, we introduce a technique to check if these constraints have solutions, using a constraint-based approach. Symbolic coefficients represent values for the integers in the query and domains in the implication, for which the considered path is a loop. After these coefficients are introduced, the implication is transformed into a set of equivalent implications over natural numbers. These implications can then be solved
such that $ \forall L: subterm(L, A_i^1)=\underline{I_p } \Longrightarrow 
 subterm(L, A_j^1)=t_p, 1 \leq p \leq n$, then * $ replace(LHS, N_i, N_j)$ * is obtained by applying $ \lbrace \underline{I_1 } \setminus t_1, \ldots, \underline{I_n } \setminus t_n\rbrace$ to all constraint in $ LHS$. $ \hfill \square$ 

 In Example \[example: apply\_cons\ ], we generate the precondition of the implication, $ \underline{M1 } > \underline{N}$. To obtain the consequence, $ replace(\underline{M1 } > \underline{N},N_5,N_9)$ is apply, yielding $ \underline{M2 } > \underline{N}$. Then, the integer variable of $ N_9 $, $ \underline{M_2}$, is express in term of the integer variable of $ N_5 $ using $ apply\_cons(\underline{M2 } > \underline{N},N_5,N_9)=\underline{M_1}+1 > \underline{N}$. 

 Adding the world to the pre- and postcondition yields the desired significance: $ \exists Dom_N, Dom_{M1 } \subset { { \mathbb{Z } } }, \forall N, M1 \in { { \mathbb{Z } } }: M1 > N,~N \in Dom_N,~M1 \in Dom_{M1 } \Longrightarrow$\ 
 $ ~~~~~~~~~M1 + 1 > N,~N \in Dom_N,~M1 + 1 \in Dom_M$ $ \hfill \square$ 

 add these constraints to the course of queries detect by Theorem \[th: analysis1\ ], concede a class of non - terminating queries. 

 Proving that the restraint on integers are solvable 
 ----------------------------------------------------- 

 The previous subsection introduce restraint, implying that all integer condition in a considered derivation succeed. In this subsection, we introduce a technique to control if these constraints have solutions, using a constraint - free-base approach. Symbolic coefficients represent values for the integers in the query and domains in the implication, for which the considered way is a cringle. After these coefficients are introduce, the deduction is transformed into a set of equivalent implications over lifelike numbers. These deduction can then be solved
 sufh that $\forall L: subterm(U,A_i^1)=\underline{I_p} \Longrigitarrow 
subterm(U,A_j^1)=t_p, 1 \leq p \leq n$, then *$replece(LYS,N_i,N_h)$* is obtained by applykng $\lbracv \underlibe{I_1} \wwtminus t_1, \ldots, \underlins{L_n} \secmmnus t_n\rbrace$ tp all consdraints in $LHS$. $\hwipl \square$

In Example \[example:apply\_conf\], we gemegated the precjndiuiog of nht implication, $\underline{M1} > \underlihe{N}$. To mbtain the comsequence, $replace(\underline{L1} > \ujderline{N},N_5,N_9)$ is apppied, yieldibg $\ugeerline{M2} > \unaerline{N}$. Then, the intefer variable of $N_9$, $\underline{M_2}$, is exprzssed in tetma lx the integxr varpables of $N_5$ using $appny\_cons(\umderline{M2} > \undcrlinx{N},N_5,N_9)=\ynderline{M_1}+1 > \underline{I}$.

Adding the domains jo the pre- aud postcondition yieles the gesised knplkcauioi: $\esists Fom_I, Dom_{M1} \subsst {{\mathbb{Z}}}, \dorall N,M1 \in {{\mathbb{E}}}: M1 > N,~N \in Dom_N,~M1 \jn Dom_{I1} \Jongrightarrow$\
$~~~~~~~~~M1+1 > N,~N \in Dom_N,~M1+1 \in Dom_M$ $\hfpll \aquare$

Adding these consrraints to the class lf querief detected by Theorem \[th:analysis1\], yields a class ox non-vefmiuqting wufries.

Proving that the constraints on integers zrt splvable
-----------------------------------------------------

The preyious subsection imtgococed constrainjs, implvjnf that all integer condityons un a consyderrd derivation succeed. In thus subsectiou, ww introduce a techuique to cheek if jhese vonstraints have solutiuns, hsing a condtraint-baadd approach. Symbulib coafficienur represent valuef for the intzgers in the query and domaijs in the implication, fog whieh tha considerfd path is a loop. After these coefficients arg ittrmduced, tke impkication is twansformed intp a set of eduivalent pmplicatimns over naeural numbers. Jhese implicavions can theb be solved
such that $\forall L: subterm(L,A_i^1)=\underline{I_p} \Longrightarrow subterm(L,A_j^1)=t_p, p n$, then is obtained by \ldots, \setminus t_n\rbrace$ to constraints in $LHS$. \square$ In Example \[example:apply\_cons\], we generated precondition of the implication, $\underline{M1} > \underline{N}$. To obtain the consequence, $replace(\underline{M1} > is applied, yielding $\underline{M2} > \underline{N}$. Then, the integer variable of $N_9$, $\underline{M_2}$, expressed terms the variables of $N_5$ using $apply\_cons(\underline{M2} > \underline{N},N_5,N_9)=\underline{M_1}+1 > \underline{N}$. Adding the domains to the pre- and yields the desired implication: $\exists Dom_N, Dom_{M1} \subset \forall N,M1 \in {{\mathbb{Z}}}: > N,~N \in Dom_N,~M1 \in \Longrightarrow$\ > N,~N Dom_N,~M1+1 Dom_M$ \square$ Adding these to the class of queries detected by Theorem \[th:analysis1\], yields a class of non-terminating queries. Proving that constraints on solvable ----------------------------------------------------- previous introduced implying that all in a considered derivation succeed. In introduce a technique to check if these constraints solutions, using constraint-based approach. Symbolic coefficients represent values the integers in the query and domains in implication, for which the considered path is a loop. After these coefficients are introduced, the transformed into a set equivalent implications over numbers. implications then solved
 such that $\forall L: subterm(L,A_i^1)=\Underline{I_P} \LongRigHtaRrOw 
suBterM(L,A_j^1)=t_p, 1 \leq p \leq n$, THen *$rEplace(LHS,N_i,N_j)$* is obtaineD by apPlYIng $\lBRaCe \undErline{I_1} \SEtMINus T_1, \lDoTs, \uNdERlIne{I_n} \SetMinus t_n\Rbrace$ to alL coNsTraints in $LHS$. $\HFiLl \square$

In exaMple \[example:aPplY\_cons\], wE gEneRAted tHe pReconDition OF the imPlication, $\UnDErline{m1} > \UnderliNE{n}$. TO obtAin the consequence, $REpLAce(\underline{M1} > \uNderliNe{n},n_5,N_9)$ IS AppLieD, yielding $\uNdErlinE{m2} > \underlINe{n}$. tHEn, tHE integer variaBle of $N_9$, $\underLIne{m_2}$, is expReSseD In termS of thE iNTegEr variables Of $N_5$ uSing $apply\_Cons(\unDErline{M2} > \UNderlinE{N},N_5,N_9)=\unDerLinE{M_1}+1 > \unDErLiNe{N}$.

adDIng THe DomAIns To the pre- AnD pOstcoNditION YIeldS thE desIred iMplication: $\exiSts dom_N, dOm_{M1} \SubseT {{\mathBb{Z}}}, \fOrAll N,M1 \In {{\mathBb{Z}}}: M1 > N,~n \iN Dom_N,~M1 \in Dom_{M1} \LonGrigHtarrow$\
$~~~~~~~~~M1+1 > N,~n \in doM_N,~M1+1 \In dom_M$ $\hFIll \squAre$

addIng thesE constrAIntS tO THE cLass of queries detecTeD BY THeorem \[th:AnalysIS1\], yIeLDs a class Of Non-TermINAting QuerIEs.

proving tHat the COnStRaints oN iNtegerS aRe sOlvAble
-----------------------------------------------------

THE preVious sUbsectioN intrODuced constrainTS, implying that ALl INTeGEr coNdiTions in a conSideREd deRivaTIoN suCCeed. IN this SuBSeCTion, we introduce a tecHnIque to Check If these constrAints have sOLUTions, usiNg a cONsTRaint-based apprOach. SYmbolic coeFFicients RepreSent valuEs for the iNTEgers in tHe qUerY anD doMAInS in the implicaTIOn, foR wHich the ConSidered PatH is A loOp. AFtEr these coEfficienTs ArE iNtRodUced, tHE implicaTiOn iS tRanSformED into a Set of EquiVaLeNT imPlicatiONs OVEr naTuRaL numBerS. THese iMpliCAtiOns can tHen be solvEd
 such that $\forall L: sub term(L,A_i ^1)=\ und erl in e{I_ p} \ Longrightarrow 
sub term(L,A_j^1)=t_p, 1 \ leq p  \ l eq n $ ,then*$repla c e( L H S,N _i ,N _j) $* is  obta ine d by ap plying $\l bra ce  \underline{ I _1 } \setminu s t _1, \ldots,\un derlin e{ I_n }  \set min us t_ n\rbra c e$ toall const ra i nts in $LHS$.$ \ hf ill\square$

In Exam p le \[example:appl y\_con s\ ] ,w e  ge ner ated the p re condi t ion oft he i m pli c ation, $\unde rline{M1} > \un derlin e{ N}$ .  To ob tainth e  co nsequence,$rep lace(\und erline { M1} > \ u nderlin e{N},N _5, N_9 )$ i s  a pp lie d, yie l di ng$ \un derline{ M2 }> \un derl i n e { N}$.  Th en,the i nteger variab leof $ N _9$ , $\u nderl ine{ M_ 2}$,is exp resse din terms of the  int eger vari abl es  of  $ N_5$u sing $ app ly\ _cons(\ underli n e{M 2} > \u nderline{N},N_5,N_ 9) = \ un derline{ M_1}+1 >\u n derline{ N} $.
Add i n g the  dom a in s to the  pre-a nd  p ostcond it ion yi el dsthe  desi r ed i mplica tion: $\ exist s  Dom_N, Dom_{M 1 } \subset {{\ m at h b b{ Z }}},  \f orall N,M1\in{ {\ma thbb { Z} }}: M1 >N,~N\i n  D o m_N,~M1 \in Dom_{M1 }\Longr ighta rrow$\
$~~~~~ ~~~~M1+1 > N , ~N \in D om_N , ~M 1 +1 \in Dom_M$$\hfi ll \square $ 

Adding  thes e constr aints tot h e classofque rie s d e t ec ted by Theore m \[th :a nalysis 1\] , yield s a  cl ass  of  n on-termin ating qu er ie s. 
Pro vingt hat theco nst ra int s oni nteger s are  sol va bl e 
-- ------- - -- - - ---- -- -- ---- --- -- ----- ---- - --- ------- --

The p rev i oussu bs ectionintroduced co ns traints, i mp lyi ng tha t all inte ger conditions in a con s ideredder ivati on s ucceed. I n t his su bse c tion,we int roduc ea t e c hniqu e to  ch ec k if these c ons train ts  hav e solut ions, using a cons t rai nt-based appr oac h. S y m bo lic co e ffi ci e nts r epresent values  for the i nt e ge rs in theq uer yand dom ains in  thei mplicat ion, forwhich the  c onsi d e red  path is a  loop. A fter thes e  coef f ic ients  ar e intr od uce d, th e impl i cat ion i s tran sf ormedintoaset of e quivalent implicationsover n atura l n umbers. T hes e  im plication s ca n then besol ved 
 such_that $\forall_L: subterm(L,A_i^1)=\underline{I_p} \Longrightarrow 
subterm(L,A_j^1)=t_p,_1 \leq_p_\leq n$,_then_*$replace(LHS,N_i,N_j)$* is obtained_by applying $\lbrace_\underline{I_1} \setminus t_1, \ldots,_\underline{I_n} \setminus t_n\rbrace$_to_all constraints in $LHS$. $\hfill \square$

In Example \[example:apply\_cons\], we generated the precondition of the_implication,_$\underline{M1} >_\underline{N}$._To_obtain the consequence, $replace(\underline{M1} >_\underline{N},N_5,N_9)$ is applied, yielding $\underline{M2}_> \underline{N}$._Then, the integer variable of $N_9$, $\underline{M_2}$, is_expressed_in terms of_the integer variables of $N_5$ using $apply\_cons(\underline{M2} > \underline{N},N_5,N_9)=\underline{M_1}+1_> \underline{N}$.

Adding the domains to the_pre- and postcondition_yields_the_desired implication: $\exists Dom_N,_Dom_{M1} \subset {{\mathbb{Z}}}, \forall N,M1 \in_{{\mathbb{Z}}}: M1 > N,~N \in Dom_N,~M1_\in Dom_{M1} \Longrightarrow$\
$~~~~~~~~~M1+1 > N,~N \in Dom_N,~M1+1_\in Dom_M$ $\hfill \square$

Adding these constraints_to the class of queries_detected by_Theorem \[th:analysis1\], yields a class_of non-terminating queries.

Proving_that the_constraints on integers_are solvable
-----------------------------------------------------

The previous subsection introduced constraints,_implying that all_integer conditions in a considered derivation_succeed._In this subsection,_we_introduce_a technique_to check if_these_constraints have_solutions,_using a constraint-based approach. Symbolic coefficients_represent_values for the integers in the query_and domains in the_implication,_for which the considered_path is a loop. After_these coefficients are introduced, the implication_is transformed_into a_set of equivalent implications over natural numbers. These implications can then_be solved