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/Maybe_mapMaybe_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 CR</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>((<FONT COLOR="#000088">Maybe.mapMaybe</FONT> :: (<FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">a</FONT>]) :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>])</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 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 Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe</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">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">f</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">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">let&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">rs</FONT>&nbsp;</td><td valign="top"></td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> <FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">xs</FONT></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">in&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">case&nbsp;</td><td valign="top" colspan="3"><FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">x</FONT> of</td>
</tr>
<tr>
<td>
    &nbsp;
    </td><td valign="top"><FONT COLOR="#666600">Nothing</FONT></td><td valign="top">-&gt;&nbsp;</td><td valign="top"><FONT COLOR="#000088">rs</FONT></td>
</tr>
<tr>
<td>
    &nbsp;
    </td><td valign="top"><FONT COLOR="#666600">Just</FONT> <FONT COLOR="#000088">r</FONT></td><td valign="top">-&gt;&nbsp;</td><td valign="top"><FONT COLOR="#000088">r</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">rs</FONT></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<BR>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>Case Reductions:<BR>The following Case expression<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top" >case&#160;</td><td valign="top" colspan="2"><font color=#000088>f</font>&#160;<font color=#000088>x</font> of</td></tr><tr><td>&#160;</td><td valign="top"><font color=#666600>Nothing</font></td><td valign="top">&#160;&#8594;&#160;<font color=#000088>rs</font></td></tr>
<tr><td>&#160;</td><td valign="top"><font color=#666600>Just</font>&#160;<font color=#000088>r</font></td><td valign="top">&#160;&#8594;&#160;<font color=#000088>r</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>rs</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>mapMaybe0</font>&#160;</td><td valign="top"><font color=#666600>Nothing</font></td><td valign="top">&#160;=&#160;<font color=#000088>rs</font></td></tr>
<tr><td valign="top"><font color=#000088>mapMaybe0</font>&#160;</td><td valign="top">(<font color=#666600>Just</font>&#160;<font color=#000088>r</font>)</td><td valign="top">&#160;=&#160;<font color=#000088>r</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>rs</font></td></tr>
</table></BLOCKQUOTE><BR><BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 CR</pre><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">Maybe.mapMaybe</FONT> :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>]) :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>])</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 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 Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> :: (<FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">a</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe</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">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">f</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">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">let&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#666600">Nothing</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">rs</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe0</FONT>&nbsp;</td><td valign="top">(<FONT COLOR="#666600">Just</FONT> <FONT COLOR="#000088">r</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">r</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">rs</FONT></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">rs</FONT>&nbsp;</td><td valign="top"></td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> <FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">xs</FONT></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">in&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe0</FONT> (<FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">x</FONT>)</td>
</tr>
</table>
</td>
</tr>
</table>
<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 CR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 BR</pre><pre>        &#8627 <B>HASKELL</B></pre><pre>          &#8627 LetRed</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>((<FONT COLOR="#000088">Maybe.mapMaybe</FONT> :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>]) :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>])</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 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 Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vw</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">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">f</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">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">let&nbsp;</td><td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#666600">Nothing</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">rs</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe0</FONT>&nbsp;</td><td valign="top">(<FONT COLOR="#666600">Just</FONT> <FONT COLOR="#000088">r</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">r</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">rs</FONT></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">rs</FONT>&nbsp;</td><td valign="top"></td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> <FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">xs</FONT></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">in&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe0</FONT> (<FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">x</FONT>)</td>
</tr>
</table>
</td>
</tr>
</table>
<BR>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>Let/Where Reductions:<BR>The bindings of the following Let/Where expression<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top">let&#160;</td><td valign="top"><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>mapMaybe0</font>&#160;</td><td valign="top"><font color=#666600>Nothing</font></td><td valign="top">&#160;=&#160;<font color=#000088>rs</font></td></tr>
<tr><td valign="top"><font color=#000088>mapMaybe0</font>&#160;</td><td valign="top">(<font color=#666600>Just</font>&#160;<font color=#000088>r</font>)</td><td valign="top">&#160;=&#160;<font color=#000088>r</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>rs</font></td></tr>
</table></td></tr>
<tr><td></td><td valign="top"><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>rs</font>&#160;</td><td valign="top"></td><td valign="top">&#160;=&#160;<font color=#000088>mapMaybe</font>&#160;<font color=#000088>f</font>&#160;<font color=#000088>xs</font></td></tr>
</table></td></tr>
<td valign="top">in&#160;</td><td valign="top"><font color=#000088>mapMaybe0</font>&#160;(<font color=#000088>f</font>&#160;<font color=#000088>x</font>)</td></tr>
</table></BLOCKQUOTE><BR>are unpacked to the following functions on top level<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>mapMaybeRs</font>&#160;</td><td valign="top"><font color=#000088>vz</font>&#160;<font color=#000088>wu</font></td><td valign="top">&#160;=&#160;<font color=#000088>mapMaybe</font>&#160;<font color=#000088>vz</font>&#160;<font color=#000088>wu</font></td></tr>
</table></BLOCKQUOTE><BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>mapMaybeMapMaybe0</font>&#160;</td><td valign="top"><font color=#000088>vz</font>&#160;<font color=#000088>wu</font>&#160;<font color=#666600>Nothing</font></td><td valign="top">&#160;=&#160;<font color=#000088>mapMaybeRs</font>&#160;<font color=#000088>vz</font>&#160;<font color=#000088>wu</font></td></tr>
<tr><td valign="top"><font color=#000088>mapMaybeMapMaybe0</font>&#160;</td><td valign="top"><font color=#000088>vz</font>&#160;<font color=#000088>wu</font>&#160;(<font color=#666600>Just</font>&#160;<font color=#000088>r</font>)</td><td valign="top">&#160;=&#160;<font color=#000088>r</font>&#160;<font color=#666600>:</font>&#160;<font color=#000088>mapMaybeRs</font>&#160;<font color=#000088>vz</font>&#160;<font color=#000088>wu</font></td></tr>
</table></BLOCKQUOTE><BR><BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 CR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 BR</pre><pre>        &#8627 HASKELL</pre><pre>          &#8627 LetRed</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">Maybe.mapMaybe</FONT> :: (<FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">a</FONT>]) :: (<FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">a</FONT>])</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 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 Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vw</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">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">f</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">mapMaybeMapMaybe0</FONT> <FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">xs</FONT> (<FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">x</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">mapMaybeMapMaybe0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vz</FONT>&nbsp;<FONT COLOR="#000088">wu</FONT>&nbsp;<FONT COLOR="#666600">Nothing</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybeRs</FONT> <FONT COLOR="#000088">vz</FONT> <FONT COLOR="#000088">wu</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybeMapMaybe0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vz</FONT>&nbsp;<FONT COLOR="#000088">wu</FONT>&nbsp;(<FONT COLOR="#666600">Just</FONT> <FONT COLOR="#000088">r</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">r</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">mapMaybeRs</FONT> <FONT COLOR="#000088">vz</FONT> <FONT COLOR="#000088">wu</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">mapMaybeRs</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vz</FONT>&nbsp;<FONT COLOR="#000088">wu</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> <FONT COLOR="#000088">vz</FONT> <FONT COLOR="#000088">wu</FONT></td>
</tr>
</table>
<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 CR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 BR</pre><pre>        &#8627 HASKELL</pre><pre>          &#8627 LetRed</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">Maybe.mapMaybe</FONT> :: (<FONT COLOR="#000088">b</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">a</FONT>])</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 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 Main<br>import qualified Prelude<br>
<br>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> :: (<FONT COLOR="#000088">a</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">Maybe</FONT> <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">b</FONT>]<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vw</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">mapMaybe</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">f</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">mapMaybeMapMaybe0</FONT> <FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">xs</FONT> (<FONT COLOR="#000088">f</FONT> <FONT COLOR="#000088">x</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">mapMaybeMapMaybe0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vz</FONT>&nbsp;<FONT COLOR="#000088">wu</FONT>&nbsp;<FONT COLOR="#666600">Nothing</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybeRs</FONT> <FONT COLOR="#000088">vz</FONT> <FONT COLOR="#000088">wu</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">mapMaybeMapMaybe0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vz</FONT>&nbsp;<FONT COLOR="#000088">wu</FONT>&nbsp;(<FONT COLOR="#666600">Just</FONT> <FONT COLOR="#000088">r</FONT>)&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">r</FONT>&nbsp;<FONT COLOR="#666600">:</FONT>&nbsp;<FONT COLOR="#000088">mapMaybeRs</FONT> <FONT COLOR="#000088">vz</FONT> <FONT COLOR="#000088">wu</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">mapMaybeRs</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">vz</FONT>&nbsp;<FONT COLOR="#000088">wu</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">mapMaybe</FONT> <FONT COLOR="#000088">vz</FONT> <FONT COLOR="#000088">wu</FONT></td>
</tr>
</table>
<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="Maybe.mapMaybe\n",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3];
3[label="Maybe.mapMaybe wv3\n",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3];
4[label="Maybe.mapMaybe wv3 wv4\n",fontsize=16,color="burlywood",shape="triangle"];20[label="wv4/wv40 : wv41",fontsize=10,color="white",style="solid",shape="box"];4 -> 20[label="",style="solid", color="burlywood", weight=9];
20 -> 5[label="",style="solid", color="burlywood", weight=3];
21[label="wv4/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 21[label="",style="solid", color="burlywood", weight=9];
21 -> 6[label="",style="solid", color="burlywood", weight=3];
5[label="Maybe.mapMaybe wv3 (wv40 : wv41)\n",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3];
6[label="Maybe.mapMaybe wv3 []\n",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3];
7 -> 9[label="",style="dashed", color="red", weight=0];
7[label="Maybe.mapMaybeMapMaybe0 wv3 wv41 (wv3 wv40)\n",fontsize=16,color="magenta"];7 -> 10[label="",style="dashed", color="magenta", weight=3];
8[label="[]\n",fontsize=16,color="green",shape="box"];10[label="wv3 wv40\n",fontsize=16,color="green",shape="box"];10 -> 14[label="",style="dashed", color="green", weight=3];
9[label="Maybe.mapMaybeMapMaybe0 wv3 wv41 wv5\n",fontsize=16,color="burlywood",shape="triangle"];23[label="wv5/Nothing",fontsize=10,color="white",style="solid",shape="box"];9 -> 23[label="",style="solid", color="burlywood", weight=9];
23 -> 12[label="",style="solid", color="burlywood", weight=3];
24[label="wv5/Just wv50",fontsize=10,color="white",style="solid",shape="box"];9 -> 24[label="",style="solid", color="burlywood", weight=9];
24 -> 13[label="",style="solid", color="burlywood", weight=3];
14[label="wv40\n",fontsize=16,color="green",shape="box"];12[label="Maybe.mapMaybeMapMaybe0 wv3 wv41 Nothing\n",fontsize=16,color="black",shape="box"];12 -> 15[label="",style="solid", color="black", weight=3];
13[label="Maybe.mapMaybeMapMaybe0 wv3 wv41 (Just wv50)\n",fontsize=16,color="black",shape="box"];13 -> 16[label="",style="solid", color="black", weight=3];
15[label="Maybe.mapMaybeRs wv3 wv41\n",fontsize=16,color="black",shape="triangle"];15 -> 17[label="",style="solid", color="black", weight=3];
16[label="wv50 : Maybe.mapMaybeRs wv3 wv41\n",fontsize=16,color="green",shape="box"];16 -> 18[label="",style="dashed", color="green", weight=3];
17 -> 4[label="",style="dashed", color="red", weight=0];
17[label="Maybe.mapMaybe wv3 wv41\n",fontsize=16,color="magenta"];17 -> 19[label="",style="dashed", color="magenta", weight=3];
18 -> 15[label="",style="dashed", color="red", weight=0];
18[label="Maybe.mapMaybeRs wv3 wv41\n",fontsize=16,color="magenta"];19[label="wv41\n",fontsize=16,color="green",shape="box"];}
</textarea><BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 CR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 BR</pre><pre>        &#8627 HASKELL</pre><pre>          &#8627 LetRed</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_mapMaybeMapMaybe0</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybe</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)
<BR><FONT COLOR=#0000cc>new_mapMaybe</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#0000cc>:</font>(<FONT COLOR=#cc0000>wv40</font>, <FONT COLOR=#cc0000>wv41</font>), <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybeMapMaybe0</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)
<BR><FONT COLOR=#0000cc>new_mapMaybeRs</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybe</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)
<BR><FONT COLOR=#0000cc>new_mapMaybeMapMaybe0</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybeRs</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)</BLOCKQUOTE><BR>R is empty.<BR>Q is empty.<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_mapMaybe</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#0000cc>:</font>(<FONT COLOR=#cc0000>wv40</font>, <FONT COLOR=#cc0000>wv41</font>), <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybeMapMaybe0</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)<BR>The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3, 4 >= 4<P></LI>
<LI><FONT COLOR=#0000cc>new_mapMaybeMapMaybe0</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybe</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)<BR>The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4<P></LI>
<LI><FONT COLOR=#0000cc>new_mapMaybeMapMaybe0</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybeRs</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)<BR>The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4<P></LI>
<LI><FONT COLOR=#0000cc>new_mapMaybeRs</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>) &#8594; <FONT COLOR=#0000cc>new_mapMaybe</font>(<FONT COLOR=#cc0000>wv3</font>, <FONT COLOR=#cc0000>wv41</font>, <FONT COLOR=#cc0000>h</font>, <FONT COLOR=#cc0000>ba</font>)<BR>The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4<P></LI></UL><BR><BR></body>


