On Mon, Feb 2, 2009 at 3:41 PM, Dan Piponi <span dir="ltr">&lt;<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>&gt;</span> wrote:<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;">
<div class="Ih2E3d">2009/2/2 Luke Palmer &lt;<a href="mailto:lrpalmer@gmail.com">lrpalmer@gmail.com</a>&gt;:<br>
<br>
</div>&gt; But Nat ~&gt; Bool is computably uncountable, meaning there is no injective (surjective?)<br>
<div class="Ih2E3d">&gt; function Nat ~&gt; (Nat ~&gt; Bool), by the diagonal argument above.<br>
<br>
</div>Given that the Haskell functions Nat -&gt; Bool are computably<br>
uncountable, you&#39;d expect that for any Haskell function (Nat -&gt; Bool)<br>
-&gt; Nat there&#39;d always be two elements that get mapped to the same<br>
value.<br>
<br>
So here&#39;s a programming challenge: write a total function (expecting<br>
total arguments) toSame :: ((Nat -&gt; Bool) -&gt; Nat) -&gt; (Nat -&gt; Bool,Nat<br>
-&gt; Bool) that finds a pair that get mapped to the same Nat.<br>
<br>
Ie. f a==f b where (a,b) = toSame f</blockquote><div><br>Presumably under the condition that a /= b.<br><br>It&#39;s unlikely that you can.&nbsp; At least you can&#39;t use Escardo&#39;s trick, because while the space of pairs of cantor spaces (cantor space = Nat -&gt; Bool) is compact, the space of pairs of <i>different</i> cantors spaces is not.&nbsp; This is witnessed by the following function:<br>
<br>f (a,b) = length (takeWhile id (zipWith (==) a b))<br><br>This function finds the first index at which they differ.&nbsp; Since they are guaranteed to be different, this function is total.&nbsp; Thus, if the space of nonequal cantor spaces were compact, then so too would be Nat, which we know is not the case.<br>
<br>Luke<br></div></div><br>