<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Optional a -&gt; a (negative proof)</title>
	<atom:link href="http://blog.tmorris.net/optional-a-negative-proof/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tmorris.net/optional-a-negative-proof/</link>
	<description>The weblog of Tony Morris</description>
	<pubDate>Sat, 19 May 2012 02:59:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Vlad Patryshev</title>
		<link>http://blog.tmorris.net/optional-a-negative-proof/#comment-171836</link>
		<dc:creator>Vlad Patryshev</dc:creator>
		<pubDate>Sun, 18 Mar 2012 21:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=779#comment-171836</guid>
		<description>We could also look at it like this: 
Optional a -&#62; a turns a into an algebra over Optional (makes a an object with a point actually); in some categories it's okay, but, say, in a topos it would mean 1=0, so the topos would be degenerate.</description>
		<content:encoded><![CDATA[<p>We could also look at it like this:<br />
Optional a -&gt; a turns a into an algebra over Optional (makes a an object with a point actually); in some categories it&#8217;s okay, but, say, in a topos it would mean 1=0, so the topos would be degenerate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: beroal</title>
		<link>http://blog.tmorris.net/optional-a-negative-proof/#comment-42487</link>
		<dc:creator>beroal</dc:creator>
		<pubDate>Wed, 30 Jun 2010 01:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=779#comment-42487</guid>
		<description>As Brian Howard pointed out, you do not need to harness a catamorphism. (Optional a) corresponds to (a∨⊤). if (a=0), then (a∨⊤→a)=0.</description>
		<content:encoded><![CDATA[<p>As Brian Howard pointed out, you do not need to harness a catamorphism. (Optional a) corresponds to (a∨⊤). if (a=0), then (a∨⊤→a)=0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Howard</title>
		<link>http://blog.tmorris.net/optional-a-negative-proof/#comment-42388</link>
		<dc:creator>Brian Howard</dc:creator>
		<pubDate>Mon, 28 Jun 2010 17:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=779#comment-42388</guid>
		<description>Here's another way, supposing you already have an uninhabited type (your a-&#62;b, or Scala's Nothing, for example); call it U.  Now, take your supposed function f at type U -- this will have type Optional U -&#62; U.  Apply this to Empty, and you've found an inhabitant of U.  That's a contradiction, so you must not have had such an f.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s another way, supposing you already have an uninhabited type (your a-&gt;b, or Scala&#8217;s Nothing, for example); call it U.  Now, take your supposed function f at type U &#8212; this will have type Optional U -&gt; U.  Apply this to Empty, and you&#8217;ve found an inhabitant of U.  That&#8217;s a contradiction, so you must not have had such an f.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/optional-a-negative-proof/#comment-42139</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Mon, 21 Jun 2010 09:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=779#comment-42139</guid>
		<description>Psuedonym, Excellent, I hadn't thought of it that way.</description>
		<content:encoded><![CDATA[<p>Psuedonym, Excellent, I hadn&#8217;t thought of it that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pseudonym</title>
		<link>http://blog.tmorris.net/optional-a-negative-proof/#comment-42134</link>
		<dc:creator>Pseudonym</dc:creator>
		<pubDate>Mon, 21 Jun 2010 08:06:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/?p=779#comment-42134</guid>
		<description>Here's an alternative way of looking at it.  Introduce:

&lt;pre&gt;
data Id a = a

instance Functor Optional where
    fmap f (Full a) = Full (f a)
    fmap f Empty = Empty

instance Functor Id where
    fmap f (Id a) = Id (f a)
&lt;/pre&gt;

We want to find a function:

&lt;pre&gt;
doesThisExist :: forall a. Optional a -&#62; Id a
&lt;/pre&gt;

doesThisExist is a map between two Functors, and is therefore (in Haskell) a natural transformation and satisfies:

&lt;pre&gt;
forall types A B. forall g :: A -&#62; B. doesThisExist . fmap g = fmap g . doesThisExist
&lt;/pre&gt;

Note that this is also the free theorem for the type of doesThisExist.

For any b :: B, we have:

&lt;pre&gt;
 doesThisExist . fmap (const b) = fmap (const b) . doesThisExist
 (expand fmap)
 doesThisExist . (\x -&#62;  case x of { Full _ -&#62; Full b; Optional -&#62; Optional }) = const (Id b)
=&#62; 
 doesThisExist . (\x -&#62;  case x of { Full _ -&#62; Full b; Optional -&#62; Optional }) $ Optional = const (Id b) $ Optional
=&#62;
 doesThisExist Optional = Id b
&lt;/pre&gt;

That is, doesThisExist Optional is the same as Id b for any b :: B.  This is impossible, therefore doesThisExist doesn't exist.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s an alternative way of looking at it.  Introduce:</p>
<pre>
data Id a = a

instance Functor Optional where
    fmap f (Full a) = Full (f a)
    fmap f Empty = Empty

instance Functor Id where
    fmap f (Id a) = Id (f a)
</pre>
<p>We want to find a function:</p>
<pre>
doesThisExist :: forall a. Optional a -&gt; Id a
</pre>
<p>doesThisExist is a map between two Functors, and is therefore (in Haskell) a natural transformation and satisfies:</p>
<pre>
forall types A B. forall g :: A -&gt; B. doesThisExist . fmap g = fmap g . doesThisExist
</pre>
<p>Note that this is also the free theorem for the type of doesThisExist.</p>
<p>For any b :: B, we have:</p>
<pre>
 doesThisExist . fmap (const b) = fmap (const b) . doesThisExist
 (expand fmap)
 doesThisExist . (\x -&gt;  case x of { Full _ -&gt; Full b; Optional -&gt; Optional }) = const (Id b)
=&gt;
 doesThisExist . (\x -&gt;  case x of { Full _ -&gt; Full b; Optional -&gt; Optional }) $ Optional = const (Id b) $ Optional
=&gt;
 doesThisExist Optional = Id b
</pre>
<p>That is, doesThisExist Optional is the same as Id b for any b :: B.  This is impossible, therefore doesThisExist doesn&#8217;t exist.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

