From Michael.Norrish at nicta.com.au Fri Feb 3 01:06:50 2012 From: Michael.Norrish at nicta.com.au (Michael Norrish) Date: Fri, 03 Feb 2012 12:06:50 +1100 Subject: [opentheory-users] WFREC In-Reply-To: References: Message-ID: <4F2B332A.9060709@nicta.com.au> On 26/01/12 00:42, Ramana Kumar wrote: > I'm thinking about the appropriate namespace for a recursion operator for wellfounded relations. > In HOL4 it is called WFREC and is in relationTheory. > In fact there is a small suite of related definitions there: RESTRICT, approx, and the_fun. > I'm wondering if the list has any ideas about an appropriate way to package these things up (i.e. under what name, or with what other stuff). > I realize I may need to give more background about what they actually do... (don't have that on me at the moment!) These are operators used to define functions that recurse in well-founded ways. I can see that they are not necessarily automatic fits for the relation theory, though they're obviously pretty tightly dependent on the WF notion from relation theory. How about a new theory called something like recursive functions? (Of course, the problem with this is the possible confusion with the computable functions...) Failing that, just put them into relation! Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From ramana.kumar at gmail.com Fri Feb 10 11:34:03 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Fri, 10 Feb 2012 11:34:03 +0000 Subject: [opentheory-users] reading articles from standard input Message-ID: If I try this: opentheory info --article -o - - I get the error: opentheory: unknown type of input: - Is it possible to read an article file from standard input? -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Fri Feb 10 21:04:08 2012 From: joe at gilith.com (Joe Hurd) Date: Fri, 10 Feb 2012 13:04:08 -0800 Subject: [opentheory-users] reading articles from standard input In-Reply-To: References: Message-ID: Hi Ramana, You can prefix an input with a type, like so: article:FILENAME tarball:FILENAME theory:FILENAME staged:NAME-VERSION to tell opentheory how to interpret it. So opentheory info --article -o - article:- should work. Cheers, Joe On Fri, Feb 10, 2012 at 3:34 AM, Ramana Kumar wrote: > If I try this: > ? opentheory info --article -o - - > I get the error: > opentheory: unknown type of input: - > > Is it possible to read an article file from standard input? > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ramana.kumar at gmail.com Wed Feb 15 16:04:07 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Wed, 15 Feb 2012 16:04:07 +0000 Subject: [opentheory-users] negative integers Message-ID: Is the virtual machine supposed to be able to process negative numbers? The article file format seems to allow a leading "-" for a decimal integer command. But I don't think any other commands would make use of negative integers; I think it's a mistake to allow them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Wed Feb 15 17:32:34 2012 From: joe at gilith.com (Joe Hurd) Date: Wed, 15 Feb 2012 09:32:34 -0800 Subject: [opentheory-users] negative integers In-Reply-To: References: Message-ID: Hi Ramana, I actually went back and forth on this one, and previous versions of the article format asked for nonnegative integers. All of the OpenTheory tools I've implemented only write articles with nonnegative integers (though they should still be able to read articles with negative integers. However, I eventually settled on integers just because they're a more natural(!) concept in programming languages and thus a little easier to explain in the spec, and the only thing they're used for is a type of key in the object dictionary. Cheers, Joe On Wed, Feb 15, 2012 at 8:04 AM, Ramana Kumar wrote: > Is the virtual machine supposed to be able to process negative numbers? > The article file format seems to allow a leading "-" for a decimal integer > command. > But I don't think any other commands would make use of negative integers; I > think it's a mistake to allow them. > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ramana.kumar at gmail.com Thu Feb 16 00:34:31 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Thu, 16 Feb 2012 00:34:31 +0000 Subject: [opentheory-users] negative integers In-Reply-To: References: Message-ID: On Wed, Feb 15, 2012 at 5:32 PM, Joe Hurd wrote: > Hi Ramana, > > I actually went back and forth on this one, and previous versions of > the article format asked for nonnegative integers. All of the > OpenTheory tools I've implemented only write articles with nonnegative > integers (though they should still be able to read articles with > negative integers. > Yeah that's the issue: it complicates what proper article readers have to do. Readers I've written would fail to handle negative integers... but I guess I'll wait for such an article to appear before worrying much. > However, I eventually settled on integers just because they're a more > natural(!) concept in programming languages and thus a little easier > to explain in the spec, and the only thing they're used for is a type > of key in the object dictionary. > > Cheers, > > Joe > > On Wed, Feb 15, 2012 at 8:04 AM, Ramana Kumar > wrote: > > Is the virtual machine supposed to be able to process negative numbers? > > The article file format seems to allow a leading "-" for a decimal > integer > > command. > > But I don't think any other commands would make use of negative > integers; I > > think it's a mistake to allow them. > > > > > > _______________________________________________ > > opentheory-users mailing list > > opentheory-users at gilith.com > > http://www.gilith.com/mailman/listinfo/opentheory-users > > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramana.kumar at gmail.com Fri Feb 17 01:59:49 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Fri, 17 Feb 2012 01:59:49 +0000 Subject: [opentheory-users] a standalone tactic translating numeral encodings Message-ID: I've written a Haskell program that acts as a conversion between Norrish numerals and binary numerals. It reads an OpenTheory article encoding a Norrish numeral n[N] (made with bit1, bit2, and zero) and writes an article that proves the theorem: |- n[N] = n[B] where n[B] is the binary encoding of n (made with bit0, bit1, and zero). You can access it as a "standalone tactic" at http://cam.xrchz.net/n2b.cgi. It may use up to 6 theorems as axioms (which are all proved in the standard library). The Haskell source code is here https://github.com/xrchz/typed-conv/blob/master/numeral/n2b.hs (around 500 lines). I'm pretty new to Haskell, so I'd very much appreciate any comments on the design. A lot of the infrastructure should be resuable by future standalone tactics in Haskell. Specific design questions I have: - would it be better to somehow write articles without going via a type of proofs (i.e. just directly log as theorems are built)? I tried to figure out a way to do that but failed, and also stopped thinking it would be better - would it be more efficient to store conclusions with proofs rather than computing them with concl? but I think Haskell memoises anyway... - is there a better algorithm for converting between these numeral encodings? - my articles always leave tonnes of stuff on the stack because they just def everything... is there an efficient algorithm for only deffing things you'll actually use (and maybe removing them after you won't any more)? - probably lots of obvious things I'm doing less nicely than is possible... -------------- next part -------------- An HTML attachment was scrubbed... URL: