<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Formalized Mathematics</title>
	<atom:link href="http://slawekk.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://slawekk.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<pubDate>Sun, 04 May 2008 22:45:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>IsarMathLib version 1.6.3 released</title>
		<link>http://slawekk.wordpress.com/2008/04/26/isarmathlib-version-163-released/</link>
		<comments>http://slawekk.wordpress.com/2008/04/26/isarmathlib-version-163-released/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 00:13:12 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[IsarMathLib releases]]></category>

		<category><![CDATA[formalized mathematics]]></category>

		<guid isPermaLink="false">http://slawekk.wordpress.com/?p=20</guid>
		<description><![CDATA[The release happened actually more than a week ago, but it is only now that I got around to write about it.
The release brought very little of new formalized mathematics. Most of the effort went into getting the TiddlyWiki rendering work with more  IsarMathLib theories. This requires improving the Isar parser and modifying the theories  [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The release happened actually more than a week ago, but it is only now that I got around to write about it.</p>
<p>The release brought very little of new formalized mathematics. Most of the effort went into getting the <a title="Tiddly Formal Math" href="http://formalmath.tiddlyspot.com/" target="_self">TiddlyWiki rendering </a>work with more  <a title="IsarMathLib" href="http://www.nongnu.org/isarmathlib/" target="_self">IsarMathLib</a> theories. This requires improving the Isar parser and modifying the theories  to conform to the Isar dialect that the parses assumes. As I modify the theories the Tiddly Formal Math site content diverges from the last released proof document and this release fixes that. The only significant change was the addition of a small tutorial on reading Isar formal proofs in the new <a title="Introduction.thy" href="http://formalmath.tiddlyspot.com/#Introduction" target="_self">Introduction.thy</a> theory.</p>
<p>The IsarMathLib&#8217;s TiddlyWiki rendering got some <a title="Mizar mailing list message" href="http://mizar.uwb.edu.pl/forum/archive/0803/msg00008.html" target="_self">praise</a> on the Mizar mailing list recently.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=20&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2008/04/26/isarmathlib-version-163-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tiddly Formal Math</title>
		<link>http://slawekk.wordpress.com/2008/03/09/tiddly-formal-math/</link>
		<comments>http://slawekk.wordpress.com/2008/03/09/tiddly-formal-math/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 15:13:54 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[announcements]]></category>

		<category><![CDATA[formalized mathematics]]></category>

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

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/?p=19</guid>
		<description><![CDATA[I have posted a TiddlyWiki rendering of two IsarMathLib theories at tiddlyspot. The theories are Finite_ZF about the finite powerset and Topology_ZF about basic general topology. The rendering looks as I expected with great display of mathematical symbols and structured proofs with subproofs expanded on demand. The only problem is the indentation. I don&#8217;t know [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have posted a <a href="http://formalmath.tiddlyspot.com/" title="Tiddly Formal Math">TiddlyWiki rendering</a> of two IsarMathLib theories at <a href="http://tiddlyspot.com/" title="TiddlyWiki hosting service">tiddlyspot</a>. The theories are Finite_ZF about the finite powerset and Topology_ZF about basic general topology. The rendering looks as I expected with great display of mathematical symbols and structured proofs with subproofs expanded on demand. The only problem is the indentation. I don&#8217;t know of a good method of controlling indentation in TiddlyWiki. There is a &#8220;{{indent{ &#8221; construct, but this indents only one line instead of a block of text and does not mix well with the sliders. The &#8220;===&#8221; markup that marks the end of the slider is not noticed by TiddlyWiki when inside an indented line. In addition, indentation achieved this way is too wide -  some twelve characters instead of perhaps three that I need for to see something like</p>
<pre><font face="courier" size="3">

   {

      <b>fix </b><img src='http://l.wordpress.com/latex.php?latex=k&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k' title='k' class='latex' />

      <b>fix </b><img src='http://l.wordpress.com/latex.php?latex=x&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x' title='x' class='latex' />

      <b>assume </b>A5: <img src='http://l.wordpress.com/latex.php?latex=k%5Cin+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k\in n' title='k\in n' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' />

      <b>with </b>A1 A3 <b>have</b> <img src='http://l.wordpress.com/latex.php?latex=a%28k%29+%5Cin++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a(k) \in  Y' title='a(k) \in  Y' class='latex' />

      <b>   using </b>apply_funtype

      <b>with </b>A2 A5 I <b>have</b> <img src='http://l.wordpress.com/latex.php?latex=%28T%28k%29%29%28x%29+%3D+f%5Clangle+x%2Ca%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(T(k))(x) = f\langle x,a(k)\rangle ' title='(T(k))(x) = f\langle x,a(k)\rangle ' class='latex' />

      <b>   using </b>fix_var_val

   }

</font></pre>
<p>There is an <a href="http://gowers.wordpress.com/2007/09/11/what-might-an-expository-mathematical-wiki-be-like/" title="Math Wiki discussion">old discussion</a> on Gower&#8217;s Weblog where Gowers says</p>
<blockquote><p>&#8220;Terry’s discussion of skeleton proofs is closely related to a fantasy I have had for a long time, which could I think become a reality. It’s to present mathematics in such a way that no step in any proof, no definition, nothing at all, is “magic”.&#8221;</p></blockquote>
<p>Indeed, this can easily become a reality with the NestedSliderPlugin for TiddlyWiki. The reader could choose to see  a short high level proof with the main points only, or expand the proofs of the facts that are unclear and see a very long and very detailed proof. Floating sliders can provide the statements of referenced theorems. This works very well to reduce verbosity of formally verifiable proofs as on the <a href="http://formalmath.tiddlyspot.com/" title="TiddlyWiki IsarMathLib rendering">Tiddly Formal Math</a> site, but would work for informal math too.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=19&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2008/03/09/tiddly-formal-math/feed/</wfw:commentRss>
		</item>
		<item>
		<title>From sea to shining sea on Amtrak</title>
		<link>http://slawekk.wordpress.com/2008/02/10/from-sea-to-shining-sea-on-amtrak/</link>
		<comments>http://slawekk.wordpress.com/2008/02/10/from-sea-to-shining-sea-on-amtrak/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 21:03:32 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[personal]]></category>

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

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/?p=18</guid>
		<description><![CDATA[I have moved with my family from California to Massachusetts. I got an idea of taking a train. I don&#8217;t like to fly and the California Zephyr train goes through the most beautiful parts of this country. It has a &#8220;sightseer&#8221; car with big windows for watching the view. I thought it would be a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have moved with my family from California to Massachusetts. I got an idea of taking a train. I don&#8217;t like to fly and the <a href="http://www.trainweb.com/routes/route_05/rg_5old.htm" title="Zephyr">California Zephyr train</a> goes through the most beautiful parts of this country. It has a &#8220;sightseer&#8221; car with big windows for watching the view. I thought it would be a four days vacation on train, fun for the kids and for us. I was wrong.<br />
We departed from Emeryville, CA on time. The first problem showed up after about two hours, between Sacramento and Truckee. Someone had tried to drive a bulldozer over a railway bridge and got stuck there. We waited for Union Pacific to clear the mess for 15 hours.<br />
It was actually not so bad for us. We were in a sleeper car. The situation of the people in the coach cars was much worse. Some were traveling with small kids, completely unprepared for longer travel. Some missed their wedding, others the Super bowl (I am not sure what that is but it seems to be very important for people here).<br />
Since there were news reporters traveling on the train, Amtrak got <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2008/02/03/BAM5UR81M.DTL&amp;hw=amtrak&amp;sn=002&amp;sc=727" title="SF Chronicle article">bad publicity</a> on this. This resulted in an Amtrak manager showing up on the train before we arrived to Chicago. He personally apologized for the 31 hours delay, which he assured us was very unusual for Amtrak. He promised that we would be put in a hotel in Chicago and our tickets would be rebooked for the same train departing two days later. It all looked good. We had a day of rest in Chicago which we used to visit the <a href="http://www.fieldmuseum.org/" title="Field museum">Field Museum</a>.<br />
However, when we showed up at the Chicago station to board the train it turned out that the rebooking part of the Amtrak&#8217;s manager promises was not quite true. The ticket counter attendant told us that he does not have space in the sleeper. The customer service representative (very unpleasant) told us that our only option was to take the coach seats. Traveling overnight in the coach seats with three small kids was out of the question. I would prefer to fly from Chicago to Boston. The problem was, Chicago airport was practically closed due to weather and most flights were canceled. Fortunately the ticket counter attendant was a bit more creative in exploring possibilities and suggested that we can take a different route to Boston through Washington, DC. So we boarded a train to Washington.<br />
After traveling about 50 minutes the bad luck struck again. There was a flash flood warning and the train slowed down to 15 miles per hour. We traveled like that through the entire state of Indiana.<br />
The next day my <a href="http://kasiavivian.blogspot.com/">daughter</a> had her 8th birthday. Instead of the new home she spent it on a train.<br />
Since the new estimated time of arrival to Washington was 1 a. m. we were &#8220;detrained&#8221; in Pittsburg and bused to Harrisburg where we took a train to Philadelphia. We arrived there about 8 p. m. After spending four hours at the magnificent <a href="http://en.wikipedia.org/wiki/30th_Street_Station">Philadelphia station</a> we took a train to Boston where we arrived on time at 7:50 a. m., about 60 hours later than the original Amtrak schedule.</p>
<p><b>Conclusions</b></p>
<p>Traveling on Amtrak for more than one night is a bad idea, especially if you want to travel with kids. Even in a sleeper car it is very tiring. The tracks are sometimes uneven and when the train travels at 80 mph the noise and vibrations make it quite difficult to sleep. You can not open a window on an Amtrak train. The air inside the cars is as dry as on an airplane. The food is tasty and abundant, but it is mostly standard American cuisine, you know, burgers and the like. There are no fruits except bananas that come with the continental breakfast. You are bound to gain weight and the gain is proportional to the time of travel. The showers in the bedrooms are too small to be usable. Taking the family bedroom is a better deal. I didn&#8217;t take it (took a standard bedroom and a roomette) because it did not have a bathroom with a shower. There is a comfortable shower next to the (only) family bedroom in the car which was the one we used anyway. And of course the schedule is a joke. Don&#8217;t travel if you have any time commitment. Be prepared that you may be stuck on the train for seventeen hours when you expected a two hours trip. This is much better on the east coast which is the &#8220;Amtrak territory&#8221;, according to one of the car attendants. This means that Amtrak owns the tracks. In other parts of the country Amtrak trains have the lowest priority and have to wait for freight trains.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=18&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2008/02/10/from-sea-to-shining-sea-on-amtrak/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MathWiki conference III</title>
		<link>http://slawekk.wordpress.com/2008/01/13/mathwiki-conference-iii/</link>
		<comments>http://slawekk.wordpress.com/2008/01/13/mathwiki-conference-iii/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 18:27:25 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/2008/01/13/mathwiki-conference-iii/</guid>
		<description><![CDATA[Aarne Ranta on Formal Mathematics in Informal Language
This talk considers generating readable prezentations of formalized mathematics as a special case of parsing and generating natural language statements. It looks like the idea is to translate at least formal definitions and statements, and perhaps also proofs, into the GF language, then generate natural language(s) reprezentation from [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>Aarne Ranta on Formal Mathematics in Informal Language</b></p>
<p>This <a href="http://homepages.inf.ed.ac.uk/rpollack/mathWiki/slides/Ranta.pdf" title="Aarne's talk">talk</a> considers generating readable prezentations of formalized mathematics as a special case of parsing and generating natural language statements. It looks like the idea is to translate at least formal definitions and statements, and perhaps also proofs, into the <a href="http://www.cs.chalmers.se/Cs/Research/Language-technology/GF/" title="GF grammar formalism">GF</a> language, then generate natural language(s) reprezentation from that.</p>
<p>The talk is more about computer-supported linguistics than mathematics so I don&#8217;t want to pretend I understand what is on the  slides. Some interesting comments from the author can be found on his <a href="http://www.jem-thematic.net/node/478" title="Aarne's blog">blog</a>.</p>
<p><b>Cezary Kaliszyk on teaching logic using web interface for COQ</b></p>
<p>The slides are actually about a bit more than the title says. Cezary&#8217;s <a href="http://www.cs.ru.nl/~cek/proofweb/" title="Isabelle web interface">web interface</a> to provers is the closest thing to the formalized math wiki that exists. It is quite generic and besides COQ it supports (at least) Isabelle back end. It even supports Isabelle/ZF so it already can be used for learning the prover without having to install it. I was not able to verify <a href="http://www.nongnu.org/isarmathlib/" title="IsarMathLib">IsarMathLib</a> theories though as the interface seems to have problems with mixing formal text, informal text and comments.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=17&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2008/01/13/mathwiki-conference-iii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MathWiki conference II</title>
		<link>http://slawekk.wordpress.com/2008/01/05/mathwiki-conference-ii/</link>
		<comments>http://slawekk.wordpress.com/2008/01/05/mathwiki-conference-ii/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 17:48:17 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/2008/01/05/mathwiki-conference-ii/</guid>
		<description><![CDATA[Christoph Lüth on PGIP
PGIP is a protocol for communication beween a proof assistant front end (editor) and a theorem prover. It seems that in practice at the moment it is used only by Proof General front-end to talk to Isabelle prover. I am using XEmacs based  version of Proof General and I am quite [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>Christoph Lüth on PGIP</b></p>
<p>PGIP is a protocol for communication beween a proof assistant front end (editor) and a theorem prover. It seems that in practice at the moment it is used only by <a href="http://proofgeneral.inf.ed.ac.uk/" title="ProofGeneral">Proof General</a> front-end to talk to <a href="http://isabelle.in.tum.de/" title="Isabelle theorem prover">Isabelle</a> prover. I am using XEmacs based  version of Proof General and I am quite satisfied with it. Through some wizard-level hackery the PG developers managed to coerce Emacs to display subscripts and some mathematical symbols, so it is almost WYSIWYG.</p>
<p>One of the slides from the talk is a screenshot of the new generation of Proof General, based on Eclipse. Eclipse is more known as a platform for software development tools   rather than document creation tools, so I was afraid it would be a step back as far as formalized mathematics is concerned. But from the slide I can see that there will be some mathematical symbols support. Hopefully all those gadgets around the main editing frame can be turned off and the new PG will be at least as good as the old one.</p>
<p>I am curious what was the rationale for selecting Eclipse for the Proof General basis, instead of for example creating a <a href="http://www.texmacs.org/" title="TeXmacs">GNU TeXmacs</a> PGIP plugin. TeXmacs has excellent support for mathematical typesetting and is specially designed to be a front end to other programs, currently mostly Computer Algebra Systems.</p>
<p><b>Herman Geuvers on Wiki for formalized mathematics</b></p>
<p>I think this was the most important talk on the conference. Herman Geuvers discussed the plan for getting the EU taxpayers money to finance the development of a formalized mathematics Wiki.</p>
<p>I really want this project to succeed. Writing formalized mathematics is fun, but I imagine doing it  in a collaborative Wikipedia-like environment would be much more fun.</p>
<p>In my opinion one of the main obstacles for such Wiki is that most theorem provers don&#8217;t support generating readable presentations of formalized text.</p>
<p>&#8220;Readable&#8221; means different things to different people. For some people &#8220;readable&#8221; means &#8220;looks like Lisp&#8221;. Here by &#8220;readable proof&#8221; I mean one that uses standard mathematical notation and terminology and anyone with some mathematical education is able to follow it without having to learn a new language with words like &#8220;constdefs&#8221; and &#8220;assms&#8221;.<br />
The author seems to realize the problem, but the solution that is suggested in the slides is wrong. The idea for the solution is that the formalized math Wiki would contain lots of nicely typeset informal math content so that it can compete with Wikipedia or  MathWorld. Then, as soon  as an unsuspecting visitor gets lured to the site she would be flashed with a formal proof that looks like this:</p>
<pre>
intros k l H; induction H as [|l H].

intros; absurd (S k &lt;= k); auto with arith.

destruct H; auto with arith.</pre>
<p>(this is taken from Freek Wiedijk&#8217;s <a href="http://homepages.inf.ed.ac.uk/rpollack/mathWiki/slides/Freek.pdf" title="Obstacles for formalized math wiki">slides</a>).</p>
<p>I am not against informal text. In fact, most of the volume of <a href="http://www.nongnu.org/isarmathlib/IsarMathLib/document.pdf" title="IsarMathLib proof document">IsarMathLib proof document</a> is informal. Just like a standard math paper needs more than  just definitions, theorems and proofs, formalized math text needs some informal text to dilute content, explain motivation, mention other people&#8217;s work or simply provide keywords to make searching easier. However, this should not be the main ingredient. The approach that reduces formalized text to an optional comment on the informal content misses the point. If a prover does not feature generating readable presentations, it is simply not suitable for formalized math Wiki.</p>
<p>I certainly hope that I am misunderstanding  Geuvers&#8217; vision. My opinion is mostly based on a (mockup?) slide with screenshot of a prototype of such Wiki that is included in the talk, so this is very little information. I really wish this project to be a success.</p>
<p>To be continued &#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=16&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2008/01/05/mathwiki-conference-ii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MathWiki conference I</title>
		<link>http://slawekk.wordpress.com/2008/01/01/mathwiki-conference/</link>
		<comments>http://slawekk.wordpress.com/2008/01/01/mathwiki-conference/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 20:00:00 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/2008/01/01/mathwiki-conference/</guid>
		<description><![CDATA[To my delight I have found that the all presentations from the  TYPES topical workshop &#8220;Math Wiki&#8221; that took place in Edinburg, Oct 31 - Nov 1, 2007 have been posted on the web. This is a lot of interesting reading on formalized mathematics. I will discuss some of my impressions here.
Klaus Grue on [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To my delight I have found that the all presentations from the  TYPES topical workshop &#8220;Math Wiki&#8221; that took place in Edinburg, Oct 31 - Nov 1, 2007 have been <a href="http://homepages.inf.ed.ac.uk/da/mathwiki/talks.html" title="MathWiki conference prezentations">posted</a> on the web. This is a lot of interesting reading on formalized mathematics. I will discuss some of my impressions here.</p>
<p><b>Klaus Grue on LogiWeb</b></p>
<p>This is a description  of <a href="http://yoa.dk/" title="LogiWeb site">LogiWeb</a> - a system for &#8230; I don&#8217;t really know.  My first impression was that it is kind of like <a href="http://www.qedeq.org/" title="Hilbert II">Hilbert II</a> - another project building infrastructure for formalized mathematics that asymptotically approaches the difficult part in its lifetime - actually formalizing the math and creating libraries. However after looking at the objectives (fundationally agnostic) and an example proof (very low level with no prover support) I started to think that this is how <a href="http://us.metamath.org/" title="Metamath">Metamath</a> would look like if Norman Megill had spent all these years writing software for formalizing math instead of creating formalized math.</p>
<p>As I was reading the presentation trying to understand what LogiWeb is I had more and more problems in putting some bounds on what LogiWeb can do. It  has a built-in version control (or rather package management) that allows to maintain consistency of changing interdependent knowledge representations (very good idea). It can output (&#8221;render&#8221;) files in .html, .xml, .lisp, .exe formats and in fact any other format. It can create &#8220;Logiweb machines&#8221; that are Turing-complete and support input/output capabilities, interrupt handling, distinction between supervisor and user-mode and non-preemptive scheduling. Logiweb machines can run real-time, safety critical software. As for formalized mathematics, LogiWeb can support Peano Arithmetic as well as mainstream theories like FOL, PA, ZFC, NGB and so on. That&#8217;s all great but I have a feeling that Klaus Grue uses the word &#8220;can&#8221; in a rather metaphoric way.  He should really be saying &#8220;potentially can&#8221; to be more clear.</p>
<p>To me software for doing formalized  mathematics becomes interesting when:</p>
<p>1. it supports ZF set theory or something similar (really, now, not potentially),</p>
<p>2. some work has been done on formalizing a bit more than foundations so that I can evaluate how readable the proofs can be made and how easy they are to write.</p>
<p>It looks like LogiWeb is not at this point yet.</p>
<p><b>Adam Naumowicz on Mizar</b></p>
<p>Mizar is still the best tool for a mathematician to do formalized mathematics. Online interface? Mizar <a href="http://www.wakasato.org/mizar/" title="On-line intefrace to Mizar">has had</a> it for a while now.</p>
<p>Too bad Mizar is not <a href="http://en.wikipedia.org/wiki/Free_software" title="Free software definition">free</a>.</p>
<p><b>Carsten Schürmann on Logosphere</b></p>
<p>Logosphere is a formal digital library project developed (mostly) by  	Department of Computer Science of Yale University.</p>
<p>Logosphere&#8217;s approach reminds me a bit of <a href="http://www.sagemath.org/" title="Sage mathematical software">Sage</a> - a very succesful mathematical software project which is based on integrating existing tools rather than inventing new ones, as they call it &#8220;Building the Car Instead of Reinventing the Wheel&#8221;. Similarly Logosphere tries to serve as a common platform for translation between different theorem provers.</p>
<p>Schürmann prezentation contains a very informative picture on different logical frameworks and provers that support them. This brings up the question - which foundation is the best for a community based formalized mathematics wiki project? In other words, which foundation has a best chance to attract a significant number of contributors?</p>
<p>I think there is a big difference beween the view on foundations of mathematics among mathematicians and computer scientists. If someone made a survey at a math department asking faculty a question on what mathematical foundation their work is based on, I am sure most would answer &#8220;ZFC&#8221;. The majority of the remaining ones would say that they don&#8217;t care  because it does not play any role in their work or say something generic, like &#8220;logic and set theory&#8221;, just because they are not even aware there is something else than ZFC. The majority of the remaining ones would declare that they work in category theory or maybe something more exotic like that they are constructivists.</p>
<p>Over at the computing science department the situation would be quite different. ZFC is not good for formal software verification or modeling computation. As a result there is much greater variety of logics and type theories that  count as foundations for computer scientiststs. Theorem provers are typically created at computing science departments. No wonder that so few provers (Isabelle and Mizar) support ZFC.</p>
<p>Another reason support for ZFC is rare is that funding for formalized mathematics projects is often obtained by promising something like &#8220;the production of mathematically proved programs&#8221; (Cornell, NuPrl, grant from the Office of Naval Research). Once your stated goal is formally verified software, ZFC is gone from the picture, together with a chance for a larger participation of people with standard mathematical education .</p>
<p>I am a mathematician by training and I have tried to use Isabelle/HOL. It was weird and I felt like I was writing software rather than mathematics. I could do it, but it was  not fun. Isabelle/ZF, on the other hand was easy and natural.  That&#8217;s why <a href="http://www.nongnu.org/isarmathlib/" title="IsarMathLib home page">IsarMathLib</a> is a library for Isabelle/ZF, not Isabelle/HOL.</p>
<p>To be continued&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=15&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2008/01/01/mathwiki-conference/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IsarMathLib updated to Isabelle 2007</title>
		<link>http://slawekk.wordpress.com/2007/12/31/isarmathlib-updated-to-isabelle-2007/</link>
		<comments>http://slawekk.wordpress.com/2007/12/31/isarmathlib-updated-to-isabelle-2007/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 00:40:10 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[IsarMathLib releases]]></category>

		<guid isPermaLink="false">http://slawekk.wordpress.com/2007/12/31/isarmathlib-updated-to-isabelle-2007/</guid>
		<description><![CDATA[I have released version 1.6.2 of IsarMathLib .  This is the first version that has been verified with Isabelle 2007. I also added a new thery file about folds in ZF set theory, presented before on this blog, and rewrote the theory file about semigroups.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have released version 1.6.2 of <a href="http://www.nongnu.org/isarmathlib/" title="IsarMathLib home page">IsarMathLib</a> .  This is the first version that has been verified with Isabelle 2007. I also added a new thery file about folds in ZF set theory, <a href="http://slawekk.wordpress.com/2007/12/17/folding-in-zf/">presented</a> before on this blog, and rewrote the theory file about semigroups.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=14&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2007/12/31/isarmathlib-updated-to-isabelle-2007/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to build a library of formalized mathematics</title>
		<link>http://slawekk.wordpress.com/2007/12/29/how-to-build-a-library-of-formalized-mathematics/</link>
		<comments>http://slawekk.wordpress.com/2007/12/29/how-to-build-a-library-of-formalized-mathematics/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 18:45:17 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[formalized mathematics wiki]]></category>

		<guid isPermaLink="false">http://slawekk.wordpress.com/2007/12/29/how-to-build-a-library-of-formalized-mathematics/</guid>
		<description><![CDATA[Freek Wiedijk  has posted the slides from his talk  &#8220;How to build a library of formalized mathematics&#8221;   on the MathWiki Workshop in University of Edinburgh that took place in October. The slides present Freek&#8217;s view on the main reasons why there is no large scale effort to create a good and [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Freek Wiedijk  has posted the <a href="http://www.cs.ru.nl/~freek/talks/obstacles.pdf">slides</a> from his talk <font face="geneva,helvetica"> &#8220;How to build a library of formalized mathematics&#8221;  </font> on the MathWiki Workshop in University of Edinburgh that took place in October. The slides present Freek&#8217;s view on the main reasons why there is no large scale effort to create a good and comprehensive library of formal mathematics. What I find striking is no mention of <a href="http://us.metamath.org/mpegif/mmset.html" title="Metamath">Metamath</a> among &#8220;interesting&#8221; or even &#8220;not in the top five&#8221; category. I understand that one can not mention every project (although, are there that many that have been active for more than ten years?), but Metamath is the only formalized mathematics project that managed to build community and attract contributors working without any expectation of reward. There are other formalized mathematics projects that people contribute to, but the contributions are either work of graduate students getting their degrees this way or faculty doing research for which they get their salaries. Freek mentions Linux and Wikipedia as succesfull projects based on &#8220;benevolent dictatorship&#8221;, but not the only formalized mathematics project in this category.</p>
<p>Unfortunately the slides are rather sketchy and only illustrate the main points, so it is hard to guess what was actually said. I would be happy to find out what was discussed under &#8220;formalization for communication of mathematics&#8221; and &#8220;looks do matter&#8221;. I think the most important feature needed for attracting contributors is the ability to produce readable presentations that attract readers.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=13&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2007/12/29/how-to-build-a-library-of-formalized-mathematics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IsarMathLib and Isabelle/ZF</title>
		<link>http://slawekk.wordpress.com/2007/12/22/isarmathlib-and-isabellezf/</link>
		<comments>http://slawekk.wordpress.com/2007/12/22/isarmathlib-and-isabellezf/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 21:43:45 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Isabelle/ZF]]></category>

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/2007/12/22/isarmathlib-and-isabellezf/</guid>
		<description><![CDATA[My impression that the new Isabelle 2007 does not break anything related to ZF was a bit premature. It turns out that the interpretation of locales has changed.  There is a locale (context) in IsarMathLib called MMIsar0 that is used for Metamath to Isabelle/ZF translation. This locale has twenty five assumptions corresponding to Metamath&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My impression that the new Isabelle 2007 does not break anything related to ZF was a bit premature. It turns out that the interpretation of locales has changed.  There is a locale (context) in <a href="http://www.nongnu.org/isarmathlib/" title="IsarMathLib home page">IsarMathLib</a> called <i>MMIsar0 </i>that is used for <a href="http://us.metamath.org/" title="Metamath home page">Metamath</a> to <a href="http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/ZF/index.html" title="Isabelle ZF browser">Isabelle/ZF</a> translation. This locale has twenty five assumptions corresponding to Metamath&#8217;s axioms for complex numbers. The <i>MMIsar_valid </i> theorem in <i>Metamath_interface.thy </i>shows that if we take a model of real numbers (i.e. a completely ordered field) and contruct the complex numbers from it in the standard way, then all Metamath axioms about complex numbers are satisfied. The problem is that those assumptions in <i>MMIsar0 </i>are interpreted by Isabelle 2007 not as a flat conjunction, but are grouped with parentheses into a complicated structure nested up to four levels deep in some places. It is not a show stopper, but it will take  me some time to  reflect this nesting structure in the proof.</p>
<p>This is a symptom of a deeper, architectural problem. When verifying a proof written in Isar  Isabelle searches for a low-level proof and once it finds one it considers the Isar proof verified, so it discards the low-level proof. This causes problems every time the proof searching algorithm is changed - that is with every new Isabelle release. Some proofs that were succesfully verified before don&#8217;t check any more. The only solution to this is to design a system so that the low-level proof is not discarded. Once the low-level proof corresponding to high-level source constructs is found, it can serve as the basis of verification and does not need to be generated again. I think while Isar is great for a high-level proof language,  something like Metamath would be great as the underlying low-level language.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=12&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2007/12/22/isarmathlib-and-isabellezf/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Folding in ZF</title>
		<link>http://slawekk.wordpress.com/2007/12/17/folding-in-zf/</link>
		<comments>http://slawekk.wordpress.com/2007/12/17/folding-in-zf/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 02:54:30 +0000</pubDate>
		<dc:creator>slawekk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

		<guid isPermaLink="false">http://slawekk.wordpress.com/2007/12/17/folding-in-zf/</guid>
		<description><![CDATA[I have finally finished the tool for converting Isabelle verified IsarMathLib source to a blog entry.  Writing a parser with Haskell&#8217;s  Parsec library was a pleasure as usual. The post below was generated from the Fold_ZF.thy theory file that will be included in the next (1.6.2) release of IsarMathLib.
Having a parser opens the [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have finally finished the tool for converting Isabelle verified <a href="http://www.nongnu.org/isarmathlib/" title="IsarMathLib">IsarMathLib</a> source to a blog entry.  Writing a parser with Haskell&#8217;s  <a href="http://legacy.cs.uu.nl/daan/parsec.html" title="Parsec">Parsec</a> library was a pleasure as usual. The post below was generated from the <em>Fold_ZF.thy </em>theory file that will be included in the next (1.6.2) release of IsarMathLib.</p>
<p>Having a parser opens the possibility of exporting the IsarMathLib source to different formats. I have been thinking what my next target should be and decided it should be <a href="http://www.tiddlywiki.com/" title="TiddlyWiki">TiddlyWiki</a>.</p>
<p><strong>Why TiddlyWiki?</strong></p>
<p>There are two most important features that a good presentation of formalized mathematics should have.</p>
<p><strong>1. Mathematical notation including mathematical symbols.</strong></p>
<p>You can not effectively communicate mathematics without mathematical symbols. Most theorem provers designers seem not to understand this. It is a mystery for me why the designers of programming languages are stuck at the set of symbols that were present on those typewriters that people used to talk to IBM mainframes in the sixties. It obviously wastes the bandwith of human visual cognition channel that can recognize thousands of symbols easily and fast. Fortunately <a href="http://www.cl.cam.ac.uk/research/hvg/Isabelle/">Isabelle</a> is an exception to this - it allows to define any number of custom symbols and specify how they should be typeset in the proof document. As for TiddlyWiki the <a href="http://bob.mcelrath.org/tiddlyjsmath-2.0.3.html" title="jsMath">jsMath plugin</a> allows beautiful display of LaTeX math notation, much better that what you can see in this blog.</p>
<p><strong>2. Ways to deal with excessive verbosity of formalized math</strong></p>
<p>Formalized proofs contain much more details than informal ones. It is good in some way that a machine will not accept proofs written in style &#8220;using methods similar to those in [1] modified in a way  analogous to [2] we can show that &#8230;&#8221; . On the other hand having too much detail can make it difficult to see the main idea and the big picture of a proof. Isabelle&#8217;s Isar language allows to write structured proofs where the proofs of the main points can be can be separated in the whole proof text so they can be skipped by the reader if the fact is obvious to him/her. TiddlyWiki&#8217;s <a href="http://www.tiddlytools.com/#NestedSlidersPlugin">NestedSlidersPlugin</a> would allow to expand such sub-proofs only on demand, so that they don&#8217;t obstruct the flow of the main proof.</p>
<p>Another aspect of verbosity of formal proofs is that they typically reference many more other theorems than a typical informal proof. It is sometimes difficult to see which of the referenced theorems are essential to understanding of the proof and which ones are only the glue logic. Isabelle allows to add some theorems to the simplifier where they effectively become the background knowledge that is not necessary to reference directly in proofs. The NestedSlidersPlugin does something even better - it can make the theorem reference clickable, so that the reader can easily examine what the referenced theorem is saying in a window floating over the main text.</p>
<p>And now some formalized mathematics about folding in ZF set theory.</p>
<pre><font face="courier" size="3"><strong>theory </strong>Fold_ZF<strong> imports </strong>InductiveSeq_ZF

<strong>begin

</strong></font></pre>
<p>Suppose we have a binary operation <img src='http://l.wordpress.com/latex.php?latex=P%3A+X%5Ctimes+X+%5Crightarrow+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P: X\times X \rightarrow X' title='P: X\times X \rightarrow X' class='latex' /> written multiplicatively as <img src='http://l.wordpress.com/latex.php?latex=P%5Clangle+x%2C+y+%5Crangle%3D+x%5Ccdot+y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P\langle x, y \rangle= x\cdot y' title='P\langle x, y \rangle= x\cdot y' class='latex' />. In informal mathematics we can take a sequence <img src='http://l.wordpress.com/latex.php?latex=%5C%7B+x_k+%5C%7D_%7Bk%5Cin+0..+n%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\{ x_k \}_{k\in 0.. n}' title='\{ x_k \}_{k\in 0.. n}' class='latex' /> of elements of <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> and consider the product <img src='http://l.wordpress.com/latex.php?latex=x_0%5Ccdot+x_1+%5Ccdot+..+%5Ccdot+x_n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x_0\cdot x_1 \cdot .. \cdot x_n' title='x_0\cdot x_1 \cdot .. \cdot x_n' class='latex' />. To do the same thing in formalized mathematics we have to define precisely what is meant by that &#8220;<img src='http://l.wordpress.com/latex.php?latex=%5Ccdot+..+%5Ccdot&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\cdot .. \cdot' title='\cdot .. \cdot' class='latex' />&#8220;. The definitition we want to use is based on the notion of sequence defined by induction discussed in <em>InductiveSeq_ZF</em>. We don&#8217;t really want to derive the terminology for this from the word &#8220;product&#8221; as that would tie it conceptually to the multiplicative notation. This would be awkward when we want to reuse the same notions to talk about sums like <img src='http://l.wordpress.com/latex.php?latex=x_0+%2B+x_1+%2B+..+%2B+x_n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x_0 + x_1 + .. + x_n' title='x_0 + x_1 + .. + x_n' class='latex' />.<br />
In functional programming there is something called &#8220;fold&#8221;. Namely for a function <img src='http://l.wordpress.com/latex.php?latex=f&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f' title='f' class='latex' />, initial point <img src='http://l.wordpress.com/latex.php?latex=a&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a' title='a' class='latex' /> and list <img src='http://l.wordpress.com/latex.php?latex=%5Cleft%5B+b%2C+c%2C+d%5Cright%5D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\left[ b, c, d\right]' title='\left[ b, c, d\right]' class='latex' /> the expression <em>fold(f, a, [b,c,d])</em> is defined to be <em>f(f(f(a,b),c),d)</em> (in Haskell something like this is called <em>foldl</em>). If we write <img src='http://l.wordpress.com/latex.php?latex=f&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f' title='f' class='latex' /> in multiplicative notation we get <img src='http://l.wordpress.com/latex.php?latex=a%5Ccdot+b+%5Ccdot+c%5Ccdot+d&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a\cdot b \cdot c\cdot d' title='a\cdot b \cdot c\cdot d' class='latex' />, so this is exactly what we need. The notion of folds in functional programming is actually much more general that what we need here (not that I know anything about that). In this theory file we just make a slight generalization and talk about folding a list with a binary operation <img src='http://l.wordpress.com/latex.php?latex=f%3AX%5Ctimes+Y+%5Crightarrow+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f:X\times Y \rightarrow X' title='f:X\times Y \rightarrow X' class='latex' /> with <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> not necessarily the same as <img src='http://l.wordpress.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y' title='Y' class='latex' />.</p>
<p><strong>Folding in ZF</strong></p>
<p>Suppose we have a binary operation <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow X' title='f : X\times Y \rightarrow X' class='latex' />. Then every <img src='http://l.wordpress.com/latex.php?latex=y%5Cin+Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='y\in Y' title='y\in Y' class='latex' /> defines a transformation of <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> defined by <img src='http://l.wordpress.com/latex.php?latex=T_y%28x%29+%3D+f%5Clangle+x%2Cy%5Crangle&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='T_y(x) = f\langle x,y\rangle' title='T_y(x) = f\langle x,y\rangle' class='latex' />. In IsarMathLib such transformation is called as <em>Fix2ndVar(f,y)</em>. Using this notion, given a function <img src='http://l.wordpress.com/latex.php?latex=f%3A+X%5Ctimes+Y%5Crightarrow+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f: X\times Y\rightarrow X' title='f: X\times Y\rightarrow X' class='latex' /> and a sequence <img src='http://l.wordpress.com/latex.php?latex=y+%3D+%5C%7By_k%5C%7D_%7Bk%5Cin+N%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='y = \{y_k\}_{k\in N}' title='y = \{y_k\}_{k\in N}' class='latex' /> of elements of <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> we can get a sequence of transformations of <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' />. This is defined in <em>Seq2TransSeq</em> below. Then we use that sequence of tranformations to define the sequence of partial folds (called <em>FoldSeq</em>) by means of <em>InductiveSeqVarFN</em> (defined in <em>InductiveSeq_ZF</em> theory) which implements the inductive sequence determined by a starting point and a sequence of transformations. Finally, we define the fold of a sequence as the last element of the sequence of the partial folds.</p>
<p>Definition that specifies how to convert a sequence <img src='http://l.wordpress.com/latex.php?latex=a&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a' title='a' class='latex' /> of elements of <img src='http://l.wordpress.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y' title='Y' class='latex' /> into a sequence of transformations of <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' />, given a binary operation <img src='http://l.wordpress.com/latex.php?latex=f+%3AX%5Ctimes+Y+%5Crightarrow+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f :X\times Y \rightarrow X' title='f :X\times Y \rightarrow X' class='latex' />.</p>
<pre><font face="courier" size="3"><strong>definition
</strong></font></pre>
<p><img src='http://l.wordpress.com/latex.php?latex=Seq2TrSeq%28f%2Ca%29+%5Cequiv++%5C%7B+%5Clangle+k%2CFix2ndVar%28f%2Ca%28k%29%29%5Crangle+.%5C++k+%5Cin++domain%28a%29%5C%7D+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Seq2TrSeq(f,a) \equiv  \{ \langle k,Fix2ndVar(f,a(k))\rangle .\  k \in  domain(a)\} ' title='Seq2TrSeq(f,a) \equiv  \{ \langle k,Fix2ndVar(f,a(k))\rangle .\  k \in  domain(a)\} ' class='latex' /></p>
<p>Definition of a sequence of partial folds.</p>
<pre><font face="courier" size="3"><strong>definition
</strong></font></pre>
<p><img src='http://l.wordpress.com/latex.php?latex=FoldSeq%28f%2Cx%2Ca%29+%5Cequiv++&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='FoldSeq(f,x,a) \equiv  ' title='FoldSeq(f,x,a) \equiv  ' class='latex' /><br />
<img src='http://l.wordpress.com/latex.php?latex=+InductiveSeqVarFN%28x%2Cfstdom%28f%29%2CSeq2TrSeq%28f%2Ca%29%2Cdomain%28a%29%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt=' InductiveSeqVarFN(x,fstdom(f),Seq2TrSeq(f,a),domain(a))' title=' InductiveSeqVarFN(x,fstdom(f),Seq2TrSeq(f,a),domain(a))' class='latex' /></p>
<p>Definition of a fold.</p>
<pre><font face="courier" size="3"><strong>definition
</strong></font></pre>
<p><img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2Ca%29+%5Cequiv++Last%28FoldSeq%28f%2Cx%2Ca%29%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,a) \equiv  Last(FoldSeq(f,x,a))' title='Fold(f,x,a) \equiv  Last(FoldSeq(f,x,a))' class='latex' /></p>
<p>If <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> is a set with a binary operation <img src='http://l.wordpress.com/latex.php?latex=f%3AX%5Ctimes+Y+%5Crightarrow+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f:X\times Y \rightarrow X' title='f:X\times Y \rightarrow X' class='latex' /> then <em>Seq2TransSeqN(f,a)</em> converts a sequence <img src='http://l.wordpress.com/latex.php?latex=a&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a' title='a' class='latex' /> of elements of <img src='http://l.wordpress.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y' title='Y' class='latex' /> into the sequence of corresponding transformations of <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' />.</p>
<pre><font face="courier" size="3">
<strong>lemma</strong> seq2trans_seq_props:
<strong>   assumes </strong>A1: <img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' /> <strong> and</strong>
   A2: <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' /> <strong> and</strong>
   A3: <img src='http://l.wordpress.com/latex.php?latex=a%3An%5Crightarrow+Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a:n\rightarrow Y' title='a:n\rightarrow Y' class='latex' /> <strong> and </strong>A4: <img src='http://l.wordpress.com/latex.php?latex=T+%3D+Seq2TrSeq%28f%2Ca%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='T = Seq2TrSeq(f,a)' title='T = Seq2TrSeq(f,a)' class='latex' />
<strong>   shows </strong><img src='http://l.wordpress.com/latex.php?latex=T+%3A+n+%5Crightarrow++%28X%5Crightarrow+X%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='T : n \rightarrow  (X\rightarrow X)' title='T : n \rightarrow  (X\rightarrow X)' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k%5Cin+n.%5C++%5Cforall+x%5Cin+X.%5C++%28T%28k%29%29%28x%29+%3D+f%5Clangle+x%2Ca%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k\in n.\  \forall x\in X.\  (T(k))(x) = f\langle x,a(k)\rangle ' title='\forall k\in n.\  \forall x\in X.\  (T(k))(x) = f\langle x,a(k)\rangle ' class='latex' />
<strong>proof </strong>-
   <strong>from </strong><img src='http://l.wordpress.com/latex.php?latex=a%3An%5Crightarrow+Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a:n\rightarrow Y' title='a:n\rightarrow Y' class='latex' /> <strong>have</strong> D: <img src='http://l.wordpress.com/latex.php?latex=domain%28a%29+%3D+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='domain(a) = n' title='domain(a) = n' class='latex' />
   <strong>   using </strong>func1_1_L1
   <strong>with </strong>A2 A3 A4 <strong>show</strong> <img src='http://l.wordpress.com/latex.php?latex=T+%3A+n+%5Crightarrow++%28X%5Crightarrow+X%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='T : n \rightarrow  (X\rightarrow X)' title='T : n \rightarrow  (X\rightarrow X)' class='latex' />
   <strong>   using </strong>apply_funtype fix_2nd_var_fun ZF_fun_from_total Seq2TrSeq_def
   <strong>with </strong>A4 D <strong>have</strong> I: <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k+%5Cin++n.%5C++T%28k%29+%3D+Fix2ndVar%28f%2Ca%28k%29%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k \in  n.\  T(k) = Fix2ndVar(f,a(k))' title='\forall k \in  n.\  T(k) = Fix2ndVar(f,a(k))' class='latex' />
   <strong>   using </strong>Seq2TrSeq_def ZF_fun_from_tot_val0
   {
      <strong>fix </strong><img src='http://l.wordpress.com/latex.php?latex=k&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k' title='k' class='latex' />
      <strong>fix </strong><img src='http://l.wordpress.com/latex.php?latex=x&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x' title='x' class='latex' />
      <strong>assume </strong>A5: <img src='http://l.wordpress.com/latex.php?latex=k%5Cin+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k\in n' title='k\in n' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' />
      <strong>with </strong>A1 A3 <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=a%28k%29+%5Cin++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a(k) \in  Y' title='a(k) \in  Y' class='latex' />
      <strong>   using </strong>apply_funtype
      <strong>with </strong>A2 A5 I <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=%28T%28k%29%29%28x%29+%3D+f%5Clangle+x%2Ca%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(T(k))(x) = f\langle x,a(k)\rangle ' title='(T(k))(x) = f\langle x,a(k)\rangle ' class='latex' />
      <strong>   using </strong>fix_var_val
   }
   <strong>thus</strong> <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k%5Cin+n.%5C++%5Cforall+x%5Cin+X.%5C++%28T%28k%29%29%28x%29+%3D+f%5Clangle+x%2Ca%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k\in n.\  \forall x\in X.\  (T(k))(x) = f\langle x,a(k)\rangle ' title='\forall k\in n.\  \forall x\in X.\  (T(k))(x) = f\langle x,a(k)\rangle ' class='latex' />
<strong>qed
</strong>
</font></pre>
<p>Basic properties of the sequence of partial folds of a sequence <img src='http://l.wordpress.com/latex.php?latex=a+%3D+%5C%7By_k%5C%7D_%7Bk%5Cin+%5C%7B0%2C..%2Cn%5C%7D+%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a = \{y_k\}_{k\in \{0,..,n\} }' title='a = \{y_k\}_{k\in \{0,..,n\} }' class='latex' />.</p>
<pre><font face="courier" size="3">
<strong>theorem</strong> fold_seq_props:
<strong>   assumes </strong>A1: <img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' /> <strong> and</strong>
   A2: <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' /> <strong> and</strong>
   A3: <img src='http://l.wordpress.com/latex.php?latex=y%3An%5Crightarrow+Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='y:n\rightarrow Y' title='y:n\rightarrow Y' class='latex' /> <strong> and </strong>A4: <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' /> <strong> and</strong>
   A5: <img src='http://l.wordpress.com/latex.php?latex=Y%5Cneq+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y\neq 0' title='Y\neq 0' class='latex' /> <strong> and </strong>A6: <img src='http://l.wordpress.com/latex.php?latex=F+%3D+FoldSeq%28f%2Cx%2Cy%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F = FoldSeq(f,x,y)' title='F = FoldSeq(f,x,y)' class='latex' />
<strong>   shows </strong><img src='http://l.wordpress.com/latex.php?latex=F%3A+succ%28n%29+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F: succ(n) \rightarrow  X' title='F: succ(n) \rightarrow  X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=F%280%29+%3D+x&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F(0) = x' title='F(0) = x' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k%5Cin+n.%5C++F%28succ%28k%29%29+%3D+f%5Clangle+F%28k%29%2C+y%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k\in n.\  F(succ(k)) = f\langle F(k), y(k)\rangle ' title='\forall k\in n.\  F(succ(k)) = f\langle F(k), y(k)\rangle ' class='latex' />
<strong>proof </strong>-
   <strong>let </strong><img src='http://l.wordpress.com/latex.php?latex=T+%3D+Seq2TrSeq%28f%2Cy%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='T = Seq2TrSeq(f,y)' title='T = Seq2TrSeq(f,y)' class='latex' />
   <strong>from </strong>A1 A3 <strong>have</strong> D: <img src='http://l.wordpress.com/latex.php?latex=domain%28y%29+%3D+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='domain(y) = n' title='domain(y) = n' class='latex' />
   <strong>   using </strong>func1_1_L1
   <strong>from </strong><img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' /> <img src='http://l.wordpress.com/latex.php?latex=Y%5Cneq+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y\neq 0' title='Y\neq 0' class='latex' /> <strong>have</strong> I: <img src='http://l.wordpress.com/latex.php?latex=fstdom%28f%29+%3D+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='fstdom(f) = X' title='fstdom(f) = X' class='latex' />
   <strong>   using </strong>fstdomdef
   <strong>with </strong>A1 A2 A3 A4 A6 D <strong>show</strong> II: <img src='http://l.wordpress.com/latex.php?latex=F%3A+succ%28n%29+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F: succ(n) \rightarrow  X' title='F: succ(n) \rightarrow  X' class='latex' /> <strong> and </strong><img src='http://l.wordpress.com/latex.php?latex=F%280%29+%3D+x&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F(0) = x' title='F(0) = x' class='latex' />
   <strong>   using </strong>seq2trans_seq_props FoldSeq_def fin_indseq_var_f_props
   <strong>from </strong>A1 A2 A3 A4 A6 I D <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k%5Cin+n.%5C++F%28succ%28k%29%29+%3D+T%28k%29%28F%28k%29%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k\in n.\  F(succ(k)) = T(k)(F(k))' title='\forall k\in n.\  F(succ(k)) = T(k)(F(k))' class='latex' />
   <strong>   using </strong>seq2trans_seq_props FoldSeq_def fin_indseq_var_f_props
   <strong>moreover </strong>   {
      <strong>fix </strong><img src='http://l.wordpress.com/latex.php?latex=k&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k' title='k' class='latex' />
      <strong>assume </strong>A5: <img src='http://l.wordpress.com/latex.php?latex=k%5Cin+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k\in n' title='k\in n' class='latex' />
      <strong>hence</strong> <img src='http://l.wordpress.com/latex.php?latex=k+%5Cin++succ%28n%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k \in  succ(n)' title='k \in  succ(n)' class='latex' />
      <strong>with </strong>A1 A2 A3 II A5 <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=%28T%28k%29%29%28F%28k%29%29+%3D+f%5Clangle+F%28k%29%2Cy%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(T(k))(F(k)) = f\langle F(k),y(k)\rangle ' title='(T(k))(F(k)) = f\langle F(k),y(k)\rangle ' class='latex' />
      <strong>   using </strong>apply_funtype seq2trans_seq_props
   }
   <strong>ultimately </strong><strong>show</strong> <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k%5Cin+n.%5C++F%28succ%28k%29%29+%3D+f%5Clangle+F%28k%29%2C+y%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k\in n.\  F(succ(k)) = f\langle F(k), y(k)\rangle ' title='\forall k\in n.\  F(succ(k)) = f\langle F(k), y(k)\rangle ' class='latex' />
<strong>qed
</strong>
</font></pre>
<p>A consistency condition: if we make the list shorter, then we get a shorter sequence of partial folds with the same values as in the original sequence. This can be proven as a special case of <em>fin_indseq_var_f_restrict</em> but a proof using <em>fold_seq_props</em> and induction turns out to be shorter.</p>
<pre><font face="courier" size="3">
<strong>lemma</strong> foldseq_restrict:
<strong>   assumes </strong><img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=k+%5Cin++succ%28n%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k \in  succ(n)' title='k \in  succ(n)' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=i+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i \in  nat' title='i \in  nat' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' />,
   <img src='http://l.wordpress.com/latex.php?latex=a+%3A+n+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a : n \rightarrow  Y' title='a : n \rightarrow  Y' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=b+%3A+i+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b : i \rightarrow  Y' title='b : i \rightarrow  Y' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=n+%5Csubseteq++i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \subseteq  i' title='n \subseteq  i' class='latex' />,
   <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+j+%5Cin++n.%5C++b%28j%29+%3D+a%28j%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall j \in  n.\  b(j) = a(j)' title='\forall j \in  n.\  b(j) = a(j)' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=x+%5Cin++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x \in  X' title='x \in  X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=Y+%5Cneq++0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y \neq  0' title='Y \neq  0' class='latex' />
<strong>   shows </strong><img src='http://l.wordpress.com/latex.php?latex=FoldSeq%28f%2Cx%2Cb%29%28k%29+%3D+FoldSeq%28f%2Cx%2Ca%29%28k%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='FoldSeq(f,x,b)(k) = FoldSeq(f,x,a)(k)' title='FoldSeq(f,x,b)(k) = FoldSeq(f,x,a)(k)' class='latex' />
<strong>proof </strong>-
   <strong>let </strong><img src='http://l.wordpress.com/latex.php?latex=P+%3D+FoldSeq%28f%2Cx%2Ca%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P = FoldSeq(f,x,a)' title='P = FoldSeq(f,x,a)' class='latex' />
   <strong>let </strong><img src='http://l.wordpress.com/latex.php?latex=Q+%3D+FoldSeq%28f%2Cx%2Cb%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Q = FoldSeq(f,x,b)' title='Q = FoldSeq(f,x,b)' class='latex' />
   <strong>from </strong>assms <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=k+%5Cin++succ%28n%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k \in  succ(n)' title='k \in  succ(n)' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=Q%280%29+%3D+P%280%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Q(0) = P(0)' title='Q(0) = P(0)' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+j+%5Cin++n.%5C++Q%28j%29+%3D+P%28j%29+%5Clongrightarrow++Q%28succ%28j%29%29+%3D+P%28succ%28j%29%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall j \in  n.\  Q(j) = P(j) \longrightarrow  Q(succ(j)) = P(succ(j))' title='\forall j \in  n.\  Q(j) = P(j) \longrightarrow  Q(succ(j)) = P(succ(j))' class='latex' />
   <strong>   using </strong>fold_seq_props
   <strong>then</strong> <strong>show</strong> <img src='http://l.wordpress.com/latex.php?latex=Q%28k%29+%3D+P%28k%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Q(k) = P(k)' title='Q(k) = P(k)' class='latex' />
   <strong>   by (rule </strong>fin_nat_ind<strong>)
</strong><strong>qed
</strong>
</font></pre>
<p>A special case of <em>foldseq_restrict</em> when the longer sequence is created from the shorter one by appending one element.</p>
<pre><font face="courier" size="3">
<strong>corollary</strong> fold_seq_append:
<strong>   assumes </strong><img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' />,
   <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=a%3An+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a:n \rightarrow  Y' title='a:n \rightarrow  Y' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=k+%5Cin++succ%28n%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k \in  succ(n)' title='k \in  succ(n)' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=y%5Cin+Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='y\in Y' title='y\in Y' class='latex' />
<strong>   shows </strong><img src='http://l.wordpress.com/latex.php?latex=FoldSeq%28f%2Cx%2CAppend%28a%2Cy%29%29%28k%29+%3D+FoldSeq%28f%2Cx%2Ca%29%28k%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='FoldSeq(f,x,Append(a,y))(k) = FoldSeq(f,x,a)(k)' title='FoldSeq(f,x,Append(a,y))(k) = FoldSeq(f,x,a)(k)' class='latex' />
<strong>proof </strong>-
   <strong>let </strong><img src='http://l.wordpress.com/latex.php?latex=b+%3D+Append%28a%2Cy%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b = Append(a,y)' title='b = Append(a,y)' class='latex' />
   <strong>from </strong>assms <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=b+%3A+succ%28n%29+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b : succ(n) \rightarrow  Y' title='b : succ(n) \rightarrow  Y' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+j+%5Cin++n.%5C++b%28j%29+%3D+a%28j%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall j \in  n.\  b(j) = a(j)' title='\forall j \in  n.\  b(j) = a(j)' class='latex' />
   <strong>   using </strong>append_props
   <strong>with </strong>assms <strong>show</strong> <img src='http://l.wordpress.com/latex.php?latex=thesis&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='thesis' title='thesis' class='latex' />
   <strong>   using </strong>foldseq_restrict
<strong>qed
</strong>
</font></pre>
<p>What we really will be using is the notion of the fold of a sequence, which we define as the last element of (inductively defined) sequence of partial folds. The next theorem lists some properties of the product of the fold operation.</p>
<pre><font face="courier" size="3">
<strong>theorem</strong> fold_props:
<strong>   assumes </strong>A1: <img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' /> <strong> and</strong>
   A2: <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' />,
   <img src='http://l.wordpress.com/latex.php?latex=a%3An+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a:n \rightarrow  Y' title='a:n \rightarrow  Y' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=Y%5Cneq+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y\neq 0' title='Y\neq 0' class='latex' />
<strong>   shows </strong><img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2Ca%29+%3D++FoldSeq%28f%2Cx%2Ca%29%28n%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,a) =  FoldSeq(f,x,a)(n)' title='Fold(f,x,a) =  FoldSeq(f,x,a)(n)' class='latex' /> <strong> and </strong><img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2Ca%29+%5Cin++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,a) \in  X' title='Fold(f,x,a) \in  X' class='latex' />
<strong>proof </strong>-
   <strong>from </strong>assms <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=+FoldSeq%28f%2Cx%2Ca%29+%3A+succ%28n%29+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt=' FoldSeq(f,x,a) : succ(n) \rightarrow  X' title=' FoldSeq(f,x,a) : succ(n) \rightarrow  X' class='latex' />
   <strong>   using </strong>fold_seq_props
   <strong>with </strong>A1 <strong>show</strong> <img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2Ca%29+%3D++FoldSeq%28f%2Cx%2Ca%29%28n%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,a) =  FoldSeq(f,x,a)(n)' title='Fold(f,x,a) =  FoldSeq(f,x,a)(n)' class='latex' /> <strong> and </strong><img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2Ca%29+%5Cin++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,a) \in  X' title='Fold(f,x,a) \in  X' class='latex' />
   <strong>   using </strong>last_seq_elem apply_funtype Fold_def
<strong>qed
</strong>
</font></pre>
<p>The next theorem tells us what happens to the fold of a sequence when we add one more element to it.</p>
<pre><font face="courier" size="3">
<strong>theorem</strong> fold_append:
<strong>   assumes </strong>A1: <img src='http://l.wordpress.com/latex.php?latex=n+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n \in  nat' title='n \in  nat' class='latex' /> <strong> and</strong>
   A2: <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' /> <strong> and</strong>
   A3: <img src='http://l.wordpress.com/latex.php?latex=a%3An+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='a:n \rightarrow  Y' title='a:n \rightarrow  Y' class='latex' /> <strong> and</strong>
   A4: <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' /> <strong> and </strong>A5: <img src='http://l.wordpress.com/latex.php?latex=y%5Cin+Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='y\in Y' title='y\in Y' class='latex' />
<strong>   shows </strong><img src='http://l.wordpress.com/latex.php?latex=FoldSeq%28f%2Cx%2CAppend%28a%2Cy%29%29%28n%29+%3D+Fold%28f%2Cx%2Ca%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='FoldSeq(f,x,Append(a,y))(n) = Fold(f,x,a)' title='FoldSeq(f,x,Append(a,y))(n) = Fold(f,x,a)' class='latex' /> <strong> and</strong>
   <img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2CAppend%28a%2Cy%29%29+%3D+f%5Clangle+Fold%28f%2Cx%2Ca%29%2C+y%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,Append(a,y)) = f\langle Fold(f,x,a), y\rangle ' title='Fold(f,x,Append(a,y)) = f\langle Fold(f,x,a), y\rangle ' class='latex' />
<strong>proof </strong>-
   <strong>let </strong><img src='http://l.wordpress.com/latex.php?latex=b+%3D+Append%28a%2Cy%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b = Append(a,y)' title='b = Append(a,y)' class='latex' />
   <strong>let </strong><img src='http://l.wordpress.com/latex.php?latex=P+%3D+FoldSeq%28f%2Cx%2Cb%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P = FoldSeq(f,x,b)' title='P = FoldSeq(f,x,b)' class='latex' />
   <strong>from </strong>A5 <strong>have</strong> I: <img src='http://l.wordpress.com/latex.php?latex=Y+%5Cneq++0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y \neq  0' title='Y \neq  0' class='latex' />
   <strong>with </strong>assms <strong>show</strong> thesis1: <img src='http://l.wordpress.com/latex.php?latex=P%28n%29+%3D+Fold%28f%2Cx%2Ca%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P(n) = Fold(f,x,a)' title='P(n) = Fold(f,x,a)' class='latex' />
   <strong>   using </strong>fold_seq_append fold_props
   <strong>from </strong>assms I <strong>have</strong> II: <img src='http://l.wordpress.com/latex.php?latex=succ%28n%29+%5Cin++nat&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='succ(n) \in  nat' title='succ(n) \in  nat' class='latex' />,
   <img src='http://l.wordpress.com/latex.php?latex=f+%3A+X%5Ctimes+Y+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f : X\times Y \rightarrow  X' title='f : X\times Y \rightarrow  X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=b+%3A+succ%28n%29+%5Crightarrow++Y&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b : succ(n) \rightarrow  Y' title='b : succ(n) \rightarrow  Y' class='latex' />,
   <img src='http://l.wordpress.com/latex.php?latex=x%5Cin+X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x\in X' title='x\in X' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=Y+%5Cneq++0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Y \neq  0' title='Y \neq  0' class='latex' />,   <img src='http://l.wordpress.com/latex.php?latex=P+%3D+FoldSeq%28f%2Cx%2Cb%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P = FoldSeq(f,x,b)' title='P = FoldSeq(f,x,b)' class='latex' />
   <strong>   using </strong>append_props
   <strong>then</strong> <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=%5Cforall+k+%5Cin++succ%28n%29.%5C++P%28succ%28k%29%29+%3D++f%5Clangle+P%28k%29%2C+b%28k%29%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\forall k \in  succ(n).\  P(succ(k)) =  f\langle P(k), b(k)\rangle ' title='\forall k \in  succ(n).\  P(succ(k)) =  f\langle P(k), b(k)\rangle ' class='latex' />
   <strong>   by (rule </strong>fold_seq_props<strong>)
</strong>   <strong>with </strong>A3 A5 thesis1 <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=P%28succ%28n%29%29+%3D++f%5Clangle++Fold%28f%2Cx%2Ca%29%2C+y%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P(succ(n)) =  f\langle  Fold(f,x,a), y\rangle ' title='P(succ(n)) =  f\langle  Fold(f,x,a), y\rangle ' class='latex' />
   <strong>   using </strong>append_props
   <strong>moreover
</strong>   <strong>from </strong>II <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=P+%3A+succ%28succ%28n%29%29+%5Crightarrow++X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='P : succ(succ(n)) \rightarrow  X' title='P : succ(succ(n)) \rightarrow  X' class='latex' />
   <strong>   by (rule </strong>fold_seq_props<strong>)
</strong>   <strong>then</strong> <strong>have</strong> <img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2Cb%29+%3D+P%28succ%28n%29%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,b) = P(succ(n))' title='Fold(f,x,b) = P(succ(n))' class='latex' />
   <strong>   using </strong>last_seq_elem Fold_def
   <strong>ultimately </strong><strong>show</strong> <img src='http://l.wordpress.com/latex.php?latex=Fold%28f%2Cx%2CAppend%28a%2Cy%29%29+%3D+f%5Clangle+Fold%28f%2Cx%2Ca%29%2C+y%5Crangle+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='Fold(f,x,Append(a,y)) = f\langle Fold(f,x,a), y\rangle ' title='Fold(f,x,Append(a,y)) = f\langle Fold(f,x,a), y\rangle ' class='latex' />
<strong>qed

end
</strong>
</font></pre>
<p>The formal part of this blog post has been generated from IsarMathLib’s Fold_ZF.thy theory file, see the <a href="http://slawekk.files.wordpress.com/2007/12/fold_zf.pdf" title="Fold_ZF.pdf">relevant pages</a> of the IsarMathLib proof document.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/slawekk.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/slawekk.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slawekk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slawekk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slawekk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slawekk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slawekk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slawekk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slawekk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slawekk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slawekk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slawekk.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slawekk.wordpress.com&blog=1771533&post=10&subd=slawekk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://slawekk.wordpress.com/2007/12/17/folding-in-zf/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>