2009/2/2 Joachim Breitner <span dir="ltr">&lt;<a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Am Montag, den 02.02.2009, 11:06 -0700 schrieb Luke Palmer:<br>
<div class="Ih2E3d"><br>
&gt; That question has kind of a crazy answer.<br>
&gt;<br>
&gt; In mathematics, Nat -&gt; Bool is uncountable, i.e. there is no function<br>
&gt; Nat -&gt; (Nat -&gt; Bool) which has every function in its range.<br>
&gt;<br>
&gt; But we know we are dealing with computable functions, so we can just<br>
&gt; enumerate all implementations. &nbsp;So the computable functions Nat -&gt;<br>
&gt; Bool are countable.<br>
&gt;<br>
&gt; However! &nbsp;If we have a function f : Nat -&gt; Nat -&gt; Bool, we can<br>
&gt; construct the diagonalization g : Nat -&gt; Bool as: &nbsp;g n = not (f n n),<br>
&gt; with g not in the range of f. &nbsp;That makes Nat -&gt; Bool &quot;computably<br>
&gt; uncountable&quot;.<br>
<br>
</div>That argument has a flaw. Just because we have a function in the<br>
mathematical sense that sends ℕ to (Nat -&gt; Bool) does not mean that we<br>
have Haskell function f of that type that we can use to construct g.</blockquote><div><br>What argument?&nbsp; What was I trying to prove?<br><br>But I admit that my notation is confusing; I am not distinguishing between Haskell types and their denotations.&nbsp; I&#39;ll be more precise:<br>
<br>I will use N for the set of naturals, Nat for the Haskell type of (strict) naturals, 2 for the set {0,1}, Bool for the Haskell type True|False, (-&gt;) for a mathematical function, (~&gt;) for a <i>total</i> computable function in Haskell.<br>
<br>N -&gt; 2&nbsp; is uncountable, meaning there is no surjection N -&gt; (N -&gt; 2).<br><br>Nat ~&gt; Bool is countable, meaning there is a surjection N -&gt; (Nat ~&gt; Bool).&nbsp; Enumerate all program source codes (which is countable, so N -&gt; SourceCode), and pick out the ones which denote a total computable function Nat ~&gt; Bool.<br>
<br>But Nat ~&gt; Bool is <i>computably</i> uncountable, meaning there is no injective function Nat ~&gt; (Nat ~&gt; Bool), by the diagonal argument above.<br><br>That&#39;s what I meant.<br><br>Luke<br></div></div>