From joe at gilith.com Fri Jan 6 00:45:29 2012 From: joe at gilith.com (Joe Hurd) Date: Thu, 5 Jan 2012 16:45:29 -0800 Subject: [opentheory-users] Package requirements Message-ID: I've just released a new version of the opentheory tool that caches package theorems when a theory package is installed, which enormouly speed up the check that theory assumptions are satisfied by the new requires: NAME package information. Unfortunately this means that old package repos are obsolete, but if you install the new opentheory tool they can be brought up to date with the shell command: cd ~/.opentheory/packages ; for f in */*.thy ; do d=$(dirname $f) ; echo $d ; opentheory info --theorems -o $d/$d.art theory:$f ; done Cheers, Joe From ramana.kumar at gmail.com Fri Jan 13 13:10:15 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Fri, 13 Jan 2012 13:10:15 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: <4EE5635D.8090401@nicta.com.au> References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> Message-ID: If we store terms in articles as-is and then clean tags up later (or not), then I imagine Opentheory repos would offer different versions of packages: either the raw one that might include prover-specific constants for some prover, or the cleaned up one with all tags removed. If you're lucky enough to be using the prover the package was made on, you get the specific version, otherwise you get the generic one. If tags are inferable, though, then there could be more options, tailoring a package to the prover you want to use it on. Does this sound right? On Mon, Dec 12, 2011 at 2:13 AM, Michael Norrish < Michael.Norrish at nicta.com.au> wrote: > I think it?s clear that there?s no end of cruft that systems might like to > put into theory files. Even the ?names? field you mention below may vary > from system to system. Given that, we need some generic way of stuffing > arbitrary, well-delimited strings into theory files. I?d probably prefer > these strings to be inline, but it could also be done with associated files > if necessary. > > I like the default being the storage of everything. > > Another example of a tag-like thing is the way we use K T x to store > arbitrary terms x in a theory so that the term can be referred to by the > LaTeX machinery we have. > > Michael > > On 08/12/11 21:32, Ramana Kumar wrote: > > Can we make a comprehensive list of the kind of stuff we might want to > > store in a theory package? > > I suspect there will be different recovery methods suitable for > > different kinds of data, and looking at the requirements will help see > > if and how opentheory might have to be modified or extended. > > > > - Tag-free theorems, definitions, low-level proofs. > > : already handled by article format > > > > - theory name and description and dependencies > > : already handled by theory package format > > > > - NUMERAL tags > > : reconstructible on reading? > > > > - Abbrev tags > > > > - Other tags? (Such as?) > > : An alternative approach might be to store terms in an article as-is > > (with tags) and then have different processing options for cleaning up > > an article like do-nothing, remove all tags, remove all of the > > following tags, or even possibly introduce tags for a specific prover > > (if they are inferable). > > > > - theorem names > > : could be stored in a separate file mapping names to statements? > > > > - automatic rewrites > > : could be stored in a separate file containing a list of theorems? > > > > - parsing and printing rules, and overloads > > : also could be in a separate file? > > > > - derived rules and other functionality associated with a theory > > - tactics, provers/decision procedures > > - syntax manipulation functions > > - what else? > > : again, could be in a separate file of code, possibly using > > opentheory article format to interface with the required > > constants/theorems in the theory? > > > > - what else? > > > > At the moment it looks like almost everything could be handled by > > extra files that would be mentioned in a theory package but wouldn't > > interfere with article files in their current form. Only tag constants > > are a problem because they change the terms the article is dealing > > with. > > > > Are there examples of tags that are definitely not reconstructible if > > they are thrown away during cleanup? > > > > > > On Thu, Dec 8, 2011 at 9:50 AM, Michael Norrish > > wrote: > >> On 07/12/2011, at 20:01, Ramana Kumar wrote: > >> > >> > >> It would be worth thinking about how to do all that with opentheory. > >> I wouldn't want to compromise the goal of storing prover-independent > >> theories without a good reason, though... > >> > >> > >> My concern is that the resulting system might forget things that can't > be > >> recovered. Then it will never be usable as a theory storage mechanism. > Is > >> it possible to create a faithful representation of what's there that > does > >> support getting back exactly what was put in, and to *then* work on > >> forgetting stuff that doesn't belong in theories meant for sharing with > >> other systems? > >> > >> Michael > >> > >> _______________________________________________ > >> 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 > > > > _______________________________________________ > 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 joe at gilith.com Sat Jan 14 13:19:03 2012 From: joe at gilith.com (Joe Hurd) Date: Sat, 14 Jan 2012 05:19:03 -0800 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> Message-ID: Hi Ramana, My preference would be that the theorem prover interface handles as much as possible of the standardization during theory export and then localization during theory import (the inverse operation). But I can see that there might be some HOL4 specific theory information that can't be reconstructed on theory import. I wonder if you could achieve your goal by exporting an extra file hol4.art declared in the package theory file hol4-theory-file: hol4.art that contained a version of the proof article file for the theory with the HOL4 specific theory information you want to preserve? Cheers, Joe > If we store terms in articles as-is and then clean tags up later (or not), > then I imagine Opentheory repos would offer different versions of packages: > either the raw one that might include prover-specific constants for some > prover, or the cleaned up one with all tags removed. If you're lucky enough > to be using the prover the package was made on, you get the specific > version, otherwise you get the generic one. > If tags are inferable, though, then there could be more options, tailoring a > package to the prover you want to use it on. > Does this sound right? > > > On Mon, Dec 12, 2011 at 2:13 AM, Michael Norrish > wrote: >> >> I think it?s clear that there?s no end of cruft that systems might like to >> put into theory files. ?Even the ?names? field you mention below may vary >> from system to system. ?Given that, we need some generic way of stuffing >> arbitrary, well-delimited strings into theory files. ?I?d probably prefer >> these strings to be inline, but it could also be done with associated files >> if necessary. >> >> I like the default being the storage of everything. >> >> >> Another example of a tag-like thing is the way we use K T x to store >> arbitrary terms x in a theory so that the term can be referred to by the >> LaTeX machinery we have. >> >> Michael >> >> On 08/12/11 21:32, Ramana Kumar wrote: >> > Can we make a comprehensive list of the kind of stuff we might want to >> > store in a theory package? >> > I suspect there will be different recovery methods suitable for >> > different kinds of data, and looking at the requirements will help see >> > if and how opentheory might have to be modified or extended. >> > >> > - Tag-free theorems, definitions, low-level proofs. >> > : already handled by article format >> > >> > - theory name and description and dependencies >> > : already handled by theory package format >> > >> > - NUMERAL tags >> > : reconstructible on reading? >> > >> > - Abbrev tags >> > >> > - Other tags? (Such as?) >> > : An alternative approach might be to store terms in an article as-is >> > (with tags) and then have different processing options for cleaning up >> > an article like do-nothing, remove all tags, remove all of the >> > following tags, or even possibly introduce tags for a specific prover >> > (if they are inferable). >> > >> > - theorem names >> > : could be stored in a separate file mapping names to statements? >> > >> > - automatic rewrites >> > : could be stored in a separate file containing a list of theorems? >> > >> > - parsing and printing rules, and overloads >> > : also could be in a separate file? >> > >> > - derived rules and other functionality associated with a theory >> > ? - tactics, provers/decision procedures >> > ? - syntax manipulation functions >> > ? - what else? >> > : again, could be in a separate file of code, possibly using >> > opentheory article format to interface with the required >> > constants/theorems in the theory? >> > >> > - what else? >> > >> > At the moment it looks like almost everything could be handled by >> > extra files that would be mentioned in a theory package but wouldn't >> > interfere with article files in their current form. Only tag constants >> > are a problem because they change the terms the article is dealing >> > with. >> > >> > Are there examples of tags that are definitely not reconstructible if >> > they are thrown away during cleanup? >> > >> > >> > On Thu, Dec 8, 2011 at 9:50 AM, Michael Norrish >> > wrote: >> >> On 07/12/2011, at 20:01, Ramana Kumar wrote: >> >> >> >> >> >> It would be worth thinking about how to do all that with opentheory. >> >> I wouldn't want to compromise the goal of storing prover-independent >> >> theories without a good reason, though... >> >> >> >> >> >> My concern is that the resulting system might forget things that can't >> >> be >> >> recovered. ?Then it will never be usable as a theory storage mechanism. >> >> ? Is >> >> it possible to create a faithful representation of what's there that >> >> does >> >> support getting back exactly what was put in, and to *then* work on >> >> forgetting stuff that doesn't belong in theories meant for sharing with >> >> other systems? >> >> >> >> Michael >> >> >> >> _______________________________________________ >> >> 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 >> >> >> >> _______________________________________________ >> 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 > From michael.norrish at nicta.com.au Sat Jan 14 20:32:52 2012 From: michael.norrish at nicta.com.au (Michael Norrish) Date: Sun, 15 Jan 2012 07:32:52 +1100 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> This would be my preference (thus my "associated files if necessary"). I don't know if everything HOL4-ish could necessarily be encoded in an "art" file though. Presumably, files mentioned in the package could contain other stuff. Michael On 15/01/2012, at 0:19, Joe Hurd wrote: > Hi Ramana, > > My preference would be that the theorem prover interface handles as > much as possible of the standardization during theory export and then > localization during theory import (the inverse operation). But I can > see that there might be some HOL4 specific theory information that > can't be reconstructed on theory import. > > I wonder if you could achieve your goal by exporting an extra file > hol4.art declared in the package theory file > > hol4-theory-file: hol4.art > > that contained a version of the proof article file for the theory with > the HOL4 specific theory information you want to preserve? > > Cheers, > > Joe > >> If we store terms in articles as-is and then clean tags up later (or not), >> then I imagine Opentheory repos would offer different versions of packages: >> either the raw one that might include prover-specific constants for some >> prover, or the cleaned up one with all tags removed. If you're lucky enough >> to be using the prover the package was made on, you get the specific >> version, otherwise you get the generic one. >> If tags are inferable, though, then there could be more options, tailoring a >> package to the prover you want to use it on. >> Does this sound right? >> >> >> On Mon, Dec 12, 2011 at 2:13 AM, Michael Norrish >> wrote: >>> >>> I think it?s clear that there?s no end of cruft that systems might like to >>> put into theory files. Even the ?names? field you mention below may vary >>> from system to system. Given that, we need some generic way of stuffing >>> arbitrary, well-delimited strings into theory files. I?d probably prefer >>> these strings to be inline, but it could also be done with associated files >>> if necessary. >>> >>> I like the default being the storage of everything. >>> >>> >>> Another example of a tag-like thing is the way we use K T x to store >>> arbitrary terms x in a theory so that the term can be referred to by the >>> LaTeX machinery we have. >>> >>> Michael >>> >>> On 08/12/11 21:32, Ramana Kumar wrote: >>>> Can we make a comprehensive list of the kind of stuff we might want to >>>> store in a theory package? >>>> I suspect there will be different recovery methods suitable for >>>> different kinds of data, and looking at the requirements will help see >>>> if and how opentheory might have to be modified or extended. >>>> >>>> - Tag-free theorems, definitions, low-level proofs. >>>> : already handled by article format >>>> >>>> - theory name and description and dependencies >>>> : already handled by theory package format >>>> >>>> - NUMERAL tags >>>> : reconstructible on reading? >>>> >>>> - Abbrev tags >>>> >>>> - Other tags? (Such as?) >>>> : An alternative approach might be to store terms in an article as-is >>>> (with tags) and then have different processing options for cleaning up >>>> an article like do-nothing, remove all tags, remove all of the >>>> following tags, or even possibly introduce tags for a specific prover >>>> (if they are inferable). >>>> >>>> - theorem names >>>> : could be stored in a separate file mapping names to statements? >>>> >>>> - automatic rewrites >>>> : could be stored in a separate file containing a list of theorems? >>>> >>>> - parsing and printing rules, and overloads >>>> : also could be in a separate file? >>>> >>>> - derived rules and other functionality associated with a theory >>>> - tactics, provers/decision procedures >>>> - syntax manipulation functions >>>> - what else? >>>> : again, could be in a separate file of code, possibly using >>>> opentheory article format to interface with the required >>>> constants/theorems in the theory? >>>> >>>> - what else? >>>> >>>> At the moment it looks like almost everything could be handled by >>>> extra files that would be mentioned in a theory package but wouldn't >>>> interfere with article files in their current form. Only tag constants >>>> are a problem because they change the terms the article is dealing >>>> with. >>>> >>>> Are there examples of tags that are definitely not reconstructible if >>>> they are thrown away during cleanup? >>>> >>>> >>>> On Thu, Dec 8, 2011 at 9:50 AM, Michael Norrish >>>> wrote: >>>>> On 07/12/2011, at 20:01, Ramana Kumar wrote: >>>>> >>>>> >>>>> It would be worth thinking about how to do all that with opentheory. >>>>> I wouldn't want to compromise the goal of storing prover-independent >>>>> theories without a good reason, though... >>>>> >>>>> >>>>> My concern is that the resulting system might forget things that can't >>>>> be >>>>> recovered. Then it will never be usable as a theory storage mechanism. >>>>> Is >>>>> it possible to create a faithful representation of what's there that >>>>> does >>>>> support getting back exactly what was put in, and to *then* work on >>>>> forgetting stuff that doesn't belong in theories meant for sharing with >>>>> other systems? >>>>> >>>>> Michael >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users From ramana.kumar at gmail.com Sat Jan 14 20:48:20 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Sat, 14 Jan 2012 20:48:20 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> Message-ID: Yes I think the theory package *-file lines allow any kind of file to be attached to a package. The only reason to have an extra hol4 article file is tags like Abbrev and NUMERAL. Everything else, as I mentioned before, can be done separately from the article. So, to summarise what's required on the HOL4 side to package an existing HOL4 theory: 1. Log the article without translating any constants to Unwanted.id (i.e. don't mark anything as tags); maybe just put constants that won't be in a standard namespace into the HOL4 namespace. 2. In the theory package file, name the article from step 1 as the hol4-theory-file. Probably post-process it with the opentheory tool too. 3. Create a new copy of the article file from step 1, and rename the tags (I'm thinking just a search+replace taking "HOL4.Abbrev" -> "Unwanted.id", etc. might be enough, right?), then postprocess with opentheory to remove them. 4. Name the article from step 3 as the main article in the package. 5. For any additional information (theorem names, exported rewrites, etc., which should probably also be recorded in step 1) add appropriate extra hol4-something-files to the package. Unfortunately, that still doesn't solve the problem when a tag shows up not fully applied (like in a point-free term). On Sat, Jan 14, 2012 at 8:32 PM, Michael Norrish < michael.norrish at nicta.com.au> wrote: > This would be my preference (thus my "associated files if necessary"). I > don't know if everything HOL4-ish could necessarily be encoded in an "art" > file though. Presumably, files mentioned in the package could contain > other stuff. > > Michael > > On 15/01/2012, at 0:19, Joe Hurd wrote: > > > Hi Ramana, > > > > My preference would be that the theorem prover interface handles as > > much as possible of the standardization during theory export and then > > localization during theory import (the inverse operation). But I can > > see that there might be some HOL4 specific theory information that > > can't be reconstructed on theory import. > > > > I wonder if you could achieve your goal by exporting an extra file > > hol4.art declared in the package theory file > > > > hol4-theory-file: hol4.art > > > > that contained a version of the proof article file for the theory with > > the HOL4 specific theory information you want to preserve? > > > > Cheers, > > > > Joe > > > >> If we store terms in articles as-is and then clean tags up later (or > not), > >> then I imagine Opentheory repos would offer different versions of > packages: > >> either the raw one that might include prover-specific constants for some > >> prover, or the cleaned up one with all tags removed. If you're lucky > enough > >> to be using the prover the package was made on, you get the specific > >> version, otherwise you get the generic one. > >> If tags are inferable, though, then there could be more options, > tailoring a > >> package to the prover you want to use it on. > >> Does this sound right? > >> > >> > >> On Mon, Dec 12, 2011 at 2:13 AM, Michael Norrish > >> wrote: > >>> > >>> I think it?s clear that there?s no end of cruft that systems might > like to > >>> put into theory files. Even the ?names? field you mention below may > vary > >>> from system to system. Given that, we need some generic way of > stuffing > >>> arbitrary, well-delimited strings into theory files. I?d probably > prefer > >>> these strings to be inline, but it could also be done with associated > files > >>> if necessary. > >>> > >>> I like the default being the storage of everything. > >>> > >>> > >>> Another example of a tag-like thing is the way we use K T x to store > >>> arbitrary terms x in a theory so that the term can be referred to by > the > >>> LaTeX machinery we have. > >>> > >>> Michael > >>> > >>> On 08/12/11 21:32, Ramana Kumar wrote: > >>>> Can we make a comprehensive list of the kind of stuff we might want to > >>>> store in a theory package? > >>>> I suspect there will be different recovery methods suitable for > >>>> different kinds of data, and looking at the requirements will help see > >>>> if and how opentheory might have to be modified or extended. > >>>> > >>>> - Tag-free theorems, definitions, low-level proofs. > >>>> : already handled by article format > >>>> > >>>> - theory name and description and dependencies > >>>> : already handled by theory package format > >>>> > >>>> - NUMERAL tags > >>>> : reconstructible on reading? > >>>> > >>>> - Abbrev tags > >>>> > >>>> - Other tags? (Such as?) > >>>> : An alternative approach might be to store terms in an article as-is > >>>> (with tags) and then have different processing options for cleaning up > >>>> an article like do-nothing, remove all tags, remove all of the > >>>> following tags, or even possibly introduce tags for a specific prover > >>>> (if they are inferable). > >>>> > >>>> - theorem names > >>>> : could be stored in a separate file mapping names to statements? > >>>> > >>>> - automatic rewrites > >>>> : could be stored in a separate file containing a list of theorems? > >>>> > >>>> - parsing and printing rules, and overloads > >>>> : also could be in a separate file? > >>>> > >>>> - derived rules and other functionality associated with a theory > >>>> - tactics, provers/decision procedures > >>>> - syntax manipulation functions > >>>> - what else? > >>>> : again, could be in a separate file of code, possibly using > >>>> opentheory article format to interface with the required > >>>> constants/theorems in the theory? > >>>> > >>>> - what else? > >>>> > >>>> At the moment it looks like almost everything could be handled by > >>>> extra files that would be mentioned in a theory package but wouldn't > >>>> interfere with article files in their current form. Only tag constants > >>>> are a problem because they change the terms the article is dealing > >>>> with. > >>>> > >>>> Are there examples of tags that are definitely not reconstructible if > >>>> they are thrown away during cleanup? > >>>> > >>>> > >>>> On Thu, Dec 8, 2011 at 9:50 AM, Michael Norrish > >>>> wrote: > >>>>> On 07/12/2011, at 20:01, Ramana Kumar > wrote: > >>>>> > >>>>> > >>>>> It would be worth thinking about how to do all that with opentheory. > >>>>> I wouldn't want to compromise the goal of storing prover-independent > >>>>> theories without a good reason, though... > >>>>> > >>>>> > >>>>> My concern is that the resulting system might forget things that > can't > >>>>> be > >>>>> recovered. Then it will never be usable as a theory storage > mechanism. > >>>>> Is > >>>>> it possible to create a faithful representation of what's there that > >>>>> does > >>>>> support getting back exactly what was put in, and to *then* work on > >>>>> forgetting stuff that doesn't belong in theories meant for sharing > with > >>>>> other systems? > >>>>> > >>>>> Michael > >>>>> > >>>>> _______________________________________________ > >>>>> 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 > >>> > >>> > >>> > >>> _______________________________________________ > >>> 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 > >> > > > > _______________________________________________ > > 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 Michael.Norrish at nicta.com.au Wed Jan 18 22:22:24 2012 From: Michael.Norrish at nicta.com.au (Michael Norrish) Date: Thu, 19 Jan 2012 09:22:24 +1100 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> Message-ID: <4F174620.6020106@nicta.com.au> On 15/01/12 07:48, Ramana Kumar wrote: > Unfortunately, that still doesn't solve the problem when a tag shows up not fully applied (like in a point-free term). So, my understanding is that this is an issue in the following scenario: * the llist proof uses a point-free theorem about the 'Abbrev' constant. * this theorem gets listed as an import dependency * this interferes with the general desire to get rid of the constant (which is really an unwanted identity function) Parenthetically, I understand the treatment of unwanted constants such as 'Abbrev' is supposed to be: * replace all occurrences with the Unwanted.id constant * process exported theorems with the |- id x = x theorem so that occurrences in what is exported disappear * similarly, process the import/axiom list so that occurrences there go away * the result is an article that all systems will be happy to use, though there may still be occurrences of Unwanted internally. Is this right? Would it be possible to augment the HOL4 exporter so that it automatically included the (fairly trivial) proof discharging the point-free theorem that gets listed as an import? It seems to me that this is the best solution, though it's clearly very ad hoc. 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 Wed Jan 18 23:04:53 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Wed, 18 Jan 2012 23:04:53 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: <4F174620.6020106@nicta.com.au> References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> Message-ID: On Wed, Jan 18, 2012 at 10:22 PM, Michael Norrish < Michael.Norrish at nicta.com.au> wrote: > On 15/01/12 07:48, Ramana Kumar wrote: > > > Unfortunately, that still doesn't solve the problem when a tag shows up > not fully applied (like in a point-free term). > > So, my understanding is that this is an issue in the following scenario: > > * the llist proof uses a point-free theorem about the 'Abbrev' constant. > * this theorem gets listed as an import dependency > * this interferes with the general desire to get rid of the constant > (which is really an unwanted identity function) > Correct. It gets listed as an import dependency implicitly (they are all implicit) because it gets used during a proof (and isn't proved itself). > > Parenthetically, I understand the treatment of unwanted constants such as > 'Abbrev' is supposed to be: > > * replace all occurrences with the Unwanted.id constant > * process exported theorems with the |- id x = x theorem so that > occurrences in what is exported disappear > * similarly, process the import/axiom list so that occurrences there go > away > * the result is an article that all systems will be happy to use, though > there may still be occurrences of Unwanted internally. > Yes. (Except for two minor details: there will be no occurrences of Unwanted afterwards, even internally, and it is the proofs that are rewritten (rather than just theorem/import/axiom statements).) > Is this right? > > Would it be possible to augment the HOL4 exporter so that it automatically > included the (fairly trivial) proof discharging the point-free theorem that > gets listed as an import? It seems to me that this is the best solution, > though it's clearly very ad hoc. > Yes that seems like a good solution to me, but I think it means looking for this theorem specifically as a special case in the exporter, right? Actually it could be as general as: if a theorem, after translating constants to OT namespace, contains any not-fully-applied Unwanted.ids, then lookup a proof for the theorem in a special database, otherwise proceed as normal. (As normal would be logging the proof if it's attached to the theorem, otherwise treat it as an axiom. The problem above is that the theorem doesn't have a proof attached when logging llist, since it was proved in an earlier theory (i.e. it's a DISK_THM)). > > Michael > > > > > _______________________________________________ > 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 Michael.Norrish at nicta.com.au Thu Jan 19 05:24:13 2012 From: Michael.Norrish at nicta.com.au (Michael Norrish) Date: Thu, 19 Jan 2012 16:24:13 +1100 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> Message-ID: <4F17A8FD.3070601@nicta.com.au> On 19/01/12 10:04, Ramana Kumar wrote: > Yes. (Except for two minor details: there will be no occurrences of > Unwanted afterwards, even internally, and it is the proofs that are > rewritten (rather than just theorem/import/axiom statements).) Ah, that's interesting. >> Would it be possible to augment the HOL4 exporter so that it >> automatically included the (fairly trivial) proof discharging the >> point-free theorem that gets listed as an import? It seems to me >> that this is the best solution, though it's clearly very ad hoc. > Yes that seems like a good solution to me, but I think it means > looking for this theorem specifically as a special case in the > exporter, right? Actually it could be as general as: if a theorem, > after translating constants to OT namespace, contains any > not-fully-applied Unwanted.ids, then lookup a proof for the theorem > in a special database, otherwise proceed as normal. (As normal would > be logging the proof if it's attached to the theorem, otherwise > treat it as an axiom. The problem above is that the theorem doesn't > have a proof attached when logging llist, since it was proved in an > earlier theory (i.e. it's a DISK_THM)). Yeah, the special database will presumably have to be populated with real proofs well in advance. There probably isn't any real harm in trying to be general. On the other hand, I don't suppose there will be a great many such theorems. 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 Thu Jan 19 08:19:06 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Thu, 19 Jan 2012 08:19:06 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: <4F17A8FD.3070601@nicta.com.au> References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> <4F17A8FD.3070601@nicta.com.au> Message-ID: Thinking about this more, I'm not sure it will work completely because the statement of the theorem will still include Unwanted.id... So the article might end up still defining Unwanted.id but hopefully not assuming any axioms. In any case, I'm going to try it out and see what happens. On Thu, Jan 19, 2012 at 5:24 AM, Michael Norrish < Michael.Norrish at nicta.com.au> wrote: > On 19/01/12 10:04, Ramana Kumar wrote: > > > Yes. (Except for two minor details: there will be no occurrences of > > Unwanted afterwards, even internally, and it is the proofs that are > > rewritten (rather than just theorem/import/axiom statements).) > > Ah, that's interesting. > > >> Would it be possible to augment the HOL4 exporter so that it > >> automatically included the (fairly trivial) proof discharging the > >> point-free theorem that gets listed as an import? It seems to me > >> that this is the best solution, though it's clearly very ad hoc. > > > Yes that seems like a good solution to me, but I think it means > > looking for this theorem specifically as a special case in the > > exporter, right? Actually it could be as general as: if a theorem, > > after translating constants to OT namespace, contains any > > not-fully-applied Unwanted.ids, then lookup a proof for the theorem > > in a special database, otherwise proceed as normal. (As normal would > > be logging the proof if it's attached to the theorem, otherwise > > treat it as an axiom. The problem above is that the theorem doesn't > > have a proof attached when logging llist, since it was proved in an > > earlier theory (i.e. it's a DISK_THM)). > > Yeah, the special database will presumably have to be populated with real > proofs well in advance. > > There probably isn't any real harm in trying to be general. On the other > hand, I don't suppose there will be a great many such theorems. > > Michael > > > _______________________________________________ > 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 huffman at in.tum.de Wed Jan 18 14:19:42 2012 From: huffman at in.tum.de (Brian Huffman) Date: Wed, 18 Jan 2012 15:19:42 +0100 Subject: [opentheory-users] Isabelle OpenTheory importer Message-ID: A mercurial repository with my OpenTheory importer for Isabelle is available online: http://www4.in.tum.de/~huffman/cgi-bin/repos.cgi/OpenTheory You should be able to use "hg clone" with the same url to download a copy of everything. The importer is tested with Isabelle version 2011-1. - Brian From joe at gilith.com Thu Jan 19 11:11:21 2012 From: joe at gilith.com (Joe Hurd) Date: Thu, 19 Jan 2012 03:11:21 -0800 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> <4F17A8FD.3070601@nicta.com.au> Message-ID: The current procedure for eliminating Unwanted.id constants only works when they're applied to arguments, so even if you remove them from assumptions and theorems they might still be present inside proofs. Really the trick is to get rid of Unwanted constants from assumptions and theorems (since constants that are only present inside proofs are trapped and can never escape to their environment). So Michael's solution of replacing the point-free version of theorems containing Unwanted constants with point-full versions should work just fine, though on an ad-hoc basis. Cheers, Joe On Thu, Jan 19, 2012 at 12:19 AM, Ramana Kumar wrote: > Thinking about this more, I'm not sure it will work completely because the > statement of the theorem will still include Unwanted.id... So the article > might end up still defining Unwanted.id but hopefully not assuming any > axioms. In any case, I'm going to try it out and see what happens. > > On Thu, Jan 19, 2012 at 5:24 AM, Michael Norrish > wrote: >> >> On 19/01/12 10:04, Ramana Kumar wrote: >> >> > Yes. (Except for two minor details: there will be no occurrences of >> > Unwanted afterwards, even internally, and it is the proofs that are >> > rewritten (rather than just theorem/import/axiom statements).) >> >> Ah, that's interesting. >> >> >> Would it be possible to augment the HOL4 exporter so that it >> >> automatically included the (fairly trivial) proof discharging the >> >> point-free theorem that gets listed as an import? ?It seems to me >> >> that this is the best solution, though it's clearly very ad hoc. >> >> > Yes that seems like a good solution to me, but I think it means >> > looking for this theorem specifically as a special case in the >> > exporter, right? Actually it could be as general as: if a theorem, >> > after translating constants to OT namespace, contains any >> > not-fully-applied Unwanted.ids, then lookup a proof for the theorem >> > in a special database, otherwise proceed as normal. (As normal would >> > be logging the proof if it's attached to the theorem, otherwise >> > treat it as an axiom. The problem above is that the theorem doesn't >> > have a proof attached when logging llist, since it was proved in an >> > earlier theory (i.e. it's a DISK_THM)). >> >> Yeah, the special database will presumably have to be populated with real >> proofs well in advance. >> >> There probably isn't any real harm in trying to be general. ?On the other >> hand, I don't suppose there will be a great many such theorems. >> >> Michael >> >> >> _______________________________________________ >> 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 > From ramana.kumar at gmail.com Thu Jan 19 11:38:12 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Thu, 19 Jan 2012 11:38:12 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> <4F17A8FD.3070601@nicta.com.au> Message-ID: On Thu, Jan 19, 2012 at 11:11 AM, Joe Hurd wrote: > The current procedure for eliminating Unwanted.id constants only works > when they're applied to arguments, so even if you remove them from > assumptions and theorems they might still be present inside proofs. > > Really the trick is to get rid of Unwanted constants from assumptions > and theorems (since constants that are only present inside proofs are > trapped and can never escape to their environment). So Michael's > solution of replacing the point-free version of theorems containing > Unwanted constants with point-full versions should work just fine, > though on an ad-hoc basis. > I don't think that's what he suggested. Rather it was to provide a proof of the point-free version. I'm about to try saving such a proof in a separate package and then listing that package as a "requires:" to see what happens... > > Cheers, > > Joe > > On Thu, Jan 19, 2012 at 12:19 AM, Ramana Kumar > wrote: > > Thinking about this more, I'm not sure it will work completely because > the > > statement of the theorem will still include Unwanted.id... So the article > > might end up still defining Unwanted.id but hopefully not assuming any > > axioms. In any case, I'm going to try it out and see what happens. > > > > On Thu, Jan 19, 2012 at 5:24 AM, Michael Norrish > > wrote: > >> > >> On 19/01/12 10:04, Ramana Kumar wrote: > >> > >> > Yes. (Except for two minor details: there will be no occurrences of > >> > Unwanted afterwards, even internally, and it is the proofs that are > >> > rewritten (rather than just theorem/import/axiom statements).) > >> > >> Ah, that's interesting. > >> > >> >> Would it be possible to augment the HOL4 exporter so that it > >> >> automatically included the (fairly trivial) proof discharging the > >> >> point-free theorem that gets listed as an import? It seems to me > >> >> that this is the best solution, though it's clearly very ad hoc. > >> > >> > Yes that seems like a good solution to me, but I think it means > >> > looking for this theorem specifically as a special case in the > >> > exporter, right? Actually it could be as general as: if a theorem, > >> > after translating constants to OT namespace, contains any > >> > not-fully-applied Unwanted.ids, then lookup a proof for the theorem > >> > in a special database, otherwise proceed as normal. (As normal would > >> > be logging the proof if it's attached to the theorem, otherwise > >> > treat it as an axiom. The problem above is that the theorem doesn't > >> > have a proof attached when logging llist, since it was proved in an > >> > earlier theory (i.e. it's a DISK_THM)). > >> > >> Yeah, the special database will presumably have to be populated with > real > >> proofs well in advance. > >> > >> There probably isn't any real harm in trying to be general. On the > other > >> hand, I don't suppose there will be a great many such theorems. > >> > >> Michael > >> > >> > >> _______________________________________________ > >> 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 > > > > _______________________________________________ > 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 Thu Jan 19 17:26:30 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Thu, 19 Jan 2012 17:26:30 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDE9EEA.4030902@nicta.com.au> <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> <4F17A8FD.3070601@nicta.com.au> Message-ID: To my mild surprise, logging the proof of the point-free theorem worked. That is, if I make sure the theorem with an unapplied Unwanted.id is logged with a proof (while logging the lazy list theory), then process the resulting article with opentheory, the resulting package doesn't define Unwanted.id and doesn't require any axioms. I've uploaded the new version of the lazy list package, which now appears to define and prove just the right things. http://opentheory.gilith.com/opentheory/packages/lazy-list-0.3/lazy-list-0.3.html On Thu, Jan 19, 2012 at 11:38 AM, Ramana Kumar wrote: > > > On Thu, Jan 19, 2012 at 11:11 AM, Joe Hurd wrote: > >> The current procedure for eliminating Unwanted.id constants only works >> when they're applied to arguments, so even if you remove them from >> assumptions and theorems they might still be present inside proofs. >> >> Really the trick is to get rid of Unwanted constants from assumptions >> and theorems (since constants that are only present inside proofs are >> trapped and can never escape to their environment). So Michael's >> solution of replacing the point-free version of theorems containing >> Unwanted constants with point-full versions should work just fine, >> though on an ad-hoc basis. >> > > I don't think that's what he suggested. Rather it was to provide a proof > of the point-free version. I'm about to try saving such a proof in a > separate package and then listing that package as a "requires:" to see what > happens... > > >> >> Cheers, >> >> Joe >> >> On Thu, Jan 19, 2012 at 12:19 AM, Ramana Kumar >> wrote: >> > Thinking about this more, I'm not sure it will work completely because >> the >> > statement of the theorem will still include Unwanted.id... So the >> article >> > might end up still defining Unwanted.id but hopefully not assuming any >> > axioms. In any case, I'm going to try it out and see what happens. >> > >> > On Thu, Jan 19, 2012 at 5:24 AM, Michael Norrish >> > wrote: >> >> >> >> On 19/01/12 10:04, Ramana Kumar wrote: >> >> >> >> > Yes. (Except for two minor details: there will be no occurrences of >> >> > Unwanted afterwards, even internally, and it is the proofs that are >> >> > rewritten (rather than just theorem/import/axiom statements).) >> >> >> >> Ah, that's interesting. >> >> >> >> >> Would it be possible to augment the HOL4 exporter so that it >> >> >> automatically included the (fairly trivial) proof discharging the >> >> >> point-free theorem that gets listed as an import? It seems to me >> >> >> that this is the best solution, though it's clearly very ad hoc. >> >> >> >> > Yes that seems like a good solution to me, but I think it means >> >> > looking for this theorem specifically as a special case in the >> >> > exporter, right? Actually it could be as general as: if a theorem, >> >> > after translating constants to OT namespace, contains any >> >> > not-fully-applied Unwanted.ids, then lookup a proof for the theorem >> >> > in a special database, otherwise proceed as normal. (As normal would >> >> > be logging the proof if it's attached to the theorem, otherwise >> >> > treat it as an axiom. The problem above is that the theorem doesn't >> >> > have a proof attached when logging llist, since it was proved in an >> >> > earlier theory (i.e. it's a DISK_THM)). >> >> >> >> Yeah, the special database will presumably have to be populated with >> real >> >> proofs well in advance. >> >> >> >> There probably isn't any real harm in trying to be general. On the >> other >> >> hand, I don't suppose there will be a great many such theorems. >> >> >> >> Michael >> >> >> >> >> >> _______________________________________________ >> >> 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 >> > >> >> _______________________________________________ >> 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 Michael.Norrish at nicta.com.au Fri Jan 20 05:53:31 2012 From: Michael.Norrish at nicta.com.au (Michael Norrish) Date: Fri, 20 Jan 2012 16:53:31 +1100 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: References: <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> <4F17A8FD.3070601@nicta.com.au> Message-ID: <4F19015B.8020106@nicta.com.au> On 20/01/12 04:26, Ramana Kumar wrote: > To my mild surprise, logging the proof of the point-free theorem > worked. That is, if I make sure the theorem with an unapplied > Unwanted.id is logged with a proof (while logging the lazy list > theory), then process the resulting article with opentheory, the > resulting package doesn't define Unwanted.id and doesn't require any > axioms. I've uploaded the new version of the lazy list package, which > now appears to define and prove just the right things. > http://opentheory.gilith.com/opentheory/packages/lazy-list-0.3/lazy-list-0.3.html I'm confused by the fact that the HTML page says that it depends on assumptions about Number.Numeral.bit2 Shouldn't bit2 terms have been eliminated by the treatment of HOL4 numerals? Certainly, http://opentheory.gilith.com/opentheory/packages/natural-numeral-1.8/natural-numeral-1.8.html only talks about bit0 and bit1. Similarly, your llist summary talks about a Relation.transitive thing that doesn't exist. (The transitive thing in llist is derived from Scott's relations-as-sets-of-pairs, but the one in base is a curried thing.) 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 Jan 20 09:42:22 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Fri, 20 Jan 2012 09:42:22 +0000 Subject: [opentheory-users] the Unwanted namespace In-Reply-To: <4F19015B.8020106@nicta.com.au> References: <4EDF27CE.30601@nicta.com.au> <4EE5635D.8090401@nicta.com.au> <5F1454AD-FE51-4B9C-9635-99C32DD1AA72@nicta.com.au> <4F174620.6020106@nicta.com.au> <4F17A8FD.3070601@nicta.com.au> <4F19015B.8020106@nicta.com.au> Message-ID: The treatment of HOL4 numerals is currently "do nothing; log them as is". (Similar comment for Relation.transitive, although that might be a case of giving a constant the wrong OpenTheory name; if it's different it should probably be HOL4.transitive or Relation.curriedTransitive or something.) There's no post-processing to force theories to only depend on things in base. And I'm not sure there should be, but we can discuss it (maybe in a different email thread). The solution I have in mind is to use a compatibility package between base and llist. This was described vaguely before, e.g. http://www.gilith.com/pipermail/opentheory-users/2011-September/000119.html. On Fri, Jan 20, 2012 at 5:53 AM, Michael Norrish < Michael.Norrish at nicta.com.au> wrote: > On 20/01/12 04:26, Ramana Kumar wrote: > > > http://opentheory.gilith.com/opentheory/packages/lazy-list-0.3/lazy-list-0.3.html > > I'm confused by the fact that the HTML page says that it depends on > assumptions about > > Number.Numeral.bit2 > > Shouldn't bit2 terms have been eliminated by the treatment of HOL4 > numerals? > > Certainly, > > > http://opentheory.gilith.com/opentheory/packages/natural-numeral-1.8/natural-numeral-1.8.html > > only talks about bit0 and bit1. > > Similarly, your llist summary talks about a Relation.transitive thing that > doesn't exist. (The transitive thing in llist is derived from Scott's > relations-as-sets-of-pairs, but the one in base is a curried thing.) > > Michael > > > _______________________________________________ > 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 Wed Jan 25 13:42:33 2012 From: ramana.kumar at gmail.com (Ramana Kumar) Date: Wed, 25 Jan 2012 13:42:33 +0000 Subject: [opentheory-users] WFREC Message-ID: 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!) -------------- next part -------------- An HTML attachment was scrubbed... URL: