<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0.2" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>peteg's blog   </title>
    <link>http://peteg.org/blog</link>
    <description></description>
    <language>en</language>

  <item>
    <title>Some of &lt;a href=&quot;http://web.comlab.ox.ac.uk/oucl/people/jeremy.gibbons.html&quot;&gt;Jeremy Gibbons&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://www.cs.nott.ac.uk/~gmh/&quot;&gt;Graham Hutton&lt;/a&gt;'s &lt;span class=&quot;title&quot;&gt;Proof Methods for Corecursive Programs&lt;/span&gt; in &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2008/03/03#2008-03-03-ApproxLemma</link>
    <category>/hacking/isabelle</category>
    <description>
&lt;p&gt;

I abandoned this attempt at mechanising a proof of the &quot;approx lemma&quot;
about eighteen months ago, for what now seem like spurious reasons;
what I had was quite close to what was needed. I was initially
interested in the &quot;take lemma&quot; made famous by &lt;a href=&quot;http://web.comlab.ox.ac.uk/oucl/people/richard.bird.html&quot;&gt;Richard Bird&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://homepages.inf.ed.ac.uk/wadler/&quot;&gt;Philip Wadler&lt;/a&gt;, and how it took the magic step from assertions about finite
lists to ones about possibly infinite objects. Well, I definitely feel
some &lt;a
href=&quot;http://en.wikipedia.org/wiki/Monkey_(TV_series)&quot;&gt;awareness of
vacuity&lt;/a&gt; now.

&lt;/p&gt;&lt;p&gt;

You can &lt;a href=&quot;http://peteg.org/isabelle/holcf/approx_lemma.thy&quot;&gt;read
it here&lt;/a&gt;.

&lt;/p&gt;&lt;p&gt;

The magic is how the continuity underpinning the semantics of
functions is reflected into the term language. As such it's
unbelievably cute. The proof of correctness is not particularly
interesting though, except perhaps as an exercise in fiddling with
fixpoints and continuity.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://www.unsafeperformio.com/&quot;&gt;Andy Gill&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://www.cs.nott.ac.uk/~gmh/&quot;&gt;Graham Hutton&lt;/a&gt;'s Worker/Wrapper in &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;, partially.</title>
    <link>http://peteg.org/blog/2008/03/02#2008-03-02-WorkerWrapper</link>
    <category>/hacking/isabelle</category>
    <description>
&lt;p&gt;

It's about time I pushed this out the door. Their proofs went through
fine for the most part, except for the need to do some induction when
rewriting the recursive calls. It is unclear to me how to prove the
lemma that justifies this step in general, though for each instance
the induction is quite straightfoward, and the key lemmas for the
inductive steps are given in the paper. In effect we need induction
just to convince &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;, not an optimisation phase, but it would be
nice if their fusion rule handled this for me. (My proposed, unproven
variant can be found in &lt;a href=&quot;http://peteg.org//isabelle/worker_wrapper/worker_wrapper/worker_wrapper.thy&quot;&gt;worker_wrapper.thy&lt;/a&gt;.)

&lt;/p&gt;&lt;p&gt;

I believe there was a small strictness bug in their streams /
memoisation example. Score one to &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;.

&lt;/p&gt;&lt;p&gt;

I also tried to mechanise &lt;a href=&quot;http://www.unsafeperformio.com/&quot;&gt;Andy Gill&lt;/a&gt;'s &lt;a
href=&quot;http://blog.unsafeperformio.com/?p=15&quot;&gt;nub example&lt;/a&gt;, which
mostly went OK, modulo proving some auxiliary lemmas. Specifically, as
above one needs to use induction to rewrite the recursive call, and
coming out with the right statements is made difficult by &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;'s
admissibility requirements. A work in progress. Again, I can feel &lt;a href=&quot;http://www.cl.cam.ac.uk/~lp15/&quot;&gt;Larry Paulson&lt;/a&gt; laughing at me for wasting my time.

&lt;/p&gt;&lt;p&gt;

You can look at it &lt;a href=&quot;http://peteg.org/isabelle/worker_wrapper/&quot;&gt;here&lt;/a&gt;, or utter:

&lt;/p&gt;&lt;p&gt;

&lt;code&gt;darcs get http://peteg.org/isabelle/worker_wrapper/&lt;/code&gt;

&lt;/p&gt;&lt;p&gt;

Note some proofs are quite rough, though most of the important stuff
is as clear as &lt;a href=&quot;http://isabelle.in.tum.de/Isar/&quot;&gt;Isar&lt;/a&gt;. The &lt;code&gt;Nat&lt;/code&gt; theory may end up being
interesting, though with too much more monadic machinery one may as
well use &lt;a href=&quot;http://en.wikipedia.org/wiki/HOL_theorem_prover&quot;&gt;HOL&lt;/a&gt;... and I have begun to realise that proof-reuse for
even something as simple as lists is quite difficult. There are at
least two mainstream types (fully lazy and fully strict), as well as
some in-betweens that might be convenient (e.g. head-strict and
tail-strict). The code here just begins down the mainstream-&lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt; path; I figure the &lt;a href=&quot;http://www.standardml.org/&quot;&gt;Standard ML&lt;/a&gt; people are wise enough to
be using &lt;a href=&quot;http://en.wikipedia.org/wiki/HOL_theorem_prover&quot;&gt;HOL&lt;/a&gt; or &lt;a href=&quot;http://coq.inria.fr/&quot;&gt;Coq&lt;/a&gt; or whatever in the first place.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://web.comlab.ox.ac.uk/oucl/people/bill.roscoe.html&quot;&gt;Bill Roscoe&lt;/a&gt;'s almost-book on &lt;a href=&quot;http://en.wikipedia.org/wiki/Denotational_semantics&quot;&gt;Denotational Semantics&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2008/03/02#2008-03-02-Roscoe-Semantics</link>
    <category>/hacking/isabelle</category>
    <description>
&lt;p&gt;

&lt;a href=&quot;http://www.cse.unsw.edu.au/~tbourke/&quot;&gt;Tim&lt;/a&gt; pointed this almost-book out to me. It's sorely
disappointing that whoever-it-was who should've cranked the
operational semantics half did not do so; what is there is top-notch,
especially the chapters on &lt;a href=&quot;&quot;&gt;Information Systems&lt;/a&gt;. Whereas
&lt;a href=&quot;http://www.cl.cam.ac.uk/~gw104/&quot;&gt;Glyn Winskel&lt;/a&gt;'s text does a great job of presenting the mathematics
of these &quot;concretised&quot; domains, this book also delves into the
philosophical concerns and hence makes the mathematics that much
easier to follow.

&lt;/p&gt;&lt;p&gt;

It's linked from near the top of his publications page.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>1 +&lt;sub&gt;#&lt;/sub&gt; 1 = 2&lt;sub&gt;⊥&lt;/sub&gt;, or more mucking about with &lt;a href=&quot;http://isabelle.in.tum.de/&quot;&gt;Isabelle&lt;/a&gt;'s &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2008/02/02#2008-02-02-WorkerWrapper</link>
    <category>/hacking/isabelle</category>
    <description>
&lt;p&gt;

It's been a while between drinks with &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;, and it didn't take me
long to realise why; it's a massive time-sink and all one gets at the
end is a proof unreadable by the mainstream and an &lt;a
href=&quot;http://en.wikipedia.org/wiki/Monkey_(TV_series)&quot;&gt;awareness of
vacuity&lt;/a&gt;. Here are some random observations that I will try to
expand on later:

&lt;/p&gt;
&lt;ul&gt;

 &lt;li&gt;&lt;a href=&quot;http://web.cecs.pdx.edu/~brianh/&quot;&gt;Brian Huffman&lt;/a&gt; gave me some help with treating unpointed
 domains, so I've begun cranking out a theory of a few ways to think
 about &lt;code&gt;Nat&lt;/code&gt;. We'll see if that ever gets polished.&lt;/li&gt;

 &lt;li&gt;I was mucking about with those while trying to mechanise &lt;a href=&quot;http://www.unsafeperformio.com/&quot;&gt;Andy Gill&lt;/a&gt; and &lt;a href=&quot;http://www.cs.nott.ac.uk/~gmh/&quot;&gt;Graham Hutton&lt;/a&gt;'s worker/wrapper pre-paper. That went
 OK, modulo &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;'s general unfriendliness towards numbers. I'll
 post the development when it's a bit more polished.&lt;/li&gt;

 &lt;li&gt;&lt;a href=&quot;http://www.cse.ogi.edu/~jl/&quot;&gt;John Launchbury&lt;/a&gt; and &lt;a href=&quot;http://research.microsoft.com/~simonpj/&quot;&gt;Simon Peyton-Jones&lt;/a&gt;'s &lt;a
 href=&quot;http://research.microsoft.com/~simonpj/Papers/unboxed-values.ps.Z&quot;
 class=&quot;title&quot;&gt;Unboxed values as first class citizens&lt;/a&gt; is the most
 awesome concrete application of domain theory I've seen yet. Perhaps
 I should dig deeper into the abstract interpretation literature.&lt;/li&gt;

 &lt;li&gt; I was curious about &lt;a href=&quot;http://www.cl.cam.ac.uk/~lp15/&quot;&gt;Larry Paulson&lt;/a&gt;'s &lt;a
 href=&quot;http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-50.pdf&quot;&gt;mechanised
 verification of the unification algorithm&lt;/a&gt; in &lt;a href=&quot;http://en.wikipedia.org/wiki/LCF_theorem_prover&quot;&gt;LCF&lt;/a&gt;, from the
 early 80s. Partial predicates? WTF is this? Larry's inimitable way
 of politely grinding his teeth made me realise just how much &lt;a href=&quot;http://en.wikipedia.org/wiki/HOL_theorem_prover&quot;&gt;HOL&lt;/a&gt;
 brought to the table.&lt;/li&gt;

 &lt;li&gt;I managed to crank out a proof in &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt; that &quot;parallel or&quot;
 and its friend &quot;tell me if this function ever says yes&quot; are
 continuous. So, err, just what is this domain theory modelling
 anyway? Those proofs were much harder yakka than I expected. Next
 step: &lt;a href=&quot;http://homepages.inf.ed.ac.uk/gdp/&quot;&gt;Gordon Plotkin&lt;/a&gt;'s notes on domains lists some cute
 sequentiality definitions that I'd like to understand.&lt;/li&gt;

 &lt;li&gt;In &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt; we have &lt;code&gt;(λx. ⊥) = ⊥&lt;/code&gt;, and one has to
 wonder just what that entails, coming from &lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt; where it does
 not obtain.&lt;/li&gt;

 &lt;li&gt;Apparently some people are translating &lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt; to &lt;a href=&quot;https://www4.in.tum.de/~nipkow/pubs/jfp99.html&quot;&gt;HOLCF&lt;/a&gt;,
 and I have to wonder what the point is. There's a bit of a semantic
 gap, so many arbitrary modelling decisions to take, not much of a
 standard library, ... so there's lots of tedious stuff to do before you
 can prove your program is incorrect.&lt;/li&gt;

&lt;/ul&gt;
&lt;p&gt;

I guess I'll have to get back to real (economic) work one of these days.

&lt;/p&gt;</description>
  </item>
  </channel>
</rss>
