<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-11295132.post393797559188947149..comments</id><updated>2011-07-26T09:12:39.012-07:00</updated><category term='category theory'/><category term='lawvere theories'/><category term='astronomy'/><category term='optimisation'/><category term='self-reference'/><category term='comonads'/><category term='haskell'/><category term='programming'/><category term='monad'/><category term='mathematics'/><category term='physics'/><category term='probability'/><category term='types'/><category term='quantum'/><title type='text'>Comments on A Neighborhood of Infinity: Perturbation confusion confusion</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.sigfpe.com/feeds/393797559188947149/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html'/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11295132.post-2340988138596428955</id><published>2011-07-26T09:12:39.012-07:00</published><updated>2011-07-26T09:12:39.012-07:00</updated><title type='text'>@Anonymous I don&amp;#39;t know a canonical source of ...</title><content type='html'>@Anonymous I don&amp;#39;t know a canonical source of the theorem but here&amp;#39;s one I found through web searching: http://eccc.hpi-web.de/resources/pdf/ica.pdf &lt;br /&gt;&lt;br /&gt;This book goes into quite a bit of detail: http://www.amazon.com/Computable-Analysis-Introduction-Theoretical-Computer/dp/3540668179/&lt;br /&gt;&lt;br /&gt;One way to think of it is that differentiation is itself not uniformly continuous. You can make arbitrarily small perturbations to a function and wildly change its derivative.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/2340988138596428955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/2340988138596428955'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1311696759012#c2340988138596428955' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7511706068214839316</id><published>2011-07-26T06:45:16.008-07:00</published><updated>2011-07-26T06:45:16.008-07:00</updated><title type='text'>Dan, can you point me to a proof that there is no ...</title><content type='html'>Dan, can you point me to a proof that there is no way to implement differentiation in a way that is also a function, or perhaps name the theorem in question?&lt;br /&gt;&lt;br /&gt;Thanks in advance!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7511706068214839316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7511706068214839316'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1311687916008#c7511706068214839316' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1271256994'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4832343735751798511</id><published>2011-07-01T06:36:42.241-07:00</published><updated>2011-07-01T06:36:42.241-07:00</updated><title type='text'>Barak,

If by glib you mean that more could be sai...</title><content type='html'>Barak,&lt;br /&gt;&lt;br /&gt;If by glib you mean that more could be said on the subject, then of course you are correct. There is no computable function for differentiation of type Num a=&amp;gt;(a-&amp;gt;a)-&amp;gt;(a-&amp;gt;a) and this ultimately reflects the fact that  classically, differentiation is not uniformly continuous, and constructively, there is no differentiation function at all.&lt;br /&gt;&lt;br /&gt;A mathematical proof that there is no way to implement differentiation in a way that it is also a function (in the mathematical sense) seems like a good justification for using lifting to me.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/4832343735751798511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/4832343735751798511'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1309527402241#c4832343735751798511' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-552498227226020314</id><published>2011-07-01T04:31:45.191-07:00</published><updated>2011-07-01T04:31:45.191-07:00</updated><title type='text'>It seems a bit glib to say that the type of diff i...</title><content type='html'>It seems a bit glib to say that the type of diff is &amp;quot;Num a=&amp;gt;(D a-&amp;gt;D a)-&amp;gt;(a-&amp;gt;a)&amp;quot; and use that to justify the needed lifting etc.  Because the type of diff is, mathematically speaking, &amp;quot;Num a=&amp;gt;(a-&amp;gt;a)-&amp;gt;(a-&amp;gt;a)&amp;quot;.  The dual numbers are an implementation technique being inappropriately exposed in the signature of the API.  This is the root cause of the modularity and nesting problems that make AD so brittle in most current systems.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/552498227226020314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/552498227226020314'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1309519905191#c552498227226020314' title=''/><author><name>Barak A. Pearlmutter</name><uri>http://barak.a.pearlmutter.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1843253633'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7204488260416696044</id><published>2011-05-01T07:23:37.432-07:00</published><updated>2011-05-01T07:23:37.432-07:00</updated><title type='text'>@Oleksandr You did a good job of convincing me :-)...</title><content type='html'>@Oleksandr You did a good job of convincing me :-)&lt;br /&gt;&lt;br /&gt;More generally, we can also build jet bundles. It&amp;#39;s also fun to look at Lie algebras built this way from Lie groups: http://blog.sigfpe.com/2008/04/infinitesimal-rotations-and-lie.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7204488260416696044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7204488260416696044'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304259817432#c7204488260416696044' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7491539048467361046</id><published>2011-05-01T07:16:54.060-07:00</published><updated>2011-05-01T07:16:54.060-07:00</updated><title type='text'>@Anonymous No, it&amp;#39;s not just about literals.</title><content type='html'>@Anonymous No, it&amp;#39;s not just about literals.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7491539048467361046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7491539048467361046'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304259414060#c7491539048467361046' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7419115809140375517</id><published>2011-05-01T04:55:22.023-07:00</published><updated>2011-05-01T04:55:22.023-07:00</updated><title type='text'>Dan, thank you for your reply.  In fact, I knew th...</title><content type='html'>Dan, thank you for your reply.  In fact, I knew the answer to my question; I only wanted to emphasize that the type system of Haskell does not rule out perturbation confusions -- you still need to carefully insert lifts in appropriate places.  I must admit that I haven&amp;#39;t written any substantial program in Haskell that uses AD, so it may be that in practice lifts don&amp;#39;t present a real problem.  I guess it is time to write such a program.&lt;br /&gt;&lt;br /&gt;By the way, I happen to be a PhD student of Barak, and one of the things I&amp;#39;ve been thinking about recently is typology of AD.  There are a few interesting ideas floating around.  For example, dual numbers are really the tangent bundle over the real line.  What if we try to extend the tangent bundle construction to other types?  Tangent bundle is a functor T from the category of smooth manifolds to itself.  Furthermore, from the point of view of synthetic differential geometry, it is a representable functor represented by the &amp;quot;set&amp;quot; D of nilsquare elements.  In particular, it enjoys some nice properties.  Obviously, it commutes with products, so one can define T (a, b) = (T a, T b) for types.  More interestingly, if follows from the representability that T (a -&amp;gt; b) is isomorphic to a -&amp;gt; T b.  Furthermore, the representability of T implies that it admits the structure of a monad, of which lift is the unit.  This structure can also be derived directly, without appealing to synthetic differential geometry.  I can go on.&lt;br /&gt;&lt;br /&gt;Ultimately I would like to have these ideas embodied in the form of a type system that would allow us to reason about AD.  This dream is still under construction...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7419115809140375517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7419115809140375517'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304250922023#c7419115809140375517' title=''/><author><name>Oleksandr Manzyuk</name><uri>http://www.blogger.com/profile/12871948425425864333</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_r_NTBlIsUfs/SnchMmu7_II/AAAAAAAACVo/5nWZtiD3QAs/S220/manzyuk.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-384811097'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7123078696261578405</id><published>2011-05-01T04:05:58.651-07:00</published><updated>2011-05-01T04:05:58.651-07:00</updated><title type='text'>CC Shan gave a pretty good overview of the issue a...</title><content type='html'>CC Shan gave a pretty good overview of the issue and presented (even if he did not invent) the approach used to resolve it that I currently use, which is to use universal quantification to keep you from mixing up your infinitesimals, here:&lt;br /&gt;&lt;br /&gt;http://conway.rutgers.edu/~ccshan/wiki/blog/posts/Differentiation/&lt;br /&gt;&lt;br /&gt;In http://hackage.haskell.org/package/ad, I make that quantified infinitesimal do double duty as the differentiation mode. (That said, with hindsight, I would like have figured out a way to quantify over the mode separately to enable fewer things to have to dispatch with the dictionary.)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7123078696261578405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7123078696261578405'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304247958651#c7123078696261578405' title=''/><author><name>Edward Kmett</name><uri>http://www.blogger.com/profile/16144424873202502715</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-507310849'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-5530493008059482989</id><published>2011-04-30T23:01:24.532-07:00</published><updated>2011-04-30T23:01:24.532-07:00</updated><title type='text'>Is the problem Haskell&amp;#39;s overloading of numeri...</title><content type='html'>Is the problem Haskell&amp;#39;s overloading of numeric literals?  I.e. would explicitly annotating them always fix things?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/5530493008059482989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/5530493008059482989'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304229684532#c5530493008059482989' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1957960190'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-3259796846857573140</id><published>2011-04-30T18:32:05.944-07:00</published><updated>2011-04-30T18:32:05.944-07:00</updated><title type='text'>@Oleksandr Just inserting lifts anywhere to make t...</title><content type='html'>@Oleksandr Just inserting lifts anywhere to make the expression typecheck isn&amp;#39;t good practice. It&amp;#39;s easy to write code that typechecks but isn&amp;#39;t correct.&lt;br /&gt;&lt;br /&gt;The easiest rule i can suggest for now is that you need to place it around any real-valued variable involved in the computation that the lambda captures from its environment. In this case &amp;#39;lift x&amp;#39;. It&amp;#39;d be nice if the type system could spot when we need this but I don&amp;#39;t know if it can. I&amp;#39;ve never had any difficulty applying this rule but now I&amp;#39;m concerned that there may be situations where it&amp;#39;s hard to apply it. I can&amp;#39;t think of one.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/3259796846857573140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/3259796846857573140'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304213525944#c3259796846857573140' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7848406286660882526</id><published>2011-04-30T17:23:48.916-07:00</published><updated>2011-04-30T17:23:48.916-07:00</updated><title type='text'>I get a slightly different error message for examp...</title><content type='html'>I get a slightly different error message for example1:&lt;br /&gt;&lt;br /&gt;*Main&amp;gt; d (\x -&amp;gt; x*(d (\y -&amp;gt; x+y) 1)) 1&lt;br /&gt;&lt;br /&gt;&amp;lt;interactive&amp;gt;:1:12:&lt;br /&gt;    Occurs check: cannot construct the infinite type: a = D a&lt;br /&gt;      Expected type: D a&lt;br /&gt;      Inferred type: a&lt;br /&gt;    In the second argument of `(*)&amp;#39;, namely `(d (\ y -&amp;gt; x + y) 1)&amp;#39;&lt;br /&gt;    In the expression: x * (d (\ y -&amp;gt; x + y) 1)&lt;br /&gt;&lt;br /&gt;And now something curious happens: based solely on this error message my initial, arguably naive guess would be to insert lift around the second argument of (*), like this:&lt;br /&gt;&lt;br /&gt;*Main&amp;gt; d (\x -&amp;gt; x * lift (d (\y -&amp;gt; x+y) 1)) 1&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;This even typechecks, but produces the wrong answer.  How do you know where to insert lift?  The type system does not help you here.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7848406286660882526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/7848406286660882526'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304209428916#c7848406286660882526' title=''/><author><name>Oleksandr Manzyuk</name><uri>http://www.blogger.com/profile/12871948425425864333</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_r_NTBlIsUfs/SnchMmu7_II/AAAAAAAACVo/5nWZtiD3QAs/S220/manzyuk.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-384811097'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-6713559227035434444</id><published>2011-04-30T14:18:08.256-07:00</published><updated>2011-04-30T14:18:08.256-07:00</updated><title type='text'>Chris,

&amp;gt; the Haskell code really does give an ...</title><content type='html'>Chris,&lt;br /&gt;&lt;br /&gt;&amp;gt; the Haskell code really does give an incorrect answer.&lt;br /&gt;&lt;br /&gt;That&amp;#39;s no incorrect answer. You&amp;#39;ve asked to evaluate the derivative at a weird value, not the integer 1. But I agree that it could be misread as 1, especially to someone not familiar with the Num typeclass. So you&amp;#39;ve convinced me that there are indeed dangers here. I&amp;#39;ve modified my position with an update.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/6713559227035434444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/6713559227035434444'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304198288256#c6713559227035434444' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-5967788864185024848</id><published>2011-04-30T13:17:15.377-07:00</published><updated>2011-04-30T13:17:15.377-07:00</updated><title type='text'>If you write some Haskell code that requires lifts...</title><content type='html'>If you write some Haskell code that requires lifts (that includes code like that using monad transformers or using fmaps with functors) but deliberately leave out the lifts and then at the end hunt around at random to find places where you can insert lifts to keep the type checker happy, then you can expect buggy code.&lt;br /&gt;&lt;br /&gt;S&amp;amp;P exhibit the function called constant_one with type signature: Num a =&amp;gt; D a -&amp;gt; a. The type signature should make you suspicious. In fact constant_one (D 10 1), say, is not 1. You don&amp;#39;t fix the code by inserting a lift at &amp;quot;at the point of type violation&amp;quot;. I&amp;#39;m not sure what to call that kind of debugging. When I debug code I think about the semantics of what I&amp;#39;m doing.&lt;br /&gt;&lt;br /&gt;Note that you can write an analogous version of  should_be_one for the symbolic differentiator too.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/5967788864185024848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/5967788864185024848'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304194635377#c5967788864185024848' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://homepage.mac.com/sigfpe/.Pictures/Photo%20Album%20Pictures/2002-12-07%2014.53.40%20-0800/ImageDSC01397_1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-961546855'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-6617927998234111665</id><published>2011-04-30T13:07:39.634-07:00</published><updated>2011-04-30T13:07:39.634-07:00</updated><title type='text'>Anonymous, I wrote what I think is a very accessib...</title><content type='html'>Anonymous, I wrote what I think is a very accessibly introduction some 4 or so years ago.&lt;br /&gt;&lt;br /&gt;http://cdsmith.wordpress.com/2007/11/29/some-playing-with-derivatives/</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/6617927998234111665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/6617927998234111665'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304194059634#c6617927998234111665' title=''/><author><name>Chris Smith</name><uri>http://www.blogger.com/profile/10635500913510539345</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1808280734'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-479668644008927190</id><published>2011-04-30T13:06:04.672-07:00</published><updated>2011-04-30T13:06:04.672-07:00</updated><title type='text'>Here&amp;#39;s an example (by Barak Perlmutter, which ...</title><content type='html'>Here&amp;#39;s an example (by Barak Perlmutter, which he provided me some time ago) where the Haskell code really does give an incorrect answer.&lt;br /&gt;&lt;br /&gt;    d (\x -&amp;gt; (d (x*) 2)) 1&lt;br /&gt;&lt;br /&gt;This gives an incorrect answer when you keep the rank 1 type assigned by type inference to d.  However, if you write the rank 2 type that d should logically have:&lt;br /&gt;&lt;br /&gt;    dd :: Num t =&amp;gt; (forall a. Num a =&amp;gt; a -&amp;gt; a) -&amp;gt; t -&amp;gt; t&lt;br /&gt;&lt;br /&gt;then it fails with an error as well.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/479668644008927190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/479668644008927190'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304193964672#c479668644008927190' title=''/><author><name>Chris Smith</name><uri>http://www.blogger.com/profile/10635500913510539345</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1808280734'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-1368739690707108084</id><published>2011-04-30T12:56:59.085-07:00</published><updated>2011-04-30T12:56:59.085-07:00</updated><title type='text'>Where can I find a nice accessible introduction to...</title><content type='html'>Where can I find a nice accessible introduction to AD? It intrigues me.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/1368739690707108084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/1368739690707108084'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304193419085#c1368739690707108084' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-765992110'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-2280386208702312444</id><published>2011-04-30T12:44:10.359-07:00</published><updated>2011-04-30T12:44:10.359-07:00</updated><title type='text'>I was also puzzled by the problem claimed in that ...</title><content type='html'>I was also puzzled by the problem claimed in that paper.  But then at the end of the paper S&amp;amp;P presented Haskell code that they claimed would demonstrate the problem.&lt;br /&gt;&lt;br /&gt;I didn&amp;#39;t try out this code.  Does their presented code actually demonstrate a problem?  Or does it fail with a type error such as the ones you showed? Or something else?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/2280386208702312444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/393797559188947149/comments/default/2280386208702312444'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html?showComment=1304192650359#c2280386208702312444' title=''/><author><name>blog</name><uri>http://blog.plover.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2011/04/perturbation-confusion-confusion.html' ref='tag:blogger.com,1999:blog-11295132.post-393797559188947149' source='http://www.blogger.com/feeds/11295132/posts/default/393797559188947149' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1905511074'/></entry></feed>
