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/Monad_when_4.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 IFR</pre><BR><html>
<body>mainModule Main<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td>
                   &nbsp;
                </td><td>((<FONT COLOR="#000088">Monad.when</FONT> :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>) :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</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 Monad<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Monad 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">when</FONT> :: <FONT COLOR="#666600">Monad</FONT> <FONT COLOR="#000088">a</FONT> =&gt; <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>
<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">when</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">p</FONT>&nbsp;<FONT COLOR="#000088">s</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"> if <FONT COLOR="#000088">p</FONT> then <FONT COLOR="#000088">s</FONT> else <FONT COLOR="#000088">return</FONT> <FONT COLOR="#666600">()</FONT></td>
</tr>
</table>
<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 Monad<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>
</body>
</html>
<BR>If Reductions:<BR>The following If expression<BR><BLOCKQUOTE>if <font color=#000088>p</font> then <font color=#000088>s</font> else <font color=#000088>return</font>&#160;<font color=#666600>()</font></BLOCKQUOTE><BR>is transformed to<BR><BLOCKQUOTE><table cellspacing="0" cellpadding="0" border="0" frame="void" >
<tr><td valign="top"><font color=#000088>when0</font>&#160;</td><td valign="top"><font color=#000088>s</font>&#160;<font color=#666600>True</font></td><td valign="top">&#160;=&#160;<font color=#000088>s</font></td></tr>
<tr><td valign="top"><font color=#000088>when0</font>&#160;</td><td valign="top"><font color=#000088>s</font>&#160;<font color=#666600>False</font></td><td valign="top">&#160;=&#160;<font color=#000088>return</font>&#160;<font color=#666600>()</font></td></tr>
</table></BLOCKQUOTE><BR><BR><BR><pre>&#8627 HASKELL</pre><pre>  &#8627 IFR</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">Monad.when</FONT> :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>) :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</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 Monad<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 Monad<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Monad 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">when</FONT> :: <FONT COLOR="#666600">Monad</FONT> <FONT COLOR="#000088">a</FONT> =&gt; <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>
<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">when</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">p</FONT>&nbsp;<FONT COLOR="#000088">s</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">when0</FONT> <FONT COLOR="#000088">s</FONT> <FONT COLOR="#000088">p</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">when0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT>&nbsp;<FONT COLOR="#666600">True</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">when0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT>&nbsp;<FONT COLOR="#666600">False</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">return</FONT> <FONT COLOR="#666600">()</FONT></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 IFR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 BR</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">Monad.when</FONT> :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>) :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</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 Monad<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Monad 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">when</FONT> :: <FONT COLOR="#666600">Monad</FONT> <FONT COLOR="#000088">a</FONT> =&gt; <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>
<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">when</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">p</FONT>&nbsp;<FONT COLOR="#000088">s</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">when0</FONT> <FONT COLOR="#000088">s</FONT> <FONT COLOR="#000088">p</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">when0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT>&nbsp;<FONT COLOR="#666600">True</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">when0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT>&nbsp;<FONT COLOR="#666600">False</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">return</FONT> <FONT COLOR="#666600">()</FONT></td>
</tr>
</table>
<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 Monad<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 IFR</pre><pre>    &#8627 HASKELL</pre><pre>      &#8627 BR</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">Monad.when</FONT> :: <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#666600">IO</FONT> <FONT COLOR="#666600">()</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 Monad<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 Monad<br>import qualified Prelude<br>
<br>
</td>
</tr>
</table>
<br>module Monad 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">when</FONT> :: <FONT COLOR="#666600">Monad</FONT> <FONT COLOR="#000088">a</FONT> =&gt; <FONT COLOR="#666600">Bool</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>&nbsp;<FONT COLOR="#666600">&nbsp;-&gt;&nbsp;</FONT>&nbsp;<FONT COLOR="#000088">a</FONT> <FONT COLOR="#666600">()</FONT>
<br>
<table cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td valign="top"><FONT COLOR="#000088">when</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">p</FONT>&nbsp;<FONT COLOR="#000088">s</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">when0</FONT> <FONT COLOR="#000088">s</FONT> <FONT COLOR="#000088">p</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">when0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT>&nbsp;<FONT COLOR="#666600">True</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT></td>
</tr>
<tr>
<td valign="top"><FONT COLOR="#000088">when0</FONT>&nbsp;</td><td valign="top"><FONT COLOR="#000088">s</FONT>&nbsp;<FONT COLOR="#666600">False</FONT>&nbsp;</td><td valign="top">=&nbsp;</td><td valign="top"><FONT COLOR="#000088">return</FONT> <FONT COLOR="#666600">()</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="Monad.when\n",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3];
3[label="Monad.when vy3\n",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3];
4[label="Monad.when vy3 vy4\n",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3];
5[label="Monad.when0 vy4 vy3\n",fontsize=16,color="burlywood",shape="box"];14[label="vy3/False",fontsize=10,color="white",style="solid",shape="box"];5 -> 14[label="",style="solid", color="burlywood", weight=9];
14 -> 6[label="",style="solid", color="burlywood", weight=3];
15[label="vy3/True",fontsize=10,color="white",style="solid",shape="box"];5 -> 15[label="",style="solid", color="burlywood", weight=9];
15 -> 7[label="",style="solid", color="burlywood", weight=3];
6[label="Monad.when0 vy4 False\n",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3];
7[label="Monad.when0 vy4 True\n",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3];
8[label="return ()\n",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3];
9[label="vy4\n",fontsize=16,color="green",shape="box"];10[label="primretIO ()\n",fontsize=16,color="black",shape="box"];10 -> 11[label="",style="solid", color="black", weight=3];
11[label="terminator ()\n",fontsize=16,color="black",shape="box"];11 -> 12[label="",style="solid", color="black", weight=3];
12[label="ter0m ()\n",fontsize=16,color="green",shape="box"];12 -> 13[label="",style="dashed", color="green", weight=3];
13[label="()\n",fontsize=16,color="green",shape="box"];}
</textarea><BR><BR></body>


