Random Hacks: Derivatives of algebraic data structures: An excellent tutorial
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial
en-us40Technology and Other Fun Stuff"Derivatives of algebraic data structures: An excellent tutorial" by Frank Atanassow<p>@Eric I beg to differ. The article starts, “With the spreading popularity of languages like F# and Haskell, many people are encountering the concept of an algebraic data type for the first time. When that term is produced without explanation, it almost invariably becomes a source of confusion. In what sense are data types algebraic?”</p>
<p>So whereas they claim to explain in what sense an adt is algebraic, what they end up explaining is in what sense the kind * is algebraic.</p>Tue, 24 May 2011 20:30:41 +0000urn:uuid:315bc7f5-70f3-44f0-b350-3e2b12d3bc44
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial#comment-843
"Derivatives of algebraic data structures: An excellent tutorial" by Eric<p>Aleksey, Steve: Thank you! I fixed the link.</p>
<p>Frank: Surely, among consenting category theorists, all isomorphic objects are identical. ;-) Thank you for the correction.</p>
<p>The article isn’t trying to explain algebraic data types by an analogy to differention. Rather, it’s trying to explain type differentiation, and it needs to define a loose algebra of types to get there.</p>Mon, 23 May 2011 13:04:02 +0000urn:uuid:bff740aa-3380-48aa-86aa-5fe377809c4c
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial#comment-841
"Derivatives of algebraic data structures: An excellent tutorial" by Steve Massey<p>This is the same paper:</p>
<p>http://strictlypositive.org/Dissect.pdf</p>Sun, 22 May 2011 10:42:48 +0000urn:uuid:befc75bf-b0d4-444c-a5b2-b363276f6562
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial#comment-840
"Derivatives of algebraic data structures: An excellent tutorial" by Aleksey Khudyakov<p>This link leads to 403 page. Is this paper available anywhere else?</p>
<p>http://www.cs.nott.ac.uk/~ctm/Dissect.pdf</p>Sat, 21 May 2011 14:08:02 +0000urn:uuid:f4105c04-9a23-4018-b76b-5fea2a4e80f2
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial#comment-839
"Derivatives of algebraic data structures: An excellent tutorial" by Frank Atanassow<p>I only read the first half, and it looks like a nice tutorial, but it does not explain what it claims to explain, namely in what sense adt’s are algebraic.</p>
<p>Algebraic datatypes are not called algebraic because type constructors form an algebra, but rather because data constructors do. In fact, type constructors do not even form an algebra; they form a pseudo-algebra, which is a generalization of algebras. That is why properties like associativity of products only hold up to (unique, natural) isomorphism rather than up to type equality.</p>
<p>If you want to explain the algebraic nature of Haskell datatypes with an allusion to differentiation, you can do it by defining a datatype, say, of polynomials.</p>Fri, 20 May 2011 23:47:27 +0000urn:uuid:f84ba62e-37d3-43fb-85d9-92139044456b
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial#comment-837
Derivatives of algebraic data structures: An excellent tutorial<p>Last month, the folks at Lab49 explained <a href="http://blog.lab49.com/archives/3011">how to compute the derivative of a data structure</a>. This is a great example of how to write about mathematical subjects for a casual audience: They draw analogies to well-known programming languages, they follow a single, well-chosen thread of explanation, and there’s a clever payoff at the end.</p>
<p>The Lab49 blog post is, of course, based on two <a href="http://strictlypositive.org/diff.pdf">classic</a> <a href="http://strictlypositive.org/Dissect.pdf">papers</a> by Conor McBride, and Huet’s original paper <a href="http://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf">The Zipper</a>.</p>
<p>If you’re interested in real-world applications of this technique, there’s a great explanation in the final chapter of <a href="http://learnyouahaskell.com/zippers">Learn You a Haskell for Great Good</a>. If you’re interested in some deeper mathematical connections, see the <a href="http://lambda-the-ultimate.org/node/1957">discussion at Lambda the Ultimate</a>.</p>Fri, 20 May 2011 20:01:00 +0000urn:uuid:1f6b612b-f3cd-4f3a-8442-d23ce7769c8cEric Kidd
http://www.randomhacks.net/articles/2011/05/20/derivatives-of-algebraic-data-structures-an-excellent-tutorial
HaskellMathhttp://www.randomhacks.net/articles/trackback/836