<div dir="ltr">Daryoush,<br><br>One of the subtle points about computation is that -- via Curry-Howard -- well-typed programs are <b><i>already</i></b> proofs. They may not be the proof you were seeking (there are a lot of programs from Int -&gt; Int), or prove the theorem you were seeking to prove (Ord a =&gt; [a] -&gt; [a] is a lot weaker than &#39;this program sorts lists of ordered types&#39;), but they are witnesses of any type they type-check against. In a system that has principal types, they are proofs of their principal type. In this sense, the utility of proofs is widespread: they are programs.<br>
<br>There is a really subtle dance between types that are rich enough to express the theorems you would have your programs be proofs of and the termination of type-checking for that type system. That&#39;s why people often do proofs by hand -- because the theorems they need to prove require a greater degree of expressiveness than is available in the type system supported by the language in which the programs are expressed. Research has really been pushing the envelope of what&#39;s expressible in types -- from region and resource analysis to deadlock-freedom. Again, in that setting the program is a witness of a property like <br>
<ul><li>won&#39;t leak URLs to unsavory agents</li><li>won&#39;t hold on to handles past their garbage-collect-by date</li><li>won&#39;t get caught in a &#39;deadly embrace&#39; (A is waiting for B, B is waiting for A)</li>
</ul>Sometimes, however, and often in mission critical code, you need stronger assurances, like <br><ul><li>this code really does implement a FIFO queue, or</li><li>this code really does implement sliding window protocol, or</li>
<li>this code really does implement two-phase-commit-presumed-abort</li></ul>It&#39;s harder -- in fact i think it&#39;s impossible for bullet item 2 above -- to squeeze these into terminating type-checks. In those cases, you have to escape out to a richer relationship between &#39;theorem&#39; (aka type) and &#39;proof&#39; (aka program). Proof assistants, like Coq, or Hol or... can be very helpful for automating some of the tasks, leaving the inventive bits to the humans. <br>
<br>In my experience, a proof of a theorem about some commercial code is pursued when the cost of developing the proof is less than some multiple of the cost of errors in the program in the life-cycle of that program. Intel, and other hardware vendors, for example, can lose a lot of business when the implementation of floating point operations is buggy; and, there is a breaking point where the complexity/difficulty/cost of proving the implementation correct is sufficiently less than that of business lost that it is to their advantage to obtain the kind of quality assurance that can be had from a proof of correctness.<br>
<br>One other place where proofs of correctness will be pursued is in mathematical proofs, themselves. To the best of my knowledge, nothing mission-critical is currently riding on the proof of the 4-color theorem. The proof -- last i checked -- required programmatic checking of many cases. Proving the program -- that implements the tedious parts of the proof -- correct is pursued because of the culture and standard of mathematical proof. <br>
<br>Best wishes,<br><br>--greg<br><br clear="all">Date: Sat, 13 Sep 2008 22:24:50 -0700<br>
From: &quot;Daryoush Mehrtash&quot; &lt;<a href="mailto:dmehrtash@gmail.com">dmehrtash@gmail.com</a>&gt;<br>
Subject: Re: [Haskell-cafe] Haskell Weekly News: Issue 85 - September<br>
 &nbsp; &nbsp; &nbsp; &nbsp;13, 2008<br>
To: &quot;Don Stewart&quot; &lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;<br>
Cc: Haskell Cafe &lt;<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>&gt;<br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:e5b8e9790809132224u3d29b858j5fda8e41b34566eb@mail.gmail.com">e5b8e9790809132224u3d29b858j5fda8e41b34566eb@mail.gmail.com</a><div id=":xq" class="ArwC7c ckChnd">&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
What I am trying to figure out is that say on the code for the IRC bot that<br>
is show here<br>
<br>
<a href="http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot/Source" target="_blank">http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot/Source</a><br>
<br>
What would theorem proofs do for me?<br>
<br>
Daryoush</div><br>-- <br>L.G. Meredith<br>Managing Partner<br>Biosimilarity LLC<br>806 55th St NE<br>Seattle, WA 98105<br><br>+1 206.650.3740<br><br><a href="http://biosimilarity.blogspot.com">http://biosimilarity.blogspot.com</a><br>

</div>