YES
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http:/www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>H-Termination proof of ../tpdb/FP/full_haskell/List_genericTake_1.hs</title>
</head>
<body>
<BR><B>H-Termination</B> of the given <I>Haskell-Program with start terms</I> could successfully be <font color=#00ff00>proven</font>:<BR><BR><BR><BR><pre>&#8627 <B>HASKELL</B></pre><pre>  &#8627 BR</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>((<FONT COLOR="#000088">List.genericTake</FONT> :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]) :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>])</td>
</tr>
</table>
<br>module List where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified Main<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake</FONT> :: <FONT COLOR="#666600">Integral</FONT> <FONT COLOR="#000088">b</FONT> =&gt; <FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top">0&nbsp;_&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top">_&nbsp;<FONT COLOR="#666600">[]</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;(<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)&nbsp;</td><td valign="top"></td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">&nbsp;|&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">&gt;</FONT>&nbsp;0</td><td valign="top">&nbsp;=&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">genericTake</FONT> (<FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">-</FONT>&nbsp;1) <FONT COLOR="#000088">xs</FONT></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top">_&nbsp;_&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">error</FONT> <FONT COLOR="#666600">[]</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
</table>
<br>module Main where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Maybe where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>Replaced joker patterns by fresh variables and removed binding patterns.<BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 BR</pre><pre>    &#8627 <B>HASKELL</B></pre><pre>      &#8627 COR</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>((<FONT COLOR="#000088">List.genericTake</FONT> :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]) :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>])</td>
</tr>
</table>
<br>module List where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified Main<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake</FONT> :: <FONT COLOR="#666600">Integral</FONT> <FONT COLOR="#000088">a</FONT> =&gt; <FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">b</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">b</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top">0&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vx</FONT>&nbsp;<FONT COLOR="#666600">[]</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;(<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)&nbsp;</td><td valign="top"></td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">&nbsp;|&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">&gt;</FONT>&nbsp;0</td><td valign="top">&nbsp;=&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">genericTake</FONT> (<FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">-</FONT>&nbsp;1) <FONT COLOR="#000088">xs</FONT></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vy</FONT>&nbsp;<FONT COLOR="#000088">vz</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">error</FONT> <FONT COLOR="#666600">[]</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
</table>
<br>module Main where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Maybe where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>Cond Reductions:<BR>The following Function with conditions<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top">0&#160;<font color=#000088>vw</font></td><td valign="top">&#160;=&#160;<font color=#666600>[]</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>vx</font>&#160;<font color=#666600>[]</font></td><td valign="top">&#160;=&#160;<font color=#666600>[]</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>n</font>&#160;(<font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>xs</font>)</td><td valign="top"><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top">&#160;|&#160;</td><td valign="top"><font color=#000088>n</font>&#160;<font color=#000088>></font>&#160;0</td><td valign="bottom"><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top">&#160;=&#160;</td><td valign="top"><font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>genericTake</font>&#160;(<font color=#000088>n</font>&#160;<font color=#000088>-</font>&#160;1)&#160;<font color=#000088>xs</font></td></tr>
</table></td></tr>
</table></td></tr>
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>vy</font>&#160;<font color=#000088>vz</font></td><td valign="top">&#160;=&#160;<font color=#000088>error</font>&#160;<font color=#666600>[]</font></td></tr>
</table></BLOCKQUOTE><BR>is transformed to<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>xy</font>&#160;<font color=#000088>vw</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake5</font>&#160;<font color=#000088>xy</font>&#160;<font color=#000088>vw</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>vx</font>&#160;<font color=#666600>[]</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake3</font>&#160;<font color=#000088>vx</font>&#160;<font color=#666600>[]</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>n</font>&#160;(<font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>xs</font>)</td><td valign="top">&#160;=&#160;<font color=#000088>genericTake2</font>&#160;<font color=#000088>n</font>&#160;(<font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>xs</font>)</td></tr>
<tr><td valign="top"><font color=#000088>genericTake</font>&#160;</td><td valign="top"><font color=#000088>vy</font>&#160;<font color=#000088>vz</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake0</font>&#160;<font color=#000088>vy</font>&#160;<font color=#000088>vz</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake0</font>&#160;</td><td valign="top"><font color=#000088>vy</font>&#160;<font color=#000088>vz</font></td><td valign="top">&#160;=&#160;<font color=#000088>error</font>&#160;<font color=#666600>[]</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake1</font>&#160;</td><td valign="top"><font color=#000088>n</font>&#160;<font color=#000088>x</font>&#160;<font color=#000088>xs</font>&#160;<font color=#666600>True</font></td><td valign="top">&#160;=&#160;<font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>genericTake</font>&#160;(<font color=#000088>n</font>&#160;<font color=#000088>-</font>&#160;1)&#160;<font color=#000088>xs</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake1</font>&#160;</td><td valign="top"><font color=#000088>n</font>&#160;<font color=#000088>x</font>&#160;<font color=#000088>xs</font>&#160;<font color=#666600>False</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake0</font>&#160;<font color=#000088>n</font>&#160;(<font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>xs</font>)</td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake2</font>&#160;</td><td valign="top"><font color=#000088>n</font>&#160;(<font color=#000088>x</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>xs</font>)</td><td valign="top">&#160;=&#160;<font color=#000088>genericTake1</font>&#160;<font color=#000088>n</font>&#160;<font color=#000088>x</font>&#160;<font color=#000088>xs</font>&#160;(<font color=#000088>n</font>&#160;<font color=#000088>></font>&#160;0)</td></tr>
<tr><td valign="top"><font color=#000088>genericTake2</font>&#160;</td><td valign="top"><font color=#000088>wz</font>&#160;<font color=#000088>xu</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake0</font>&#160;<font color=#000088>wz</font>&#160;<font color=#000088>xu</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake3</font>&#160;</td><td valign="top"><font color=#000088>vx</font>&#160;<font color=#666600>[]</font></td><td valign="top">&#160;=&#160;<font color=#666600>[]</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake3</font>&#160;</td><td valign="top"><font color=#000088>xw</font>&#160;<font color=#000088>xx</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake2</font>&#160;<font color=#000088>xw</font>&#160;<font color=#000088>xx</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake4</font>&#160;</td><td valign="top"><font color=#666600>True</font>&#160;<font color=#000088>xy</font>&#160;<font color=#000088>vw</font></td><td valign="top">&#160;=&#160;<font color=#666600>[]</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake4</font>&#160;</td><td valign="top"><font color=#000088>xz</font>&#160;<font color=#000088>yu</font>&#160;<font color=#000088>yv</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake3</font>&#160;<font color=#000088>yu</font>&#160;<font color=#000088>yv</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>genericTake5</font>&#160;</td><td valign="top"><font color=#000088>xy</font>&#160;<font color=#000088>vw</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake4</font>&#160;(<font color=#000088>xy</font>&#160;<font color=#000088>==</font>&#160;0)&#160;<font color=#000088>xy</font>&#160;<font color=#000088>vw</font></td></tr>
<tr><td valign="top"><font color=#000088>genericTake5</font>&#160;</td><td valign="top"><font color=#000088>yw</font>&#160;<font color=#000088>yx</font></td><td valign="top">&#160;=&#160;<font color=#000088>genericTake3</font>&#160;<font color=#000088>yw</font>&#160;<font color=#000088>yx</font></td></tr>
</table></BLOCKQUOTE><BR>The following Function with conditions<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>undefined</font>&#160;</td><td valign="top"></td><td valign="top"><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top">&#160;|&#160;</td><td valign="top"><font color=#666600>False</font></td><td valign="bottom"><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top">&#160;=&#160;</td><td valign="top"><font color=#000088>undefined</font></td></tr>
</table></td></tr>
</table></td></tr>
</table></BLOCKQUOTE><BR>is transformed to<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>undefined</font>&#160;</td><td valign="top"></td><td valign="top">&#160;=&#160;<font color=#000088>undefined1</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>undefined0</font>&#160;</td><td valign="top"><font color=#666600>True</font></td><td valign="top">&#160;=&#160;<font color=#000088>undefined</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>undefined1</font>&#160;</td><td valign="top"></td><td valign="top">&#160;=&#160;<font color=#000088>undefined0</font>&#160;<font color=#666600>False</font></td></tr>
</table></BLOCKQUOTE><BR><BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 BR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 COR</pre><pre>        &#8627 <B>HASKELL</B></pre><pre>          &#8627 NumRed</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>((<FONT COLOR="#000088">List.genericTake</FONT> :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]) :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>])</td>
</tr>
</table>
<br>module List where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified Main<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake</FONT> :: <FONT COLOR="#666600">Integral</FONT> <FONT COLOR="#000088">b</FONT> =&gt; <FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake5</FONT> <FONT COLOR="#000088">xy</FONT> <FONT COLOR="#000088">vw</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vx</FONT>&nbsp;<FONT COLOR="#666600">[]</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake3</FONT> <FONT COLOR="#000088">vx</FONT> <FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;(<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake2</FONT> <FONT COLOR="#000088">n</FONT> (<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)</td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vy</FONT>&nbsp;<FONT COLOR="#000088">vz</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake0</FONT> <FONT COLOR="#000088">vy</FONT> <FONT COLOR="#000088">vz</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vy</FONT>&nbsp;<FONT COLOR="#000088">vz</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">error</FONT> <FONT COLOR="#666600">[]</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake1</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>&nbsp;<FONT COLOR="#666600">True</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">genericTake</FONT> (<FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">-</FONT>&nbsp;1) <FONT COLOR="#000088">xs</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake1</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>&nbsp;<FONT COLOR="#666600">False</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake0</FONT> <FONT COLOR="#000088">n</FONT> (<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)</td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake2</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;(<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake1</FONT> <FONT COLOR="#000088">n</FONT> <FONT COLOR="#000088">x</FONT> <FONT COLOR="#000088">xs</FONT> (<FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">&gt;</FONT>&nbsp;0)</td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake2</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">wz</FONT>&nbsp;<FONT COLOR="#000088">xu</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake0</FONT> <FONT COLOR="#000088">wz</FONT> <FONT COLOR="#000088">xu</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake3</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vx</FONT>&nbsp;<FONT COLOR="#666600">[]</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake3</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xw</FONT>&nbsp;<FONT COLOR="#000088">xx</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake2</FONT> <FONT COLOR="#000088">xw</FONT> <FONT COLOR="#000088">xx</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake4</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#666600">True</FONT>&nbsp;<FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake4</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xz</FONT>&nbsp;<FONT COLOR="#000088">yu</FONT>&nbsp;<FONT COLOR="#000088">yv</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake3</FONT> <FONT COLOR="#000088">yu</FONT> <FONT COLOR="#000088">yv</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake5</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake4</FONT> (<FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">==</FONT>&nbsp;0) <FONT COLOR="#000088">xy</FONT> <FONT COLOR="#000088">vw</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake5</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">yw</FONT>&nbsp;<FONT COLOR="#000088">yx</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake3</FONT> <FONT COLOR="#000088">yw</FONT> <FONT COLOR="#000088">yx</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
</table>
<br>module Main where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Maybe where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>Num Reduction:All numbers are transformed to thier corresponding representation with Succ, Pred and Zero.<BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 BR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 COR</pre><pre>        &#8627 HASKELL</pre><pre>          &#8627 NumRed</pre><pre>            &#8627 <B>HASKELL</B></pre><pre>              &#8627 Narrow</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>(<FONT COLOR="#000088">List.genericTake</FONT> :: <FONT COLOR="#666600">Int</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>])</td>
</tr>
</table>
<br>module List where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified Main<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake</FONT> :: <FONT COLOR="#666600">Integral</FONT> <FONT COLOR="#000088">b</FONT> =&gt; <FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;[<FONT COLOR="#000088">a</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake5</FONT> <FONT COLOR="#000088">xy</FONT> <FONT COLOR="#000088">vw</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vx</FONT>&nbsp;<FONT COLOR="#666600">[]</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake3</FONT> <FONT COLOR="#000088">vx</FONT> <FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;(<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake2</FONT> <FONT COLOR="#000088">n</FONT> (<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)</td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vy</FONT>&nbsp;<FONT COLOR="#000088">vz</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake0</FONT> <FONT COLOR="#000088">vy</FONT> <FONT COLOR="#000088">vz</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vy</FONT>&nbsp;<FONT COLOR="#000088">vz</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">error</FONT> <FONT COLOR="#666600">[]</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake1</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>&nbsp;<FONT COLOR="#666600">True</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">genericTake</FONT> (<FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">-</FONT>&nbsp;<FONT COLOR="#000088">fromInt</FONT> (<FONT COLOR="#666600">Pos</FONT> (<FONT COLOR="#666600">Succ</FONT> <FONT COLOR="#666600">Zero</FONT>))) <FONT COLOR="#000088">xs</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake1</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>&nbsp;<FONT COLOR="#666600">False</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake0</FONT> <FONT COLOR="#000088">n</FONT> (<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)</td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake2</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">n</FONT>&nbsp;(<FONT COLOR="#000088">x</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">xs</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake1</FONT> <FONT COLOR="#000088">n</FONT> <FONT COLOR="#000088">x</FONT> <FONT COLOR="#000088">xs</FONT> (<FONT COLOR="#000088">n</FONT>&nbsp;<FONT COLOR="#000088">&gt;</FONT>&nbsp;<FONT COLOR="#000088">fromInt</FONT> (<FONT COLOR="#666600">Pos</FONT> <FONT COLOR="#666600">Zero</FONT>))</td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake2</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">wz</FONT>&nbsp;<FONT COLOR="#000088">xu</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake0</FONT> <FONT COLOR="#000088">wz</FONT> <FONT COLOR="#000088">xu</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake3</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vx</FONT>&nbsp;<FONT COLOR="#666600">[]</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake3</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xw</FONT>&nbsp;<FONT COLOR="#000088">xx</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake2</FONT> <FONT COLOR="#000088">xw</FONT> <FONT COLOR="#000088">xx</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake4</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#666600">True</FONT>&nbsp;<FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#666600">[]</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake4</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xz</FONT>&nbsp;<FONT COLOR="#000088">yu</FONT>&nbsp;<FONT COLOR="#000088">yv</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake3</FONT> <FONT COLOR="#000088">yu</FONT> <FONT COLOR="#000088">yv</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake5</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">vw</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake4</FONT> (<FONT COLOR="#000088">xy</FONT>&nbsp;<FONT COLOR="#000088">==</FONT>&nbsp;<FONT COLOR="#000088">fromInt</FONT> (<FONT COLOR="#666600">Pos</FONT> <FONT COLOR="#666600">Zero</FONT>)) <FONT COLOR="#000088">xy</FONT> <FONT COLOR="#000088">vw</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">genericTake5</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">yw</FONT>&nbsp;<FONT COLOR="#000088">yx</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">genericTake3</FONT> <FONT COLOR="#000088">yw</FONT> <FONT COLOR="#000088">yx</FONT></td>
</tr>
</table>
<BR>
</td>
</tr>
</table>
<br>module Main where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Maybe<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Maybe where<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>&nbsp;&nbsp;</td><td valign="top">import qualified List<br>import qualified Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>Haskell To QDPs<BR><textarea cols="80" rows="25">digraph dp_graph {
node [outthreshold=100, inthreshold=100];1[label="List.genericTake\n",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3];
3[label="List.genericTake yy3\n",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3];
4[label="List.genericTake yy3 yy4\n",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3];
5[label="List.genericTake5 yy3 yy4\n",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3];
6[label="List.genericTake4 (yy3 == fromInt (Pos Zero)) yy3 yy4\n",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3];
7[label="List.genericTake4 (primEqInt yy3 (fromInt (Pos Zero))) yy3 yy4\n",fontsize=16,color="burlywood",shape="box"];62[label="yy3/Pos yy30",fontsize=10,color="white",style="solid",shape="box"];7 -> 62[label="",style="solid", color="burlywood", weight=9];
62 -> 8[label="",style="solid", color="burlywood", weight=3];
63[label="yy3/Neg yy30",fontsize=10,color="white",style="solid",shape="box"];7 -> 63[label="",style="solid", color="burlywood", weight=9];
63 -> 9[label="",style="solid", color="burlywood", weight=3];
8[label="List.genericTake4 (primEqInt (Pos yy30) (fromInt (Pos Zero))) (Pos yy30) yy4\n",fontsize=16,color="burlywood",shape="box"];64[label="yy30/Succ yy300",fontsize=10,color="white",style="solid",shape="box"];8 -> 64[label="",style="solid", color="burlywood", weight=9];
64 -> 10[label="",style="solid", color="burlywood", weight=3];
65[label="yy30/Zero",fontsize=10,color="white",style="solid",shape="box"];8 -> 65[label="",style="solid", color="burlywood", weight=9];
65 -> 11[label="",style="solid", color="burlywood", weight=3];
9[label="List.genericTake4 (primEqInt (Neg yy30) (fromInt (Pos Zero))) (Neg yy30) yy4\n",fontsize=16,color="burlywood",shape="box"];66[label="yy30/Succ yy300",fontsize=10,color="white",style="solid",shape="box"];9 -> 66[label="",style="solid", color="burlywood", weight=9];
66 -> 12[label="",style="solid", color="burlywood", weight=3];
67[label="yy30/Zero",fontsize=10,color="white",style="solid",shape="box"];9 -> 67[label="",style="solid", color="burlywood", weight=9];
67 -> 13[label="",style="solid", color="burlywood", weight=3];
10[label="List.genericTake4 (primEqInt (Pos (Succ yy300)) (fromInt (Pos Zero))) (Pos (Succ yy300)) yy4\n",fontsize=16,color="black",shape="box"];10 -> 14[label="",style="solid", color="black", weight=3];
11[label="List.genericTake4 (primEqInt (Pos Zero) (fromInt (Pos Zero))) (Pos Zero) yy4\n",fontsize=16,color="black",shape="box"];11 -> 15[label="",style="solid", color="black", weight=3];
12[label="List.genericTake4 (primEqInt (Neg (Succ yy300)) (fromInt (Pos Zero))) (Neg (Succ yy300)) yy4\n",fontsize=16,color="black",shape="box"];12 -> 16[label="",style="solid", color="black", weight=3];
13[label="List.genericTake4 (primEqInt (Neg Zero) (fromInt (Pos Zero))) (Neg Zero) yy4\n",fontsize=16,color="black",shape="box"];13 -> 17[label="",style="solid", color="black", weight=3];
14[label="List.genericTake4 (primEqInt (Pos (Succ yy300)) (Pos Zero)) (Pos (Succ yy300)) yy4\n",fontsize=16,color="black",shape="box"];14 -> 18[label="",style="solid", color="black", weight=3];
15[label="List.genericTake4 (primEqInt (Pos Zero) (Pos Zero)) (Pos Zero) yy4\n",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3];
16[label="List.genericTake4 (primEqInt (Neg (Succ yy300)) (Pos Zero)) (Neg (Succ yy300)) yy4\n",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3];
17[label="List.genericTake4 (primEqInt (Neg Zero) (Pos Zero)) (Neg Zero) yy4\n",fontsize=16,color="black",shape="box"];17 -> 21[label="",style="solid", color="black", weight=3];
18[label="List.genericTake4 False (Pos (Succ yy300)) yy4\n",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3];
19[label="List.genericTake4 True (Pos Zero) yy4\n",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3];
20[label="List.genericTake4 False (Neg (Succ yy300)) yy4\n",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3];
21[label="List.genericTake4 True (Neg Zero) yy4\n",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3];
22[label="List.genericTake3 (Pos (Succ yy300)) yy4\n",fontsize=16,color="burlywood",shape="box"];68[label="yy4/yy40 : yy41",fontsize=10,color="white",style="solid",shape="box"];22 -> 68[label="",style="solid", color="burlywood", weight=9];
68 -> 26[label="",style="solid", color="burlywood", weight=3];
69[label="yy4/[]",fontsize=10,color="white",style="solid",shape="box"];22 -> 69[label="",style="solid", color="burlywood", weight=9];
69 -> 27[label="",style="solid", color="burlywood", weight=3];
23[label="[]\n",fontsize=16,color="green",shape="box"];24[label="List.genericTake3 (Neg (Succ yy300)) yy4\n",fontsize=16,color="burlywood",shape="box"];70[label="yy4/yy40 : yy41",fontsize=10,color="white",style="solid",shape="box"];24 -> 70[label="",style="solid", color="burlywood", weight=9];
70 -> 28[label="",style="solid", color="burlywood", weight=3];
71[label="yy4/[]",fontsize=10,color="white",style="solid",shape="box"];24 -> 71[label="",style="solid", color="burlywood", weight=9];
71 -> 29[label="",style="solid", color="burlywood", weight=3];
25[label="[]\n",fontsize=16,color="green",shape="box"];26[label="List.genericTake3 (Pos (Succ yy300)) (yy40 : yy41)\n",fontsize=16,color="black",shape="box"];26 -> 30[label="",style="solid", color="black", weight=3];
27[label="List.genericTake3 (Pos (Succ yy300)) []\n",fontsize=16,color="black",shape="box"];27 -> 31[label="",style="solid", color="black", weight=3];
28[label="List.genericTake3 (Neg (Succ yy300)) (yy40 : yy41)\n",fontsize=16,color="black",shape="box"];28 -> 32[label="",style="solid", color="black", weight=3];
29[label="List.genericTake3 (Neg (Succ yy300)) []\n",fontsize=16,color="black",shape="box"];29 -> 33[label="",style="solid", color="black", weight=3];
30[label="List.genericTake2 (Pos (Succ yy300)) (yy40 : yy41)\n",fontsize=16,color="black",shape="box"];30 -> 34[label="",style="solid", color="black", weight=3];
31[label="[]\n",fontsize=16,color="green",shape="box"];32[label="List.genericTake2 (Neg (Succ yy300)) (yy40 : yy41)\n",fontsize=16,color="black",shape="box"];32 -> 35[label="",style="solid", color="black", weight=3];
33[label="[]\n",fontsize=16,color="green",shape="box"];34[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 (Pos (Succ yy300) > fromInt (Pos Zero))\n",fontsize=16,color="black",shape="box"];34 -> 36[label="",style="solid", color="black", weight=3];
35[label="List.genericTake1 (Neg (Succ yy300)) yy40 yy41 (Neg (Succ yy300) > fromInt (Pos Zero))\n",fontsize=16,color="black",shape="box"];35 -> 37[label="",style="solid", color="black", weight=3];
36[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 (compare (Pos (Succ yy300)) (fromInt (Pos Zero)) == GT)\n",fontsize=16,color="black",shape="box"];36 -> 38[label="",style="solid", color="black", weight=3];
37[label="List.genericTake1 (Neg (Succ yy300)) yy40 yy41 (compare (Neg (Succ yy300)) (fromInt (Pos Zero)) == GT)\n",fontsize=16,color="black",shape="box"];37 -> 39[label="",style="solid", color="black", weight=3];
38[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 (primCmpInt (Pos (Succ yy300)) (fromInt (Pos Zero)) == GT)\n",fontsize=16,color="black",shape="box"];38 -> 40[label="",style="solid", color="black", weight=3];
39[label="List.genericTake1 (Neg (Succ yy300)) yy40 yy41 (primCmpInt (Neg (Succ yy300)) (fromInt (Pos Zero)) == GT)\n",fontsize=16,color="black",shape="box"];39 -> 41[label="",style="solid", color="black", weight=3];
40[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 (primCmpInt (Pos (Succ yy300)) (Pos Zero) == GT)\n",fontsize=16,color="black",shape="box"];40 -> 42[label="",style="solid", color="black", weight=3];
41[label="List.genericTake1 (Neg (Succ yy300)) yy40 yy41 (primCmpInt (Neg (Succ yy300)) (Pos Zero) == GT)\n",fontsize=16,color="black",shape="box"];41 -> 43[label="",style="solid", color="black", weight=3];
42[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 (primCmpNat (Succ yy300) Zero == GT)\n",fontsize=16,color="black",shape="box"];42 -> 44[label="",style="solid", color="black", weight=3];
43[label="List.genericTake1 (Neg (Succ yy300)) yy40 yy41 (LT == GT)\n",fontsize=16,color="black",shape="box"];43 -> 45[label="",style="solid", color="black", weight=3];
44[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 (GT == GT)\n",fontsize=16,color="black",shape="box"];44 -> 46[label="",style="solid", color="black", weight=3];
45[label="List.genericTake1 (Neg (Succ yy300)) yy40 yy41 False\n",fontsize=16,color="black",shape="box"];45 -> 47[label="",style="solid", color="black", weight=3];
46[label="List.genericTake1 (Pos (Succ yy300)) yy40 yy41 True\n",fontsize=16,color="black",shape="box"];46 -> 48[label="",style="solid", color="black", weight=3];
47[label="List.genericTake0 (Neg (Succ yy300)) (yy40 : yy41)\n",fontsize=16,color="black",shape="box"];47 -> 49[label="",style="solid", color="black", weight=3];
48[label="yy40 : List.genericTake (Pos (Succ yy300) - fromInt (Pos (Succ Zero))) yy41\n",fontsize=16,color="green",shape="box"];48 -> 50[label="",style="dashed", color="green", weight=3];
49[label="error []\n",fontsize=16,color="black",shape="box"];49 -> 51[label="",style="solid", color="black", weight=3];
50 -> 4[label="",style="dashed", color="red", weight=0];
50[label="List.genericTake (Pos (Succ yy300) - fromInt (Pos (Succ Zero))) yy41\n",fontsize=16,color="magenta"];50 -> 52[label="",style="dashed", color="magenta", weight=3];
50 -> 53[label="",style="dashed", color="magenta", weight=3];
51[label="error []\n",fontsize=16,color="red",shape="box"];52[label="Pos (Succ yy300) - fromInt (Pos (Succ Zero))\n",fontsize=16,color="black",shape="box"];52 -> 54[label="",style="solid", color="black", weight=3];
53[label="yy41\n",fontsize=16,color="green",shape="box"];54[label="primMinusInt (Pos (Succ yy300)) (fromInt (Pos (Succ Zero)))\n",fontsize=16,color="black",shape="box"];54 -> 55[label="",style="solid", color="black", weight=3];
55[label="primMinusInt (Pos (Succ yy300)) (Pos (Succ Zero))\n",fontsize=16,color="black",shape="box"];55 -> 56[label="",style="solid", color="black", weight=3];
56[label="primMinusNat (Succ yy300) (Succ Zero)\n",fontsize=16,color="black",shape="box"];56 -> 57[label="",style="solid", color="black", weight=3];
57[label="primMinusNat yy300 Zero\n",fontsize=16,color="burlywood",shape="box"];73[label="yy300/Succ yy3000",fontsize=10,color="white",style="solid",shape="box"];57 -> 73[label="",style="solid", color="burlywood", weight=9];
73 -> 58[label="",style="solid", color="burlywood", weight=3];
74[label="yy300/Zero",fontsize=10,color="white",style="solid",shape="box"];57 -> 74[label="",style="solid", color="burlywood", weight=9];
74 -> 59[label="",style="solid", color="burlywood", weight=3];
58[label="primMinusNat (Succ yy3000) Zero\n",fontsize=16,color="black",shape="box"];58 -> 60[label="",style="solid", color="black", weight=3];
59[label="primMinusNat Zero Zero\n",fontsize=16,color="black",shape="box"];59 -> 61[label="",style="solid", color="black", weight=3];
60[label="Pos (Succ yy3000)\n",fontsize=16,color="green",shape="box"];61[label="Pos Zero\n",fontsize=16,color="green",shape="box"];}
</textarea><BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 BR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 COR</pre><pre>        &#8627 HASKELL</pre><pre>          &#8627 NumRed</pre><pre>            &#8627 HASKELL</pre><pre>              &#8627 Narrow</pre><pre>                &#8627 <B>QDP</B></pre><pre>                  &#8627 QDPSizeChangeProof</pre><BR>Q DP problem:<BR>The TRS P consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>new_genericTake</font>(<FONT COLOR=#0000cc>Pos</font>(<FONT COLOR=#0000cc>Succ</font>(<FONT COLOR=#cc0000>yy300</font>)), <FONT COLOR=#0000cc>:</font>(<FONT COLOR=#cc0000>yy40</font>, <FONT COLOR=#cc0000>yy41</font>), <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_genericTake</font>(<FONT COLOR=#0000cc>new_primMinusNat</font>(<FONT COLOR=#cc0000>yy300</font>), <FONT COLOR=#cc0000>yy41</font>, <FONT COLOR=#cc0000>ba</font>)</BLOCKQUOTE><BR>The TRS R consists of the following rules:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>new_primMinusNat</font>(<FONT COLOR=#0000cc>Succ</font>(<FONT COLOR=#cc0000>yy3000</font>)) &#8594; <FONT COLOR=#0000cc>Pos</font>(<FONT COLOR=#0000cc>Succ</font>(<FONT COLOR=#cc0000>yy3000</font>))
<BR><FONT COLOR=#0000cc>new_primMinusNat</font>(<FONT COLOR=#0000cc>Zero</font>) &#8594; <FONT COLOR=#0000cc>Pos</font>(<FONT COLOR=#0000cc>Zero</font>)</BLOCKQUOTE><BR>The set Q consists of the following terms:<BR><BLOCKQUOTE><BR><FONT COLOR=#0000cc>new_primMinusNat</font>(<FONT COLOR=#0000cc>Succ</font>(<FONT COLOR=#cc0000>x0</font>))
<BR><FONT COLOR=#0000cc>new_primMinusNat</font>(<FONT COLOR=#0000cc>Zero</font>)</BLOCKQUOTE><BR>We have to consider all minimal (P,Q,R)-chains.<BR>By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. <P>From the DPs we obtained the following set of size-change graphs:
<UL><LI><FONT COLOR=#0000cc>new_genericTake</font>(<FONT COLOR=#0000cc>Pos</font>(<FONT COLOR=#0000cc>Succ</font>(<FONT COLOR=#cc0000>yy300</font>)), <FONT COLOR=#0000cc>:</font>(<FONT COLOR=#cc0000>yy40</font>, <FONT COLOR=#cc0000>yy41</font>), <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_genericTake</font>(<FONT COLOR=#0000cc>new_primMinusNat</font>(<FONT COLOR=#cc0000>yy300</font>), <FONT COLOR=#cc0000>yy41</font>, <FONT COLOR=#cc0000>ba</font>)<BR>The graph contains the following edges 2 > 2, 3 >= 3<P></LI></UL><BR><BR></body>


