YES
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http:/www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Left Termination proof of ../tpdb/LP/terminweb/Size-Change:NJ/NJ1.pl</title>
</head>
<body>
<BR><B>Left Termination</B> of the query pattern
rev_in_2(g, a)
w.r.t. the given <I>Prolog program</I> could successfully be <font color=#00ff00>proven</font>:<BR><BR><BR><BR><pre>&#8627 <B>Prolog</B></pre><pre>  &#8627 UndefinedPredicateHandlerProof</pre><BR>Clauses:<BR><BR>rev(LS, RES)&#160;:-&#160;r1(LS, []).<BR>r1([], RES, RES).<BR>r1(.(X, Xs), Accm, RES)&#160;:-&#160;r1(Xs, .(X, Accm), RES).<BR><BR>Queries:<BR><BR>rev(g,a).<BR><BR>Added facts for all undefined predicates.<BR><BR><pre>&#8627 Prolog</pre><pre>  &#8627 UndefinedPredicateHandlerProof</pre><pre>    &#8627 <B>Prolog</B></pre><pre>      &#8627 PrologToPiTRSProof</pre><BR>Clauses:<BR><BR>rev(LS, RES)&#160;:-&#160;r1(LS, []).<BR>r1([], RES, RES).<BR>r1(.(X, Xs), Accm, RES)&#160;:-&#160;r1(Xs, .(X, Accm), RES).<BR>r1(X0, X1).<BR><BR>Queries:<BR><BR>rev(g,a).<BR><BR>We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
<BR><FONT COLOR=#0000cc>rev_in</font>: (b,f)
<BR>Transforming <I>Prolog</I> into the following <B>Term Rewriting System</B>:
<BR>Pi-finite rewrite system:<BR>The TRS R consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>))
<BR><FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>) &#8594; <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>)
<BR><FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>)) &#8594; <FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>)</BLOCKQUOTE><BR>The argument filtering Pi contains the following mapping:<BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>)<BR>
<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>, <FONT COLOR=#cc0000>x3</font>)&#160; = &#160;<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x3</font>)<BR>
<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)<BR>
<FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_out_gg</font><BR>
<FONT COLOR=#0000cc>[]</font>&#160; = &#160;<FONT COLOR=#0000cc>[]</font><BR>
<FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_out_ga</font><BR>
<BR>
<P><B>Infinitary Constructor Rewriting Termination</B> of PiTRS implies <B>Termination</B> of Prolog<P>
<BR><BR><pre>&#8627 Prolog</pre><pre>  &#8627 UndefinedPredicateHandlerProof</pre><pre>    &#8627 Prolog</pre><pre>      &#8627 PrologToPiTRSProof</pre><pre>        &#8627 <B>PiTRS</B></pre><pre>          &#8627 DependencyPairsProof</pre><BR>Pi-finite rewrite system:<BR>The TRS R consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>))
<BR><FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>) &#8594; <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>)
<BR><FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>)) &#8594; <FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>)</BLOCKQUOTE><BR>The argument filtering Pi contains the following mapping:<BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>)<BR>
<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>, <FONT COLOR=#cc0000>x3</font>)&#160; = &#160;<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x3</font>)<BR>
<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)<BR>
<FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_out_gg</font><BR>
<FONT COLOR=#0000cc>[]</font>&#160; = &#160;<FONT COLOR=#0000cc>[]</font><BR>
<FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_out_ga</font><BR>
<BR><BR>Using Dependency Pairs [1,30] we result in the following initial DP problem:<BR>Pi DP problem:<BR>The TRS P consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>U1_GA</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>))
<BR><FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>R1_IN_GG</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>)</BLOCKQUOTE><BR>The TRS R consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>))
<BR><FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>) &#8594; <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>)
<BR><FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>)) &#8594; <FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>)</BLOCKQUOTE><BR>The argument filtering Pi contains the following mapping:<BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>)<BR>
<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>, <FONT COLOR=#cc0000>x3</font>)&#160; = &#160;<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x3</font>)<BR>
<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)<BR>
<FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_out_gg</font><BR>
<FONT COLOR=#0000cc>[]</font>&#160; = &#160;<FONT COLOR=#0000cc>[]</font><BR>
<FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_out_ga</font><BR>
<FONT COLOR=#0000cc>R1_IN_GG</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>R1_IN_GG</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)<BR>
<FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>x1</font>)<BR>
<FONT COLOR=#0000cc>U1_GA</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>, <FONT COLOR=#cc0000>x3</font>)&#160; = &#160;<FONT COLOR=#0000cc>U1_GA</font>(<FONT COLOR=#cc0000>x3</font>)<BR>
<BR>We have to consider all (P,R,Pi)-chains<BR><BR><pre>&#8627 Prolog</pre><pre>  &#8627 UndefinedPredicateHandlerProof</pre><pre>    &#8627 Prolog</pre><pre>      &#8627 PrologToPiTRSProof</pre><pre>        &#8627 PiTRS</pre><pre>          &#8627 DependencyPairsProof</pre><pre>            &#8627 <B>PiDP</B></pre><pre>              &#8627 DependencyGraphProof</pre><BR>Pi DP problem:<BR>The TRS P consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>U1_GA</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>))
<BR><FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>R1_IN_GG</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>)</BLOCKQUOTE><BR>The TRS R consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>) &#8594; <FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>))
<BR><FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>) &#8594; <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>X0</font>, <FONT COLOR=#cc0000>X1</font>)
<BR><FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>, <FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#0000cc>[]</font>)) &#8594; <FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>LS</font>, <FONT COLOR=#cc0000>RES</font>)</BLOCKQUOTE><BR>The argument filtering Pi contains the following mapping:<BR><FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_in_ga</font>(<FONT COLOR=#cc0000>x1</font>)<BR>
<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>, <FONT COLOR=#cc0000>x3</font>)&#160; = &#160;<FONT COLOR=#0000cc>U1_ga</font>(<FONT COLOR=#cc0000>x3</font>)<BR>
<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_in_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)<BR>
<FONT COLOR=#0000cc>r1_out_gg</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>r1_out_gg</font><BR>
<FONT COLOR=#0000cc>[]</font>&#160; = &#160;<FONT COLOR=#0000cc>[]</font><BR>
<FONT COLOR=#0000cc>rev_out_ga</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>rev_out_ga</font><BR>
<FONT COLOR=#0000cc>R1_IN_GG</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>R1_IN_GG</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)<BR>
<FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>)&#160; = &#160;<FONT COLOR=#0000cc>REV_IN_GA</font>(<FONT COLOR=#cc0000>x1</font>)<BR>
<FONT COLOR=#0000cc>U1_GA</font>(<FONT COLOR=#cc0000>x1</font>, <FONT COLOR=#cc0000>x2</font>, <FONT COLOR=#cc0000>x3</font>)&#160; = &#160;<FONT COLOR=#0000cc>U1_GA</font>(<FONT COLOR=#cc0000>x3</font>)<BR>
<BR>We have to consider all (P,R,Pi)-chains<BR>The approximation of the Dependency Graph [30] contains 0 SCCs with 2 less nodes.<BR><BR></body>

