<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Mathematical Pamphlet</title>
	<link>http://www.kennknowles.com/blog</link>
	<description>Mathematics, Haskell, and little bit of Linux</description>
	<pubDate>Sat, 12 Jul 2008 20:17:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Debugging Mesa DRI for the Intel i965 on a Lenovo R61</title>
		<link>http://www.kennknowles.com/blog/2008/07/12/debugging-mesa-dri-for-the-intel-i965-on-a-lenovo-r61/</link>
		<comments>http://www.kennknowles.com/blog/2008/07/12/debugging-mesa-dri-for-the-intel-i965-on-a-lenovo-r61/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 20:17:23 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[DRI]]></category>

		<category><![CDATA[i915]]></category>

		<category><![CDATA[i965]]></category>

		<category><![CDATA[Lenovo R61]]></category>

		<category><![CDATA[Mesa]]></category>

		<category><![CDATA[OpenGL]]></category>

		<category><![CDATA[X.org]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/07/12/debugging-mesa-dri-for-the-intel-i965-on-a-lenovo-r61/</guid>
		<description><![CDATA[Here I am trying to crank out something for the ICFP Programming Contest and I have a huge host of OpenGL problems with my new laptop.  This stuff should come in handy for all those people out there with a Lenovo R61 running Gentoo Linux with Mesa 6.5&#8230; all two of them.

Anyhow, no math [...]]]></description>
			<content:encoded><![CDATA[<p>Here I am trying to crank out something for the <a href="http://www.icfpcontest.org/">ICFP Programming Contest</a> and I have a huge host of OpenGL problems with my new laptop.  This stuff should come in handy for all those people out there with a Lenovo R61 running Gentoo Linux with Mesa 6.5&#8230; all two of them.</p>

<p>Anyhow, no math or programming in this post, I'm afraid, just good old-fashioned system debugging.
 <a href="http://www.kennknowles.com/blog/2008/07/12/debugging-mesa-dri-for-the-intel-i965-on-a-lenovo-r61/#more-65" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/07/12/debugging-mesa-dri-for-the-intel-i965-on-a-lenovo-r61/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is defunctionalization?</title>
		<link>http://www.kennknowles.com/blog/2008/05/24/what-is-defunctionalization/</link>
		<comments>http://www.kennknowles.com/blog/2008/05/24/what-is-defunctionalization/#comments</comments>
		<pubDate>Sat, 24 May 2008 21:57:15 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Reading]]></category>

		<category><![CDATA[church encoding]]></category>

		<category><![CDATA[continuations]]></category>

		<category><![CDATA[defunctionalization]]></category>

		<category><![CDATA[operational semantics]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/05/24/what-is-defunctionalization/</guid>
		<description><![CDATA[I recently gave a little demonstration entitled "What is Defunctionalization?" for UCSC TWIGS (the acronym, stolen from a similar seminar in the the U. Mass. math department, stands for The "What Is &#8230; ?" Graduate Seminar).  The inspiration for this talk was just to present what I'd learned after Conor McBride's brilliant presentation at [...]]]></description>
			<content:encoded><![CDATA[<p>I recently gave a little demonstration entitled "What is Defunctionalization?" for <a href="http://slang.soe.ucsc.edu/wiki/doku.php?id=twigs#spring08">UCSC TWIGS</a> (the acronym, stolen from a <a href="http://www.math.umass.edu/~hajir/twigsf03.html">similar seminar</a> in the the U. Mass. math department, stands for <strong>T</strong>he "<strong>W</strong>hat <strong>I</strong>s &#8230; ?" <strong>G</strong>raduate <strong>S</strong>eminar).  The inspiration for this talk was just to present what I'd learned after Conor McBride's brilliant presentation at POPL'08 drove me to put the words "Olivier Danvy defunctionalize continuation" into Google.</p>

<p>I coded the simplest examples from</p>

<ul>
<li><a href="http://www.brics.dk/RS/01/23/">Defunctionalization at work</a>. O Danvy, LR Nielsen.  PPDP 2001.</li>
</ul>

<p>in literate Haskell for the audience, and also showed off QuickCheck a little to make sure the translation was correct (finding one error, if I recall).</p>

<p><center><img src='http://www.kennknowles.com/blog/wp-content/uploads/2008/05/nolambda-med.png' alt='nolambda-med.png' /></center></p>

<p>This blog post is a merging of my talk outline and new stuff that came up live.  Try loading it up in GHCi or Haskell-mode and running the examples and QuickCheck properties.
 <a href="http://www.kennknowles.com/blog/2008/05/24/what-is-defunctionalization/#more-62" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/05/24/what-is-defunctionalization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging with Open Recursion Mixins</title>
		<link>http://www.kennknowles.com/blog/2008/05/10/debugging-with-open-recursion-mixins/</link>
		<comments>http://www.kennknowles.com/blog/2008/05/10/debugging-with-open-recursion-mixins/#comments</comments>
		<pubDate>Sat, 10 May 2008 21:19:25 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[coproduct]]></category>

		<category><![CDATA[debugging]]></category>

		<category><![CDATA[expression problem]]></category>

		<category><![CDATA[mixin]]></category>

		<category><![CDATA[monad]]></category>

		<category><![CDATA[open recursion]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/05/10/debugging-with-open-recursion-mixins/</guid>
		<description><![CDATA[The call is out for submissions to the next issue of The Monad.Reader!  To get an idea of the content (and because Don Stewart told us all to read every past
issue) I cracked open Issue 10, which has a nice tutorial by B Pope on the GHCi debugger.

But having just finished a post using [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.haskell.org/pipermail/haskell-cafe/2008-May/042493.html">call is out</a> for submissions to the next issue of <a href="http://www.haskell.org/haskellwiki/The_Monad.Reader">The Monad.Reader</a>!  To get an idea of the content (and because <a href="http://www.haskell.org/pipermail/haskell-cafe/2008-May/042580.html">Don Stewart told us all to read every past
issue</a>) I cracked open <a href="http://www.haskell.org/sitewiki/images/0/0a/TMR-Issue10.pdf">Issue 10</a>, which has a nice tutorial by B Pope on the GHCi debugger.</p>

<p>But having just finished <a href="http://www.kennknowles.com/blog/2008/05/07/ctl-model-checking-in-haskell-a-classic-algorithm-explained-as-memoization/">a post using open recursion</a>, it immediately cried out to me that open-recursive functions already have some debugging hooks for tracing/breakpoints/etc.  Naturally, some complications arose, and I got to try out some other cool ideas from the literature.</p>

<p>To combine the <code>State</code> in which I store the memoization table with the <code>IO</code> I use for debugging, I use</p>

<ul>
<li><a href="http://www.mcs.le.ac.uk/~ng13/papers/icfp02.ps.gz">Composing monads using coproducts</a>.  C Lüth, N Ghani.  ICFP 2002.</li>
</ul>

<p>And then to reduce the plumbing overhead I use</p>

<ul>
<li><a href="http://www.cs.nott.ac.uk/~wss/Publications/DataTypesALaCarte.pdf">Data Types a la Carte</a>.  W Swierstra. Accepted to JFP.</li>
</ul>

<p>This post is, as usual, a literate Haskell file so load it up in GHCi or Emacs Haskell-mode and see what happens.
 <a href="http://www.kennknowles.com/blog/2008/05/10/debugging-with-open-recursion-mixins/#more-61" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/05/10/debugging-with-open-recursion-mixins/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CTL Model Checking in Haskell:  A Classic Algorithm Explained as Memoization</title>
		<link>http://www.kennknowles.com/blog/2008/05/07/ctl-model-checking-in-haskell-a-classic-algorithm-explained-as-memoization/</link>
		<comments>http://www.kennknowles.com/blog/2008/05/07/ctl-model-checking-in-haskell-a-classic-algorithm-explained-as-memoization/#comments</comments>
		<pubDate>Wed, 07 May 2008 09:13:46 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Reading]]></category>

		<category><![CDATA[memoization]]></category>

		<category><![CDATA[model checking]]></category>

		<category><![CDATA[monads]]></category>

		<category><![CDATA[open recursion]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/05/07/ctl-model-checking-in-haskell-a-classic-algorithm-explained-as-memoization/</guid>
		<description><![CDATA[As an exercise, since my reading group was discussing model checking this week, I implemented the classic model checker for CTL specifications from the 1986 paper


Automatic Verification of Concurrent Systems Using Temporal Logic Specifications by EM Clarke, EM Emerson, AP Sistla.


The "efficient algorithm" presented in the paper is, upon reflection, merely a memoized traversal of [...]]]></description>
			<content:encoded><![CDATA[<p>As an exercise, since my reading group was discussing model checking this week, I implemented the classic model checker for CTL specifications from the 1986 paper</p>

<ul>
<li><a href="http://research.microsoft.com/users/qadeer/cse599f/papers/clarke-toplas.pdf">Automatic Verification of Concurrent Systems Using Temporal Logic Specifications</a> by EM Clarke, EM Emerson, AP Sistla.</li>
</ul>

<p>The "efficient algorithm" presented in the paper is, upon reflection, merely a memoized traversal of the state machine,
so I combined it with a modified version of</p>

<ul>
<li><a href="http://www.cs.utexas.edu/~wcook/Drafts/2006/MemoMixins.pdf">Monadic Memoization Mixins</a> by D Brown, WR Cook</li>
</ul>

<p>which actually eliminated an auxilliary function from the algorithm, yielding an efficiently-executable 20-line Haskell specification of the meaning of CTL (which is probably clearer than my English prose explanation, and certainly more fun to play with).</p>

<p><a href='http://www.kennknowles.com/blog/wp-content/uploads/2008/05/redyellowgreen.png' title='redyellowgreen.png'><img src='http://www.kennknowles.com/blog/wp-content/uploads/2008/05/redyellowgreen.png' alt='redyellowgreen.png' /></a></p>

<p>This post is, as usual, literate Haskell.  Load it up in GHCi, Haskell-mode, or compile it with <code>ghc --make</code> and try it out.  Maybe you can convince my state space exploration not to terminate <img src='http://www.kennknowles.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://www.kennknowles.com/blog/2008/05/07/ctl-model-checking-in-haskell-a-classic-algorithm-explained-as-memoization/#more-58" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/05/07/ctl-model-checking-in-haskell-a-classic-algorithm-explained-as-memoization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using HaXml to make a PDF slideshow from an Inkscape SVG</title>
		<link>http://www.kennknowles.com/blog/2008/04/20/using-haxml-to-make-a-pdf-slideshow-from-an-inkscape-svg/</link>
		<comments>http://www.kennknowles.com/blog/2008/04/20/using-haxml-to-make-a-pdf-slideshow-from-an-inkscape-svg/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 09:01:21 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[LaTeX]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[gournal]]></category>

		<category><![CDATA[HaXml]]></category>

		<category><![CDATA[Inkscape]]></category>

		<category><![CDATA[jarnal]]></category>

		<category><![CDATA[note-taking]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[slide]]></category>

		<category><![CDATA[SVG]]></category>

		<category><![CDATA[XML]]></category>

		<category><![CDATA[xournal]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/04/20/using-haxml-to-make-a-pdf-slideshow-from-an-inkscape-svg/</guid>
		<description><![CDATA[I recently got a tablet to input handwritten math for slideshow presentations, but instead of using a note-taking program (Jarnal,
Xournal,
Gournal) I decided that I wanted the full power of image manipulation of a program like Gimp or Inkscape.  Neither of these, though, has the level of support for multi-page documents that you find in [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got a tablet to input handwritten math for slideshow presentations, but instead of using a note-taking program (<a href="http://www.dklevine.com/general/software/tc1000/jarnal.htm">Jarnal</a>,
<a href="http://xournal.sourceforge.net/">Xournal</a>,
<a href="http://www.adebenham.com/gournal/">Gournal</a>) I decided that I wanted the full power of image manipulation of a program like <a href="http://www.gimp.org/">Gimp</a> or <a href="http://www.inkscape.org/">Inkscape</a>.  Neither of these, though, has the level of support for multi-page documents that you find in note-taking software.  But Inkscape uses SVG as its native file format, so I wrote this Haskell script to transform the layers of an Inkscape SVG file into the slides of a PDF presentation.  I use the
<a href="http://www.cs.york.ac.uk/fp/HaXml/">HaXml</a> library to manipulate the SVG, the Inkscape command-line interface to convert each page to PDF, and <a href="http://www.pdfhacks.com/pdftk/">pdftk</a> to glue the whole thing back together.</p>

<p><a href='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/Slide001.svg' title='slide001.svg'><img width='200' src='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/slide001.png' alt='slide001.png' /></a>
<a href='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/Slide002.svg' title='slide002.png'><img width='200' src='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/slide002.png' alt='slide002.png' /></a></p>

<p><a href='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/Slide003.svg' title='slide003.png'><img width='200' src='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/slide003.png' alt='slide003.png' /></a>
<a href='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/Slide004.svg' title='slide004.png'><img width='200' src='http://www.kennknowles.com/blog/wp-content/uploads/2008/04/slide004.png' alt='slide004.png' /></a></p>

<p>As usual, this post is a literate Haskell file, so you can try it out by saving it to <code>Inkscape.lhs</code>, compiling with <code>ghc --make Inkscape</code>, grabbing the <a href="http://www.kennknowles.com/blog/wp-content/uploads/2008/04/demo.svg">source file for the images above</a>, and running <code>./Inkscape &lt; demo.svg</code>.  The output will appear in <code>Slides.pdf</code> (and your directory will be polluted with temp files, so be aware).
 <a href="http://www.kennknowles.com/blog/2008/04/20/using-haxml-to-make-a-pdf-slideshow-from-an-inkscape-svg/#more-53" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/04/20/using-haxml-to-make-a-pdf-slideshow-from-an-inkscape-svg/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Drawing fractals in Haskell with a cursor graphics DSEL and a cute list representation</title>
		<link>http://www.kennknowles.com/blog/2008/04/16/drawing-fractals-in-haskell-with-a-cursor-graphics-dsel-and-a-cute-list-representation/</link>
		<comments>http://www.kennknowles.com/blog/2008/04/16/drawing-fractals-in-haskell-with-a-cursor-graphics-dsel-and-a-cute-list-representation/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 18:02:52 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[cantor set]]></category>

		<category><![CDATA[fractal]]></category>

		<category><![CDATA[heighway dragon]]></category>

		<category><![CDATA[iterated function system]]></category>

		<category><![CDATA[koch curve]]></category>

		<category><![CDATA[koch snowflake]]></category>

		<category><![CDATA[list representation]]></category>

		<category><![CDATA[monoid homomorphism]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/04/16/drawing-fractals-in-haskell-with-a-cursor-graphics-dsel-and-a-cute-list-representation/</guid>
		<description><![CDATA[I'm reading the very fun Measure, Topology, and Fractal Geometry by GA Edgar, and thought I'd hack up some of the examples in Haskell.  So this post implements cursor graphics in OpenGL in (I think) DSEL style, demonstrating the StateT and Writer monad gadgets from the
standard library and a cool "novel representation of lists" [...]]]></description>
			<content:encoded><![CDATA[<p>I'm reading the very fun <em>Measure, Topology, and Fractal Geometry</em> by GA Edgar, and thought I'd hack up some of the examples in Haskell.  So this post implements cursor graphics in OpenGL in (I think) DSEL style, demonstrating the <code>StateT</code> and <code>Writer</code> monad gadgets from the
standard library and a cool "novel representation of lists" due to R Hughes. On the fractal side, the examples will hopefully convince you that fractals are not just cute pictures, but extremely important illustrations that the real numbers are weird.</p>

<p><img width='400' src='http://kennknowles.com/blog/wp-content/uploads/2008/04/heighway3small.png' /></p>

<p>As usual, you can save this post to <code>Fractals.lhs</code> and compile it with <code>ghc --make Fractals</code> <a href="http://www.kennknowles.com/blog/2008/04/16/drawing-fractals-in-haskell-with-a-cursor-graphics-dsel-and-a-cute-list-representation/#more-42" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/04/16/drawing-fractals-in-haskell-with-a-cursor-graphics-dsel-and-a-cute-list-representation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using OpenGL's blending to visualize congestion in convex routing (in Haskell)</title>
		<link>http://www.kennknowles.com/blog/2008/03/23/using-opengls-blending-to-visualize-congestion-in-convex-routing-in-haskell/</link>
		<comments>http://www.kennknowles.com/blog/2008/03/23/using-opengls-blending-to-visualize-congestion-in-convex-routing-in-haskell/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 23:44:40 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[blending]]></category>

		<category><![CDATA[OpenGL]]></category>

		<category><![CDATA[random]]></category>

		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2008/03/23/using-opengls-blending-to-visualize-congestion-in-convex-routing-in-haskell/</guid>
		<description><![CDATA[This is a question posed in my randomized algorithms class.  If you are routing in a network whose connectivity looks "more or less" like a convex figure, what does the congestion look like?  A quick way to make an educated guess is to draw a bunch of random line segments in such a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a question posed in my randomized algorithms class.  If you are routing in a network whose connectivity looks "more or less" like a convex figure, what does the congestion look like?  A quick way to make an educated guess is to draw a bunch of random line segments in such a convex shape and see where the colors get the brightest:</p>

<p><img src="http://www.kennknowles.com/blog/wp-content/uploads/2008/03/congestion.png" alt="Congestion" /></p>

<p>This post is literate Haskell that will output that image, so save it to something like <code>Congestion.lhs</code> and run <code>ghc --make Congestion.lhs</code>.   <a href="http://www.kennknowles.com/blog/2008/03/23/using-opengls-blending-to-visualize-congestion-in-convex-routing-in-haskell/#more-40" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2008/03/23/using-opengls-blending-to-visualize-congestion-in-convex-routing-in-haskell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reading Cluster: Recreational Mathematics</title>
		<link>http://www.kennknowles.com/blog/2007/12/29/reading-cluster-recreational-mathematics/</link>
		<comments>http://www.kennknowles.com/blog/2007/12/29/reading-cluster-recreational-mathematics/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 23:51:54 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Reading]]></category>

		<category><![CDATA[math]]></category>

		<category><![CDATA[recreation]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2007/12/29/reading-cluster-recreational-mathematics/</guid>
		<description><![CDATA[I read a lot, perhaps to the
detriment of my eventual graduation plans.  Recently, I've been enjoying books of
"recreational mathematics."  This
is a combined review of all such books I've read recently.
]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://kennknowles.com/reading/">read a lot</a>, perhaps to the
detriment of my eventual graduation plans.  Recently, I've been enjoying books of
"recreational mathematics."  This
is a combined review of all such books I've read recently.
 <a href="http://www.kennknowles.com/blog/2007/12/29/reading-cluster-recreational-mathematics/#more-38" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2007/12/29/reading-cluster-recreational-mathematics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Infinite lazy Knuth-Bendix completion for monoids in Haskell</title>
		<link>http://www.kennknowles.com/blog/2007/12/20/infinite-lazy-knuth-bendix-completion-for-monoids-in-haskell/</link>
		<comments>http://www.kennknowles.com/blog/2007/12/20/infinite-lazy-knuth-bendix-completion-for-monoids-in-haskell/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 21:20:14 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[group]]></category>

		<category><![CDATA[Knuth-Bendix]]></category>

		<category><![CDATA[lazy lists]]></category>

		<category><![CDATA[monoid]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[rewriting]]></category>

		<category><![CDATA[Universal algebra]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2007/12/20/infinite-lazy-knuth-bendix-completion-for-monoids-in-haskell/</guid>
		<description><![CDATA[The Knuth-Bendix completion procedure (when it succeeds) transforms a
collection of equations into a confluent, terminating rewrite
system.  Sometimes the procedure fails, and sometimes does not
terminate, but The Handbook of Computational Group Theory by D Holt
remarked that even in this case it generates an infinite set of
rewrite rules that are complete, and An Introduction to Knuth-Bendix
Completion [...]]]></description>
			<content:encoded><![CDATA[<p>The Knuth-Bendix completion procedure (when it succeeds) transforms a
collection of equations into a confluent, terminating rewrite
system.  Sometimes the procedure fails, and sometimes does not
terminate, but <em>The Handbook of Computational Group Theory</em> by D Holt
remarked that even in this case it generates an <em>infinite</em> set of
rewrite rules that are complete, and <em>An Introduction to Knuth-Bendix
Completion</em> by AJJ Dick also mentions that in the nonterminating case
one can derive a semi-decision procedure for equality checking.  I naturally had to hack
this up in Haskell, to create an infinite set of rewrite rules as a
lazy list.  This illustrates the very real software engineering
benefit of decoupling creation and consumption of infinite data.  As
usual, this post is a valid literate Haskell file, so save it so
something like <code>KnuthBendix.lhs</code> and compile with <code>ghc --make
KnuthBendix</code> or load it up with <code>ghci KnuthBendix.lhs</code>
 <a href="http://www.kennknowles.com/blog/2007/12/20/infinite-lazy-knuth-bendix-completion-for-monoids-in-haskell/#more-37" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2007/12/20/infinite-lazy-knuth-bendix-completion-for-monoids-in-haskell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Calculating the reflect-rotate-translate normal form for an isometry of the plane in Haskell, and verifying it with QuickCheck.</title>
		<link>http://www.kennknowles.com/blog/2007/12/03/calculating-the-reflect-rotate-translate-normal-form-for-an-isometry-of-the-plane-in-haskell-and-verifying-it-with-quickcheck/</link>
		<comments>http://www.kennknowles.com/blog/2007/12/03/calculating-the-reflect-rotate-translate-normal-form-for-an-isometry-of-the-plane-in-haskell-and-verifying-it-with-quickcheck/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 08:53:10 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
		
		<category><![CDATA[Haskell]]></category>

		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Euclidean group]]></category>

		<category><![CDATA[Isometry]]></category>

		<category><![CDATA[QuickCheck]]></category>

		<guid isPermaLink="false">http://www.kennknowles.com/blog/2007/12/03/calculating-the-reflect-rotate-translate-normal-form-for-an-isometry-of-the-plane-in-haskell-and-verifying-it-with-quickcheck/</guid>
		<description><![CDATA[Any isometry of the plane has a unique normal form as the composition of a translation, rotation and reflection.  This note computes this normal form and tests the implementation using the QuickCheck automated testing tool for Haskell. To generate random test data, I use another characterization of isometries as products of up to three [...]]]></description>
			<content:encoded><![CDATA[<p>Any isometry of the plane has a unique normal form as the composition of a translation, rotation and reflection.  This note computes this normal form and tests the implementation using the QuickCheck automated testing tool for Haskell. To generate random test data, I use another characterization of isometries as products of up to three reflections.  This post is a valid literate Haskell file, so save it to something like <code>Isometries.lhs</code> and run <code>ghc --make Isometries</code>.  Then check it with <code>quickCheck +names Isometries.lhs</code>.
 <a href="http://www.kennknowles.com/blog/2007/12/03/calculating-the-reflect-rotate-translate-normal-form-for-an-isometry-of-the-plane-in-haskell-and-verifying-it-with-quickcheck/#more-22" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennknowles.com/blog/2007/12/03/calculating-the-reflect-rotate-translate-normal-form-for-an-isometry-of-the-plane-in-haskell-and-verifying-it-with-quickcheck/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
