From ramana at member.fsf.org Fri Oct 2 00:25:35 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Fri, 2 Oct 2015 10:25:35 +1000 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: Hello, Michael Norrish and I have taken Brian's importer and got it to at least build on Isabelle2015. In the process we also converted to a git repository and put it on GitHub. You can find it here: https://github.com/xrchz/isabelle-opentheory We haven't been able to get Brian's demo OpenTheory.thy to work yet, and it's quite possible we made mistakes in updating opentheory.ML. I hope further updates can happen in the above repository, where it's easy for me to accept contributions (pull requests), although further coordination on the original repository would also be fine as long as it's being actively maintained. Cheers, Ramana On 31 August 2015 at 15:24, Ramana Kumar wrote: > Hi Brian, > > Could I trouble you to look for a copy of your OpenTheory-related code for > Isabelle? I'd like to see if I can get it working. > > Oh, actually I just found this link: > http://www4.in.tum.de/~huffman/cgi-bin/repos.cgi/OpenTheory > > So, I can get started with that, but if you have any comments or ideas > they could probably still be helpful :) > > Cheers, > Ramana > > On 6 July 2015 at 20:54, Ramana Kumar wrote: > >> Yes, if it works (or is close to working) I would like to get it >> incorporated into the Isabelle codebase. I'm not yet sure how to contribute >> things to Isabelle, but I imagine I'll find out within the next few months. >> >> On 23 May 2015 at 15:52, Brian Huffman wrote: >> >>> I've hardly looked at it since I wrote it. It was never incorporated >>> into the Isabelle codebase. I suppose it would probably work with the >>> latest Isabelle, because it uses only the low-level proof kernel api, >>> which doesn't change much any more. >>> >>> I'll have to look around to see where I have a copy of the source >>> code; that was a couple of computers ago. Did you want to try to do >>> something with it? >>> >>> - Brian >>> >>> >>> On Sat, May 23, 2015 at 5:13 AM, Ramana Kumar >>> wrote: >>> > Hi Brian, >>> > >>> > What's the status of your OpenTheory importer? Does it work with the >>> > latest Isabelle? Was it incorporated into the main code base? >>> > >>> > Cheers, >>> > Ramana >>> > >>> > On 15 April 2011 at 17:34, Brian Huffman wrote: >>> >> On Thu, Apr 14, 2011 at 7:03 PM, Joe Hurd wrote: >>> >>> Hi Brian, >>> >>> >>> >>> That is really great work! Am I right in thinking you can import the >>> >>> parser-1.5 article binding all the input symbols and axioms to >>> >>> existing ones in Isabelle? I would have guessed that Isabelle type >>> >>> classes would have managed to get in the way at some point, but >>> >>> perhaps this would only be for converting Isabelle proofs to >>> >>> OpenTheory format? >>> >> >>> >> Yes, each of the input constants of the article is mapped to a >>> >> pre-existing Isabelle constant. Some of these existing Isabelle >>> >> constants happen to be overloaded, but that doesn't cause any >>> >> problems. This mapping of constant names does not even need to be >>> >> one-to-one; for example, I imagine that "Number.Natural.+" and >>> >> "Number.Integer.+" would map to the same overloaded "plus" constant in >>> >> Isabelle. >>> >> >>> >> Of course, exporting proofs from Isabelle is a completely different >>> story. >>> >> >>> >>> You mentioned that you prove a lot of theorems that the OpenTheory >>> >>> article relies on, but it seems you could reduce this by processing a >>> >>> set of OpenTheory packages that don't make any definitions. When I >>> was >>> >>> designing the standard theory library I tried to isolate packages >>> that >>> >>> made definitions and have them export just a minimal theorem >>> interface >>> >>> - most of the theorems are proved in packages that make no >>> definitions >>> >>> and so can be safely run to populate the [opentheory] set of >>> theorems. >>> >> >>> >> Your idea of keeping definitions in separate, minimal modules is a >>> >> good design. I'm sure I could have greatly reduced the number of >>> >> [opentheory] lemmas that I needed by finding the right additional >>> >> article files to import; I was just too lazy to figure out how the >>> >> packages were organized. >>> >> >>> >>>> The importer should also extend these tables whenever it defines a >>> new >>> >>>> constant or type, but I haven't implemented this yet. Another nice >>> >>>> feature would be a way for users to influence how the importer >>> chooses >>> >>>> names for newly-defined constants and types. Right now it takes the >>> >>>> names directly from the strings in the article file, which isn't so >>> >>>> nice for names like "HOLLight._dest_rec" (Isabelle's parser can't >>> >>>> handle names that start with underscores). >>> >>> >>> >>> You should find that constants and type operators with names like >>> this >>> >>> are never exported from a theory (i.e., never appear in exported >>> >>> theorems), so it's perfectly safe to normalize their names to >>> >>> something more acceptable to Isabelle. They are `local definitions' >>> >>> that are used only in proofs. >>> >> >>> >> Actually, it seems like it would be safe to rename *any* constant >>> >> (whether exported or not) to any name that I want in Isabelle, as long >>> >> as the importer keeps track of the name mapping so that later imports >>> >> can use the same names. >>> >> >>> >> I suppose I should write an "import_name" function that converts from >>> >> OpenTheory names to Isabelle-friendly ones. It would be nice to >>> >> parameterize this by a list of user-specified exceptions to the >>> >> mapping, so you could say something like, "import this article, but >>> >> when you define constant 'foo', call it 'bar' instead." >>> >> >>> >>>> Once I clean up the code, I'm not sure what I should do with it... I >>> >>>> suppose I could add it to the Isabelle repo, but I'm not sure if I >>> >>>> want to advertise to Munich crowd that I've been doing all this work >>> >>>> that is unrelated to finishing my thesis :) >>> >>> >>> >>> I would very much like to see it live on in some fashion - my hope is >>> >>> that more and more theories will be converted to OpenTheory packages, >>> >>> and your code could be used to import them into Isabelle in a >>> >>> principled way. >>> >> >>> >> I suppose I'll add it to the Isabelle distribution at some point, >>> >> maybe after I finish writing my thesis. In the meantime, I guess I can >>> >> post the code to the list, so it will be archived and people can try >>> >> it out. >>> >> >>> >> - Brian >>> >> >>> >> _______________________________________________ >>> >> 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 Fri Oct 2 03:27:10 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 1 Oct 2015 20:27:10 -0700 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: Hi Ramana and Michael, Thank you for updating the Isabelle importer and moving it to a new home. I'll update the link on the OpenTheory project page http://www.gilith.com/research/opentheory/ to point to the github repo, and should I also change the maintainer to you both? Perhaps one day it will be possible to replace the "R" with an "R/W" too, to match the other interfaces :-) Cheers, Joe On Thu, Oct 1, 2015 at 5:25 PM, Ramana Kumar wrote: > Hello, > > Michael Norrish and I have taken Brian's importer and got it to at least > build on Isabelle2015. In the process we also converted to a git repository > and put it on GitHub. You can find it here: > > https://github.com/xrchz/isabelle-opentheory > > We haven't been able to get Brian's demo OpenTheory.thy to work yet, and > it's quite possible we made mistakes in updating opentheory.ML. I hope > further updates can happen in the above repository, where it's easy for me > to accept contributions (pull requests), although further coordination on > the original repository would also be fine as long as it's being actively > maintained. > > Cheers, > Ramana > > On 31 August 2015 at 15:24, Ramana Kumar wrote: >> >> Hi Brian, >> >> Could I trouble you to look for a copy of your OpenTheory-related code for >> Isabelle? I'd like to see if I can get it working. >> >> Oh, actually I just found this link: >> http://www4.in.tum.de/~huffman/cgi-bin/repos.cgi/OpenTheory >> >> So, I can get started with that, but if you have any comments or ideas >> they could probably still be helpful :) >> >> Cheers, >> Ramana >> >> On 6 July 2015 at 20:54, Ramana Kumar wrote: >>> >>> Yes, if it works (or is close to working) I would like to get it >>> incorporated into the Isabelle codebase. I'm not yet sure how to contribute >>> things to Isabelle, but I imagine I'll find out within the next few months. >>> >>> On 23 May 2015 at 15:52, Brian Huffman wrote: >>>> >>>> I've hardly looked at it since I wrote it. It was never incorporated >>>> into the Isabelle codebase. I suppose it would probably work with the >>>> latest Isabelle, because it uses only the low-level proof kernel api, >>>> which doesn't change much any more. >>>> >>>> I'll have to look around to see where I have a copy of the source >>>> code; that was a couple of computers ago. Did you want to try to do >>>> something with it? >>>> >>>> - Brian >>>> >>>> >>>> On Sat, May 23, 2015 at 5:13 AM, Ramana Kumar >>>> wrote: >>>> > Hi Brian, >>>> > >>>> > What's the status of your OpenTheory importer? Does it work with the >>>> > latest Isabelle? Was it incorporated into the main code base? >>>> > >>>> > Cheers, >>>> > Ramana >>>> > >>>> > On 15 April 2011 at 17:34, Brian Huffman wrote: >>>> >> On Thu, Apr 14, 2011 at 7:03 PM, Joe Hurd wrote: >>>> >>> Hi Brian, >>>> >>> >>>> >>> That is really great work! Am I right in thinking you can import the >>>> >>> parser-1.5 article binding all the input symbols and axioms to >>>> >>> existing ones in Isabelle? I would have guessed that Isabelle type >>>> >>> classes would have managed to get in the way at some point, but >>>> >>> perhaps this would only be for converting Isabelle proofs to >>>> >>> OpenTheory format? >>>> >> >>>> >> Yes, each of the input constants of the article is mapped to a >>>> >> pre-existing Isabelle constant. Some of these existing Isabelle >>>> >> constants happen to be overloaded, but that doesn't cause any >>>> >> problems. This mapping of constant names does not even need to be >>>> >> one-to-one; for example, I imagine that "Number.Natural.+" and >>>> >> "Number.Integer.+" would map to the same overloaded "plus" constant >>>> >> in >>>> >> Isabelle. >>>> >> >>>> >> Of course, exporting proofs from Isabelle is a completely different >>>> >> story. >>>> >> >>>> >>> You mentioned that you prove a lot of theorems that the OpenTheory >>>> >>> article relies on, but it seems you could reduce this by processing >>>> >>> a >>>> >>> set of OpenTheory packages that don't make any definitions. When I >>>> >>> was >>>> >>> designing the standard theory library I tried to isolate packages >>>> >>> that >>>> >>> made definitions and have them export just a minimal theorem >>>> >>> interface >>>> >>> - most of the theorems are proved in packages that make no >>>> >>> definitions >>>> >>> and so can be safely run to populate the [opentheory] set of >>>> >>> theorems. >>>> >> >>>> >> Your idea of keeping definitions in separate, minimal modules is a >>>> >> good design. I'm sure I could have greatly reduced the number of >>>> >> [opentheory] lemmas that I needed by finding the right additional >>>> >> article files to import; I was just too lazy to figure out how the >>>> >> packages were organized. >>>> >> >>>> >>>> The importer should also extend these tables whenever it defines a >>>> >>>> new >>>> >>>> constant or type, but I haven't implemented this yet. Another nice >>>> >>>> feature would be a way for users to influence how the importer >>>> >>>> chooses >>>> >>>> names for newly-defined constants and types. Right now it takes the >>>> >>>> names directly from the strings in the article file, which isn't so >>>> >>>> nice for names like "HOLLight._dest_rec" (Isabelle's parser can't >>>> >>>> handle names that start with underscores). >>>> >>> >>>> >>> You should find that constants and type operators with names like >>>> >>> this >>>> >>> are never exported from a theory (i.e., never appear in exported >>>> >>> theorems), so it's perfectly safe to normalize their names to >>>> >>> something more acceptable to Isabelle. They are `local definitions' >>>> >>> that are used only in proofs. >>>> >> >>>> >> Actually, it seems like it would be safe to rename *any* constant >>>> >> (whether exported or not) to any name that I want in Isabelle, as >>>> >> long >>>> >> as the importer keeps track of the name mapping so that later imports >>>> >> can use the same names. >>>> >> >>>> >> I suppose I should write an "import_name" function that converts from >>>> >> OpenTheory names to Isabelle-friendly ones. It would be nice to >>>> >> parameterize this by a list of user-specified exceptions to the >>>> >> mapping, so you could say something like, "import this article, but >>>> >> when you define constant 'foo', call it 'bar' instead." >>>> >> >>>> >>>> Once I clean up the code, I'm not sure what I should do with it... >>>> >>>> I >>>> >>>> suppose I could add it to the Isabelle repo, but I'm not sure if I >>>> >>>> want to advertise to Munich crowd that I've been doing all this >>>> >>>> work >>>> >>>> that is unrelated to finishing my thesis :) >>>> >>> >>>> >>> I would very much like to see it live on in some fashion - my hope >>>> >>> is >>>> >>> that more and more theories will be converted to OpenTheory >>>> >>> packages, >>>> >>> and your code could be used to import them into Isabelle in a >>>> >>> principled way. >>>> >> >>>> >> I suppose I'll add it to the Isabelle distribution at some point, >>>> >> maybe after I finish writing my thesis. In the meantime, I guess I >>>> >> can >>>> >> post the code to the list, so it will be archived and people can try >>>> >> it out. >>>> >> >>>> >> - Brian >>>> >> >>>> >> _______________________________________________ >>>> >> 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 huffman at galois.com Fri Oct 2 00:54:17 2015 From: huffman at galois.com (Brian Huffman) Date: Thu, 1 Oct 2015 17:54:17 -0700 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: Hi Ramana, I think it's great that you've revived my old opentheory importer; I haven't worked on it for years and don't remember many details about how it works. I don't plan on doing any more maintenance on my old repo, so I'm happy to have all future development move to github. If you are having problems with OpenTheory.thy, I can think of one possible reason: Sometime around 2010-2012, Isabelle changed type 'a set into an abbreviation for 'a => bool, and then later changed it back into a separate type again. I'm not 100% sure, but I think the importer was written during the 'a => bool time period. If opentheory uses 'a => bool as its set type, you might need to map opentheory set operations onto the corresponding Isabelle predicate operators instead. Another thing you might look into: Around 2012 Cezary Kaliszyk implemented an Isabelle importer for HOL Light proofs; at the time I remember looking at the code and noting that it was quite similar to my OpenTheory importer. Browsing through his publication list, I just found a paper about it: http://cl-informatik.uibk.ac.at/users/cek/docs/13/ckak-itp13.pdf If his importer has been maintained since then, it might be worth looking at. - Brian On Thu, Oct 1, 2015 at 5:25 PM, Ramana Kumar wrote: > Hello, > > Michael Norrish and I have taken Brian's importer and got it to at least > build on Isabelle2015. In the process we also converted to a git repository > and put it on GitHub. You can find it here: > > https://github.com/xrchz/isabelle-opentheory > > We haven't been able to get Brian's demo OpenTheory.thy to work yet, and > it's quite possible we made mistakes in updating opentheory.ML. I hope > further updates can happen in the above repository, where it's easy for me > to accept contributions (pull requests), although further coordination on > the original repository would also be fine as long as it's being actively > maintained. > > Cheers, > Ramana > > On 31 August 2015 at 15:24, Ramana Kumar wrote: >> >> Hi Brian, >> >> Could I trouble you to look for a copy of your OpenTheory-related code for >> Isabelle? I'd like to see if I can get it working. >> >> Oh, actually I just found this link: >> http://www4.in.tum.de/~huffman/cgi-bin/repos.cgi/OpenTheory >> >> So, I can get started with that, but if you have any comments or ideas >> they could probably still be helpful :) >> >> Cheers, >> Ramana >> >> On 6 July 2015 at 20:54, Ramana Kumar wrote: >>> >>> Yes, if it works (or is close to working) I would like to get it >>> incorporated into the Isabelle codebase. I'm not yet sure how to contribute >>> things to Isabelle, but I imagine I'll find out within the next few months. >>> >>> On 23 May 2015 at 15:52, Brian Huffman wrote: >>>> >>>> I've hardly looked at it since I wrote it. It was never incorporated >>>> into the Isabelle codebase. I suppose it would probably work with the >>>> latest Isabelle, because it uses only the low-level proof kernel api, >>>> which doesn't change much any more. >>>> >>>> I'll have to look around to see where I have a copy of the source >>>> code; that was a couple of computers ago. Did you want to try to do >>>> something with it? >>>> >>>> - Brian >>>> >>>> >>>> On Sat, May 23, 2015 at 5:13 AM, Ramana Kumar >>>> wrote: >>>> > Hi Brian, >>>> > >>>> > What's the status of your OpenTheory importer? Does it work with the >>>> > latest Isabelle? Was it incorporated into the main code base? >>>> > >>>> > Cheers, >>>> > Ramana >>>> > >>>> > On 15 April 2011 at 17:34, Brian Huffman wrote: >>>> >> On Thu, Apr 14, 2011 at 7:03 PM, Joe Hurd wrote: >>>> >>> Hi Brian, >>>> >>> >>>> >>> That is really great work! Am I right in thinking you can import the >>>> >>> parser-1.5 article binding all the input symbols and axioms to >>>> >>> existing ones in Isabelle? I would have guessed that Isabelle type >>>> >>> classes would have managed to get in the way at some point, but >>>> >>> perhaps this would only be for converting Isabelle proofs to >>>> >>> OpenTheory format? >>>> >> >>>> >> Yes, each of the input constants of the article is mapped to a >>>> >> pre-existing Isabelle constant. Some of these existing Isabelle >>>> >> constants happen to be overloaded, but that doesn't cause any >>>> >> problems. This mapping of constant names does not even need to be >>>> >> one-to-one; for example, I imagine that "Number.Natural.+" and >>>> >> "Number.Integer.+" would map to the same overloaded "plus" constant >>>> >> in >>>> >> Isabelle. >>>> >> >>>> >> Of course, exporting proofs from Isabelle is a completely different >>>> >> story. >>>> >> >>>> >>> You mentioned that you prove a lot of theorems that the OpenTheory >>>> >>> article relies on, but it seems you could reduce this by processing >>>> >>> a >>>> >>> set of OpenTheory packages that don't make any definitions. When I >>>> >>> was >>>> >>> designing the standard theory library I tried to isolate packages >>>> >>> that >>>> >>> made definitions and have them export just a minimal theorem >>>> >>> interface >>>> >>> - most of the theorems are proved in packages that make no >>>> >>> definitions >>>> >>> and so can be safely run to populate the [opentheory] set of >>>> >>> theorems. >>>> >> >>>> >> Your idea of keeping definitions in separate, minimal modules is a >>>> >> good design. I'm sure I could have greatly reduced the number of >>>> >> [opentheory] lemmas that I needed by finding the right additional >>>> >> article files to import; I was just too lazy to figure out how the >>>> >> packages were organized. >>>> >> >>>> >>>> The importer should also extend these tables whenever it defines a >>>> >>>> new >>>> >>>> constant or type, but I haven't implemented this yet. Another nice >>>> >>>> feature would be a way for users to influence how the importer >>>> >>>> chooses >>>> >>>> names for newly-defined constants and types. Right now it takes the >>>> >>>> names directly from the strings in the article file, which isn't so >>>> >>>> nice for names like "HOLLight._dest_rec" (Isabelle's parser can't >>>> >>>> handle names that start with underscores). >>>> >>> >>>> >>> You should find that constants and type operators with names like >>>> >>> this >>>> >>> are never exported from a theory (i.e., never appear in exported >>>> >>> theorems), so it's perfectly safe to normalize their names to >>>> >>> something more acceptable to Isabelle. They are `local definitions' >>>> >>> that are used only in proofs. >>>> >> >>>> >> Actually, it seems like it would be safe to rename *any* constant >>>> >> (whether exported or not) to any name that I want in Isabelle, as >>>> >> long >>>> >> as the importer keeps track of the name mapping so that later imports >>>> >> can use the same names. >>>> >> >>>> >> I suppose I should write an "import_name" function that converts from >>>> >> OpenTheory names to Isabelle-friendly ones. It would be nice to >>>> >> parameterize this by a list of user-specified exceptions to the >>>> >> mapping, so you could say something like, "import this article, but >>>> >> when you define constant 'foo', call it 'bar' instead." >>>> >> >>>> >>>> Once I clean up the code, I'm not sure what I should do with it... >>>> >>>> I >>>> >>>> suppose I could add it to the Isabelle repo, but I'm not sure if I >>>> >>>> want to advertise to Munich crowd that I've been doing all this >>>> >>>> work >>>> >>>> that is unrelated to finishing my thesis :) >>>> >>> >>>> >>> I would very much like to see it live on in some fashion - my hope >>>> >>> is >>>> >>> that more and more theories will be converted to OpenTheory >>>> >>> packages, >>>> >>> and your code could be used to import them into Isabelle in a >>>> >>> principled way. >>>> >> >>>> >> I suppose I'll add it to the Isabelle distribution at some point, >>>> >> maybe after I finish writing my thesis. In the meantime, I guess I >>>> >> can >>>> >> post the code to the list, so it will be archived and people can try >>>> >> it out. >>>> >> >>>> >> - Brian >>>> >> >>>> >> _______________________________________________ >>>> >> opentheory-users mailing list >>>> >> opentheory-users at gilith.com >>>> >> http://www.gilith.com/mailman/listinfo/opentheory-users >>> >>> >> > From ramana at member.fsf.org Sat Oct 3 23:59:26 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Sun, 4 Oct 2015 10:59:26 +1100 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: Thanks Brian. I'll keep a look out for mismatched set/predicate expectations. Regarding OpenTheory.thy, the problem seemed more basic than that: the reader is not picking up the lemma defining "All" and therefore complains about an axiom not being found when it needs that lemma. I haven't yet had a chance to investigate it at all, so it might be something simple to fix. I'm aware of Cezary Kaliszyk's work, indeed it's been discussed on this list before :) I've mainly been looking at it from the exporter perspective, but you make a good point that he also had an importer into Isabelle for his traces, so yes that could be a source of useful information if it's been kept up to date. On 2 October 2015 at 10:54, Brian Huffman wrote: > Hi Ramana, > > I think it's great that you've revived my old opentheory importer; I > haven't worked on it for years and don't remember many details about > how it works. I don't plan on doing any more maintenance on my old > repo, so I'm happy to have all future development move to github. > > If you are having problems with OpenTheory.thy, I can think of one > possible reason: Sometime around 2010-2012, Isabelle changed type 'a > set into an abbreviation for 'a => bool, and then later changed it > back into a separate type again. I'm not 100% sure, but I think the > importer was written during the 'a => bool time period. If opentheory > uses 'a => bool as its set type, you might need to map opentheory set > operations onto the corresponding Isabelle predicate operators > instead. > > Another thing you might look into: Around 2012 Cezary Kaliszyk > implemented an Isabelle importer for HOL Light proofs; at the time I > remember looking at the code and noting that it was quite similar to > my OpenTheory importer. Browsing through his publication list, I just > found a paper about it: > > http://cl-informatik.uibk.ac.at/users/cek/docs/13/ckak-itp13.pdf > > If his importer has been maintained since then, it might be worth looking > at. > > - Brian > > > On Thu, Oct 1, 2015 at 5:25 PM, Ramana Kumar > wrote: > > Hello, > > > > Michael Norrish and I have taken Brian's importer and got it to at least > > build on Isabelle2015. In the process we also converted to a git > repository > > and put it on GitHub. You can find it here: > > > > https://github.com/xrchz/isabelle-opentheory > > > > We haven't been able to get Brian's demo OpenTheory.thy to work yet, and > > it's quite possible we made mistakes in updating opentheory.ML. I hope > > further updates can happen in the above repository, where it's easy for > me > > to accept contributions (pull requests), although further coordination on > > the original repository would also be fine as long as it's being actively > > maintained. > > > > Cheers, > > Ramana > > > > On 31 August 2015 at 15:24, Ramana Kumar wrote: > >> > >> Hi Brian, > >> > >> Could I trouble you to look for a copy of your OpenTheory-related code > for > >> Isabelle? I'd like to see if I can get it working. > >> > >> Oh, actually I just found this link: > >> http://www4.in.tum.de/~huffman/cgi-bin/repos.cgi/OpenTheory > >> > >> So, I can get started with that, but if you have any comments or ideas > >> they could probably still be helpful :) > >> > >> Cheers, > >> Ramana > >> > >> On 6 July 2015 at 20:54, Ramana Kumar wrote: > >>> > >>> Yes, if it works (or is close to working) I would like to get it > >>> incorporated into the Isabelle codebase. I'm not yet sure how to > contribute > >>> things to Isabelle, but I imagine I'll find out within the next few > months. > >>> > >>> On 23 May 2015 at 15:52, Brian Huffman wrote: > >>>> > >>>> I've hardly looked at it since I wrote it. It was never incorporated > >>>> into the Isabelle codebase. I suppose it would probably work with the > >>>> latest Isabelle, because it uses only the low-level proof kernel api, > >>>> which doesn't change much any more. > >>>> > >>>> I'll have to look around to see where I have a copy of the source > >>>> code; that was a couple of computers ago. Did you want to try to do > >>>> something with it? > >>>> > >>>> - Brian > >>>> > >>>> > >>>> On Sat, May 23, 2015 at 5:13 AM, Ramana Kumar > >>>> wrote: > >>>> > Hi Brian, > >>>> > > >>>> > What's the status of your OpenTheory importer? Does it work with the > >>>> > latest Isabelle? Was it incorporated into the main code base? > >>>> > > >>>> > Cheers, > >>>> > Ramana > >>>> > > >>>> > On 15 April 2011 at 17:34, Brian Huffman wrote: > >>>> >> On Thu, Apr 14, 2011 at 7:03 PM, Joe Hurd wrote: > >>>> >>> Hi Brian, > >>>> >>> > >>>> >>> That is really great work! Am I right in thinking you can import > the > >>>> >>> parser-1.5 article binding all the input symbols and axioms to > >>>> >>> existing ones in Isabelle? I would have guessed that Isabelle type > >>>> >>> classes would have managed to get in the way at some point, but > >>>> >>> perhaps this would only be for converting Isabelle proofs to > >>>> >>> OpenTheory format? > >>>> >> > >>>> >> Yes, each of the input constants of the article is mapped to a > >>>> >> pre-existing Isabelle constant. Some of these existing Isabelle > >>>> >> constants happen to be overloaded, but that doesn't cause any > >>>> >> problems. This mapping of constant names does not even need to be > >>>> >> one-to-one; for example, I imagine that "Number.Natural.+" and > >>>> >> "Number.Integer.+" would map to the same overloaded "plus" constant > >>>> >> in > >>>> >> Isabelle. > >>>> >> > >>>> >> Of course, exporting proofs from Isabelle is a completely different > >>>> >> story. > >>>> >> > >>>> >>> You mentioned that you prove a lot of theorems that the OpenTheory > >>>> >>> article relies on, but it seems you could reduce this by > processing > >>>> >>> a > >>>> >>> set of OpenTheory packages that don't make any definitions. When I > >>>> >>> was > >>>> >>> designing the standard theory library I tried to isolate packages > >>>> >>> that > >>>> >>> made definitions and have them export just a minimal theorem > >>>> >>> interface > >>>> >>> - most of the theorems are proved in packages that make no > >>>> >>> definitions > >>>> >>> and so can be safely run to populate the [opentheory] set of > >>>> >>> theorems. > >>>> >> > >>>> >> Your idea of keeping definitions in separate, minimal modules is a > >>>> >> good design. I'm sure I could have greatly reduced the number of > >>>> >> [opentheory] lemmas that I needed by finding the right additional > >>>> >> article files to import; I was just too lazy to figure out how the > >>>> >> packages were organized. > >>>> >> > >>>> >>>> The importer should also extend these tables whenever it defines > a > >>>> >>>> new > >>>> >>>> constant or type, but I haven't implemented this yet. Another > nice > >>>> >>>> feature would be a way for users to influence how the importer > >>>> >>>> chooses > >>>> >>>> names for newly-defined constants and types. Right now it takes > the > >>>> >>>> names directly from the strings in the article file, which isn't > so > >>>> >>>> nice for names like "HOLLight._dest_rec" (Isabelle's parser can't > >>>> >>>> handle names that start with underscores). > >>>> >>> > >>>> >>> You should find that constants and type operators with names like > >>>> >>> this > >>>> >>> are never exported from a theory (i.e., never appear in exported > >>>> >>> theorems), so it's perfectly safe to normalize their names to > >>>> >>> something more acceptable to Isabelle. They are `local > definitions' > >>>> >>> that are used only in proofs. > >>>> >> > >>>> >> Actually, it seems like it would be safe to rename *any* constant > >>>> >> (whether exported or not) to any name that I want in Isabelle, as > >>>> >> long > >>>> >> as the importer keeps track of the name mapping so that later > imports > >>>> >> can use the same names. > >>>> >> > >>>> >> I suppose I should write an "import_name" function that converts > from > >>>> >> OpenTheory names to Isabelle-friendly ones. It would be nice to > >>>> >> parameterize this by a list of user-specified exceptions to the > >>>> >> mapping, so you could say something like, "import this article, but > >>>> >> when you define constant 'foo', call it 'bar' instead." > >>>> >> > >>>> >>>> Once I clean up the code, I'm not sure what I should do with > it... > >>>> >>>> I > >>>> >>>> suppose I could add it to the Isabelle repo, but I'm not sure if > I > >>>> >>>> want to advertise to Munich crowd that I've been doing all this > >>>> >>>> work > >>>> >>>> that is unrelated to finishing my thesis :) > >>>> >>> > >>>> >>> I would very much like to see it live on in some fashion - my hope > >>>> >>> is > >>>> >>> that more and more theories will be converted to OpenTheory > >>>> >>> packages, > >>>> >>> and your code could be used to import them into Isabelle in a > >>>> >>> principled way. > >>>> >> > >>>> >> I suppose I'll add it to the Isabelle distribution at some point, > >>>> >> maybe after I finish writing my thesis. In the meantime, I guess I > >>>> >> can > >>>> >> post the code to the list, so it will be archived and people can > try > >>>> >> it out. > >>>> >> > >>>> >> - Brian > >>>> >> > >>>> >> _______________________________________________ > >>>> >> 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 at member.fsf.org Sun Oct 4 00:01:09 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Sun, 4 Oct 2015 11:01:09 +1100 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: On 2 October 2015 at 13:27, Joe Leslie-Hurd wrote: > Hi Ramana and Michael, > > Thank you for updating the Isabelle importer and moving it to a new > home. I'll update the link on the OpenTheory project page > > http://www.gilith.com/research/opentheory/ > > to point to the github repo, and should I also change the maintainer > to you both? > I'm fine with that. > > Perhaps one day it will be possible to replace the "R" with an "R/W" > too, to match the other interfaces :-) > That is the hope. > > Cheers, > > Joe > > On Thu, Oct 1, 2015 at 5:25 PM, Ramana Kumar > wrote: > > Hello, > > > > Michael Norrish and I have taken Brian's importer and got it to at least > > build on Isabelle2015. In the process we also converted to a git > repository > > and put it on GitHub. You can find it here: > > > > https://github.com/xrchz/isabelle-opentheory > > > > We haven't been able to get Brian's demo OpenTheory.thy to work yet, and > > it's quite possible we made mistakes in updating opentheory.ML. I hope > > further updates can happen in the above repository, where it's easy for > me > > to accept contributions (pull requests), although further coordination on > > the original repository would also be fine as long as it's being actively > > maintained. > > > > Cheers, > > Ramana > > > > On 31 August 2015 at 15:24, Ramana Kumar wrote: > >> > >> Hi Brian, > >> > >> Could I trouble you to look for a copy of your OpenTheory-related code > for > >> Isabelle? I'd like to see if I can get it working. > >> > >> Oh, actually I just found this link: > >> http://www4.in.tum.de/~huffman/cgi-bin/repos.cgi/OpenTheory > >> > >> So, I can get started with that, but if you have any comments or ideas > >> they could probably still be helpful :) > >> > >> Cheers, > >> Ramana > >> > >> On 6 July 2015 at 20:54, Ramana Kumar wrote: > >>> > >>> Yes, if it works (or is close to working) I would like to get it > >>> incorporated into the Isabelle codebase. I'm not yet sure how to > contribute > >>> things to Isabelle, but I imagine I'll find out within the next few > months. > >>> > >>> On 23 May 2015 at 15:52, Brian Huffman wrote: > >>>> > >>>> I've hardly looked at it since I wrote it. It was never incorporated > >>>> into the Isabelle codebase. I suppose it would probably work with the > >>>> latest Isabelle, because it uses only the low-level proof kernel api, > >>>> which doesn't change much any more. > >>>> > >>>> I'll have to look around to see where I have a copy of the source > >>>> code; that was a couple of computers ago. Did you want to try to do > >>>> something with it? > >>>> > >>>> - Brian > >>>> > >>>> > >>>> On Sat, May 23, 2015 at 5:13 AM, Ramana Kumar > >>>> wrote: > >>>> > Hi Brian, > >>>> > > >>>> > What's the status of your OpenTheory importer? Does it work with the > >>>> > latest Isabelle? Was it incorporated into the main code base? > >>>> > > >>>> > Cheers, > >>>> > Ramana > >>>> > > >>>> > On 15 April 2011 at 17:34, Brian Huffman wrote: > >>>> >> On Thu, Apr 14, 2011 at 7:03 PM, Joe Hurd wrote: > >>>> >>> Hi Brian, > >>>> >>> > >>>> >>> That is really great work! Am I right in thinking you can import > the > >>>> >>> parser-1.5 article binding all the input symbols and axioms to > >>>> >>> existing ones in Isabelle? I would have guessed that Isabelle type > >>>> >>> classes would have managed to get in the way at some point, but > >>>> >>> perhaps this would only be for converting Isabelle proofs to > >>>> >>> OpenTheory format? > >>>> >> > >>>> >> Yes, each of the input constants of the article is mapped to a > >>>> >> pre-existing Isabelle constant. Some of these existing Isabelle > >>>> >> constants happen to be overloaded, but that doesn't cause any > >>>> >> problems. This mapping of constant names does not even need to be > >>>> >> one-to-one; for example, I imagine that "Number.Natural.+" and > >>>> >> "Number.Integer.+" would map to the same overloaded "plus" constant > >>>> >> in > >>>> >> Isabelle. > >>>> >> > >>>> >> Of course, exporting proofs from Isabelle is a completely different > >>>> >> story. > >>>> >> > >>>> >>> You mentioned that you prove a lot of theorems that the OpenTheory > >>>> >>> article relies on, but it seems you could reduce this by > processing > >>>> >>> a > >>>> >>> set of OpenTheory packages that don't make any definitions. When I > >>>> >>> was > >>>> >>> designing the standard theory library I tried to isolate packages > >>>> >>> that > >>>> >>> made definitions and have them export just a minimal theorem > >>>> >>> interface > >>>> >>> - most of the theorems are proved in packages that make no > >>>> >>> definitions > >>>> >>> and so can be safely run to populate the [opentheory] set of > >>>> >>> theorems. > >>>> >> > >>>> >> Your idea of keeping definitions in separate, minimal modules is a > >>>> >> good design. I'm sure I could have greatly reduced the number of > >>>> >> [opentheory] lemmas that I needed by finding the right additional > >>>> >> article files to import; I was just too lazy to figure out how the > >>>> >> packages were organized. > >>>> >> > >>>> >>>> The importer should also extend these tables whenever it defines > a > >>>> >>>> new > >>>> >>>> constant or type, but I haven't implemented this yet. Another > nice > >>>> >>>> feature would be a way for users to influence how the importer > >>>> >>>> chooses > >>>> >>>> names for newly-defined constants and types. Right now it takes > the > >>>> >>>> names directly from the strings in the article file, which isn't > so > >>>> >>>> nice for names like "HOLLight._dest_rec" (Isabelle's parser can't > >>>> >>>> handle names that start with underscores). > >>>> >>> > >>>> >>> You should find that constants and type operators with names like > >>>> >>> this > >>>> >>> are never exported from a theory (i.e., never appear in exported > >>>> >>> theorems), so it's perfectly safe to normalize their names to > >>>> >>> something more acceptable to Isabelle. They are `local > definitions' > >>>> >>> that are used only in proofs. > >>>> >> > >>>> >> Actually, it seems like it would be safe to rename *any* constant > >>>> >> (whether exported or not) to any name that I want in Isabelle, as > >>>> >> long > >>>> >> as the importer keeps track of the name mapping so that later > imports > >>>> >> can use the same names. > >>>> >> > >>>> >> I suppose I should write an "import_name" function that converts > from > >>>> >> OpenTheory names to Isabelle-friendly ones. It would be nice to > >>>> >> parameterize this by a list of user-specified exceptions to the > >>>> >> mapping, so you could say something like, "import this article, but > >>>> >> when you define constant 'foo', call it 'bar' instead." > >>>> >> > >>>> >>>> Once I clean up the code, I'm not sure what I should do with > it... > >>>> >>>> I > >>>> >>>> suppose I could add it to the Isabelle repo, but I'm not sure if > I > >>>> >>>> want to advertise to Munich crowd that I've been doing all this > >>>> >>>> work > >>>> >>>> that is unrelated to finishing my thesis :) > >>>> >>> > >>>> >>> I would very much like to see it live on in some fashion - my hope > >>>> >>> is > >>>> >>> that more and more theories will be converted to OpenTheory > >>>> >>> packages, > >>>> >>> and your code could be used to import them into Isabelle in a > >>>> >>> principled way. > >>>> >> > >>>> >> I suppose I'll add it to the Isabelle distribution at some point, > >>>> >> maybe after I finish writing my thesis. In the meantime, I guess I > >>>> >> can > >>>> >> post the code to the list, so it will be archived and people can > try > >>>> >> it out. > >>>> >> > >>>> >> - Brian > >>>> >> > >>>> >> _______________________________________________ > >>>> >> 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 ai.robert.wangshuai at gmail.com Sun Oct 4 21:57:07 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Sun, 4 Oct 2015 23:57:07 +0200 Subject: [opentheory-users] Error loading articles Message-ID: Dear Joe, I have problem importing article files. For example: Failure "in article word10.art at line 7495: defineConst\nstack = [Term; \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown constant \"Number.Modular.equivalent\"". I also have problems with the following packages: natural-prime gfp natural-fibonacci Could you please check if that is because opentheory packages got updated but the int files haven't? Thanks a lot. -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Mon Oct 5 20:56:23 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Mon, 5 Oct 2015 13:56:23 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, There are a couple of different obstacles here. Firstly, it is important that the dependent theories have been imported before the theory. To show all the dependent theories, use the following command: $ opentheory list --dependency-order 'Requires+ natural-prime' base-1.200 natural-divides-1.62 stream-1.46 Now this sequence will succeed: extend_the_interpretation "opentheory/theories/natural-divides/natural-divides.int";; import_article "natural-divides.art";; extend_the_interpretation "opentheory/theories/stream/stream.int";; import_article "stream.art";; extend_the_interpretation "opentheory/theories/natural-prime/natural-prime.int";; import_article "natural-prime.art";; The second obstacle is that the theory word10 includes the theory word, which in turn includes the theory modular. So to successfully import word10 you need to extend the interpretation with the interpretations for these theories, too: $ opentheory list --dependency-order 'Requires+ word10' base-1.200 stream-1.46 probability-1.49 natural-bits-1.66 natural-divides-1.62 extend_the_interpretation "opentheory/theories/stream/stream.int";; import_article "stream.art";; extend_the_interpretation "opentheory/theories/probability/probability.int";; import_article "probability.art";; extend_the_interpretation "opentheory/theories/natural-bits/natural-bits.int";; import_article "natural-bits.art";; extend_the_interpretation "opentheory/theories/natural-divides/natural-divides.int";; import_article "natural-divides.art";; extend_the_interpretation "opentheory/theories/modular/modular.int";; extend_the_interpretation "opentheory/theories/word/word.int";; extend_the_interpretation "opentheory/theories/word10/word10.int";; import_article "word10.art";; I regard this second problem as a defect in the theories, because it's unreasonable to expect people to discover this information. I'll work on fixing it so these multiple extend_the_interpretation commands are unnecessary. Cheers, Joe On Sun, Oct 4, 2015 at 2:57 PM, Robert White wrote: > Dear Joe, > > I have problem importing article files. For example: > > Failure > > "in article word10.art at line 7495: defineConst\nstack = [Term; > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown > constant \"Number.Modular.equivalent\"". > > I also have problems with the following packages: > > natural-prime > > gfp > > natural-fibonacci > > Could you please check if that is because opentheory packages got updated > but the int files haven't? > > Thanks a lot. > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ai.robert.wangshuai at gmail.com Mon Oct 5 21:27:58 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Mon, 5 Oct 2015 23:27:58 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Thanks very much Joe. I also noticed that there is kind of dependency going on but I don't know how to fix it. On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: > Hi Robert, > > There are a couple of different obstacles here. > > Firstly, it is important that the dependent theories have been > imported before the theory. To show all the dependent theories, use > the following command: > > $ opentheory list --dependency-order 'Requires+ natural-prime' > base-1.200 > natural-divides-1.62 > stream-1.46 > > Now this sequence will succeed: > > extend_the_interpretation > "opentheory/theories/natural-divides/natural-divides.int";; > import_article "natural-divides.art";; > > extend_the_interpretation > "opentheory/theories/stream/stream.int";; > import_article "stream.art";; > > extend_the_interpretation > "opentheory/theories/natural-prime/natural-prime.int";; > import_article "natural-prime.art";; > > The second obstacle is that the theory word10 includes the theory > word, which in turn includes the theory modular. So to successfully > import word10 you need to extend the interpretation with the > interpretations for these theories, too: > > $ opentheory list --dependency-order 'Requires+ word10' > base-1.200 > stream-1.46 > probability-1.49 > natural-bits-1.66 > natural-divides-1.62 > > extend_the_interpretation > "opentheory/theories/stream/stream.int";; > import_article "stream.art";; > > extend_the_interpretation > "opentheory/theories/probability/probability.int";; > import_article "probability.art";; > > extend_the_interpretation > "opentheory/theories/natural-bits/natural-bits.int";; > import_article "natural-bits.art";; > > extend_the_interpretation > "opentheory/theories/natural-divides/natural-divides.int";; > import_article "natural-divides.art";; > > extend_the_interpretation > "opentheory/theories/modular/modular.int";; > extend_the_interpretation > "opentheory/theories/word/word.int";; > extend_the_interpretation > "opentheory/theories/word10/word10.int";; > import_article "word10.art";; > > I regard this second problem as a defect in the theories, because it's > unreasonable to expect people to discover this information. I'll work > on fixing it so these multiple extend_the_interpretation commands are > unnecessary. > > Cheers, > > Joe > > On Sun, Oct 4, 2015 at 2:57 PM, Robert White > wrote: > > Dear Joe, > > > > I have problem importing article files. For example: > > > > Failure > > > > "in article word10.art at line 7495: defineConst\nstack = [Term; > > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; > > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; > > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown > > constant \"Number.Modular.equivalent\"". > > > > I also have problems with the following packages: > > > > natural-prime > > > > gfp > > > > natural-fibonacci > > > > Could you please check if that is because opentheory packages got updated > > but the int files haven't? > > > > Thanks a lot. > > > > > > -- > > > > Regards, > > Robert > > > > New homepage at Github: https://airobert.github.io/ > > New email address at ILLC: shuai.wang at student.uva.nl > > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > > > > _______________________________________________ > > 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 > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ai.robert.wangshuai at gmail.com Tue Oct 6 10:15:50 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 6 Oct 2015 12:15:50 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Dear Joe, I still get one error from the modular package: Exception: Failure "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; Thm]\nunknown assumption:\n|- ~(modulus = 0)". Is there any package missing? I have loaded the following packages: stream probability natural-bits natural-divides natural-prime Thanks very much! Regards, Robert On 5 October 2015 at 23:27, Robert White wrote: > Thanks very much Joe. > I also noticed that there is kind of dependency going on but I don't know > how to fix it. > > > On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: > >> Hi Robert, >> >> There are a couple of different obstacles here. >> >> Firstly, it is important that the dependent theories have been >> imported before the theory. To show all the dependent theories, use >> the following command: >> >> $ opentheory list --dependency-order 'Requires+ natural-prime' >> base-1.200 >> natural-divides-1.62 >> stream-1.46 >> >> Now this sequence will succeed: >> >> extend_the_interpretation >> "opentheory/theories/natural-divides/natural-divides.int";; >> import_article "natural-divides.art";; >> >> extend_the_interpretation >> "opentheory/theories/stream/stream.int";; >> import_article "stream.art";; >> >> extend_the_interpretation >> "opentheory/theories/natural-prime/natural-prime.int";; >> import_article "natural-prime.art";; >> >> The second obstacle is that the theory word10 includes the theory >> word, which in turn includes the theory modular. So to successfully >> import word10 you need to extend the interpretation with the >> interpretations for these theories, too: >> >> $ opentheory list --dependency-order 'Requires+ word10' >> base-1.200 >> stream-1.46 >> probability-1.49 >> natural-bits-1.66 >> natural-divides-1.62 >> >> extend_the_interpretation >> "opentheory/theories/stream/stream.int";; >> import_article "stream.art";; >> >> extend_the_interpretation >> "opentheory/theories/probability/probability.int";; >> import_article "probability.art";; >> >> extend_the_interpretation >> "opentheory/theories/natural-bits/natural-bits.int";; >> import_article "natural-bits.art";; >> >> extend_the_interpretation >> "opentheory/theories/natural-divides/natural-divides.int";; >> import_article "natural-divides.art";; >> >> extend_the_interpretation >> "opentheory/theories/modular/modular.int";; >> extend_the_interpretation >> "opentheory/theories/word/word.int";; >> extend_the_interpretation >> "opentheory/theories/word10/word10.int";; >> import_article "word10.art";; >> >> I regard this second problem as a defect in the theories, because it's >> unreasonable to expect people to discover this information. I'll work >> on fixing it so these multiple extend_the_interpretation commands are >> unnecessary. >> >> Cheers, >> >> Joe >> >> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >> wrote: >> > Dear Joe, >> > >> > I have problem importing article files. For example: >> > >> > Failure >> > >> > "in article word10.art at line 7495: defineConst\nstack = [Term; >> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown >> > constant \"Number.Modular.equivalent\"". >> > >> > I also have problems with the following packages: >> > >> > natural-prime >> > >> > gfp >> > >> > natural-fibonacci >> > >> > Could you please check if that is because opentheory packages got >> updated >> > but the int files haven't? >> > >> > Thanks a lot. >> > >> > >> > -- >> > >> > Regards, >> > Robert >> > >> > New homepage at Github: https://airobert.github.io/ >> > New email address at ILLC: shuai.wang at student.uva.nl >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > >> > >> > _______________________________________________ >> > 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 >> > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ai.robert.wangshuai at gmail.com Tue Oct 6 10:31:41 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 6 Oct 2015 12:31:41 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Dear Joe, I also have problem loading lazy-list and gfp: For lazy-list : Exception: Failure "in article lazy-list.art at line 234: const\nstack = [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; Term; Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; Thm; Thm]\nunknown constant \"Data.Option.NONE\"". For gfp; Exception: Failure "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; Thm]\nunknown assumption:\n|- prime oddprime". Could you please help on that? Thanks a lot! Regards Robert On 6 October 2015 at 12:15, Robert White wrote: > Dear Joe, > > I still get one error from the modular package: > > Exception: > > Failure > > "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; > Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Var; > Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; > [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; > \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; Thm]\nunknown > assumption:\n|- ~(modulus = 0)". > > Is there any package missing? > > I have loaded the following packages: > > stream > > probability > > natural-bits > > natural-divides > > natural-prime > > > Thanks very much! > > > Regards, > > Robert > > On 5 October 2015 at 23:27, Robert White > wrote: > >> Thanks very much Joe. >> I also noticed that there is kind of dependency going on but I don't know >> how to fix it. >> >> >> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: >> >>> Hi Robert, >>> >>> There are a couple of different obstacles here. >>> >>> Firstly, it is important that the dependent theories have been >>> imported before the theory. To show all the dependent theories, use >>> the following command: >>> >>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>> base-1.200 >>> natural-divides-1.62 >>> stream-1.46 >>> >>> Now this sequence will succeed: >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-divides/natural-divides.int";; >>> import_article "natural-divides.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/stream/stream.int";; >>> import_article "stream.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-prime/natural-prime.int";; >>> import_article "natural-prime.art";; >>> >>> The second obstacle is that the theory word10 includes the theory >>> word, which in turn includes the theory modular. So to successfully >>> import word10 you need to extend the interpretation with the >>> interpretations for these theories, too: >>> >>> $ opentheory list --dependency-order 'Requires+ word10' >>> base-1.200 >>> stream-1.46 >>> probability-1.49 >>> natural-bits-1.66 >>> natural-divides-1.62 >>> >>> extend_the_interpretation >>> "opentheory/theories/stream/stream.int";; >>> import_article "stream.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/probability/probability.int";; >>> import_article "probability.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-bits/natural-bits.int";; >>> import_article "natural-bits.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-divides/natural-divides.int";; >>> import_article "natural-divides.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/modular/modular.int";; >>> extend_the_interpretation >>> "opentheory/theories/word/word.int";; >>> extend_the_interpretation >>> "opentheory/theories/word10/word10.int";; >>> import_article "word10.art";; >>> >>> I regard this second problem as a defect in the theories, because it's >>> unreasonable to expect people to discover this information. I'll work >>> on fixing it so these multiple extend_the_interpretation commands are >>> unnecessary. >>> >>> Cheers, >>> >>> Joe >>> >>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>> wrote: >>> > Dear Joe, >>> > >>> > I have problem importing article files. For example: >>> > >>> > Failure >>> > >>> > "in article word10.art at line 7495: defineConst\nstack = [Term; >>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown >>> > constant \"Number.Modular.equivalent\"". >>> > >>> > I also have problems with the following packages: >>> > >>> > natural-prime >>> > >>> > gfp >>> > >>> > natural-fibonacci >>> > >>> > Could you please check if that is because opentheory packages got >>> updated >>> > but the int files haven't? >>> > >>> > Thanks a lot. >>> > >>> > >>> > -- >>> > >>> > Regards, >>> > Robert >>> > >>> > New homepage at Github: https://airobert.github.io/ >>> > New email address at ILLC: shuai.wang at student.uva.nl >>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> > >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> >> >> -- >> >> Regards, >> Robert >> >> New homepage at Github: https://airobert.github.io/ >> New email address at ILLC: shuai.wang at student.uva.nl >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ai.robert.wangshuai at gmail.com Tue Oct 6 11:00:32 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 6 Oct 2015 13:00:32 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Dear Joe, I also noticed that parser is has the following errors: Exception: Failure "in article parser.art at line 457: defineConst\nstack = [Term; \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; Term; Var; [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; \"HOLLight.INJP\"; \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; Term]\nnew_constant: constant NUMSUM has already been declared". I looked into it and found that NUMSUM has been declared in int_type.ml which is loaded in hol.ml. Could you please update this package? Thanks! Robert On 6 October 2015 at 12:31, Robert White wrote: > Dear Joe, > > I also have problem loading lazy-list and gfp: > > For lazy-list : > > Exception: > > Failure > > "in article lazy-list.art at line 234: const\nstack = > [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; Term; > Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; > \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; Thm; > Thm]\nunknown constant \"Data.Option.NONE\"". > > > For gfp; > > > Exception: > > Failure > > "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; > Thm]\nunknown assumption:\n|- prime oddprime". > > > Could you please help on that? Thanks a lot! > > Regards > > Robert > > > > > > On 6 October 2015 at 12:15, Robert White > wrote: > >> Dear Joe, >> >> I still get one error from the modular package: >> >> Exception: >> >> Failure >> >> "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; >> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Var; >> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; Thm]\nunknown >> assumption:\n|- ~(modulus = 0)". >> >> Is there any package missing? >> >> I have loaded the following packages: >> >> stream >> >> probability >> >> natural-bits >> >> natural-divides >> >> natural-prime >> >> >> Thanks very much! >> >> >> Regards, >> >> Robert >> >> On 5 October 2015 at 23:27, Robert White >> wrote: >> >>> Thanks very much Joe. >>> I also noticed that there is kind of dependency going on but I don't >>> know how to fix it. >>> >>> >>> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: >>> >>>> Hi Robert, >>>> >>>> There are a couple of different obstacles here. >>>> >>>> Firstly, it is important that the dependent theories have been >>>> imported before the theory. To show all the dependent theories, use >>>> the following command: >>>> >>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>>> base-1.200 >>>> natural-divides-1.62 >>>> stream-1.46 >>>> >>>> Now this sequence will succeed: >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>> import_article "natural-divides.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/stream/stream.int";; >>>> import_article "stream.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-prime/natural-prime.int";; >>>> import_article "natural-prime.art";; >>>> >>>> The second obstacle is that the theory word10 includes the theory >>>> word, which in turn includes the theory modular. So to successfully >>>> import word10 you need to extend the interpretation with the >>>> interpretations for these theories, too: >>>> >>>> $ opentheory list --dependency-order 'Requires+ word10' >>>> base-1.200 >>>> stream-1.46 >>>> probability-1.49 >>>> natural-bits-1.66 >>>> natural-divides-1.62 >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/stream/stream.int";; >>>> import_article "stream.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/probability/probability.int";; >>>> import_article "probability.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-bits/natural-bits.int";; >>>> import_article "natural-bits.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>> import_article "natural-divides.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/modular/modular.int";; >>>> extend_the_interpretation >>>> "opentheory/theories/word/word.int";; >>>> extend_the_interpretation >>>> "opentheory/theories/word10/word10.int";; >>>> import_article "word10.art";; >>>> >>>> I regard this second problem as a defect in the theories, because it's >>>> unreasonable to expect people to discover this information. I'll work >>>> on fixing it so these multiple extend_the_interpretation commands are >>>> unnecessary. >>>> >>>> Cheers, >>>> >>>> Joe >>>> >>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>>> wrote: >>>> > Dear Joe, >>>> > >>>> > I have problem importing article files. For example: >>>> > >>>> > Failure >>>> > >>>> > "in article word10.art at line 7495: defineConst\nstack = [Term; >>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown >>>> > constant \"Number.Modular.equivalent\"". >>>> > >>>> > I also have problems with the following packages: >>>> > >>>> > natural-prime >>>> > >>>> > gfp >>>> > >>>> > natural-fibonacci >>>> > >>>> > Could you please check if that is because opentheory packages got >>>> updated >>>> > but the int files haven't? >>>> > >>>> > Thanks a lot. >>>> > >>>> > >>>> > -- >>>> > >>>> > Regards, >>>> > Robert >>>> > >>>> > New homepage at Github: https://airobert.github.io/ >>>> > New email address at ILLC: shuai.wang at student.uva.nl >>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>>> >>> >>> >>> >>> -- >>> >>> Regards, >>> Robert >>> >>> New homepage at Github: https://airobert.github.io/ >>> New email address at ILLC: shuai.wang at student.uva.nl >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >>> >> >> >> -- >> >> Regards, >> Robert >> >> New homepage at Github: https://airobert.github.io/ >> New email address at ILLC: shuai.wang at student.uva.nl >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Tue Oct 6 20:39:11 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Tue, 6 Oct 2015 13:39:11 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, modular is a parametric theory, which means it expects to be imported in a context where there is a natural number constant called modular already defined, having the property that ~(modular = 0). The modular-witness theory defines a suitable signature, to show it is not inconsistent: $ opentheory info --theory modular-witness 3 external type operators: -> bool natural 9 external constants: = ! /\ ==> ~ F T suc zero 8 satisfied assumptions: hidden 1 defined constant: modulus 1 theorem: |- ~(modulus = 0) For testing you could simply import the modular-witness theory before modular, to create a valid context. Cheers, Joe On Tue, Oct 6, 2015 at 3:15 AM, Robert White wrote: > Dear Joe, > > I still get one error from the modular package: > > Exception: > > Failure > > "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; Thm; > [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Var; Thm; > Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; [[\"Number.Modular.toNatural\"; > Var]]; Term; Var; Var; \"Number.Modular.<=\"; Term; Var; [[]; [[Var; > Term]]]; Var; Thm]\nunknown assumption:\n|- ~(modulus = 0)". > > Is there any package missing? > > I have loaded the following packages: > > stream > > probability > > natural-bits > > natural-divides > > natural-prime > > > Thanks very much! > > > Regards, > > Robert > > > On 5 October 2015 at 23:27, Robert White > wrote: >> >> Thanks very much Joe. >> I also noticed that there is kind of dependency going on but I don't know >> how to fix it. >> >> >> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: >>> >>> Hi Robert, >>> >>> There are a couple of different obstacles here. >>> >>> Firstly, it is important that the dependent theories have been >>> imported before the theory. To show all the dependent theories, use >>> the following command: >>> >>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>> base-1.200 >>> natural-divides-1.62 >>> stream-1.46 >>> >>> Now this sequence will succeed: >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-divides/natural-divides.int";; >>> import_article "natural-divides.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/stream/stream.int";; >>> import_article "stream.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-prime/natural-prime.int";; >>> import_article "natural-prime.art";; >>> >>> The second obstacle is that the theory word10 includes the theory >>> word, which in turn includes the theory modular. So to successfully >>> import word10 you need to extend the interpretation with the >>> interpretations for these theories, too: >>> >>> $ opentheory list --dependency-order 'Requires+ word10' >>> base-1.200 >>> stream-1.46 >>> probability-1.49 >>> natural-bits-1.66 >>> natural-divides-1.62 >>> >>> extend_the_interpretation >>> "opentheory/theories/stream/stream.int";; >>> import_article "stream.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/probability/probability.int";; >>> import_article "probability.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-bits/natural-bits.int";; >>> import_article "natural-bits.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/natural-divides/natural-divides.int";; >>> import_article "natural-divides.art";; >>> >>> extend_the_interpretation >>> "opentheory/theories/modular/modular.int";; >>> extend_the_interpretation >>> "opentheory/theories/word/word.int";; >>> extend_the_interpretation >>> "opentheory/theories/word10/word10.int";; >>> import_article "word10.art";; >>> >>> I regard this second problem as a defect in the theories, because it's >>> unreasonable to expect people to discover this information. I'll work >>> on fixing it so these multiple extend_the_interpretation commands are >>> unnecessary. >>> >>> Cheers, >>> >>> Joe >>> >>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>> wrote: >>> > Dear Joe, >>> > >>> > I have problem importing article files. For example: >>> > >>> > Failure >>> > >>> > "in article word10.art at line 7495: defineConst\nstack = [Term; >>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown >>> > constant \"Number.Modular.equivalent\"". >>> > >>> > I also have problems with the following packages: >>> > >>> > natural-prime >>> > >>> > gfp >>> > >>> > natural-fibonacci >>> > >>> > Could you please check if that is because opentheory packages got >>> > updated >>> > but the int files haven't? >>> > >>> > Thanks a lot. >>> > >>> > >>> > -- >>> > >>> > Regards, >>> > Robert >>> > >>> > New homepage at Github: https://airobert.github.io/ >>> > New email address at ILLC: shuai.wang at student.uva.nl >>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> > >>> > >>> > _______________________________________________ >>> > 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 >> >> >> >> >> -- >> >> Regards, >> Robert >> >> New homepage at Github: https://airobert.github.io/ >> New email address at ILLC: shuai.wang at student.uva.nl >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From joe at gilith.com Tue Oct 6 21:01:26 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Tue, 6 Oct 2015 14:01:26 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, The theory lazy-list was contributed by Ramana Kumar. It was exported from HOL4 but hasn't been kept up to date with the standard theory library, so in its present state I don't think it can be imported into HOL Light. gfp is another parametric theory: $ opentheory info --theory gfp-witness 3 external type operators: -> bool natural 14 external constants: = ! /\ ==> ~ F T + bit0 bit1 odd prime suc zero 16 satisfied assumptions: hidden 1 defined constant: oddprime 2 theorems: |- odd oddprime |- prime oddprime So follow the same pattern as modular. Cheers, Joe On Tue, Oct 6, 2015 at 3:31 AM, Robert White wrote: > Dear Joe, > > I also have problem loading lazy-list and gfp: > > For lazy-list : > > Exception: > > Failure > > "in article lazy-list.art at line 234: const\nstack = > [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; Term; > Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; > \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; Thm; > Thm]\nunknown constant \"Data.Option.NONE\"". > > > For gfp; > > > Exception: > > Failure > > "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; > Thm]\nunknown assumption:\n|- prime oddprime". > > > Could you please help on that? Thanks a lot! > > Regards > > Robert > > > > > > On 6 October 2015 at 12:15, Robert White > wrote: >> >> Dear Joe, >> >> I still get one error from the modular package: >> >> Exception: >> >> Failure >> >> "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; >> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Var; >> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; Thm]\nunknown >> assumption:\n|- ~(modulus = 0)". >> >> Is there any package missing? >> >> I have loaded the following packages: >> >> stream >> >> probability >> >> natural-bits >> >> natural-divides >> >> natural-prime >> >> >> Thanks very much! >> >> >> Regards, >> >> Robert >> >> >> On 5 October 2015 at 23:27, Robert White >> wrote: >>> >>> Thanks very much Joe. >>> I also noticed that there is kind of dependency going on but I don't know >>> how to fix it. >>> >>> >>> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: >>>> >>>> Hi Robert, >>>> >>>> There are a couple of different obstacles here. >>>> >>>> Firstly, it is important that the dependent theories have been >>>> imported before the theory. To show all the dependent theories, use >>>> the following command: >>>> >>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>>> base-1.200 >>>> natural-divides-1.62 >>>> stream-1.46 >>>> >>>> Now this sequence will succeed: >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>> import_article "natural-divides.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/stream/stream.int";; >>>> import_article "stream.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-prime/natural-prime.int";; >>>> import_article "natural-prime.art";; >>>> >>>> The second obstacle is that the theory word10 includes the theory >>>> word, which in turn includes the theory modular. So to successfully >>>> import word10 you need to extend the interpretation with the >>>> interpretations for these theories, too: >>>> >>>> $ opentheory list --dependency-order 'Requires+ word10' >>>> base-1.200 >>>> stream-1.46 >>>> probability-1.49 >>>> natural-bits-1.66 >>>> natural-divides-1.62 >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/stream/stream.int";; >>>> import_article "stream.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/probability/probability.int";; >>>> import_article "probability.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-bits/natural-bits.int";; >>>> import_article "natural-bits.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>> import_article "natural-divides.art";; >>>> >>>> extend_the_interpretation >>>> "opentheory/theories/modular/modular.int";; >>>> extend_the_interpretation >>>> "opentheory/theories/word/word.int";; >>>> extend_the_interpretation >>>> "opentheory/theories/word10/word10.int";; >>>> import_article "word10.art";; >>>> >>>> I regard this second problem as a defect in the theories, because it's >>>> unreasonable to expect people to discover this information. I'll work >>>> on fixing it so these multiple extend_the_interpretation commands are >>>> unnecessary. >>>> >>>> Cheers, >>>> >>>> Joe >>>> >>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>>> wrote: >>>> > Dear Joe, >>>> > >>>> > I have problem importing article files. For example: >>>> > >>>> > Failure >>>> > >>>> > "in article word10.art at line 7495: defineConst\nstack = [Term; >>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown >>>> > constant \"Number.Modular.equivalent\"". >>>> > >>>> > I also have problems with the following packages: >>>> > >>>> > natural-prime >>>> > >>>> > gfp >>>> > >>>> > natural-fibonacci >>>> > >>>> > Could you please check if that is because opentheory packages got >>>> > updated >>>> > but the int files haven't? >>>> > >>>> > Thanks a lot. >>>> > >>>> > >>>> > -- >>>> > >>>> > Regards, >>>> > Robert >>>> > >>>> > New homepage at Github: https://airobert.github.io/ >>>> > New email address at ILLC: shuai.wang at student.uva.nl >>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>> >>> >>> >>> >>> -- >>> >>> Regards, >>> Robert >>> >>> New homepage at Github: https://airobert.github.io/ >>> New email address at ILLC: shuai.wang at student.uva.nl >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >> >> >> >> -- >> >> Regards, >> Robert >> >> New homepage at Github: https://airobert.github.io/ >> New email address at ILLC: shuai.wang at student.uva.nl >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From joe at gilith.com Tue Oct 6 21:04:12 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Tue, 6 Oct 2015 14:04:12 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, This is a case of a theory-local definition clashing with an existing definition of the same name. It will be solved by the same change that I'm working on that will make the extra extend_the_interpretation commands unnecessary. Cheers, Joe On Tue, Oct 6, 2015 at 4:00 AM, Robert White wrote: > Dear Joe, > > I also noticed that parser is has the following errors: > > Exception: > > Failure > > "in article parser.art at line 457: defineConst\nstack = [Term; > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; Term; Var; > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; \"HOLLight.INJP\"; > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; > Term]\nnew_constant: constant NUMSUM has already been declared". > > > I looked into it and found that NUMSUM has been declared in int_type.ml > which is loaded in hol.ml. > > Could you please update this package? > > Thanks! > > Robert > > > On 6 October 2015 at 12:31, Robert White > wrote: >> >> Dear Joe, >> >> I also have problem loading lazy-list and gfp: >> >> For lazy-list : >> >> Exception: >> >> Failure >> >> "in article lazy-list.art at line 234: const\nstack = >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; Term; >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; Thm; >> Thm]\nunknown constant \"Data.Option.NONE\"". >> >> >> For gfp; >> >> >> Exception: >> >> Failure >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; >> Thm]\nunknown assumption:\n|- prime oddprime". >> >> >> Could you please help on that? Thanks a lot! >> >> Regards >> >> Robert >> >> >> >> >> >> On 6 October 2015 at 12:15, Robert White >> wrote: >>> >>> Dear Joe, >>> >>> I still get one error from the modular package: >>> >>> Exception: >>> >>> Failure >>> >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Var; >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; Thm]\nunknown >>> assumption:\n|- ~(modulus = 0)". >>> >>> Is there any package missing? >>> >>> I have loaded the following packages: >>> >>> stream >>> >>> probability >>> >>> natural-bits >>> >>> natural-divides >>> >>> natural-prime >>> >>> >>> Thanks very much! >>> >>> >>> Regards, >>> >>> Robert >>> >>> >>> On 5 October 2015 at 23:27, Robert White >>> wrote: >>>> >>>> Thanks very much Joe. >>>> I also noticed that there is kind of dependency going on but I don't >>>> know how to fix it. >>>> >>>> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: >>>>> >>>>> Hi Robert, >>>>> >>>>> There are a couple of different obstacles here. >>>>> >>>>> Firstly, it is important that the dependent theories have been >>>>> imported before the theory. To show all the dependent theories, use >>>>> the following command: >>>>> >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>>>> base-1.200 >>>>> natural-divides-1.62 >>>>> stream-1.46 >>>>> >>>>> Now this sequence will succeed: >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>>> import_article "natural-divides.art";; >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/stream/stream.int";; >>>>> import_article "stream.art";; >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/natural-prime/natural-prime.int";; >>>>> import_article "natural-prime.art";; >>>>> >>>>> The second obstacle is that the theory word10 includes the theory >>>>> word, which in turn includes the theory modular. So to successfully >>>>> import word10 you need to extend the interpretation with the >>>>> interpretations for these theories, too: >>>>> >>>>> $ opentheory list --dependency-order 'Requires+ word10' >>>>> base-1.200 >>>>> stream-1.46 >>>>> probability-1.49 >>>>> natural-bits-1.66 >>>>> natural-divides-1.62 >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/stream/stream.int";; >>>>> import_article "stream.art";; >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/probability/probability.int";; >>>>> import_article "probability.art";; >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/natural-bits/natural-bits.int";; >>>>> import_article "natural-bits.art";; >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>>> import_article "natural-divides.art";; >>>>> >>>>> extend_the_interpretation >>>>> "opentheory/theories/modular/modular.int";; >>>>> extend_the_interpretation >>>>> "opentheory/theories/word/word.int";; >>>>> extend_the_interpretation >>>>> "opentheory/theories/word10/word10.int";; >>>>> import_article "word10.art";; >>>>> >>>>> I regard this second problem as a defect in the theories, because it's >>>>> unreasonable to expect people to discover this information. I'll work >>>>> on fixing it so these multiple extend_the_interpretation commands are >>>>> unnecessary. >>>>> >>>>> Cheers, >>>>> >>>>> Joe >>>>> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>>>> wrote: >>>>> > Dear Joe, >>>>> > >>>>> > I have problem importing article files. For example: >>>>> > >>>>> > Failure >>>>> > >>>>> > "in article word10.art at line 7495: defineConst\nstack = [Term; >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown >>>>> > constant \"Number.Modular.equivalent\"". >>>>> > >>>>> > I also have problems with the following packages: >>>>> > >>>>> > natural-prime >>>>> > >>>>> > gfp >>>>> > >>>>> > natural-fibonacci >>>>> > >>>>> > Could you please check if that is because opentheory packages got >>>>> > updated >>>>> > but the int files haven't? >>>>> > >>>>> > Thanks a lot. >>>>> > >>>>> > >>>>> > -- >>>>> > >>>>> > Regards, >>>>> > Robert >>>>> > >>>>> > New homepage at Github: https://airobert.github.io/ >>>>> > New email address at ILLC: shuai.wang at student.uva.nl >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>>> > >>>>> > >>>>> > _______________________________________________ >>>>> > 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 >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Regards, >>>> Robert >>>> >>>> New homepage at Github: https://airobert.github.io/ >>>> New email address at ILLC: shuai.wang at student.uva.nl >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> >>> >>> >>> >>> -- >>> >>> Regards, >>> Robert >>> >>> New homepage at Github: https://airobert.github.io/ >>> New email address at ILLC: shuai.wang at student.uva.nl >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >> >> >> >> -- >> >> Regards, >> Robert >> >> New homepage at Github: https://airobert.github.io/ >> New email address at ILLC: shuai.wang at student.uva.nl >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ai.robert.wangshuai at gmail.com Tue Oct 6 21:08:05 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 6 Oct 2015 23:08:05 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: > This is a case of a theory-local definition clashing with an existing definition of the same name. It will be solved by the same change that I'm working on that will make the extra extend_the_interpretation commands unnecessary. So looks like i can't do anything for now on it? On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: > Hi Robert, > > This is a case of a theory-local definition clashing with an existing > definition of the same name. It will be solved by the same change that > I'm working on that will make the extra extend_the_interpretation > commands unnecessary. > > Cheers, > > Joe > > On Tue, Oct 6, 2015 at 4:00 AM, Robert White > wrote: > > Dear Joe, > > > > I also noticed that parser is has the following errors: > > > > Exception: > > > > Failure > > > > "in article parser.art at line 457: defineConst\nstack = [Term; > > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; Term; > Var; > > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; > \"HOLLight.INJP\"; > > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; > > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; > > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; > > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; > > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; > > Term]\nnew_constant: constant NUMSUM has already been declared". > > > > > > I looked into it and found that NUMSUM has been declared in int_type.ml > > which is loaded in hol.ml. > > > > Could you please update this package? > > > > Thanks! > > > > Robert > > > > > > On 6 October 2015 at 12:31, Robert White > > wrote: > >> > >> Dear Joe, > >> > >> I also have problem loading lazy-list and gfp: > >> > >> For lazy-list : > >> > >> Exception: > >> > >> Failure > >> > >> "in article lazy-list.art at line 234: const\nstack = > >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; > Term; > >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; > >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; > Thm; > >> Thm]\nunknown constant \"Data.Option.NONE\"". > >> > >> > >> For gfp; > >> > >> > >> Exception: > >> > >> Failure > >> > >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; > >> Thm]\nunknown assumption:\n|- prime oddprime". > >> > >> > >> Could you please help on that? Thanks a lot! > >> > >> Regards > >> > >> Robert > >> > >> > >> > >> > >> > >> On 6 October 2015 at 12:15, Robert White > > >> wrote: > >>> > >>> Dear Joe, > >>> > >>> I still get one error from the modular package: > >>> > >>> Exception: > >>> > >>> Failure > >>> > >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; > >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; > Var; > >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; > >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; > >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; > Thm]\nunknown > >>> assumption:\n|- ~(modulus = 0)". > >>> > >>> Is there any package missing? > >>> > >>> I have loaded the following packages: > >>> > >>> stream > >>> > >>> probability > >>> > >>> natural-bits > >>> > >>> natural-divides > >>> > >>> natural-prime > >>> > >>> > >>> Thanks very much! > >>> > >>> > >>> Regards, > >>> > >>> Robert > >>> > >>> > >>> On 5 October 2015 at 23:27, Robert White < > ai.robert.wangshuai at gmail.com> > >>> wrote: > >>>> > >>>> Thanks very much Joe. > >>>> I also noticed that there is kind of dependency going on but I don't > >>>> know how to fix it. > >>>> > >>>> > >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: > >>>>> > >>>>> Hi Robert, > >>>>> > >>>>> There are a couple of different obstacles here. > >>>>> > >>>>> Firstly, it is important that the dependent theories have been > >>>>> imported before the theory. To show all the dependent theories, use > >>>>> the following command: > >>>>> > >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' > >>>>> base-1.200 > >>>>> natural-divides-1.62 > >>>>> stream-1.46 > >>>>> > >>>>> Now this sequence will succeed: > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/natural-divides/natural-divides.int";; > >>>>> import_article "natural-divides.art";; > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/stream/stream.int";; > >>>>> import_article "stream.art";; > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/natural-prime/natural-prime.int";; > >>>>> import_article "natural-prime.art";; > >>>>> > >>>>> The second obstacle is that the theory word10 includes the theory > >>>>> word, which in turn includes the theory modular. So to successfully > >>>>> import word10 you need to extend the interpretation with the > >>>>> interpretations for these theories, too: > >>>>> > >>>>> $ opentheory list --dependency-order 'Requires+ word10' > >>>>> base-1.200 > >>>>> stream-1.46 > >>>>> probability-1.49 > >>>>> natural-bits-1.66 > >>>>> natural-divides-1.62 > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/stream/stream.int";; > >>>>> import_article "stream.art";; > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/probability/probability.int";; > >>>>> import_article "probability.art";; > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/natural-bits/natural-bits.int";; > >>>>> import_article "natural-bits.art";; > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/natural-divides/natural-divides.int";; > >>>>> import_article "natural-divides.art";; > >>>>> > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/modular/modular.int";; > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/word/word.int";; > >>>>> extend_the_interpretation > >>>>> "opentheory/theories/word10/word10.int";; > >>>>> import_article "word10.art";; > >>>>> > >>>>> I regard this second problem as a defect in the theories, because > it's > >>>>> unreasonable to expect people to discover this information. I'll work > >>>>> on fixing it so these multiple extend_the_interpretation commands are > >>>>> unnecessary. > >>>>> > >>>>> Cheers, > >>>>> > >>>>> Joe > >>>>> > >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White > >>>>> wrote: > >>>>> > Dear Joe, > >>>>> > > >>>>> > I have problem importing article files. For example: > >>>>> > > >>>>> > Failure > >>>>> > > >>>>> > "in article word10.art at line 7495: defineConst\nstack = [Term; > >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; > >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; > >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; > Const]\nunknown > >>>>> > constant \"Number.Modular.equivalent\"". > >>>>> > > >>>>> > I also have problems with the following packages: > >>>>> > > >>>>> > natural-prime > >>>>> > > >>>>> > gfp > >>>>> > > >>>>> > natural-fibonacci > >>>>> > > >>>>> > Could you please check if that is because opentheory packages got > >>>>> > updated > >>>>> > but the int files haven't? > >>>>> > > >>>>> > Thanks a lot. > >>>>> > > >>>>> > > >>>>> > -- > >>>>> > > >>>>> > Regards, > >>>>> > Robert > >>>>> > > >>>>> > New homepage at Github: https://airobert.github.io/ > >>>>> > New email address at ILLC: shuai.wang at student.uva.nl > >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>>>> > > >>>>> > > >>>>> > _______________________________________________ > >>>>> > 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 > >>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> > >>>> Regards, > >>>> Robert > >>>> > >>>> New homepage at Github: https://airobert.github.io/ > >>>> New email address at ILLC: shuai.wang at student.uva.nl > >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>>> > >>> > >>> > >>> > >>> -- > >>> > >>> Regards, > >>> Robert > >>> > >>> New homepage at Github: https://airobert.github.io/ > >>> New email address at ILLC: shuai.wang at student.uva.nl > >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>> > >> > >> > >> > >> -- > >> > >> Regards, > >> Robert > >> > >> New homepage at Github: https://airobert.github.io/ > >> New email address at ILLC: shuai.wang at student.uva.nl > >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> > > > > > > > > -- > > > > Regards, > > Robert > > > > New homepage at Github: https://airobert.github.io/ > > New email address at ILLC: shuai.wang at student.uva.nl > > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > > > > _______________________________________________ > > 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 > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ai.robert.wangshuai at gmail.com Tue Oct 6 21:08:56 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 6 Oct 2015 23:08:56 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Dear Joe, Thanks a lot. I just downloaded them. I will try test the whole thing again tomorrow. Thanks! Robert On 6 October 2015 at 23:01, Joe Leslie-Hurd wrote: > Hi Robert, > > The theory lazy-list was contributed by Ramana Kumar. It was exported > from HOL4 but hasn't been kept up to date with the standard theory > library, so in its present state I don't think it can be imported into > HOL Light. > > gfp is another parametric theory: > > $ opentheory info --theory gfp-witness > 3 external type operators: -> bool natural > 14 external constants: = ! /\ ==> ~ F T + bit0 bit1 odd prime suc zero > 16 satisfied assumptions: hidden > 1 defined constant: oddprime > 2 theorems: > |- odd oddprime > |- prime oddprime > > So follow the same pattern as modular. > > Cheers, > > Joe > > On Tue, Oct 6, 2015 at 3:31 AM, Robert White > wrote: > > Dear Joe, > > > > I also have problem loading lazy-list and gfp: > > > > For lazy-list : > > > > Exception: > > > > Failure > > > > "in article lazy-list.art at line 234: const\nstack = > > [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; Term; > > Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; > > \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; > Thm; > > Thm]\nunknown constant \"Data.Option.NONE\"". > > > > > > For gfp; > > > > > > Exception: > > > > Failure > > > > "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; > > Thm]\nunknown assumption:\n|- prime oddprime". > > > > > > Could you please help on that? Thanks a lot! > > > > Regards > > > > Robert > > > > > > > > > > > > On 6 October 2015 at 12:15, Robert White > > wrote: > >> > >> Dear Joe, > >> > >> I still get one error from the modular package: > >> > >> Exception: > >> > >> Failure > >> > >> "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; > >> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; > Var; > >> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; > >> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; > >> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; > Thm]\nunknown > >> assumption:\n|- ~(modulus = 0)". > >> > >> Is there any package missing? > >> > >> I have loaded the following packages: > >> > >> stream > >> > >> probability > >> > >> natural-bits > >> > >> natural-divides > >> > >> natural-prime > >> > >> > >> Thanks very much! > >> > >> > >> Regards, > >> > >> Robert > >> > >> > >> On 5 October 2015 at 23:27, Robert White > > >> wrote: > >>> > >>> Thanks very much Joe. > >>> I also noticed that there is kind of dependency going on but I don't > know > >>> how to fix it. > >>> > >>> > >>> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: > >>>> > >>>> Hi Robert, > >>>> > >>>> There are a couple of different obstacles here. > >>>> > >>>> Firstly, it is important that the dependent theories have been > >>>> imported before the theory. To show all the dependent theories, use > >>>> the following command: > >>>> > >>>> $ opentheory list --dependency-order 'Requires+ natural-prime' > >>>> base-1.200 > >>>> natural-divides-1.62 > >>>> stream-1.46 > >>>> > >>>> Now this sequence will succeed: > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/natural-divides/natural-divides.int";; > >>>> import_article "natural-divides.art";; > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/stream/stream.int";; > >>>> import_article "stream.art";; > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/natural-prime/natural-prime.int";; > >>>> import_article "natural-prime.art";; > >>>> > >>>> The second obstacle is that the theory word10 includes the theory > >>>> word, which in turn includes the theory modular. So to successfully > >>>> import word10 you need to extend the interpretation with the > >>>> interpretations for these theories, too: > >>>> > >>>> $ opentheory list --dependency-order 'Requires+ word10' > >>>> base-1.200 > >>>> stream-1.46 > >>>> probability-1.49 > >>>> natural-bits-1.66 > >>>> natural-divides-1.62 > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/stream/stream.int";; > >>>> import_article "stream.art";; > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/probability/probability.int";; > >>>> import_article "probability.art";; > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/natural-bits/natural-bits.int";; > >>>> import_article "natural-bits.art";; > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/natural-divides/natural-divides.int";; > >>>> import_article "natural-divides.art";; > >>>> > >>>> extend_the_interpretation > >>>> "opentheory/theories/modular/modular.int";; > >>>> extend_the_interpretation > >>>> "opentheory/theories/word/word.int";; > >>>> extend_the_interpretation > >>>> "opentheory/theories/word10/word10.int";; > >>>> import_article "word10.art";; > >>>> > >>>> I regard this second problem as a defect in the theories, because it's > >>>> unreasonable to expect people to discover this information. I'll work > >>>> on fixing it so these multiple extend_the_interpretation commands are > >>>> unnecessary. > >>>> > >>>> Cheers, > >>>> > >>>> Joe > >>>> > >>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White > >>>> wrote: > >>>> > Dear Joe, > >>>> > > >>>> > I have problem importing article files. For example: > >>>> > > >>>> > Failure > >>>> > > >>>> > "in article word10.art at line 7495: defineConst\nstack = [Term; > >>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; > >>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; > >>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; Const]\nunknown > >>>> > constant \"Number.Modular.equivalent\"". > >>>> > > >>>> > I also have problems with the following packages: > >>>> > > >>>> > natural-prime > >>>> > > >>>> > gfp > >>>> > > >>>> > natural-fibonacci > >>>> > > >>>> > Could you please check if that is because opentheory packages got > >>>> > updated > >>>> > but the int files haven't? > >>>> > > >>>> > Thanks a lot. > >>>> > > >>>> > > >>>> > -- > >>>> > > >>>> > Regards, > >>>> > Robert > >>>> > > >>>> > New homepage at Github: https://airobert.github.io/ > >>>> > New email address at ILLC: shuai.wang at student.uva.nl > >>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>>> > > >>>> > > >>>> > _______________________________________________ > >>>> > 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 > >>> > >>> > >>> > >>> > >>> -- > >>> > >>> Regards, > >>> Robert > >>> > >>> New homepage at Github: https://airobert.github.io/ > >>> New email address at ILLC: shuai.wang at student.uva.nl > >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>> > >> > >> > >> > >> -- > >> > >> Regards, > >> Robert > >> > >> New homepage at Github: https://airobert.github.io/ > >> New email address at ILLC: shuai.wang at student.uva.nl > >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> > > > > > > > > -- > > > > Regards, > > Robert > > > > New homepage at Github: https://airobert.github.io/ > > New email address at ILLC: shuai.wang at student.uva.nl > > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > > > > _______________________________________________ > > 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 > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Tue Oct 6 21:09:23 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Tue, 6 Oct 2015 14:09:23 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: No, but you should shortly be able to download a new version of the opentheory tool that will fix it. Cheers, Joe On Tue, Oct 6, 2015 at 2:08 PM, Robert White wrote: >> This is a case of a theory-local definition clashing with an existing > definition of the same name. It will be solved by the same change that > I'm working on that will make the extra extend_the_interpretation > commands unnecessary. > > So looks like i can't do anything for now on it? > > > > On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: >> >> Hi Robert, >> >> This is a case of a theory-local definition clashing with an existing >> definition of the same name. It will be solved by the same change that >> I'm working on that will make the extra extend_the_interpretation >> commands unnecessary. >> >> Cheers, >> >> Joe >> >> On Tue, Oct 6, 2015 at 4:00 AM, Robert White >> wrote: >> > Dear Joe, >> > >> > I also noticed that parser is has the following errors: >> > >> > Exception: >> > >> > Failure >> > >> > "in article parser.art at line 457: defineConst\nstack = [Term; >> > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; Term; >> > Var; >> > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; >> > \"HOLLight.INJP\"; >> > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; >> > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; >> > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; >> > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; >> > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; >> > Term]\nnew_constant: constant NUMSUM has already been declared". >> > >> > >> > I looked into it and found that NUMSUM has been declared in int_type.ml >> > which is loaded in hol.ml. >> > >> > Could you please update this package? >> > >> > Thanks! >> > >> > Robert >> > >> > >> > On 6 October 2015 at 12:31, Robert White >> > wrote: >> >> >> >> Dear Joe, >> >> >> >> I also have problem loading lazy-list and gfp: >> >> >> >> For lazy-list : >> >> >> >> Exception: >> >> >> >> Failure >> >> >> >> "in article lazy-list.art at line 234: const\nstack = >> >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; >> >> Term; >> >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; \"llist.llist.rep\"; >> >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; >> >> Thm; >> >> Thm]\nunknown constant \"Data.Option.NONE\"". >> >> >> >> >> >> For gfp; >> >> >> >> >> >> Exception: >> >> >> >> Failure >> >> >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; >> >> Thm]\nunknown assumption:\n|- prime oddprime". >> >> >> >> >> >> Could you please help on that? Thanks a lot! >> >> >> >> Regards >> >> >> >> Robert >> >> >> >> >> >> >> >> >> >> >> >> On 6 October 2015 at 12:15, Robert White >> >> >> >> wrote: >> >>> >> >>> Dear Joe, >> >>> >> >>> I still get one error from the modular package: >> >>> >> >>> Exception: >> >>> >> >>> Failure >> >>> >> >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; Thm; >> >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; >> >>> Var; >> >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >> >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >> >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; >> >>> Thm]\nunknown >> >>> assumption:\n|- ~(modulus = 0)". >> >>> >> >>> Is there any package missing? >> >>> >> >>> I have loaded the following packages: >> >>> >> >>> stream >> >>> >> >>> probability >> >>> >> >>> natural-bits >> >>> >> >>> natural-divides >> >>> >> >>> natural-prime >> >>> >> >>> >> >>> Thanks very much! >> >>> >> >>> >> >>> Regards, >> >>> >> >>> Robert >> >>> >> >>> >> >>> On 5 October 2015 at 23:27, Robert White >> >>> >> >>> wrote: >> >>>> >> >>>> Thanks very much Joe. >> >>>> I also noticed that there is kind of dependency going on but I don't >> >>>> know how to fix it. >> >>>> >> >>>> >> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd wrote: >> >>>>> >> >>>>> Hi Robert, >> >>>>> >> >>>>> There are a couple of different obstacles here. >> >>>>> >> >>>>> Firstly, it is important that the dependent theories have been >> >>>>> imported before the theory. To show all the dependent theories, use >> >>>>> the following command: >> >>>>> >> >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >> >>>>> base-1.200 >> >>>>> natural-divides-1.62 >> >>>>> stream-1.46 >> >>>>> >> >>>>> Now this sequence will succeed: >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >> >>>>> import_article "natural-divides.art";; >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/stream/stream.int";; >> >>>>> import_article "stream.art";; >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/natural-prime/natural-prime.int";; >> >>>>> import_article "natural-prime.art";; >> >>>>> >> >>>>> The second obstacle is that the theory word10 includes the theory >> >>>>> word, which in turn includes the theory modular. So to successfully >> >>>>> import word10 you need to extend the interpretation with the >> >>>>> interpretations for these theories, too: >> >>>>> >> >>>>> $ opentheory list --dependency-order 'Requires+ word10' >> >>>>> base-1.200 >> >>>>> stream-1.46 >> >>>>> probability-1.49 >> >>>>> natural-bits-1.66 >> >>>>> natural-divides-1.62 >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/stream/stream.int";; >> >>>>> import_article "stream.art";; >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/probability/probability.int";; >> >>>>> import_article "probability.art";; >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/natural-bits/natural-bits.int";; >> >>>>> import_article "natural-bits.art";; >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >> >>>>> import_article "natural-divides.art";; >> >>>>> >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/modular/modular.int";; >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/word/word.int";; >> >>>>> extend_the_interpretation >> >>>>> "opentheory/theories/word10/word10.int";; >> >>>>> import_article "word10.art";; >> >>>>> >> >>>>> I regard this second problem as a defect in the theories, because >> >>>>> it's >> >>>>> unreasonable to expect people to discover this information. I'll >> >>>>> work >> >>>>> on fixing it so these multiple extend_the_interpretation commands >> >>>>> are >> >>>>> unnecessary. >> >>>>> >> >>>>> Cheers, >> >>>>> >> >>>>> Joe >> >>>>> >> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >> >>>>> wrote: >> >>>>> > Dear Joe, >> >>>>> > >> >>>>> > I have problem importing article files. For example: >> >>>>> > >> >>>>> > Failure >> >>>>> > >> >>>>> > "in article word10.art at line 7495: defineConst\nstack = [Term; >> >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >> >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >> >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; >> >>>>> > Const]\nunknown >> >>>>> > constant \"Number.Modular.equivalent\"". >> >>>>> > >> >>>>> > I also have problems with the following packages: >> >>>>> > >> >>>>> > natural-prime >> >>>>> > >> >>>>> > gfp >> >>>>> > >> >>>>> > natural-fibonacci >> >>>>> > >> >>>>> > Could you please check if that is because opentheory packages got >> >>>>> > updated >> >>>>> > but the int files haven't? >> >>>>> > >> >>>>> > Thanks a lot. >> >>>>> > >> >>>>> > >> >>>>> > -- >> >>>>> > >> >>>>> > Regards, >> >>>>> > Robert >> >>>>> > >> >>>>> > New homepage at Github: https://airobert.github.io/ >> >>>>> > New email address at ILLC: shuai.wang at student.uva.nl >> >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >>>>> > >> >>>>> > >> >>>>> > _______________________________________________ >> >>>>> > 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 >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> >> >>>> Regards, >> >>>> Robert >> >>>> >> >>>> New homepage at Github: https://airobert.github.io/ >> >>>> New email address at ILLC: shuai.wang at student.uva.nl >> >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >>>> >> >>> >> >>> >> >>> >> >>> -- >> >>> >> >>> Regards, >> >>> Robert >> >>> >> >>> New homepage at Github: https://airobert.github.io/ >> >>> New email address at ILLC: shuai.wang at student.uva.nl >> >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >>> >> >> >> >> >> >> >> >> -- >> >> >> >> Regards, >> >> Robert >> >> >> >> New homepage at Github: https://airobert.github.io/ >> >> New email address at ILLC: shuai.wang at student.uva.nl >> >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> >> > >> > >> > >> > -- >> > >> > Regards, >> > Robert >> > >> > New homepage at Github: https://airobert.github.io/ >> > New email address at ILLC: shuai.wang at student.uva.nl >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > >> > >> > _______________________________________________ >> > 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 > > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ai.robert.wangshuai at gmail.com Tue Oct 6 21:22:36 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 6 Oct 2015 23:22:36 +0200 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Dear Joe, Okay, please let me know when it's ready. Thanks Robert On 6 October 2015 at 23:09, Joe Leslie-Hurd wrote: > No, but you should shortly be able to download a new version of the > opentheory tool that will fix it. > > Cheers, > > Joe > > On Tue, Oct 6, 2015 at 2:08 PM, Robert White > wrote: > >> This is a case of a theory-local definition clashing with an existing > > definition of the same name. It will be solved by the same change that > > I'm working on that will make the extra extend_the_interpretation > > commands unnecessary. > > > > So looks like i can't do anything for now on it? > > > > > > > > On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: > >> > >> Hi Robert, > >> > >> This is a case of a theory-local definition clashing with an existing > >> definition of the same name. It will be solved by the same change that > >> I'm working on that will make the extra extend_the_interpretation > >> commands unnecessary. > >> > >> Cheers, > >> > >> Joe > >> > >> On Tue, Oct 6, 2015 at 4:00 AM, Robert White > >> wrote: > >> > Dear Joe, > >> > > >> > I also noticed that parser is has the following errors: > >> > > >> > Exception: > >> > > >> > Failure > >> > > >> > "in article parser.art at line 457: defineConst\nstack = [Term; > >> > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; > Term; > >> > Var; > >> > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; > >> > \"HOLLight.INJP\"; > >> > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; > >> > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; > >> > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; > >> > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; > >> > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; > >> > Term]\nnew_constant: constant NUMSUM has already been declared". > >> > > >> > > >> > I looked into it and found that NUMSUM has been declared in > int_type.ml > >> > which is loaded in hol.ml. > >> > > >> > Could you please update this package? > >> > > >> > Thanks! > >> > > >> > Robert > >> > > >> > > >> > On 6 October 2015 at 12:31, Robert White < > ai.robert.wangshuai at gmail.com> > >> > wrote: > >> >> > >> >> Dear Joe, > >> >> > >> >> I also have problem loading lazy-list and gfp: > >> >> > >> >> For lazy-list : > >> >> > >> >> Exception: > >> >> > >> >> Failure > >> >> > >> >> "in article lazy-list.art at line 234: const\nstack = > >> >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; > >> >> Term; > >> >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; > \"llist.llist.rep\"; > >> >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; Var; > >> >> Thm; > >> >> Thm]\nunknown constant \"Data.Option.NONE\"". > >> >> > >> >> > >> >> For gfp; > >> >> > >> >> > >> >> Exception: > >> >> > >> >> Failure > >> >> > >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; Thm; > >> >> Thm]\nunknown assumption:\n|- prime oddprime". > >> >> > >> >> > >> >> Could you please help on that? Thanks a lot! > >> >> > >> >> Regards > >> >> > >> >> Robert > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> On 6 October 2015 at 12:15, Robert White > >> >> > >> >> wrote: > >> >>> > >> >>> Dear Joe, > >> >>> > >> >>> I still get one error from the modular package: > >> >>> > >> >>> Exception: > >> >>> > >> >>> Failure > >> >>> > >> >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; > Thm; > >> >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; > Thm; > >> >>> Var; > >> >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; > >> >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; > >> >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; > >> >>> Thm]\nunknown > >> >>> assumption:\n|- ~(modulus = 0)". > >> >>> > >> >>> Is there any package missing? > >> >>> > >> >>> I have loaded the following packages: > >> >>> > >> >>> stream > >> >>> > >> >>> probability > >> >>> > >> >>> natural-bits > >> >>> > >> >>> natural-divides > >> >>> > >> >>> natural-prime > >> >>> > >> >>> > >> >>> Thanks very much! > >> >>> > >> >>> > >> >>> Regards, > >> >>> > >> >>> Robert > >> >>> > >> >>> > >> >>> On 5 October 2015 at 23:27, Robert White > >> >>> > >> >>> wrote: > >> >>>> > >> >>>> Thanks very much Joe. > >> >>>> I also noticed that there is kind of dependency going on but I > don't > >> >>>> know how to fix it. > >> >>>> > >> >>>> > >> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd > wrote: > >> >>>>> > >> >>>>> Hi Robert, > >> >>>>> > >> >>>>> There are a couple of different obstacles here. > >> >>>>> > >> >>>>> Firstly, it is important that the dependent theories have been > >> >>>>> imported before the theory. To show all the dependent theories, > use > >> >>>>> the following command: > >> >>>>> > >> >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' > >> >>>>> base-1.200 > >> >>>>> natural-divides-1.62 > >> >>>>> stream-1.46 > >> >>>>> > >> >>>>> Now this sequence will succeed: > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; > >> >>>>> import_article "natural-divides.art";; > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/stream/stream.int";; > >> >>>>> import_article "stream.art";; > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/natural-prime/natural-prime.int";; > >> >>>>> import_article "natural-prime.art";; > >> >>>>> > >> >>>>> The second obstacle is that the theory word10 includes the theory > >> >>>>> word, which in turn includes the theory modular. So to > successfully > >> >>>>> import word10 you need to extend the interpretation with the > >> >>>>> interpretations for these theories, too: > >> >>>>> > >> >>>>> $ opentheory list --dependency-order 'Requires+ word10' > >> >>>>> base-1.200 > >> >>>>> stream-1.46 > >> >>>>> probability-1.49 > >> >>>>> natural-bits-1.66 > >> >>>>> natural-divides-1.62 > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/stream/stream.int";; > >> >>>>> import_article "stream.art";; > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/probability/probability.int";; > >> >>>>> import_article "probability.art";; > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/natural-bits/natural-bits.int";; > >> >>>>> import_article "natural-bits.art";; > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; > >> >>>>> import_article "natural-divides.art";; > >> >>>>> > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/modular/modular.int";; > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/word/word.int";; > >> >>>>> extend_the_interpretation > >> >>>>> "opentheory/theories/word10/word10.int";; > >> >>>>> import_article "word10.art";; > >> >>>>> > >> >>>>> I regard this second problem as a defect in the theories, because > >> >>>>> it's > >> >>>>> unreasonable to expect people to discover this information. I'll > >> >>>>> work > >> >>>>> on fixing it so these multiple extend_the_interpretation commands > >> >>>>> are > >> >>>>> unnecessary. > >> >>>>> > >> >>>>> Cheers, > >> >>>>> > >> >>>>> Joe > >> >>>>> > >> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White > >> >>>>> wrote: > >> >>>>> > Dear Joe, > >> >>>>> > > >> >>>>> > I have problem importing article files. For example: > >> >>>>> > > >> >>>>> > Failure > >> >>>>> > > >> >>>>> > "in article word10.art at line 7495: defineConst\nstack = > [Term; > >> >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; > >> >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; > >> >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; > >> >>>>> > Const]\nunknown > >> >>>>> > constant \"Number.Modular.equivalent\"". > >> >>>>> > > >> >>>>> > I also have problems with the following packages: > >> >>>>> > > >> >>>>> > natural-prime > >> >>>>> > > >> >>>>> > gfp > >> >>>>> > > >> >>>>> > natural-fibonacci > >> >>>>> > > >> >>>>> > Could you please check if that is because opentheory packages > got > >> >>>>> > updated > >> >>>>> > but the int files haven't? > >> >>>>> > > >> >>>>> > Thanks a lot. > >> >>>>> > > >> >>>>> > > >> >>>>> > -- > >> >>>>> > > >> >>>>> > Regards, > >> >>>>> > Robert > >> >>>>> > > >> >>>>> > New homepage at Github: https://airobert.github.io/ > >> >>>>> > New email address at ILLC: shuai.wang at student.uva.nl > >> >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: > 0652691901 > >> >>>>> > > >> >>>>> > > >> >>>>> > _______________________________________________ > >> >>>>> > 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 > >> >>>> > >> >>>> > >> >>>> > >> >>>> > >> >>>> -- > >> >>>> > >> >>>> Regards, > >> >>>> Robert > >> >>>> > >> >>>> New homepage at Github: https://airobert.github.io/ > >> >>>> New email address at ILLC: shuai.wang at student.uva.nl > >> >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> >>>> > >> >>> > >> >>> > >> >>> > >> >>> -- > >> >>> > >> >>> Regards, > >> >>> Robert > >> >>> > >> >>> New homepage at Github: https://airobert.github.io/ > >> >>> New email address at ILLC: shuai.wang at student.uva.nl > >> >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> >>> > >> >> > >> >> > >> >> > >> >> -- > >> >> > >> >> Regards, > >> >> Robert > >> >> > >> >> New homepage at Github: https://airobert.github.io/ > >> >> New email address at ILLC: shuai.wang at student.uva.nl > >> >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> >> > >> > > >> > > >> > > >> > -- > >> > > >> > Regards, > >> > Robert > >> > > >> > New homepage at Github: https://airobert.github.io/ > >> > New email address at ILLC: shuai.wang at student.uva.nl > >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> > > >> > > >> > _______________________________________________ > >> > 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 > > > > > > > > > > -- > > > > Regards, > > Robert > > > > New homepage at Github: https://airobert.github.io/ > > New email address at ILLC: shuai.wang at student.uva.nl > > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > > > > _______________________________________________ > > 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 > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Thu Oct 8 08:05:19 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 8 Oct 2015 01:05:19 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, I've just released a new version of the opentheory tool with a new option that should solve the name clashing problem when importing into HOL Light. Here's how you use it: opentheory info --clear-local-names --article -o parser.art parser This replaces the names of all symbols that are local to the theory with the special empty name (which prints as _). You can see this with the following command: $ opentheory info --symbols parser.art 7 external type operators: -> bool Data.List.list Data.Option.option Data.Pair.* Data.Sum.+ Number.Natural.natural 46 external constants: = select ! /\ ==> ? ?! \/ ~ cond F T Data.List.:: Data.List.@ Data.List.[] Data.List.concat Data.List.length Data.List.map Data.Option.case.none.some Data.Option.map Data.Option.none Data.Option.some Data.Pair., Data.Pair.fst Data.Pair.snd Data.Sum.case.left.right Data.Sum.left Data.Sum.right Function.const Function.o Function.surjective Number.Natural.* Number.Natural.+ Number.Natural.- Number.Natural.< Number.Natural.<= Number.Natural.^ Number.Natural.bit0 Number.Natural.bit1 Number.Natural.even Number.Natural.suc Number.Natural.zero Relation.irreflexive Relation.measure Relation.subrelation Relation.wellFounded 3 defined type operators: _ Parser.parser Parser.Stream.stream 59 defined constants: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Parser.any Parser.apply Parser.dest Parser.filter Parser.fold Parser.fold.prs Parser.foldN Parser.invariant Parser.inverse Parser.map Parser.mapPartial Parser.mapPartial.prs Parser.mk Parser.none Parser.orelse Parser.orelse.prs Parser.pair Parser.parse Parser.sequence Parser.sequence.prs Parser.some Parser.strongInverse Parser.token Parser.token.prs Parser.Stream.append Parser.Stream.case.error.eof.cons Parser.Stream.cons Parser.Stream.eof Parser.Stream.error Parser.Stream.fromList Parser.Stream.isProperSuffix Parser.Stream.isSuffix Parser.Stream.length Parser.Stream.map Parser.Stream.toList Here you can see there is one occurrence of a local type operator and many occurrences of local constants. Local symbols are defined and used internally in the theory but do not appear in any exported theorem (or assumption). It was local symbols that were causing name clashes when importing theories into HOL Light. I have updated the import mechanism so that fresh symbol names are generated when an empty name is encountered. You will need to execute a git pull of the OpenTheory HOL Light fork to get this update. The parser theory now imports without issue, and word10 theory imports without needing the extra extend_the_interpretation commands beforehand. Please give the new HOL Light import flow a try and let me know of any problems. It was a bit trickier than expected getting it all to work, so it wouldn't surprise me if there were issues. Cheers, Joe On Tue, Oct 6, 2015 at 2:22 PM, Robert White wrote: > Dear Joe, > > Okay, please let me know when it's ready. > > Thanks > Robert > > On 6 October 2015 at 23:09, Joe Leslie-Hurd wrote: >> >> No, but you should shortly be able to download a new version of the >> opentheory tool that will fix it. >> >> Cheers, >> >> Joe >> >> On Tue, Oct 6, 2015 at 2:08 PM, Robert White >> wrote: >> >> This is a case of a theory-local definition clashing with an existing >> > definition of the same name. It will be solved by the same change that >> > I'm working on that will make the extra extend_the_interpretation >> > commands unnecessary. >> > >> > So looks like i can't do anything for now on it? >> > >> > >> > >> > On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: >> >> >> >> Hi Robert, >> >> >> >> This is a case of a theory-local definition clashing with an existing >> >> definition of the same name. It will be solved by the same change that >> >> I'm working on that will make the extra extend_the_interpretation >> >> commands unnecessary. >> >> >> >> Cheers, >> >> >> >> Joe >> >> >> >> On Tue, Oct 6, 2015 at 4:00 AM, Robert White >> >> wrote: >> >> > Dear Joe, >> >> > >> >> > I also noticed that parser is has the following errors: >> >> > >> >> > Exception: >> >> > >> >> > Failure >> >> > >> >> > "in article parser.art at line 457: defineConst\nstack = [Term; >> >> > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; >> >> > Term; >> >> > Var; >> >> > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; >> >> > \"HOLLight.INJP\"; >> >> > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; >> >> > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; >> >> > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; >> >> > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; >> >> > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; >> >> > Term]\nnew_constant: constant NUMSUM has already been declared". >> >> > >> >> > >> >> > I looked into it and found that NUMSUM has been declared in >> >> > int_type.ml >> >> > which is loaded in hol.ml. >> >> > >> >> > Could you please update this package? >> >> > >> >> > Thanks! >> >> > >> >> > Robert >> >> > >> >> > >> >> > On 6 October 2015 at 12:31, Robert White >> >> > >> >> > wrote: >> >> >> >> >> >> Dear Joe, >> >> >> >> >> >> I also have problem loading lazy-list and gfp: >> >> >> >> >> >> For lazy-list : >> >> >> >> >> >> Exception: >> >> >> >> >> >> Failure >> >> >> >> >> >> "in article lazy-list.art at line 234: const\nstack = >> >> >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; >> >> >> Term; >> >> >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; >> >> >> \"llist.llist.rep\"; >> >> >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; >> >> >> Var; >> >> >> Thm; >> >> >> Thm]\nunknown constant \"Data.Option.NONE\"". >> >> >> >> >> >> >> >> >> For gfp; >> >> >> >> >> >> >> >> >> Exception: >> >> >> >> >> >> Failure >> >> >> >> >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; >> >> >> Thm; >> >> >> Thm]\nunknown assumption:\n|- prime oddprime". >> >> >> >> >> >> >> >> >> Could you please help on that? Thanks a lot! >> >> >> >> >> >> Regards >> >> >> >> >> >> Robert >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On 6 October 2015 at 12:15, Robert White >> >> >> >> >> >> wrote: >> >> >>> >> >> >>> Dear Joe, >> >> >>> >> >> >>> I still get one error from the modular package: >> >> >>> >> >> >>> Exception: >> >> >>> >> >> >>> Failure >> >> >>> >> >> >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; >> >> >>> Thm; >> >> >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; >> >> >>> Thm; >> >> >>> Var; >> >> >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >> >> >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >> >> >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; >> >> >>> Thm]\nunknown >> >> >>> assumption:\n|- ~(modulus = 0)". >> >> >>> >> >> >>> Is there any package missing? >> >> >>> >> >> >>> I have loaded the following packages: >> >> >>> >> >> >>> stream >> >> >>> >> >> >>> probability >> >> >>> >> >> >>> natural-bits >> >> >>> >> >> >>> natural-divides >> >> >>> >> >> >>> natural-prime >> >> >>> >> >> >>> >> >> >>> Thanks very much! >> >> >>> >> >> >>> >> >> >>> Regards, >> >> >>> >> >> >>> Robert >> >> >>> >> >> >>> >> >> >>> On 5 October 2015 at 23:27, Robert White >> >> >>> >> >> >>> wrote: >> >> >>>> >> >> >>>> Thanks very much Joe. >> >> >>>> I also noticed that there is kind of dependency going on but I >> >> >>>> don't >> >> >>>> know how to fix it. >> >> >>>> >> >> >>>> >> >> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd >> >> >>>> wrote: >> >> >>>>> >> >> >>>>> Hi Robert, >> >> >>>>> >> >> >>>>> There are a couple of different obstacles here. >> >> >>>>> >> >> >>>>> Firstly, it is important that the dependent theories have been >> >> >>>>> imported before the theory. To show all the dependent theories, >> >> >>>>> use >> >> >>>>> the following command: >> >> >>>>> >> >> >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >> >> >>>>> base-1.200 >> >> >>>>> natural-divides-1.62 >> >> >>>>> stream-1.46 >> >> >>>>> >> >> >>>>> Now this sequence will succeed: >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >> >> >>>>> import_article "natural-divides.art";; >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/stream/stream.int";; >> >> >>>>> import_article "stream.art";; >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/natural-prime/natural-prime.int";; >> >> >>>>> import_article "natural-prime.art";; >> >> >>>>> >> >> >>>>> The second obstacle is that the theory word10 includes the theory >> >> >>>>> word, which in turn includes the theory modular. So to >> >> >>>>> successfully >> >> >>>>> import word10 you need to extend the interpretation with the >> >> >>>>> interpretations for these theories, too: >> >> >>>>> >> >> >>>>> $ opentheory list --dependency-order 'Requires+ word10' >> >> >>>>> base-1.200 >> >> >>>>> stream-1.46 >> >> >>>>> probability-1.49 >> >> >>>>> natural-bits-1.66 >> >> >>>>> natural-divides-1.62 >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/stream/stream.int";; >> >> >>>>> import_article "stream.art";; >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/probability/probability.int";; >> >> >>>>> import_article "probability.art";; >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/natural-bits/natural-bits.int";; >> >> >>>>> import_article "natural-bits.art";; >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >> >> >>>>> import_article "natural-divides.art";; >> >> >>>>> >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/modular/modular.int";; >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/word/word.int";; >> >> >>>>> extend_the_interpretation >> >> >>>>> "opentheory/theories/word10/word10.int";; >> >> >>>>> import_article "word10.art";; >> >> >>>>> >> >> >>>>> I regard this second problem as a defect in the theories, because >> >> >>>>> it's >> >> >>>>> unreasonable to expect people to discover this information. I'll >> >> >>>>> work >> >> >>>>> on fixing it so these multiple extend_the_interpretation commands >> >> >>>>> are >> >> >>>>> unnecessary. >> >> >>>>> >> >> >>>>> Cheers, >> >> >>>>> >> >> >>>>> Joe >> >> >>>>> >> >> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >> >> >>>>> wrote: >> >> >>>>> > Dear Joe, >> >> >>>>> > >> >> >>>>> > I have problem importing article files. For example: >> >> >>>>> > >> >> >>>>> > Failure >> >> >>>>> > >> >> >>>>> > "in article word10.art at line 7495: defineConst\nstack = >> >> >>>>> > [Term; >> >> >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >> >> >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >> >> >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; >> >> >>>>> > Const]\nunknown >> >> >>>>> > constant \"Number.Modular.equivalent\"". >> >> >>>>> > >> >> >>>>> > I also have problems with the following packages: >> >> >>>>> > >> >> >>>>> > natural-prime >> >> >>>>> > >> >> >>>>> > gfp >> >> >>>>> > >> >> >>>>> > natural-fibonacci >> >> >>>>> > >> >> >>>>> > Could you please check if that is because opentheory packages >> >> >>>>> > got >> >> >>>>> > updated >> >> >>>>> > but the int files haven't? >> >> >>>>> > >> >> >>>>> > Thanks a lot. >> >> >>>>> > >> >> >>>>> > >> >> >>>>> > -- >> >> >>>>> > >> >> >>>>> > Regards, >> >> >>>>> > Robert >> >> >>>>> > >> >> >>>>> > New homepage at Github: https://airobert.github.io/ >> >> >>>>> > New email address at ILLC: shuai.wang at student.uva.nl >> >> >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: >> >> >>>>> > 0652691901 >> >> >>>>> > >> >> >>>>> > >> >> >>>>> > _______________________________________________ >> >> >>>>> > 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 >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> -- >> >> >>>> >> >> >>>> Regards, >> >> >>>> Robert >> >> >>>> >> >> >>>> New homepage at Github: https://airobert.github.io/ >> >> >>>> New email address at ILLC: shuai.wang at student.uva.nl >> >> >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> >>>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> -- >> >> >>> >> >> >>> Regards, >> >> >>> Robert >> >> >>> >> >> >>> New homepage at Github: https://airobert.github.io/ >> >> >>> New email address at ILLC: shuai.wang at student.uva.nl >> >> >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> >>> >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> >> >> Regards, >> >> >> Robert >> >> >> >> >> >> New homepage at Github: https://airobert.github.io/ >> >> >> New email address at ILLC: shuai.wang at student.uva.nl >> >> >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> >> >> >> > >> >> > >> >> > >> >> > -- >> >> > >> >> > Regards, >> >> > Robert >> >> > >> >> > New homepage at Github: https://airobert.github.io/ >> >> > New email address at ILLC: shuai.wang at student.uva.nl >> >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> > >> >> > >> >> > _______________________________________________ >> >> > 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 >> > >> > >> > >> > >> > -- >> > >> > Regards, >> > Robert >> > >> > New homepage at Github: https://airobert.github.io/ >> > New email address at ILLC: shuai.wang at student.uva.nl >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > >> > >> > _______________________________________________ >> > 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 > > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From joe at gilith.com Fri Oct 9 07:43:14 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Fri, 9 Oct 2015 00:43:14 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, I've worked a little more on the HOL Light import, so now all you need to do is the following: # logfile "test-import";; val it : unit = () # import_theory "word10";; auto-importing theory stream auto-importing theory probability auto-importing theory natural-bits auto-importing theory natural-divides importing theory word10 val it : thm list * thm list = ... # imported_theories ();; val it : string list = ["base"; "stream"; "probability"; "natural-bits"; "natural-divides"; "word10"] Under the covers it calls the opentheory tool to recursively import all the required theories, extends the interpretation for the new theory, converts the theory into an article with cleared local symbol names, and finally reads the article into HOL Light. Hopefully this should make things a little easier. Cheers, Joe On Thu, Oct 8, 2015 at 1:05 AM, Joe Leslie-Hurd wrote: > Hi Robert, > > I've just released a new version of the opentheory tool with a new > option that should solve the name clashing problem when importing into > HOL Light. Here's how you use it: > > opentheory info --clear-local-names --article -o parser.art parser > > This replaces the names of all symbols that are local to the theory > with the special empty name (which prints as _). You can see this with > the following command: > > $ opentheory info --symbols parser.art > 7 external type operators: -> bool Data.List.list Data.Option.option > Data.Pair.* Data.Sum.+ Number.Natural.natural > 46 external constants: = select ! /\ ==> ? ?! \/ ~ cond F T Data.List.:: > Data.List.@ Data.List.[] Data.List.concat Data.List.length Data.List.map > Data.Option.case.none.some Data.Option.map Data.Option.none > Data.Option.some Data.Pair., Data.Pair.fst Data.Pair.snd > Data.Sum.case.left.right Data.Sum.left Data.Sum.right Function.const > Function.o Function.surjective Number.Natural.* Number.Natural.+ > Number.Natural.- Number.Natural.< Number.Natural.<= Number.Natural.^ > Number.Natural.bit0 Number.Natural.bit1 Number.Natural.even > Number.Natural.suc Number.Natural.zero Relation.irreflexive > Relation.measure Relation.subrelation Relation.wellFounded > 3 defined type operators: _ Parser.parser Parser.Stream.stream > 59 defined constants: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > Parser.any Parser.apply Parser.dest Parser.filter Parser.fold > Parser.fold.prs Parser.foldN Parser.invariant Parser.inverse Parser.map > Parser.mapPartial Parser.mapPartial.prs Parser.mk Parser.none > Parser.orelse Parser.orelse.prs Parser.pair Parser.parse Parser.sequence > Parser.sequence.prs Parser.some Parser.strongInverse Parser.token > Parser.token.prs Parser.Stream.append Parser.Stream.case.error.eof.cons > Parser.Stream.cons Parser.Stream.eof Parser.Stream.error > Parser.Stream.fromList Parser.Stream.isProperSuffix > Parser.Stream.isSuffix Parser.Stream.length Parser.Stream.map > Parser.Stream.toList > > Here you can see there is one occurrence of a local type operator and > many occurrences of local constants. Local symbols are defined and > used internally in the theory but do not appear in any exported > theorem (or assumption). > > It was local symbols that were causing name clashes when importing > theories into HOL Light. I have updated the import mechanism so that > fresh symbol names are generated when an empty name is encountered. > You will need to execute a git pull of the OpenTheory HOL Light fork > to get this update. > > The parser theory now imports without issue, and word10 theory imports > without needing the extra extend_the_interpretation commands > beforehand. > > Please give the new HOL Light import flow a try and let me know of any > problems. It was a bit trickier than expected getting it all to work, > so it wouldn't surprise me if there were issues. > > Cheers, > > Joe > > On Tue, Oct 6, 2015 at 2:22 PM, Robert White > wrote: >> Dear Joe, >> >> Okay, please let me know when it's ready. >> >> Thanks >> Robert >> >> On 6 October 2015 at 23:09, Joe Leslie-Hurd wrote: >>> >>> No, but you should shortly be able to download a new version of the >>> opentheory tool that will fix it. >>> >>> Cheers, >>> >>> Joe >>> >>> On Tue, Oct 6, 2015 at 2:08 PM, Robert White >>> wrote: >>> >> This is a case of a theory-local definition clashing with an existing >>> > definition of the same name. It will be solved by the same change that >>> > I'm working on that will make the extra extend_the_interpretation >>> > commands unnecessary. >>> > >>> > So looks like i can't do anything for now on it? >>> > >>> > >>> > >>> > On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: >>> >> >>> >> Hi Robert, >>> >> >>> >> This is a case of a theory-local definition clashing with an existing >>> >> definition of the same name. It will be solved by the same change that >>> >> I'm working on that will make the extra extend_the_interpretation >>> >> commands unnecessary. >>> >> >>> >> Cheers, >>> >> >>> >> Joe >>> >> >>> >> On Tue, Oct 6, 2015 at 4:00 AM, Robert White >>> >> wrote: >>> >> > Dear Joe, >>> >> > >>> >> > I also noticed that parser is has the following errors: >>> >> > >>> >> > Exception: >>> >> > >>> >> > Failure >>> >> > >>> >> > "in article parser.art at line 457: defineConst\nstack = [Term; >>> >> > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; >>> >> > Term; >>> >> > Var; >>> >> > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; >>> >> > \"HOLLight.INJP\"; >>> >> > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; >>> >> > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; >>> >> > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; >>> >> > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; >>> >> > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; >>> >> > Term]\nnew_constant: constant NUMSUM has already been declared". >>> >> > >>> >> > >>> >> > I looked into it and found that NUMSUM has been declared in >>> >> > int_type.ml >>> >> > which is loaded in hol.ml. >>> >> > >>> >> > Could you please update this package? >>> >> > >>> >> > Thanks! >>> >> > >>> >> > Robert >>> >> > >>> >> > >>> >> > On 6 October 2015 at 12:31, Robert White >>> >> > >>> >> > wrote: >>> >> >> >>> >> >> Dear Joe, >>> >> >> >>> >> >> I also have problem loading lazy-list and gfp: >>> >> >> >>> >> >> For lazy-list : >>> >> >> >>> >> >> Exception: >>> >> >> >>> >> >> Failure >>> >> >> >>> >> >> "in article lazy-list.art at line 234: const\nstack = >>> >> >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; >>> >> >> Term; >>> >> >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; >>> >> >> \"llist.llist.rep\"; >>> >> >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; >>> >> >> Var; >>> >> >> Thm; >>> >> >> Thm]\nunknown constant \"Data.Option.NONE\"". >>> >> >> >>> >> >> >>> >> >> For gfp; >>> >> >> >>> >> >> >>> >> >> Exception: >>> >> >> >>> >> >> Failure >>> >> >> >>> >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; >>> >> >> Thm; >>> >> >> Thm]\nunknown assumption:\n|- prime oddprime". >>> >> >> >>> >> >> >>> >> >> Could you please help on that? Thanks a lot! >>> >> >> >>> >> >> Regards >>> >> >> >>> >> >> Robert >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> On 6 October 2015 at 12:15, Robert White >>> >> >> >>> >> >> wrote: >>> >> >>> >>> >> >>> Dear Joe, >>> >> >>> >>> >> >>> I still get one error from the modular package: >>> >> >>> >>> >> >>> Exception: >>> >> >>> >>> >> >>> Failure >>> >> >>> >>> >> >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; >>> >> >>> Thm; >>> >> >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; >>> >> >>> Thm; >>> >> >>> Var; >>> >> >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >>> >> >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >>> >> >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; >>> >> >>> Thm]\nunknown >>> >> >>> assumption:\n|- ~(modulus = 0)". >>> >> >>> >>> >> >>> Is there any package missing? >>> >> >>> >>> >> >>> I have loaded the following packages: >>> >> >>> >>> >> >>> stream >>> >> >>> >>> >> >>> probability >>> >> >>> >>> >> >>> natural-bits >>> >> >>> >>> >> >>> natural-divides >>> >> >>> >>> >> >>> natural-prime >>> >> >>> >>> >> >>> >>> >> >>> Thanks very much! >>> >> >>> >>> >> >>> >>> >> >>> Regards, >>> >> >>> >>> >> >>> Robert >>> >> >>> >>> >> >>> >>> >> >>> On 5 October 2015 at 23:27, Robert White >>> >> >>> >>> >> >>> wrote: >>> >> >>>> >>> >> >>>> Thanks very much Joe. >>> >> >>>> I also noticed that there is kind of dependency going on but I >>> >> >>>> don't >>> >> >>>> know how to fix it. >>> >> >>>> >>> >> >>>> >>> >> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd >>> >> >>>> wrote: >>> >> >>>>> >>> >> >>>>> Hi Robert, >>> >> >>>>> >>> >> >>>>> There are a couple of different obstacles here. >>> >> >>>>> >>> >> >>>>> Firstly, it is important that the dependent theories have been >>> >> >>>>> imported before the theory. To show all the dependent theories, >>> >> >>>>> use >>> >> >>>>> the following command: >>> >> >>>>> >>> >> >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>> >> >>>>> base-1.200 >>> >> >>>>> natural-divides-1.62 >>> >> >>>>> stream-1.46 >>> >> >>>>> >>> >> >>>>> Now this sequence will succeed: >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >>> >> >>>>> import_article "natural-divides.art";; >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/stream/stream.int";; >>> >> >>>>> import_article "stream.art";; >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/natural-prime/natural-prime.int";; >>> >> >>>>> import_article "natural-prime.art";; >>> >> >>>>> >>> >> >>>>> The second obstacle is that the theory word10 includes the theory >>> >> >>>>> word, which in turn includes the theory modular. So to >>> >> >>>>> successfully >>> >> >>>>> import word10 you need to extend the interpretation with the >>> >> >>>>> interpretations for these theories, too: >>> >> >>>>> >>> >> >>>>> $ opentheory list --dependency-order 'Requires+ word10' >>> >> >>>>> base-1.200 >>> >> >>>>> stream-1.46 >>> >> >>>>> probability-1.49 >>> >> >>>>> natural-bits-1.66 >>> >> >>>>> natural-divides-1.62 >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/stream/stream.int";; >>> >> >>>>> import_article "stream.art";; >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/probability/probability.int";; >>> >> >>>>> import_article "probability.art";; >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/natural-bits/natural-bits.int";; >>> >> >>>>> import_article "natural-bits.art";; >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >>> >> >>>>> import_article "natural-divides.art";; >>> >> >>>>> >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/modular/modular.int";; >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/word/word.int";; >>> >> >>>>> extend_the_interpretation >>> >> >>>>> "opentheory/theories/word10/word10.int";; >>> >> >>>>> import_article "word10.art";; >>> >> >>>>> >>> >> >>>>> I regard this second problem as a defect in the theories, because >>> >> >>>>> it's >>> >> >>>>> unreasonable to expect people to discover this information. I'll >>> >> >>>>> work >>> >> >>>>> on fixing it so these multiple extend_the_interpretation commands >>> >> >>>>> are >>> >> >>>>> unnecessary. >>> >> >>>>> >>> >> >>>>> Cheers, >>> >> >>>>> >>> >> >>>>> Joe >>> >> >>>>> >>> >> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>> >> >>>>> wrote: >>> >> >>>>> > Dear Joe, >>> >> >>>>> > >>> >> >>>>> > I have problem importing article files. For example: >>> >> >>>>> > >>> >> >>>>> > Failure >>> >> >>>>> > >>> >> >>>>> > "in article word10.art at line 7495: defineConst\nstack = >>> >> >>>>> > [Term; >>> >> >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>> >> >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>> >> >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; >>> >> >>>>> > Const]\nunknown >>> >> >>>>> > constant \"Number.Modular.equivalent\"". >>> >> >>>>> > >>> >> >>>>> > I also have problems with the following packages: >>> >> >>>>> > >>> >> >>>>> > natural-prime >>> >> >>>>> > >>> >> >>>>> > gfp >>> >> >>>>> > >>> >> >>>>> > natural-fibonacci >>> >> >>>>> > >>> >> >>>>> > Could you please check if that is because opentheory packages >>> >> >>>>> > got >>> >> >>>>> > updated >>> >> >>>>> > but the int files haven't? >>> >> >>>>> > >>> >> >>>>> > Thanks a lot. >>> >> >>>>> > >>> >> >>>>> > >>> >> >>>>> > -- >>> >> >>>>> > >>> >> >>>>> > Regards, >>> >> >>>>> > Robert >>> >> >>>>> > >>> >> >>>>> > New homepage at Github: https://airobert.github.io/ >>> >> >>>>> > New email address at ILLC: shuai.wang at student.uva.nl >>> >> >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: >>> >> >>>>> > 0652691901 >>> >> >>>>> > >>> >> >>>>> > >>> >> >>>>> > _______________________________________________ >>> >> >>>>> > 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 >>> >> >>>> >>> >> >>>> >>> >> >>>> >>> >> >>>> >>> >> >>>> -- >>> >> >>>> >>> >> >>>> Regards, >>> >> >>>> Robert >>> >> >>>> >>> >> >>>> New homepage at Github: https://airobert.github.io/ >>> >> >>>> New email address at ILLC: shuai.wang at student.uva.nl >>> >> >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >> >>>> >>> >> >>> >>> >> >>> >>> >> >>> >>> >> >>> -- >>> >> >>> >>> >> >>> Regards, >>> >> >>> Robert >>> >> >>> >>> >> >>> New homepage at Github: https://airobert.github.io/ >>> >> >>> New email address at ILLC: shuai.wang at student.uva.nl >>> >> >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >> >>> >>> >> >> >>> >> >> >>> >> >> >>> >> >> -- >>> >> >> >>> >> >> Regards, >>> >> >> Robert >>> >> >> >>> >> >> New homepage at Github: https://airobert.github.io/ >>> >> >> New email address at ILLC: shuai.wang at student.uva.nl >>> >> >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >> >> >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > >>> >> > Regards, >>> >> > Robert >>> >> > >>> >> > New homepage at Github: https://airobert.github.io/ >>> >> > New email address at ILLC: shuai.wang at student.uva.nl >>> >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >> > >>> >> > >>> >> > _______________________________________________ >>> >> > 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 >>> > >>> > >>> > >>> > >>> > -- >>> > >>> > Regards, >>> > Robert >>> > >>> > New homepage at Github: https://airobert.github.io/ >>> > New email address at ILLC: shuai.wang at student.uva.nl >>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> > >>> > >>> > _______________________________________________ >>> > 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 >> >> >> >> >> -- >> >> Regards, >> Robert >> >> New homepage at Github: https://airobert.github.io/ >> New email address at ILLC: shuai.wang at student.uva.nl >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> >> >> _______________________________________________ >> opentheory-users mailing list >> opentheory-users at gilith.com >> http://www.gilith.com/mailman/listinfo/opentheory-users >> From joe at gilith.com Tue Oct 27 03:04:16 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Mon, 26 Oct 2015 20:04:16 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, I have worked a little more on the HOL Light/OpenTheory interface, and now include the HOL Light names of theorems in the theory packages, in addition to the HOL Light names of type operators and constants. For example, the following command results in the theorems in the modular theory having Ocaml names just like they'd been proved in an interactive session: # import_theory "modular";; auto-imported theory stream : {128} |> {55} auto-imported theory probability : {39} |> {18} auto-imported theory natural-bits : {205} |> {210} auto-imported theory natural-divides : {177} |> {136} imported sub-theory modular-witness : {8} |> {1} imported theory modular : {75} |> {68} val it : Theory.t = modular : {75} |> {68} # modular_exp_add;; val it : thm = |- !x m n. modular_mult (modular_exp x m) (modular_exp x n) = modular_exp x (m + n) I have also added an interpret_theory command to "interpret" a theory in another context. For example, the following command interprets the modular theory inside the word theory, renaming the type operators and constants according to the word-def-modular.int file, and renaming the theorems by replacing the "modular" with "word" and "modulus" with "word_size". # interpret_theory {Import.source_theory = "modular"; Import.interpretation = "opentheory/theories/word/word-def-modular.int"; Import.theorem_renamer = Import.replace "modular" "word" o Import.replace "modulus" "word_size"; Import.destination_theory = "word-def"};; val it : Theory.t = modular : {75} |> {68} # word_exp_add;; val it : thm = |- !x m n. word_mult (word_exp x m) (word_exp x n) = word_exp x (m + n) Hopefully this will make it easier to import OpenTheory theories into HOL Light. Cheers, Joe On Fri, Oct 9, 2015 at 12:43 AM, Joe Leslie-Hurd wrote: > Hi Robert, > > I've worked a little more on the HOL Light import, so now all you need > to do is the following: > > # logfile "test-import";; > val it : unit = () > # import_theory "word10";; > auto-importing theory stream > auto-importing theory probability > auto-importing theory natural-bits > auto-importing theory natural-divides > importing theory word10 > val it : thm list * thm list = ... > # imported_theories ();; > val it : string list = > ["base"; "stream"; "probability"; "natural-bits"; "natural-divides"; > "word10"] > > Under the covers it calls the opentheory tool to recursively import > all the required theories, extends the interpretation for the new > theory, converts the theory into an article with cleared local symbol > names, and finally reads the article into HOL Light. > > Hopefully this should make things a little easier. > > Cheers, > > Joe > > On Thu, Oct 8, 2015 at 1:05 AM, Joe Leslie-Hurd wrote: >> Hi Robert, >> >> I've just released a new version of the opentheory tool with a new >> option that should solve the name clashing problem when importing into >> HOL Light. Here's how you use it: >> >> opentheory info --clear-local-names --article -o parser.art parser >> >> This replaces the names of all symbols that are local to the theory >> with the special empty name (which prints as _). You can see this with >> the following command: >> >> $ opentheory info --symbols parser.art >> 7 external type operators: -> bool Data.List.list Data.Option.option >> Data.Pair.* Data.Sum.+ Number.Natural.natural >> 46 external constants: = select ! /\ ==> ? ?! \/ ~ cond F T Data.List.:: >> Data.List.@ Data.List.[] Data.List.concat Data.List.length Data.List.map >> Data.Option.case.none.some Data.Option.map Data.Option.none >> Data.Option.some Data.Pair., Data.Pair.fst Data.Pair.snd >> Data.Sum.case.left.right Data.Sum.left Data.Sum.right Function.const >> Function.o Function.surjective Number.Natural.* Number.Natural.+ >> Number.Natural.- Number.Natural.< Number.Natural.<= Number.Natural.^ >> Number.Natural.bit0 Number.Natural.bit1 Number.Natural.even >> Number.Natural.suc Number.Natural.zero Relation.irreflexive >> Relation.measure Relation.subrelation Relation.wellFounded >> 3 defined type operators: _ Parser.parser Parser.Stream.stream >> 59 defined constants: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >> Parser.any Parser.apply Parser.dest Parser.filter Parser.fold >> Parser.fold.prs Parser.foldN Parser.invariant Parser.inverse Parser.map >> Parser.mapPartial Parser.mapPartial.prs Parser.mk Parser.none >> Parser.orelse Parser.orelse.prs Parser.pair Parser.parse Parser.sequence >> Parser.sequence.prs Parser.some Parser.strongInverse Parser.token >> Parser.token.prs Parser.Stream.append Parser.Stream.case.error.eof.cons >> Parser.Stream.cons Parser.Stream.eof Parser.Stream.error >> Parser.Stream.fromList Parser.Stream.isProperSuffix >> Parser.Stream.isSuffix Parser.Stream.length Parser.Stream.map >> Parser.Stream.toList >> >> Here you can see there is one occurrence of a local type operator and >> many occurrences of local constants. Local symbols are defined and >> used internally in the theory but do not appear in any exported >> theorem (or assumption). >> >> It was local symbols that were causing name clashes when importing >> theories into HOL Light. I have updated the import mechanism so that >> fresh symbol names are generated when an empty name is encountered. >> You will need to execute a git pull of the OpenTheory HOL Light fork >> to get this update. >> >> The parser theory now imports without issue, and word10 theory imports >> without needing the extra extend_the_interpretation commands >> beforehand. >> >> Please give the new HOL Light import flow a try and let me know of any >> problems. It was a bit trickier than expected getting it all to work, >> so it wouldn't surprise me if there were issues. >> >> Cheers, >> >> Joe >> >> On Tue, Oct 6, 2015 at 2:22 PM, Robert White >> wrote: >>> Dear Joe, >>> >>> Okay, please let me know when it's ready. >>> >>> Thanks >>> Robert >>> >>> On 6 October 2015 at 23:09, Joe Leslie-Hurd wrote: >>>> >>>> No, but you should shortly be able to download a new version of the >>>> opentheory tool that will fix it. >>>> >>>> Cheers, >>>> >>>> Joe >>>> >>>> On Tue, Oct 6, 2015 at 2:08 PM, Robert White >>>> wrote: >>>> >> This is a case of a theory-local definition clashing with an existing >>>> > definition of the same name. It will be solved by the same change that >>>> > I'm working on that will make the extra extend_the_interpretation >>>> > commands unnecessary. >>>> > >>>> > So looks like i can't do anything for now on it? >>>> > >>>> > >>>> > >>>> > On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: >>>> >> >>>> >> Hi Robert, >>>> >> >>>> >> This is a case of a theory-local definition clashing with an existing >>>> >> definition of the same name. It will be solved by the same change that >>>> >> I'm working on that will make the extra extend_the_interpretation >>>> >> commands unnecessary. >>>> >> >>>> >> Cheers, >>>> >> >>>> >> Joe >>>> >> >>>> >> On Tue, Oct 6, 2015 at 4:00 AM, Robert White >>>> >> wrote: >>>> >> > Dear Joe, >>>> >> > >>>> >> > I also noticed that parser is has the following errors: >>>> >> > >>>> >> > Exception: >>>> >> > >>>> >> > Failure >>>> >> > >>>> >> > "in article parser.art at line 457: defineConst\nstack = [Term; >>>> >> > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; >>>> >> > Term; >>>> >> > Var; >>>> >> > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; >>>> >> > \"HOLLight.INJP\"; >>>> >> > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; Var; >>>> >> > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; >>>> >> > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; [\"A\"]; >>>> >> > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; >>>> >> > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; >>>> >> > Term]\nnew_constant: constant NUMSUM has already been declared". >>>> >> > >>>> >> > >>>> >> > I looked into it and found that NUMSUM has been declared in >>>> >> > int_type.ml >>>> >> > which is loaded in hol.ml. >>>> >> > >>>> >> > Could you please update this package? >>>> >> > >>>> >> > Thanks! >>>> >> > >>>> >> > Robert >>>> >> > >>>> >> > >>>> >> > On 6 October 2015 at 12:31, Robert White >>>> >> > >>>> >> > wrote: >>>> >> >> >>>> >> >> Dear Joe, >>>> >> >> >>>> >> >> I also have problem loading lazy-list and gfp: >>>> >> >> >>>> >> >> For lazy-list : >>>> >> >> >>>> >> >> Exception: >>>> >> >> >>>> >> >> Failure >>>> >> >> >>>> >> >> "in article lazy-list.art at line 234: const\nstack = >>>> >> >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; Var; >>>> >> >> Term; >>>> >> >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; >>>> >> >> \"llist.llist.rep\"; >>>> >> >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; >>>> >> >> Var; >>>> >> >> Thm; >>>> >> >> Thm]\nunknown constant \"Data.Option.NONE\"". >>>> >> >> >>>> >> >> >>>> >> >> For gfp; >>>> >> >> >>>> >> >> >>>> >> >> Exception: >>>> >> >> >>>> >> >> Failure >>>> >> >> >>>> >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; >>>> >> >> Thm; >>>> >> >> Thm]\nunknown assumption:\n|- prime oddprime". >>>> >> >> >>>> >> >> >>>> >> >> Could you please help on that? Thanks a lot! >>>> >> >> >>>> >> >> Regards >>>> >> >> >>>> >> >> Robert >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> On 6 October 2015 at 12:15, Robert White >>>> >> >> >>>> >> >> wrote: >>>> >> >>> >>>> >> >>> Dear Joe, >>>> >> >>> >>>> >> >>> I still get one error from the modular package: >>>> >> >>> >>>> >> >>> Exception: >>>> >> >>> >>>> >> >>> Failure >>>> >> >>> >>>> >> >>> "in article modular.art at line 11928: axiom\nstack = [Term; []; >>>> >> >>> Thm; >>>> >> >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; Thm; >>>> >> >>> Thm; >>>> >> >>> Var; >>>> >> >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; >>>> >> >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; >>>> >> >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; >>>> >> >>> Thm]\nunknown >>>> >> >>> assumption:\n|- ~(modulus = 0)". >>>> >> >>> >>>> >> >>> Is there any package missing? >>>> >> >>> >>>> >> >>> I have loaded the following packages: >>>> >> >>> >>>> >> >>> stream >>>> >> >>> >>>> >> >>> probability >>>> >> >>> >>>> >> >>> natural-bits >>>> >> >>> >>>> >> >>> natural-divides >>>> >> >>> >>>> >> >>> natural-prime >>>> >> >>> >>>> >> >>> >>>> >> >>> Thanks very much! >>>> >> >>> >>>> >> >>> >>>> >> >>> Regards, >>>> >> >>> >>>> >> >>> Robert >>>> >> >>> >>>> >> >>> >>>> >> >>> On 5 October 2015 at 23:27, Robert White >>>> >> >>> >>>> >> >>> wrote: >>>> >> >>>> >>>> >> >>>> Thanks very much Joe. >>>> >> >>>> I also noticed that there is kind of dependency going on but I >>>> >> >>>> don't >>>> >> >>>> know how to fix it. >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd >>>> >> >>>> wrote: >>>> >> >>>>> >>>> >> >>>>> Hi Robert, >>>> >> >>>>> >>>> >> >>>>> There are a couple of different obstacles here. >>>> >> >>>>> >>>> >> >>>>> Firstly, it is important that the dependent theories have been >>>> >> >>>>> imported before the theory. To show all the dependent theories, >>>> >> >>>>> use >>>> >> >>>>> the following command: >>>> >> >>>>> >>>> >> >>>>> $ opentheory list --dependency-order 'Requires+ natural-prime' >>>> >> >>>>> base-1.200 >>>> >> >>>>> natural-divides-1.62 >>>> >> >>>>> stream-1.46 >>>> >> >>>>> >>>> >> >>>>> Now this sequence will succeed: >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>> >> >>>>> import_article "natural-divides.art";; >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/stream/stream.int";; >>>> >> >>>>> import_article "stream.art";; >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/natural-prime/natural-prime.int";; >>>> >> >>>>> import_article "natural-prime.art";; >>>> >> >>>>> >>>> >> >>>>> The second obstacle is that the theory word10 includes the theory >>>> >> >>>>> word, which in turn includes the theory modular. So to >>>> >> >>>>> successfully >>>> >> >>>>> import word10 you need to extend the interpretation with the >>>> >> >>>>> interpretations for these theories, too: >>>> >> >>>>> >>>> >> >>>>> $ opentheory list --dependency-order 'Requires+ word10' >>>> >> >>>>> base-1.200 >>>> >> >>>>> stream-1.46 >>>> >> >>>>> probability-1.49 >>>> >> >>>>> natural-bits-1.66 >>>> >> >>>>> natural-divides-1.62 >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/stream/stream.int";; >>>> >> >>>>> import_article "stream.art";; >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/probability/probability.int";; >>>> >> >>>>> import_article "probability.art";; >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/natural-bits/natural-bits.int";; >>>> >> >>>>> import_article "natural-bits.art";; >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int";; >>>> >> >>>>> import_article "natural-divides.art";; >>>> >> >>>>> >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/modular/modular.int";; >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/word/word.int";; >>>> >> >>>>> extend_the_interpretation >>>> >> >>>>> "opentheory/theories/word10/word10.int";; >>>> >> >>>>> import_article "word10.art";; >>>> >> >>>>> >>>> >> >>>>> I regard this second problem as a defect in the theories, because >>>> >> >>>>> it's >>>> >> >>>>> unreasonable to expect people to discover this information. I'll >>>> >> >>>>> work >>>> >> >>>>> on fixing it so these multiple extend_the_interpretation commands >>>> >> >>>>> are >>>> >> >>>>> unnecessary. >>>> >> >>>>> >>>> >> >>>>> Cheers, >>>> >> >>>>> >>>> >> >>>>> Joe >>>> >> >>>>> >>>> >> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White >>>> >> >>>>> wrote: >>>> >> >>>>> > Dear Joe, >>>> >> >>>>> > >>>> >> >>>>> > I have problem importing article files. For example: >>>> >> >>>>> > >>>> >> >>>>> > Failure >>>> >> >>>>> > >>>> >> >>>>> > "in article word10.art at line 7495: defineConst\nstack = >>>> >> >>>>> > [Term; >>>> >> >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; >>>> >> >>>>> > \"HOLLight.modular_to_class\"; \"HOLLight.modular_from_class\"; >>>> >> >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; >>>> >> >>>>> > Const]\nunknown >>>> >> >>>>> > constant \"Number.Modular.equivalent\"". >>>> >> >>>>> > >>>> >> >>>>> > I also have problems with the following packages: >>>> >> >>>>> > >>>> >> >>>>> > natural-prime >>>> >> >>>>> > >>>> >> >>>>> > gfp >>>> >> >>>>> > >>>> >> >>>>> > natural-fibonacci >>>> >> >>>>> > >>>> >> >>>>> > Could you please check if that is because opentheory packages >>>> >> >>>>> > got >>>> >> >>>>> > updated >>>> >> >>>>> > but the int files haven't? >>>> >> >>>>> > >>>> >> >>>>> > Thanks a lot. >>>> >> >>>>> > >>>> >> >>>>> > >>>> >> >>>>> > -- >>>> >> >>>>> > >>>> >> >>>>> > Regards, >>>> >> >>>>> > Robert >>>> >> >>>>> > >>>> >> >>>>> > New homepage at Github: https://airobert.github.io/ >>>> >> >>>>> > New email address at ILLC: shuai.wang at student.uva.nl >>>> >> >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: >>>> >> >>>>> > 0652691901 >>>> >> >>>>> > >>>> >> >>>>> > >>>> >> >>>>> > _______________________________________________ >>>> >> >>>>> > 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 >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> -- >>>> >> >>>> >>>> >> >>>> Regards, >>>> >> >>>> Robert >>>> >> >>>> >>>> >> >>>> New homepage at Github: https://airobert.github.io/ >>>> >> >>>> New email address at ILLC: shuai.wang at student.uva.nl >>>> >> >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> >> >>>> >>>> >> >>> >>>> >> >>> >>>> >> >>> >>>> >> >>> -- >>>> >> >>> >>>> >> >>> Regards, >>>> >> >>> Robert >>>> >> >>> >>>> >> >>> New homepage at Github: https://airobert.github.io/ >>>> >> >>> New email address at ILLC: shuai.wang at student.uva.nl >>>> >> >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> >> >>> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> -- >>>> >> >> >>>> >> >> Regards, >>>> >> >> Robert >>>> >> >> >>>> >> >> New homepage at Github: https://airobert.github.io/ >>>> >> >> New email address at ILLC: shuai.wang at student.uva.nl >>>> >> >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> >> >> >>>> >> > >>>> >> > >>>> >> > >>>> >> > -- >>>> >> > >>>> >> > Regards, >>>> >> > Robert >>>> >> > >>>> >> > New homepage at Github: https://airobert.github.io/ >>>> >> > New email address at ILLC: shuai.wang at student.uva.nl >>>> >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> >> > >>>> >> > >>>> >> > _______________________________________________ >>>> >> > 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 >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > >>>> > Regards, >>>> > Robert >>>> > >>>> > New homepage at Github: https://airobert.github.io/ >>>> > New email address at ILLC: shuai.wang at student.uva.nl >>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>> >>> >>> >>> >>> -- >>> >>> Regards, >>> Robert >>> >>> New homepage at Github: https://airobert.github.io/ >>> New email address at ILLC: shuai.wang at student.uva.nl >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >>> >>> >>> _______________________________________________ >>> opentheory-users mailing list >>> opentheory-users at gilith.com >>> http://www.gilith.com/mailman/listinfo/opentheory-users >>> From ramana at member.fsf.org Tue Oct 27 03:57:18 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Tue, 27 Oct 2015 14:57:18 +1100 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Joe, It looks like you are encoding theorem names via some (undocumented) scheme that wraps the theorem as: |- (\name_of_thm. name_of_thm) conclusion_of_thm Is this going to become a standard format in which to encode theorem names, that other article readers should expect? (I presume not!) When we last discussed theorem names, ( http://www.gilith.com/opentheory/mailing-list/2014-November/000438.html and the ensuing discussion), the plan was to standardise on theorem metadata. Has there been any progress on this front? Cheers, Ramana -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Tue Oct 27 04:28:04 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Mon, 26 Oct 2015 21:28:04 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Ramana, > It looks like you are encoding theorem names via some (undocumented) scheme > that wraps the theorem as: > > |- (\name_of_thm. name_of_thm) conclusion_of_thm > > Is this going to become a standard format in which to encode theorem names, > that other article readers should expect? (I presume not!) It didn't take you long to reverse engineer my little hack to annotate theorems with names! Have no fear, my intention is that this scheme is private to the HOL Light/OpenTheory interface, which is why the scheme is undocumented, and the corresponding metadata files in the theory package suggest that they are to be used by HOL Light only: hol-light.int -- Mapping the OpenTheory namespace to HOL Light names hol-light.art -- Mapping the set of theorems to HOL Light names This fits with the existing scheme whereby some theories can be exported as Haskell packages, and there are haskell* metadata files in the theory package to help perform this export. Naturally other theorem provers are welcome to use the HOL Light files in their own interface, or alternatively could contribute metadata files of their own to the theory package. > When we last discussed theorem names, > (http://www.gilith.com/opentheory/mailing-list/2014-November/000438.html > and the ensuing discussion), the plan was to standardise on theorem > metadata. Has there been any progress on this front? Thank you for exhuming the theorem metadata proposal from the archive. Even a year later I still like the idea of changing the type of exported theorems from thm set to (thm, metadata) finite_map using a scheme for merging meta-data such as the one I sketched out. However, perhaps it is better to see how the current scheme with extra metadata files evolves before committing to a standard metadata scheme? Cheers, Joe From ramana at member.fsf.org Wed Oct 28 00:03:22 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Wed, 28 Oct 2015 11:03:22 +1100 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: I like your original theorem metadata proposal better. But I suppose one could follow your approach with an extra article that adds names, if one needs names right now. It may be right to wait for more field testing, that's up to you. Certainly if I actually end up hacking up custom encoding/decoding schemes for metadata, I'll keep the list informed. On 27 October 2015 at 15:28, Joe Leslie-Hurd wrote: > Hi Ramana, > > > It looks like you are encoding theorem names via some (undocumented) > scheme > > that wraps the theorem as: > > > > |- (\name_of_thm. name_of_thm) conclusion_of_thm > > > > Is this going to become a standard format in which to encode theorem > names, > > that other article readers should expect? (I presume not!) > > It didn't take you long to reverse engineer my little hack to annotate > theorems with names! Have no fear, my intention is that this scheme is > private to the HOL Light/OpenTheory interface, which is why the scheme > is undocumented, and the corresponding metadata files in the theory > package suggest that they are to be used by HOL Light only: > > hol-light.int -- Mapping the OpenTheory namespace to HOL Light names > hol-light.art -- Mapping the set of theorems to HOL Light names > > This fits with the existing scheme whereby some theories can be > exported as Haskell packages, and there are haskell* metadata files in > the theory package to help perform this export. Naturally other > theorem provers are welcome to use the HOL Light files in their own > interface, or alternatively could contribute metadata files of their > own to the theory package. > > > When we last discussed theorem names, > > ( > http://www.gilith.com/opentheory/mailing-list/2014-November/000438.html > > and the ensuing discussion), the plan was to standardise on theorem > > metadata. Has there been any progress on this front? > > Thank you for exhuming the theorem metadata proposal from the archive. > Even a year later I still like the idea of changing the type of > exported theorems from > > thm set > > to > > (thm, metadata) finite_map > > using a scheme for merging meta-data such as the one I sketched out. > However, perhaps it is better to see how the current scheme with extra > metadata files evolves before committing to a standard metadata > scheme? > > Cheers, > > Joe > > _______________________________________________ > 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 ai.robert.wangshuai at gmail.com Tue Oct 27 21:53:29 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 27 Oct 2015 22:53:29 +0100 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Dear Joe, Looks like you have done a lot. Thanks! 1) Here is the first problem: I can't import modular theory # import_theory "modular";; opentheory: unknown switch "--directory" usage: opentheory info [info options] INPUT Extract information from packages and files. Displaying info options: --format FORMAT ...... format package information --information ........ display all package information --theory ............. display the package theory --article ............ output the package theory in article format --requires ........... list satisfying required packages --inference .......... display count of inference rules --files .............. list package files --document ........... output package document in HTML format --theory-source ...... output package theory source --theorems ........... output package theorems in article format --assumptions ........ output package assumptions in article format --symbols ............ list all symbols in the package --includes ........... list included packages -o, --output FILE .... write previous information to FILE --output-version N ... set previous information output version --show-assumptions ... do not hide satisfied assumptions --show-derivations ... show assumptions and axioms for each theorem --upgrade-theory ..... upgrade theory source to latest versions --preserve-theory .... do not optimize theory source -- ................... no more options -?, -h, --help ....... display option information and exit -v, --version ........ display version information INPUT is one of the following: - A package: NAME-VERSION or NAME (for the latest version) - A theory source file: FILE.thy or theory:FILE - A proof article file: FILE.art or article:FILE - A package tarball: FILE.tgz or tarball:FILE - A package staged for installation: staged:NAME-VERSION NAME is a package name (e.g., base). VERSION is a package version (e.g., 1.0). FILE is a filename; use - to read from stdin or write to stdout. FORMAT is a string containing {NAME,VERSION,DESCRIPTION,CHECKSUM,EMPTY}. Exception: Failure "theory_directory: strange output for theory stream". 2) I also noticed that you removed start_logging();; Then how should I export the proofs. Could you please give me an example or maybe update the hacking doc ? Thanks! Robert On 27 October 2015 at 04:04, Joe Leslie-Hurd wrote: > Hi Robert, > > I have worked a little more on the HOL Light/OpenTheory interface, and > now include the HOL Light names of theorems in the theory packages, in > addition to the HOL Light names of type operators and constants. For > example, the following command results in the theorems in the modular > theory having Ocaml names just like they'd been proved in an > interactive session: > > # import_theory "modular";; > auto-imported theory stream : {128} |> {55} > auto-imported theory probability : {39} |> {18} > auto-imported theory natural-bits : {205} |> {210} > auto-imported theory natural-divides : {177} |> {136} > imported sub-theory modular-witness : {8} |> {1} > imported theory modular : {75} |> {68} > val it : Theory.t = modular : {75} |> {68} > # modular_exp_add;; > val it : thm = > |- !x m n. > modular_mult (modular_exp x m) (modular_exp x n) = > modular_exp x (m + n) > > I have also added an interpret_theory command to "interpret" a theory > in another context. For example, the following command interprets the > modular theory inside the word theory, renaming the type operators and > constants according to the word-def-modular.int file, and renaming the > theorems by replacing the "modular" with "word" and "modulus" with > "word_size". > > # interpret_theory > {Import.source_theory = "modular"; > Import.interpretation = "opentheory/theories/word/ > word-def-modular.int"; > Import.theorem_renamer = Import.replace "modular" "word" o > Import.replace "modulus" "word_size"; > Import.destination_theory = "word-def"};; > val it : Theory.t = modular : {75} |> {68} > # word_exp_add;; > val it : thm = > |- !x m n. word_mult (word_exp x m) (word_exp x n) = word_exp x (m + n) > > Hopefully this will make it easier to import OpenTheory theories into HOL > Light. > > Cheers, > > Joe > > On Fri, Oct 9, 2015 at 12:43 AM, Joe Leslie-Hurd wrote: > > Hi Robert, > > > > I've worked a little more on the HOL Light import, so now all you need > > to do is the following: > > > > # logfile "test-import";; > > val it : unit = () > > # import_theory "word10";; > > auto-importing theory stream > > auto-importing theory probability > > auto-importing theory natural-bits > > auto-importing theory natural-divides > > importing theory word10 > > val it : thm list * thm list = ... > > # imported_theories ();; > > val it : string list = > > ["base"; "stream"; "probability"; "natural-bits"; "natural-divides"; > > "word10"] > > > > Under the covers it calls the opentheory tool to recursively import > > all the required theories, extends the interpretation for the new > > theory, converts the theory into an article with cleared local symbol > > names, and finally reads the article into HOL Light. > > > > Hopefully this should make things a little easier. > > > > Cheers, > > > > Joe > > > > On Thu, Oct 8, 2015 at 1:05 AM, Joe Leslie-Hurd wrote: > >> Hi Robert, > >> > >> I've just released a new version of the opentheory tool with a new > >> option that should solve the name clashing problem when importing into > >> HOL Light. Here's how you use it: > >> > >> opentheory info --clear-local-names --article -o parser.art parser > >> > >> This replaces the names of all symbols that are local to the theory > >> with the special empty name (which prints as _). You can see this with > >> the following command: > >> > >> $ opentheory info --symbols parser.art > >> 7 external type operators: -> bool Data.List.list Data.Option.option > >> Data.Pair.* Data.Sum.+ Number.Natural.natural > >> 46 external constants: = select ! /\ ==> ? ?! \/ ~ cond F T Data.List.:: > >> Data.List.@ Data.List.[] Data.List.concat Data.List.length > Data.List.map > >> Data.Option.case.none.some Data.Option.map Data.Option.none > >> Data.Option.some Data.Pair., Data.Pair.fst Data.Pair.snd > >> Data.Sum.case.left.right Data.Sum.left Data.Sum.right Function.const > >> Function.o Function.surjective Number.Natural.* Number.Natural.+ > >> Number.Natural.- Number.Natural.< Number.Natural.<= Number.Natural.^ > >> Number.Natural.bit0 Number.Natural.bit1 Number.Natural.even > >> Number.Natural.suc Number.Natural.zero Relation.irreflexive > >> Relation.measure Relation.subrelation Relation.wellFounded > >> 3 defined type operators: _ Parser.parser Parser.Stream.stream > >> 59 defined constants: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >> Parser.any Parser.apply Parser.dest Parser.filter Parser.fold > >> Parser.fold.prs Parser.foldN Parser.invariant Parser.inverse > Parser.map > >> Parser.mapPartial Parser.mapPartial.prs Parser.mk Parser.none > >> Parser.orelse Parser.orelse.prs Parser.pair Parser.parse > Parser.sequence > >> Parser.sequence.prs Parser.some Parser.strongInverse Parser.token > >> Parser.token.prs Parser.Stream.append > Parser.Stream.case.error.eof.cons > >> Parser.Stream.cons Parser.Stream.eof Parser.Stream.error > >> Parser.Stream.fromList Parser.Stream.isProperSuffix > >> Parser.Stream.isSuffix Parser.Stream.length Parser.Stream.map > >> Parser.Stream.toList > >> > >> Here you can see there is one occurrence of a local type operator and > >> many occurrences of local constants. Local symbols are defined and > >> used internally in the theory but do not appear in any exported > >> theorem (or assumption). > >> > >> It was local symbols that were causing name clashes when importing > >> theories into HOL Light. I have updated the import mechanism so that > >> fresh symbol names are generated when an empty name is encountered. > >> You will need to execute a git pull of the OpenTheory HOL Light fork > >> to get this update. > >> > >> The parser theory now imports without issue, and word10 theory imports > >> without needing the extra extend_the_interpretation commands > >> beforehand. > >> > >> Please give the new HOL Light import flow a try and let me know of any > >> problems. It was a bit trickier than expected getting it all to work, > >> so it wouldn't surprise me if there were issues. > >> > >> Cheers, > >> > >> Joe > >> > >> On Tue, Oct 6, 2015 at 2:22 PM, Robert White > >> wrote: > >>> Dear Joe, > >>> > >>> Okay, please let me know when it's ready. > >>> > >>> Thanks > >>> Robert > >>> > >>> On 6 October 2015 at 23:09, Joe Leslie-Hurd wrote: > >>>> > >>>> No, but you should shortly be able to download a new version of the > >>>> opentheory tool that will fix it. > >>>> > >>>> Cheers, > >>>> > >>>> Joe > >>>> > >>>> On Tue, Oct 6, 2015 at 2:08 PM, Robert White > >>>> wrote: > >>>> >> This is a case of a theory-local definition clashing with an > existing > >>>> > definition of the same name. It will be solved by the same change > that > >>>> > I'm working on that will make the extra extend_the_interpretation > >>>> > commands unnecessary. > >>>> > > >>>> > So looks like i can't do anything for now on it? > >>>> > > >>>> > > >>>> > > >>>> > On 6 October 2015 at 23:04, Joe Leslie-Hurd wrote: > >>>> >> > >>>> >> Hi Robert, > >>>> >> > >>>> >> This is a case of a theory-local definition clashing with an > existing > >>>> >> definition of the same name. It will be solved by the same change > that > >>>> >> I'm working on that will make the extra extend_the_interpretation > >>>> >> commands unnecessary. > >>>> >> > >>>> >> Cheers, > >>>> >> > >>>> >> Joe > >>>> >> > >>>> >> On Tue, Oct 6, 2015 at 4:00 AM, Robert White > >>>> >> wrote: > >>>> >> > Dear Joe, > >>>> >> > > >>>> >> > I also noticed that parser is has the following errors: > >>>> >> > > >>>> >> > Exception: > >>>> >> > > >>>> >> > Failure > >>>> >> > > >>>> >> > "in article parser.art at line 457: defineConst\nstack = [Term; > >>>> >> > \"HOLLight.NUMSUM\"; Term; Term; Term; Var; Term; Var; Term; Var; > >>>> >> > Term; > >>>> >> > Var; > >>>> >> > [[\"HOLLight.NUMLEFT\"; Var]]; Term; Var; Var; Var; Var; > >>>> >> > \"HOLLight.INJP\"; > >>>> >> > \"HOLLight.ZBOT\"; Term; Term; Term; Var; Term; Term; Var; Term; > Var; > >>>> >> > \"HOLLight.ZRECSPACE\"; [\"A\"]; \"HOLLight._dest_rec\"; > >>>> >> > \"HOLLight._mk_rec\"; \"HOLLight.recspace\"; \"a1\"; Var; > [\"A\"]; > >>>> >> > \"HOLLight._dest_pstream\"; \"HOLLight._mk_pstream\"; > >>>> >> > \"Parser.Stream.stream\"; TypeOp; TypeOp; Const; > >>>> >> > Term]\nnew_constant: constant NUMSUM has already been declared". > >>>> >> > > >>>> >> > > >>>> >> > I looked into it and found that NUMSUM has been declared in > >>>> >> > int_type.ml > >>>> >> > which is loaded in hol.ml. > >>>> >> > > >>>> >> > Could you please update this package? > >>>> >> > > >>>> >> > Thanks! > >>>> >> > > >>>> >> > Robert > >>>> >> > > >>>> >> > > >>>> >> > On 6 October 2015 at 12:31, Robert White > >>>> >> > > >>>> >> > wrote: > >>>> >> >> > >>>> >> >> Dear Joe, > >>>> >> >> > >>>> >> >> I also have problem loading lazy-list and gfp: > >>>> >> >> > >>>> >> >> For lazy-list : > >>>> >> >> > >>>> >> >> Exception: > >>>> >> >> > >>>> >> >> Failure > >>>> >> >> > >>>> >> >> "in article lazy-list.art at line 234: const\nstack = > >>>> >> >> [\"Data.Option.NONE\"; Var; Term; Term; Term; Var; Term; Term; > Var; > >>>> >> >> Term; > >>>> >> >> Var; \"llist.lrep_ok\"; Var; Term; Term; [\"A\"]; > >>>> >> >> \"llist.llist.rep\"; > >>>> >> >> \"llist.llist.abs\"; \"llist.llist\"; \"a0\"; \"llist.LFINITE\"; > >>>> >> >> Var; > >>>> >> >> Thm; > >>>> >> >> Thm]\nunknown constant \"Data.Option.NONE\"". > >>>> >> >> > >>>> >> >> > >>>> >> >> For gfp; > >>>> >> >> > >>>> >> >> > >>>> >> >> Exception: > >>>> >> >> > >>>> >> >> Failure > >>>> >> >> > >>>> >> >> "in article gfp.art at line 676: axiom\nstack = [Term; []; Thm; > >>>> >> >> Thm; > >>>> >> >> Thm]\nunknown assumption:\n|- prime oddprime". > >>>> >> >> > >>>> >> >> > >>>> >> >> Could you please help on that? Thanks a lot! > >>>> >> >> > >>>> >> >> Regards > >>>> >> >> > >>>> >> >> Robert > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> On 6 October 2015 at 12:15, Robert White > >>>> >> >> > >>>> >> >> wrote: > >>>> >> >>> > >>>> >> >>> Dear Joe, > >>>> >> >>> > >>>> >> >>> I still get one error from the modular package: > >>>> >> >>> > >>>> >> >>> Exception: > >>>> >> >>> > >>>> >> >>> Failure > >>>> >> >>> > >>>> >> >>> "in article modular.art at line 11928: axiom\nstack = [Term; > []; > >>>> >> >>> Thm; > >>>> >> >>> Thm; [[]; [[Var; Term]]]; Thm; Thm; Thm; Thm; Thm; Thm; Thm; > Thm; > >>>> >> >>> Thm; > >>>> >> >>> Var; > >>>> >> >>> Thm; Thm; Thm; Thm; Thm; Var; Thm; Thm; Thm; Thm; > >>>> >> >>> [[\"Number.Modular.toNatural\"; Var]]; Term; Var; Var; > >>>> >> >>> \"Number.Modular.<=\"; Term; Var; [[]; [[Var; Term]]]; Var; > >>>> >> >>> Thm]\nunknown > >>>> >> >>> assumption:\n|- ~(modulus = 0)". > >>>> >> >>> > >>>> >> >>> Is there any package missing? > >>>> >> >>> > >>>> >> >>> I have loaded the following packages: > >>>> >> >>> > >>>> >> >>> stream > >>>> >> >>> > >>>> >> >>> probability > >>>> >> >>> > >>>> >> >>> natural-bits > >>>> >> >>> > >>>> >> >>> natural-divides > >>>> >> >>> > >>>> >> >>> natural-prime > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> Thanks very much! > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> Regards, > >>>> >> >>> > >>>> >> >>> Robert > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> On 5 October 2015 at 23:27, Robert White > >>>> >> >>> > >>>> >> >>> wrote: > >>>> >> >>>> > >>>> >> >>>> Thanks very much Joe. > >>>> >> >>>> I also noticed that there is kind of dependency going on but I > >>>> >> >>>> don't > >>>> >> >>>> know how to fix it. > >>>> >> >>>> > >>>> >> >>>> > >>>> >> >>>> On 5 October 2015 at 22:56, Joe Leslie-Hurd > >>>> >> >>>> wrote: > >>>> >> >>>>> > >>>> >> >>>>> Hi Robert, > >>>> >> >>>>> > >>>> >> >>>>> There are a couple of different obstacles here. > >>>> >> >>>>> > >>>> >> >>>>> Firstly, it is important that the dependent theories have > been > >>>> >> >>>>> imported before the theory. To show all the dependent > theories, > >>>> >> >>>>> use > >>>> >> >>>>> the following command: > >>>> >> >>>>> > >>>> >> >>>>> $ opentheory list --dependency-order 'Requires+ > natural-prime' > >>>> >> >>>>> base-1.200 > >>>> >> >>>>> natural-divides-1.62 > >>>> >> >>>>> stream-1.46 > >>>> >> >>>>> > >>>> >> >>>>> Now this sequence will succeed: > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int > ";; > >>>> >> >>>>> import_article "natural-divides.art";; > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/stream/stream.int";; > >>>> >> >>>>> import_article "stream.art";; > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/natural-prime/natural-prime.int";; > >>>> >> >>>>> import_article "natural-prime.art";; > >>>> >> >>>>> > >>>> >> >>>>> The second obstacle is that the theory word10 includes the > theory > >>>> >> >>>>> word, which in turn includes the theory modular. So to > >>>> >> >>>>> successfully > >>>> >> >>>>> import word10 you need to extend the interpretation with the > >>>> >> >>>>> interpretations for these theories, too: > >>>> >> >>>>> > >>>> >> >>>>> $ opentheory list --dependency-order 'Requires+ word10' > >>>> >> >>>>> base-1.200 > >>>> >> >>>>> stream-1.46 > >>>> >> >>>>> probability-1.49 > >>>> >> >>>>> natural-bits-1.66 > >>>> >> >>>>> natural-divides-1.62 > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/stream/stream.int";; > >>>> >> >>>>> import_article "stream.art";; > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/probability/probability.int";; > >>>> >> >>>>> import_article "probability.art";; > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/natural-bits/natural-bits.int";; > >>>> >> >>>>> import_article "natural-bits.art";; > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/natural-divides/natural-divides.int > ";; > >>>> >> >>>>> import_article "natural-divides.art";; > >>>> >> >>>>> > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/modular/modular.int";; > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/word/word.int";; > >>>> >> >>>>> extend_the_interpretation > >>>> >> >>>>> "opentheory/theories/word10/word10.int";; > >>>> >> >>>>> import_article "word10.art";; > >>>> >> >>>>> > >>>> >> >>>>> I regard this second problem as a defect in the theories, > because > >>>> >> >>>>> it's > >>>> >> >>>>> unreasonable to expect people to discover this information. > I'll > >>>> >> >>>>> work > >>>> >> >>>>> on fixing it so these multiple extend_the_interpretation > commands > >>>> >> >>>>> are > >>>> >> >>>>> unnecessary. > >>>> >> >>>>> > >>>> >> >>>>> Cheers, > >>>> >> >>>>> > >>>> >> >>>>> Joe > >>>> >> >>>>> > >>>> >> >>>>> On Sun, Oct 4, 2015 at 2:57 PM, Robert White > >>>> >> >>>>> wrote: > >>>> >> >>>>> > Dear Joe, > >>>> >> >>>>> > > >>>> >> >>>>> > I have problem importing article files. For example: > >>>> >> >>>>> > > >>>> >> >>>>> > Failure > >>>> >> >>>>> > > >>>> >> >>>>> > "in article word10.art at line 7495: defineConst\nstack = > >>>> >> >>>>> > [Term; > >>>> >> >>>>> > \"Number.Modular.equivalent\"; Term; Var; Term; Var; []; > >>>> >> >>>>> > \"HOLLight.modular_to_class\"; > \"HOLLight.modular_from_class\"; > >>>> >> >>>>> > \"Data.Word10.word10\"; TypeOp; TypeOp; > >>>> >> >>>>> > Const]\nunknown > >>>> >> >>>>> > constant \"Number.Modular.equivalent\"". > >>>> >> >>>>> > > >>>> >> >>>>> > I also have problems with the following packages: > >>>> >> >>>>> > > >>>> >> >>>>> > natural-prime > >>>> >> >>>>> > > >>>> >> >>>>> > gfp > >>>> >> >>>>> > > >>>> >> >>>>> > natural-fibonacci > >>>> >> >>>>> > > >>>> >> >>>>> > Could you please check if that is because opentheory > packages > >>>> >> >>>>> > got > >>>> >> >>>>> > updated > >>>> >> >>>>> > but the int files haven't? > >>>> >> >>>>> > > >>>> >> >>>>> > Thanks a lot. > >>>> >> >>>>> > > >>>> >> >>>>> > > >>>> >> >>>>> > -- > >>>> >> >>>>> > > >>>> >> >>>>> > Regards, > >>>> >> >>>>> > Robert > >>>> >> >>>>> > > >>>> >> >>>>> > New homepage at Github: https://airobert.github.io/ > >>>> >> >>>>> > New email address at ILLC: shuai.wang at student.uva.nl > >>>> >> >>>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: > >>>> >> >>>>> > 0652691901 > >>>> >> >>>>> > > >>>> >> >>>>> > > >>>> >> >>>>> > _______________________________________________ > >>>> >> >>>>> > 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 > >>>> >> >>>> > >>>> >> >>>> > >>>> >> >>>> > >>>> >> >>>> > >>>> >> >>>> -- > >>>> >> >>>> > >>>> >> >>>> Regards, > >>>> >> >>>> Robert > >>>> >> >>>> > >>>> >> >>>> New homepage at Github: https://airobert.github.io/ > >>>> >> >>>> New email address at ILLC: shuai.wang at student.uva.nl > >>>> >> >>>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: > 0652691901 > >>>> >> >>>> > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> -- > >>>> >> >>> > >>>> >> >>> Regards, > >>>> >> >>> Robert > >>>> >> >>> > >>>> >> >>> New homepage at Github: https://airobert.github.io/ > >>>> >> >>> New email address at ILLC: shuai.wang at student.uva.nl > >>>> >> >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: > 0652691901 > >>>> >> >>> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> -- > >>>> >> >> > >>>> >> >> Regards, > >>>> >> >> Robert > >>>> >> >> > >>>> >> >> New homepage at Github: https://airobert.github.io/ > >>>> >> >> New email address at ILLC: shuai.wang at student.uva.nl > >>>> >> >> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: > 0652691901 > >>>> >> >> > >>>> >> > > >>>> >> > > >>>> >> > > >>>> >> > -- > >>>> >> > > >>>> >> > Regards, > >>>> >> > Robert > >>>> >> > > >>>> >> > New homepage at Github: https://airobert.github.io/ > >>>> >> > New email address at ILLC: shuai.wang at student.uva.nl > >>>> >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>>> >> > > >>>> >> > > >>>> >> > _______________________________________________ > >>>> >> > 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 > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > -- > >>>> > > >>>> > Regards, > >>>> > Robert > >>>> > > >>>> > New homepage at Github: https://airobert.github.io/ > >>>> > New email address at ILLC: shuai.wang at student.uva.nl > >>>> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>>> > > >>>> > > >>>> > _______________________________________________ > >>>> > 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 > >>> > >>> > >>> > >>> > >>> -- > >>> > >>> Regards, > >>> Robert > >>> > >>> New homepage at Github: https://airobert.github.io/ > >>> New email address at ILLC: shuai.wang at student.uva.nl > >>> Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >>> > >>> > >>> _______________________________________________ > >>> 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 > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Wed Oct 28 15:10:07 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Wed, 28 Oct 2015 08:10:07 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, > 1) Here is the first problem: I can't import modular theory > > opentheory: unknown switch "--directory" I needed to add an extra switch to the opentheory tool that returned the directory in which the theory file lives: $ opentheory info --directory base /Users/joe/.opentheory/packages/base-1.200 If you upgrade your opentheory tool to the latest release this switch should be recognized. > 2) I also noticed that you removed start_logging();; Then how should I > export the proofs. Could you please give me an example or maybe update the > hacking doc? Yes, I did some simple renamings to consistently export the various parts of a theory. I've already updated the FAQ: http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light I'll also update the hacking doc shortly. Cheers, Joe From joe at gilith.com Wed Oct 28 15:21:55 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Wed, 28 Oct 2015 08:21:55 -0700 Subject: [opentheory-users] Error loading articles In-Reply-To: References: Message-ID: Hi Robert, I've now updated the hacking document: the changes are awaiting your approval. I also remembered that to use the new import functionality you'll also need to upgrade your theories using opentheory update opentheory upgrade The new version of the theories contain the HOL Light theorem names, and I also changed the format of the HOL Light symbol name mapping so you'll likely get errors if you try to import earlier versions of the theories. Cheers, Joe On Wed, Oct 28, 2015 at 8:10 AM, Joe Leslie-Hurd wrote: > Hi Robert, > >> 1) Here is the first problem: I can't import modular theory >> >> opentheory: unknown switch "--directory" > > I needed to add an extra switch to the opentheory tool that returned > the directory in which the theory file lives: > > $ opentheory info --directory base > /Users/joe/.opentheory/packages/base-1.200 > > If you upgrade your opentheory tool to the latest release this switch > should be recognized. > >> 2) I also noticed that you removed start_logging();; Then how should I >> export the proofs. Could you please give me an example or maybe update the >> hacking doc? > > Yes, I did some simple renamings to consistently export the various > parts of a theory. I've already updated the FAQ: > > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > > I'll also update the hacking doc shortly. > > Cheers, > > Joe From ai.robert.wangshuai at gmail.com Thu Oct 29 13:26:19 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Thu, 29 Oct 2015 14:26:19 +0100 Subject: [opentheory-users] opentheory-users Digest, Vol 39, Issue 17 In-Reply-To: References: Message-ID: Dear Joe, I still have problems: $ opentheory upgrade FATAL ERROR: opentheory failed: no matching installed packages package upgrade failed Shall I maybe install everything again or wait for a more stable release? I don't know why it is not working right now. Regards, Robert On 29 October 2015 at 13:00, wrote: > Send opentheory-users mailing list submissions to > opentheory-users at gilith.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.gilith.com/mailman/listinfo/opentheory-users > or, via email, send a message with subject or body 'help' to > opentheory-users-request at gilith.com > > You can reach the person managing the list at > opentheory-users-owner at gilith.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of opentheory-users digest..." > > > Today's Topics: > > 1. Re: Error loading articles (Joe Leslie-Hurd) > 2. Re: Error loading articles (Joe Leslie-Hurd) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 28 Oct 2015 08:10:07 -0700 > From: Joe Leslie-Hurd > To: OpenTheory users > Subject: Re: [opentheory-users] Error loading articles > Message-ID: > ubYrmADynig at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi Robert, > > > 1) Here is the first problem: I can't import modular theory > > > > opentheory: unknown switch "--directory" > > I needed to add an extra switch to the opentheory tool that returned > the directory in which the theory file lives: > > $ opentheory info --directory base > /Users/joe/.opentheory/packages/base-1.200 > > If you upgrade your opentheory tool to the latest release this switch > should be recognized. > > > 2) I also noticed that you removed start_logging();; Then how should I > > export the proofs. Could you please give me an example or maybe update > the > > hacking doc? > > Yes, I did some simple renamings to consistently export the various > parts of a theory. I've already updated the FAQ: > > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > > I'll also update the hacking doc shortly. > > Cheers, > > Joe > > > > ------------------------------ > > Message: 2 > Date: Wed, 28 Oct 2015 08:21:55 -0700 > From: Joe Leslie-Hurd > To: OpenTheory users > Subject: Re: [opentheory-users] Error loading articles > Message-ID: > Jtkw at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi Robert, > > I've now updated the hacking document: the changes are awaiting your > approval. > > I also remembered that to use the new import functionality you'll also > need to upgrade your theories using > > opentheory update > opentheory upgrade > > The new version of the theories contain the HOL Light theorem names, > and I also changed the format of the HOL Light symbol name mapping so > you'll likely get errors if you try to import earlier versions of the > theories. > > Cheers, > > Joe > > On Wed, Oct 28, 2015 at 8:10 AM, Joe Leslie-Hurd wrote: > > Hi Robert, > > > >> 1) Here is the first problem: I can't import modular theory > >> > >> opentheory: unknown switch "--directory" > > > > I needed to add an extra switch to the opentheory tool that returned > > the directory in which the theory file lives: > > > > $ opentheory info --directory base > > /Users/joe/.opentheory/packages/base-1.200 > > > > If you upgrade your opentheory tool to the latest release this switch > > should be recognized. > > > >> 2) I also noticed that you removed start_logging();; Then how should I > >> export the proofs. Could you please give me an example or maybe update > the > >> hacking doc? > > > > Yes, I did some simple renamings to consistently export the various > > parts of a theory. I've already updated the FAQ: > > > > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > > > > I'll also update the hacking doc shortly. > > > > Cheers, > > > > Joe > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > > > ------------------------------ > > End of opentheory-users Digest, Vol 39, Issue 17 > ************************************************ > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Thu Oct 29 16:57:45 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 29 Oct 2015 09:57:45 -0700 Subject: [opentheory-users] opentheory-users Digest, Vol 39, Issue 17 In-Reply-To: References: Message-ID: Hi Robert, Two questions: 1. Did you upgrade your opentheory tool to the latest version? $ opentheory -v opentheory 1.3 (release 20151025) In the latest version there's a friendlier message when they're nothing to upgrade: $ opentheory upgrade everything up-to-date 2. Did you do an opentheory update before the upgrade to refresh the package lists? $ opentheory update updated package list for gilith repo Cheers, Joe On Thu, Oct 29, 2015 at 6:26 AM, Robert White wrote: > Dear Joe, > > I still have problems: > > $ opentheory upgrade > > > FATAL ERROR: opentheory failed: > > no matching installed packages > > package upgrade failed > > > Shall I maybe install everything again or wait for a more stable release? I > don't know why it is not working right now. > > Regards, > > Robert > > > On 29 October 2015 at 13:00, wrote: >> >> Send opentheory-users mailing list submissions to >> opentheory-users at gilith.com >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://www.gilith.com/mailman/listinfo/opentheory-users >> or, via email, send a message with subject or body 'help' to >> opentheory-users-request at gilith.com >> >> You can reach the person managing the list at >> opentheory-users-owner at gilith.com >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of opentheory-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Error loading articles (Joe Leslie-Hurd) >> 2. Re: Error loading articles (Joe Leslie-Hurd) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Wed, 28 Oct 2015 08:10:07 -0700 >> From: Joe Leslie-Hurd >> To: OpenTheory users >> Subject: Re: [opentheory-users] Error loading articles >> Message-ID: >> >> >> Content-Type: text/plain; charset=UTF-8 >> >> Hi Robert, >> >> > 1) Here is the first problem: I can't import modular theory >> > >> > opentheory: unknown switch "--directory" >> >> I needed to add an extra switch to the opentheory tool that returned >> the directory in which the theory file lives: >> >> $ opentheory info --directory base >> /Users/joe/.opentheory/packages/base-1.200 >> >> If you upgrade your opentheory tool to the latest release this switch >> should be recognized. >> >> > 2) I also noticed that you removed start_logging();; Then how should I >> > export the proofs. Could you please give me an example or maybe update >> > the >> > hacking doc? >> >> Yes, I did some simple renamings to consistently export the various >> parts of a theory. I've already updated the FAQ: >> >> http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light >> >> I'll also update the hacking doc shortly. >> >> Cheers, >> >> Joe >> >> >> >> ------------------------------ >> >> Message: 2 >> Date: Wed, 28 Oct 2015 08:21:55 -0700 >> From: Joe Leslie-Hurd >> To: OpenTheory users >> Subject: Re: [opentheory-users] Error loading articles >> Message-ID: >> >> >> Content-Type: text/plain; charset=UTF-8 >> >> Hi Robert, >> >> I've now updated the hacking document: the changes are awaiting your >> approval. >> >> I also remembered that to use the new import functionality you'll also >> need to upgrade your theories using >> >> opentheory update >> opentheory upgrade >> >> The new version of the theories contain the HOL Light theorem names, >> and I also changed the format of the HOL Light symbol name mapping so >> you'll likely get errors if you try to import earlier versions of the >> theories. >> >> Cheers, >> >> Joe >> >> On Wed, Oct 28, 2015 at 8:10 AM, Joe Leslie-Hurd wrote: >> > Hi Robert, >> > >> >> 1) Here is the first problem: I can't import modular theory >> >> >> >> opentheory: unknown switch "--directory" >> > >> > I needed to add an extra switch to the opentheory tool that returned >> > the directory in which the theory file lives: >> > >> > $ opentheory info --directory base >> > /Users/joe/.opentheory/packages/base-1.200 >> > >> > If you upgrade your opentheory tool to the latest release this switch >> > should be recognized. >> > >> >> 2) I also noticed that you removed start_logging();; Then how should I >> >> export the proofs. Could you please give me an example or maybe update >> >> the >> >> hacking doc? >> > >> > Yes, I did some simple renamings to consistently export the various >> > parts of a theory. I've already updated the FAQ: >> > >> > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light >> > >> > I'll also update the hacking doc shortly. >> > >> > Cheers, >> > >> > Joe >> >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> opentheory-users mailing list >> opentheory-users at gilith.com >> http://www.gilith.com/mailman/listinfo/opentheory-users >> >> >> ------------------------------ >> >> End of opentheory-users Digest, Vol 39, Issue 17 >> ************************************************ > > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ai.robert.wangshuai at gmail.com Thu Oct 29 22:11:15 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Thu, 29 Oct 2015 23:11:15 +0100 Subject: [opentheory-users] opentheory-users Digest, Vol 39, Issue 17 In-Reply-To: References: Message-ID: Dear Joe, ----------------------------- $ opentheory update updated package list for gilith repo $ opentheory upgrade and I have an the error still FATAL ERROR: opentheory failed: no matching installed packages package upgrade failed and even worse: $ opentheory -v opentheory 1.3 (release 20150102) Looks like I have to install it again then? On 29 October 2015 at 17:57, Joe Leslie-Hurd wrote: > Hi Robert, > > Two questions: > > 1. Did you upgrade your opentheory tool to the latest version? > > $ opentheory -v > opentheory 1.3 (release 20151025) > > In the latest version there's a friendlier message when they're > nothing to upgrade: > > $ opentheory upgrade > everything up-to-date > > 2. Did you do an opentheory update before the upgrade to refresh the > package lists? > > $ opentheory update > updated package list for gilith repo > > Cheers, > > Joe > > On Thu, Oct 29, 2015 at 6:26 AM, Robert White > wrote: > > Dear Joe, > > > > I still have problems: > > > > $ opentheory upgrade > > > > > > FATAL ERROR: opentheory failed: > > > > no matching installed packages > > > > package upgrade failed > > > > > > Shall I maybe install everything again or wait for a more stable > release? I > > don't know why it is not working right now. > > > > Regards, > > > > Robert > > > > > > On 29 October 2015 at 13:00, > wrote: > >> > >> Send opentheory-users mailing list submissions to > >> opentheory-users at gilith.com > >> > >> To subscribe or unsubscribe via the World Wide Web, visit > >> http://www.gilith.com/mailman/listinfo/opentheory-users > >> or, via email, send a message with subject or body 'help' to > >> opentheory-users-request at gilith.com > >> > >> You can reach the person managing the list at > >> opentheory-users-owner at gilith.com > >> > >> When replying, please edit your Subject line so it is more specific > >> than "Re: Contents of opentheory-users digest..." > >> > >> > >> Today's Topics: > >> > >> 1. Re: Error loading articles (Joe Leslie-Hurd) > >> 2. Re: Error loading articles (Joe Leslie-Hurd) > >> > >> > >> ---------------------------------------------------------------------- > >> > >> Message: 1 > >> Date: Wed, 28 Oct 2015 08:10:07 -0700 > >> From: Joe Leslie-Hurd > >> To: OpenTheory users > >> Subject: Re: [opentheory-users] Error loading articles > >> Message-ID: > >> > >> > >> Content-Type: text/plain; charset=UTF-8 > >> > >> Hi Robert, > >> > >> > 1) Here is the first problem: I can't import modular theory > >> > > >> > opentheory: unknown switch "--directory" > >> > >> I needed to add an extra switch to the opentheory tool that returned > >> the directory in which the theory file lives: > >> > >> $ opentheory info --directory base > >> /Users/joe/.opentheory/packages/base-1.200 > >> > >> If you upgrade your opentheory tool to the latest release this switch > >> should be recognized. > >> > >> > 2) I also noticed that you removed start_logging();; Then how should I > >> > export the proofs. Could you please give me an example or maybe update > >> > the > >> > hacking doc? > >> > >> Yes, I did some simple renamings to consistently export the various > >> parts of a theory. I've already updated the FAQ: > >> > >> > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > >> > >> I'll also update the hacking doc shortly. > >> > >> Cheers, > >> > >> Joe > >> > >> > >> > >> ------------------------------ > >> > >> Message: 2 > >> Date: Wed, 28 Oct 2015 08:21:55 -0700 > >> From: Joe Leslie-Hurd > >> To: OpenTheory users > >> Subject: Re: [opentheory-users] Error loading articles > >> Message-ID: > >> > >> > >> Content-Type: text/plain; charset=UTF-8 > >> > >> Hi Robert, > >> > >> I've now updated the hacking document: the changes are awaiting your > >> approval. > >> > >> I also remembered that to use the new import functionality you'll also > >> need to upgrade your theories using > >> > >> opentheory update > >> opentheory upgrade > >> > >> The new version of the theories contain the HOL Light theorem names, > >> and I also changed the format of the HOL Light symbol name mapping so > >> you'll likely get errors if you try to import earlier versions of the > >> theories. > >> > >> Cheers, > >> > >> Joe > >> > >> On Wed, Oct 28, 2015 at 8:10 AM, Joe Leslie-Hurd > wrote: > >> > Hi Robert, > >> > > >> >> 1) Here is the first problem: I can't import modular theory > >> >> > >> >> opentheory: unknown switch "--directory" > >> > > >> > I needed to add an extra switch to the opentheory tool that returned > >> > the directory in which the theory file lives: > >> > > >> > $ opentheory info --directory base > >> > /Users/joe/.opentheory/packages/base-1.200 > >> > > >> > If you upgrade your opentheory tool to the latest release this switch > >> > should be recognized. > >> > > >> >> 2) I also noticed that you removed start_logging();; Then how should > I > >> >> export the proofs. Could you please give me an example or maybe > update > >> >> the > >> >> hacking doc? > >> > > >> > Yes, I did some simple renamings to consistently export the various > >> > parts of a theory. I've already updated the FAQ: > >> > > >> > > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > >> > > >> > I'll also update the hacking doc shortly. > >> > > >> > Cheers, > >> > > >> > Joe > >> > >> > >> > >> ------------------------------ > >> > >> Subject: Digest Footer > >> > >> _______________________________________________ > >> opentheory-users mailing list > >> opentheory-users at gilith.com > >> http://www.gilith.com/mailman/listinfo/opentheory-users > >> > >> > >> ------------------------------ > >> > >> End of opentheory-users Digest, Vol 39, Issue 17 > >> ************************************************ > > > > > > > > > > -- > > > > Regards, > > Robert > > > > New homepage at Github: https://airobert.github.io/ > > New email address at ILLC: shuai.wang at student.uva.nl > > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > > > > _______________________________________________ > > 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 > -- Regards, Robert New homepage at Github: https://airobert.github.io/ New email address at ILLC: shuai.wang at student.uva.nl Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramana at member.fsf.org Thu Oct 29 23:08:22 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Fri, 30 Oct 2015 10:08:22 +1100 Subject: [opentheory-users] redundant commands Message-ID: I was originally going to suggesting retiring defineConst, but I have realised that what I'm really asking is about redundant commands. The defineConst command is subsumed by the defineConstList command. Unfortunately, I can't write an implementation of defineConst purely in terms of other article commands, because the virtual machine provides no mechanism for retrieving the type of a term, or for keeping track of available keys in the dictionary. However, any article writer will be able to do these things. Then simulating a defineConst command is as easy as doing defineConstList(assume(mk_eq(varTerm(var n),t)),cons n nil) where mk_eq corresponds to making an equality between two terms, and n and t correspond to the arguments to defineConst. I guess there are already redundant commands in the virtual machine, though (like trans). I guess it would be nice (to readers) if there were some switches in the opentheory tool to produce an article with certain redundant commands expanded out into a minimal non-redundant core set of commands. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramana at member.fsf.org Thu Oct 29 23:23:03 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Fri, 30 Oct 2015 10:23:03 +1100 Subject: [opentheory-users] redundant commands In-Reply-To: References: Message-ID: Even cooler would be to go in the other direction :) (I mean see an article snippet that looks like it's doing defineConst or trans or something, in terms of more primitive commands, and turn it into a call to the derived command instead.) On 30 October 2015 at 10:08, Ramana Kumar wrote: > I was originally going to suggesting retiring defineConst, but I have > realised that what I'm really asking is about redundant commands. > > The defineConst command is subsumed by the defineConstList command. > > Unfortunately, I can't write an implementation of defineConst purely in > terms of other article commands, because the virtual machine provides no > mechanism for retrieving the type of a term, or for keeping track of > available keys in the dictionary. However, any article writer will be able > to do these things. > > Then simulating a defineConst command is as easy as doing > > defineConstList(assume(mk_eq(varTerm(var n),t)),cons n nil) > > where mk_eq corresponds to making an equality between two terms, and n and > t correspond to the arguments to defineConst. > > I guess there are already redundant commands in the virtual machine, > though (like trans). > > I guess it would be nice (to readers) if there were some switches in the > opentheory tool to produce an article with certain redundant commands > expanded out into a minimal non-redundant core set of commands. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramana at member.fsf.org Thu Oct 29 23:25:45 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Fri, 30 Oct 2015 10:25:45 +1100 Subject: [opentheory-users] redundant commands In-Reply-To: References: Message-ID: (Also, my simulation of defineConst was totally wrong, but I think you get the idea. It just needs to use typeOf(t) in more places, and make the variable twice.) On 30 October 2015 at 10:23, Ramana Kumar wrote: > Even cooler would be to go in the other direction :) > (I mean see an article snippet that looks like it's doing defineConst or > trans or something, in terms of more primitive commands, and turn it into a > call to the derived command instead.) > > On 30 October 2015 at 10:08, Ramana Kumar wrote: > >> I was originally going to suggesting retiring defineConst, but I have >> realised that what I'm really asking is about redundant commands. >> >> The defineConst command is subsumed by the defineConstList command. >> >> Unfortunately, I can't write an implementation of defineConst purely in >> terms of other article commands, because the virtual machine provides no >> mechanism for retrieving the type of a term, or for keeping track of >> available keys in the dictionary. However, any article writer will be able >> to do these things. >> >> Then simulating a defineConst command is as easy as doing >> >> defineConstList(assume(mk_eq(varTerm(var n),t)),cons n nil) >> >> where mk_eq corresponds to making an equality between two terms, and n >> and t correspond to the arguments to defineConst. >> >> I guess there are already redundant commands in the virtual machine, >> though (like trans). >> >> I guess it would be nice (to readers) if there were some switches in the >> opentheory tool to produce an article with certain redundant commands >> expanded out into a minimal non-redundant core set of commands. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Fri Oct 30 03:44:05 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 29 Oct 2015 20:44:05 -0700 Subject: [opentheory-users] opentheory-users Digest, Vol 39, Issue 17 In-Reply-To: References: Message-ID: Hi Robert, Unfortunately you can't update the opentheory tool itself using opentheory update, you have to reinstall it. If you're tracking the development version then you can update by following these instructions: http://src.gilith.com/opentheory.html Otherwise you will have to download and build from the release site: http://www.gilith.com/software/opentheory/download.html Cheers, Joe On Thu, Oct 29, 2015 at 3:11 PM, Robert White wrote: > Dear Joe, > > ----------------------------- > > $ opentheory update > > updated package list for gilith repo > > $ opentheory upgrade > > and I have an the error still > > FATAL ERROR: opentheory failed: > > no matching installed packages > > package upgrade failed > > > and even worse: > > $ opentheory -v > > opentheory 1.3 (release 20150102) > > > Looks like I have to install it again then? > > > > On 29 October 2015 at 17:57, Joe Leslie-Hurd wrote: >> >> Hi Robert, >> >> Two questions: >> >> 1. Did you upgrade your opentheory tool to the latest version? >> >> $ opentheory -v >> opentheory 1.3 (release 20151025) >> >> In the latest version there's a friendlier message when they're >> nothing to upgrade: >> >> $ opentheory upgrade >> everything up-to-date >> >> 2. Did you do an opentheory update before the upgrade to refresh the >> package lists? >> >> $ opentheory update >> updated package list for gilith repo >> >> Cheers, >> >> Joe >> >> On Thu, Oct 29, 2015 at 6:26 AM, Robert White >> wrote: >> > Dear Joe, >> > >> > I still have problems: >> > >> > $ opentheory upgrade >> > >> > >> > FATAL ERROR: opentheory failed: >> > >> > no matching installed packages >> > >> > package upgrade failed >> > >> > >> > Shall I maybe install everything again or wait for a more stable >> > release? I >> > don't know why it is not working right now. >> > >> > Regards, >> > >> > Robert >> > >> > >> > On 29 October 2015 at 13:00, >> > wrote: >> >> >> >> Send opentheory-users mailing list submissions to >> >> opentheory-users at gilith.com >> >> >> >> To subscribe or unsubscribe via the World Wide Web, visit >> >> http://www.gilith.com/mailman/listinfo/opentheory-users >> >> or, via email, send a message with subject or body 'help' to >> >> opentheory-users-request at gilith.com >> >> >> >> You can reach the person managing the list at >> >> opentheory-users-owner at gilith.com >> >> >> >> When replying, please edit your Subject line so it is more specific >> >> than "Re: Contents of opentheory-users digest..." >> >> >> >> >> >> Today's Topics: >> >> >> >> 1. Re: Error loading articles (Joe Leslie-Hurd) >> >> 2. Re: Error loading articles (Joe Leslie-Hurd) >> >> >> >> >> >> ---------------------------------------------------------------------- >> >> >> >> Message: 1 >> >> Date: Wed, 28 Oct 2015 08:10:07 -0700 >> >> From: Joe Leslie-Hurd >> >> To: OpenTheory users >> >> Subject: Re: [opentheory-users] Error loading articles >> >> Message-ID: >> >> >> >> >> >> Content-Type: text/plain; charset=UTF-8 >> >> >> >> Hi Robert, >> >> >> >> > 1) Here is the first problem: I can't import modular theory >> >> > >> >> > opentheory: unknown switch "--directory" >> >> >> >> I needed to add an extra switch to the opentheory tool that returned >> >> the directory in which the theory file lives: >> >> >> >> $ opentheory info --directory base >> >> /Users/joe/.opentheory/packages/base-1.200 >> >> >> >> If you upgrade your opentheory tool to the latest release this switch >> >> should be recognized. >> >> >> >> > 2) I also noticed that you removed start_logging();; Then how should >> >> > I >> >> > export the proofs. Could you please give me an example or maybe >> >> > update >> >> > the >> >> > hacking doc? >> >> >> >> Yes, I did some simple renamings to consistently export the various >> >> parts of a theory. I've already updated the FAQ: >> >> >> >> >> >> http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light >> >> >> >> I'll also update the hacking doc shortly. >> >> >> >> Cheers, >> >> >> >> Joe >> >> >> >> >> >> >> >> ------------------------------ >> >> >> >> Message: 2 >> >> Date: Wed, 28 Oct 2015 08:21:55 -0700 >> >> From: Joe Leslie-Hurd >> >> To: OpenTheory users >> >> Subject: Re: [opentheory-users] Error loading articles >> >> Message-ID: >> >> >> >> >> >> Content-Type: text/plain; charset=UTF-8 >> >> >> >> Hi Robert, >> >> >> >> I've now updated the hacking document: the changes are awaiting your >> >> approval. >> >> >> >> I also remembered that to use the new import functionality you'll also >> >> need to upgrade your theories using >> >> >> >> opentheory update >> >> opentheory upgrade >> >> >> >> The new version of the theories contain the HOL Light theorem names, >> >> and I also changed the format of the HOL Light symbol name mapping so >> >> you'll likely get errors if you try to import earlier versions of the >> >> theories. >> >> >> >> Cheers, >> >> >> >> Joe >> >> >> >> On Wed, Oct 28, 2015 at 8:10 AM, Joe Leslie-Hurd >> >> wrote: >> >> > Hi Robert, >> >> > >> >> >> 1) Here is the first problem: I can't import modular theory >> >> >> >> >> >> opentheory: unknown switch "--directory" >> >> > >> >> > I needed to add an extra switch to the opentheory tool that returned >> >> > the directory in which the theory file lives: >> >> > >> >> > $ opentheory info --directory base >> >> > /Users/joe/.opentheory/packages/base-1.200 >> >> > >> >> > If you upgrade your opentheory tool to the latest release this switch >> >> > should be recognized. >> >> > >> >> >> 2) I also noticed that you removed start_logging();; Then how should >> >> >> I >> >> >> export the proofs. Could you please give me an example or maybe >> >> >> update >> >> >> the >> >> >> hacking doc? >> >> > >> >> > Yes, I did some simple renamings to consistently export the various >> >> > parts of a theory. I've already updated the FAQ: >> >> > >> >> > >> >> > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light >> >> > >> >> > I'll also update the hacking doc shortly. >> >> > >> >> > Cheers, >> >> > >> >> > Joe >> >> >> >> >> >> >> >> ------------------------------ >> >> >> >> Subject: Digest Footer >> >> >> >> _______________________________________________ >> >> opentheory-users mailing list >> >> opentheory-users at gilith.com >> >> http://www.gilith.com/mailman/listinfo/opentheory-users >> >> >> >> >> >> ------------------------------ >> >> >> >> End of opentheory-users Digest, Vol 39, Issue 17 >> >> ************************************************ >> > >> > >> > >> > >> > -- >> > >> > Regards, >> > Robert >> > >> > New homepage at Github: https://airobert.github.io/ >> > New email address at ILLC: shuai.wang at student.uva.nl >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 >> > >> > >> > _______________________________________________ >> > 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 > > > > > -- > > Regards, > Robert > > New homepage at Github: https://airobert.github.io/ > New email address at ILLC: shuai.wang at student.uva.nl > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From joe at gilith.com Fri Oct 30 03:52:16 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 29 Oct 2015 20:52:16 -0700 Subject: [opentheory-users] redundant commands In-Reply-To: References: Message-ID: Hi Ramana, Version 5 of the article standard comprises a non-redundant set of commands (as far as I know), so one way of achieving your goal is to downgrade a version 6 article to version 5 as follows: opentheory info --article -o output5.art --output-version 5 input.art This also converts the version 6 defineTypeOp command into the incompatible version 5 defineTypeOp command, so it's exactly what you asked for. Also, the inverse transformation from version 5 articles to version 6: opentheory info --article -o output6.art --output-version 6 input.art is rather simple-minded and doesn't implement the cool pattern recognition to create version 6 derived commands from the non-redundant set of version 5 commands. To help developers using the article format, I had been thinking of adding recipes to the description of the redundant version 6 commands in the article standard showing how to implement them in terms of the non-redundant commands, but I never got around to it. Do you think that would be helpful? Cheers, Joe On Thu, Oct 29, 2015 at 4:25 PM, Ramana Kumar wrote: > (Also, my simulation of defineConst was totally wrong, but I think you get > the idea. It just needs to use typeOf(t) in more places, and make the > variable twice.) > > On 30 October 2015 at 10:23, Ramana Kumar wrote: >> >> Even cooler would be to go in the other direction :) >> (I mean see an article snippet that looks like it's doing defineConst or >> trans or something, in terms of more primitive commands, and turn it into a >> call to the derived command instead.) >> >> On 30 October 2015 at 10:08, Ramana Kumar wrote: >>> >>> I was originally going to suggesting retiring defineConst, but I have >>> realised that what I'm really asking is about redundant commands. >>> >>> The defineConst command is subsumed by the defineConstList command. >>> >>> Unfortunately, I can't write an implementation of defineConst purely in >>> terms of other article commands, because the virtual machine provides no >>> mechanism for retrieving the type of a term, or for keeping track of >>> available keys in the dictionary. However, any article writer will be able >>> to do these things. >>> >>> Then simulating a defineConst command is as easy as doing >>> >>> defineConstList(assume(mk_eq(varTerm(var n),t)),cons n nil) >>> >>> where mk_eq corresponds to making an equality between two terms, and n >>> and t correspond to the arguments to defineConst. >>> >>> I guess there are already redundant commands in the virtual machine, >>> though (like trans). >>> >>> I guess it would be nice (to readers) if there were some switches in the >>> opentheory tool to produce an article with certain redundant commands >>> expanded out into a minimal non-redundant core set of commands. >> >> > > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From ramana at member.fsf.org Fri Oct 30 03:57:41 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Fri, 30 Oct 2015 14:57:41 +1100 Subject: [opentheory-users] opentheory-users Digest, Vol 39, Issue 17 In-Reply-To: References: Message-ID: On 30 October 2015 at 14:44, Joe Leslie-Hurd wrote: > Hi Robert, > > Unfortunately you can't update the opentheory tool itself using > opentheory update, I don't think this is unfortunate at all. Tools which attempt to update themselves don't play nicely with package managers. > you have to reinstall it. If you're tracking the > development version then you can update by following these > instructions: > > http://src.gilith.com/opentheory.html > > Otherwise you will have to download and build from the release site: > > http://www.gilith.com/software/opentheory/download.html > > Or use a package, if there is one, for your package manager. For example, for Arch Linux: https://aur.archlinux.org/packages/opentheory. > Cheers, > > Joe > > On Thu, Oct 29, 2015 at 3:11 PM, Robert White > wrote: > > Dear Joe, > > > > ----------------------------- > > > > $ opentheory update > > > > updated package list for gilith repo > > > > $ opentheory upgrade > > > > and I have an the error still > > > > FATAL ERROR: opentheory failed: > > > > no matching installed packages > > > > package upgrade failed > > > > > > and even worse: > > > > $ opentheory -v > > > > opentheory 1.3 (release 20150102) > > > > > > Looks like I have to install it again then? > > > > > > > > On 29 October 2015 at 17:57, Joe Leslie-Hurd wrote: > >> > >> Hi Robert, > >> > >> Two questions: > >> > >> 1. Did you upgrade your opentheory tool to the latest version? > >> > >> $ opentheory -v > >> opentheory 1.3 (release 20151025) > >> > >> In the latest version there's a friendlier message when they're > >> nothing to upgrade: > >> > >> $ opentheory upgrade > >> everything up-to-date > >> > >> 2. Did you do an opentheory update before the upgrade to refresh the > >> package lists? > >> > >> $ opentheory update > >> updated package list for gilith repo > >> > >> Cheers, > >> > >> Joe > >> > >> On Thu, Oct 29, 2015 at 6:26 AM, Robert White > >> wrote: > >> > Dear Joe, > >> > > >> > I still have problems: > >> > > >> > $ opentheory upgrade > >> > > >> > > >> > FATAL ERROR: opentheory failed: > >> > > >> > no matching installed packages > >> > > >> > package upgrade failed > >> > > >> > > >> > Shall I maybe install everything again or wait for a more stable > >> > release? I > >> > don't know why it is not working right now. > >> > > >> > Regards, > >> > > >> > Robert > >> > > >> > > >> > On 29 October 2015 at 13:00, > >> > wrote: > >> >> > >> >> Send opentheory-users mailing list submissions to > >> >> opentheory-users at gilith.com > >> >> > >> >> To subscribe or unsubscribe via the World Wide Web, visit > >> >> http://www.gilith.com/mailman/listinfo/opentheory-users > >> >> or, via email, send a message with subject or body 'help' to > >> >> opentheory-users-request at gilith.com > >> >> > >> >> You can reach the person managing the list at > >> >> opentheory-users-owner at gilith.com > >> >> > >> >> When replying, please edit your Subject line so it is more specific > >> >> than "Re: Contents of opentheory-users digest..." > >> >> > >> >> > >> >> Today's Topics: > >> >> > >> >> 1. Re: Error loading articles (Joe Leslie-Hurd) > >> >> 2. Re: Error loading articles (Joe Leslie-Hurd) > >> >> > >> >> > >> >> > ---------------------------------------------------------------------- > >> >> > >> >> Message: 1 > >> >> Date: Wed, 28 Oct 2015 08:10:07 -0700 > >> >> From: Joe Leslie-Hurd > >> >> To: OpenTheory users > >> >> Subject: Re: [opentheory-users] Error loading articles > >> >> Message-ID: > >> >> > >> >> > >> >> Content-Type: text/plain; charset=UTF-8 > >> >> > >> >> Hi Robert, > >> >> > >> >> > 1) Here is the first problem: I can't import modular theory > >> >> > > >> >> > opentheory: unknown switch "--directory" > >> >> > >> >> I needed to add an extra switch to the opentheory tool that returned > >> >> the directory in which the theory file lives: > >> >> > >> >> $ opentheory info --directory base > >> >> /Users/joe/.opentheory/packages/base-1.200 > >> >> > >> >> If you upgrade your opentheory tool to the latest release this switch > >> >> should be recognized. > >> >> > >> >> > 2) I also noticed that you removed start_logging();; Then how > should > >> >> > I > >> >> > export the proofs. Could you please give me an example or maybe > >> >> > update > >> >> > the > >> >> > hacking doc? > >> >> > >> >> Yes, I did some simple renamings to consistently export the various > >> >> parts of a theory. I've already updated the FAQ: > >> >> > >> >> > >> >> > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > >> >> > >> >> I'll also update the hacking doc shortly. > >> >> > >> >> Cheers, > >> >> > >> >> Joe > >> >> > >> >> > >> >> > >> >> ------------------------------ > >> >> > >> >> Message: 2 > >> >> Date: Wed, 28 Oct 2015 08:21:55 -0700 > >> >> From: Joe Leslie-Hurd > >> >> To: OpenTheory users > >> >> Subject: Re: [opentheory-users] Error loading articles > >> >> Message-ID: > >> >> > >> >> > >> >> Content-Type: text/plain; charset=UTF-8 > >> >> > >> >> Hi Robert, > >> >> > >> >> I've now updated the hacking document: the changes are awaiting your > >> >> approval. > >> >> > >> >> I also remembered that to use the new import functionality you'll > also > >> >> need to upgrade your theories using > >> >> > >> >> opentheory update > >> >> opentheory upgrade > >> >> > >> >> The new version of the theories contain the HOL Light theorem names, > >> >> and I also changed the format of the HOL Light symbol name mapping so > >> >> you'll likely get errors if you try to import earlier versions of the > >> >> theories. > >> >> > >> >> Cheers, > >> >> > >> >> Joe > >> >> > >> >> On Wed, Oct 28, 2015 at 8:10 AM, Joe Leslie-Hurd > >> >> wrote: > >> >> > Hi Robert, > >> >> > > >> >> >> 1) Here is the first problem: I can't import modular theory > >> >> >> > >> >> >> opentheory: unknown switch "--directory" > >> >> > > >> >> > I needed to add an extra switch to the opentheory tool that > returned > >> >> > the directory in which the theory file lives: > >> >> > > >> >> > $ opentheory info --directory base > >> >> > /Users/joe/.opentheory/packages/base-1.200 > >> >> > > >> >> > If you upgrade your opentheory tool to the latest release this > switch > >> >> > should be recognized. > >> >> > > >> >> >> 2) I also noticed that you removed start_logging();; Then how > should > >> >> >> I > >> >> >> export the proofs. Could you please give me an example or maybe > >> >> >> update > >> >> >> the > >> >> >> hacking doc? > >> >> > > >> >> > Yes, I did some simple renamings to consistently export the various > >> >> > parts of a theory. I've already updated the FAQ: > >> >> > > >> >> > > >> >> > > http://www.gilith.com/research/opentheory/faq.html#export-from-hol-light > >> >> > > >> >> > I'll also update the hacking doc shortly. > >> >> > > >> >> > Cheers, > >> >> > > >> >> > Joe > >> >> > >> >> > >> >> > >> >> ------------------------------ > >> >> > >> >> Subject: Digest Footer > >> >> > >> >> _______________________________________________ > >> >> opentheory-users mailing list > >> >> opentheory-users at gilith.com > >> >> http://www.gilith.com/mailman/listinfo/opentheory-users > >> >> > >> >> > >> >> ------------------------------ > >> >> > >> >> End of opentheory-users Digest, Vol 39, Issue 17 > >> >> ************************************************ > >> > > >> > > >> > > >> > > >> > -- > >> > > >> > Regards, > >> > Robert > >> > > >> > New homepage at Github: https://airobert.github.io/ > >> > New email address at ILLC: shuai.wang at student.uva.nl > >> > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > >> > > >> > > >> > _______________________________________________ > >> > 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 > > > > > > > > > > -- > > > > Regards, > > Robert > > > > New homepage at Github: https://airobert.github.io/ > > New email address at ILLC: shuai.wang at student.uva.nl > > Carolina MacGillavrylaan 2246 , 1098 XK AMSTERDAM HP: 0652691901 > > > > > > _______________________________________________ > > 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 Fri Oct 30 04:02:48 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 29 Oct 2015 21:02:48 -0700 Subject: [opentheory-users] opentheory-users Digest, Vol 39, Issue 17 In-Reply-To: References: Message-ID: > Or use a package, if there is one, for your package manager. > For example, for Arch Linux: https://aur.archlinux.org/packages/opentheory. Very cool! Joe From ramana at member.fsf.org Fri Oct 30 06:26:58 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Fri, 30 Oct 2015 17:26:58 +1100 Subject: [opentheory-users] redundant commands In-Reply-To: References: Message-ID: It would be helpful, but I don't think it's urgent. I have made the HOL4 writer detect when a call to defineConstList could be done via defineConst, and use that instead. On 30 October 2015 at 14:52, Joe Leslie-Hurd wrote: > Hi Ramana, > > Version 5 of the article standard comprises a non-redundant set of > commands (as far as I know), so one way of achieving your goal is to > downgrade a version 6 article to version 5 as follows: > > opentheory info --article -o output5.art --output-version 5 input.art > > This also converts the version 6 defineTypeOp command into the > incompatible version 5 defineTypeOp command, so it's exactly what you > asked for. Also, the inverse transformation from version 5 articles to > version 6: > > opentheory info --article -o output6.art --output-version 6 input.art > > is rather simple-minded and doesn't implement the cool pattern > recognition to create version 6 derived commands from the > non-redundant set of version 5 commands. > > To help developers using the article format, I had been thinking of > adding recipes to the description of the redundant version 6 commands > in the article standard showing how to implement them in terms of the > non-redundant commands, but I never got around to it. Do you think > that would be helpful? > > Cheers, > > Joe > > On Thu, Oct 29, 2015 at 4:25 PM, Ramana Kumar > wrote: > > (Also, my simulation of defineConst was totally wrong, but I think you > get > > the idea. It just needs to use typeOf(t) in more places, and make the > > variable twice.) > > > > On 30 October 2015 at 10:23, Ramana Kumar wrote: > >> > >> Even cooler would be to go in the other direction :) > >> (I mean see an article snippet that looks like it's doing defineConst or > >> trans or something, in terms of more primitive commands, and turn it > into a > >> call to the derived command instead.) > >> > >> On 30 October 2015 at 10:08, Ramana Kumar > wrote: > >>> > >>> I was originally going to suggesting retiring defineConst, but I have > >>> realised that what I'm really asking is about redundant commands. > >>> > >>> The defineConst command is subsumed by the defineConstList command. > >>> > >>> Unfortunately, I can't write an implementation of defineConst purely in > >>> terms of other article commands, because the virtual machine provides > no > >>> mechanism for retrieving the type of a term, or for keeping track of > >>> available keys in the dictionary. However, any article writer will be > able > >>> to do these things. > >>> > >>> Then simulating a defineConst command is as easy as doing > >>> > >>> defineConstList(assume(mk_eq(varTerm(var n),t)),cons n nil) > >>> > >>> where mk_eq corresponds to making an equality between two terms, and n > >>> and t correspond to the arguments to defineConst. > >>> > >>> I guess there are already redundant commands in the virtual machine, > >>> though (like trans). > >>> > >>> I guess it would be nice (to readers) if there were some switches in > the > >>> opentheory tool to produce an article with certain redundant commands > >>> expanded out into a minimal non-redundant core set of commands. > >> > >> > > > > > > _______________________________________________ > > 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 Fri Oct 30 16:07:08 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Fri, 30 Oct 2015 09:07:08 -0700 Subject: [opentheory-users] redundant commands In-Reply-To: References: Message-ID: That's a good simple optimization. Another one I discovered in HOL Light is that if you're caching exported theorems then you automatically take care of such redundant inferences as TRANS ( |- x = y) (REFL y) because the later theorem will match the earlier exported one. If you discover anything else like this please let the list know: I'm always interested in techniques that result in smaller articles. Cheers, Joe On Thu, Oct 29, 2015 at 11:26 PM, Ramana Kumar wrote: > It would be helpful, but I don't think it's urgent. > > I have made the HOL4 writer detect when a call to defineConstList could be > done via defineConst, and use that instead. > > On 30 October 2015 at 14:52, Joe Leslie-Hurd wrote: >> >> Hi Ramana, >> >> Version 5 of the article standard comprises a non-redundant set of >> commands (as far as I know), so one way of achieving your goal is to >> downgrade a version 6 article to version 5 as follows: >> >> opentheory info --article -o output5.art --output-version 5 input.art >> >> This also converts the version 6 defineTypeOp command into the >> incompatible version 5 defineTypeOp command, so it's exactly what you >> asked for. Also, the inverse transformation from version 5 articles to >> version 6: >> >> opentheory info --article -o output6.art --output-version 6 input.art >> >> is rather simple-minded and doesn't implement the cool pattern >> recognition to create version 6 derived commands from the >> non-redundant set of version 5 commands. >> >> To help developers using the article format, I had been thinking of >> adding recipes to the description of the redundant version 6 commands >> in the article standard showing how to implement them in terms of the >> non-redundant commands, but I never got around to it. Do you think >> that would be helpful? >> >> Cheers, >> >> Joe >> >> On Thu, Oct 29, 2015 at 4:25 PM, Ramana Kumar >> wrote: >> > (Also, my simulation of defineConst was totally wrong, but I think you >> > get >> > the idea. It just needs to use typeOf(t) in more places, and make the >> > variable twice.) >> > >> > On 30 October 2015 at 10:23, Ramana Kumar wrote: >> >> >> >> Even cooler would be to go in the other direction :) >> >> (I mean see an article snippet that looks like it's doing defineConst >> >> or >> >> trans or something, in terms of more primitive commands, and turn it >> >> into a >> >> call to the derived command instead.) >> >> >> >> On 30 October 2015 at 10:08, Ramana Kumar >> >> wrote: >> >>> >> >>> I was originally going to suggesting retiring defineConst, but I have >> >>> realised that what I'm really asking is about redundant commands. >> >>> >> >>> The defineConst command is subsumed by the defineConstList command. >> >>> >> >>> Unfortunately, I can't write an implementation of defineConst purely >> >>> in >> >>> terms of other article commands, because the virtual machine provides >> >>> no >> >>> mechanism for retrieving the type of a term, or for keeping track of >> >>> available keys in the dictionary. However, any article writer will be >> >>> able >> >>> to do these things. >> >>> >> >>> Then simulating a defineConst command is as easy as doing >> >>> >> >>> defineConstList(assume(mk_eq(varTerm(var n),t)),cons n nil) >> >>> >> >>> where mk_eq corresponds to making an equality between two terms, and n >> >>> and t correspond to the arguments to defineConst. >> >>> >> >>> I guess there are already redundant commands in the virtual machine, >> >>> though (like trans). >> >>> >> >>> I guess it would be nice (to readers) if there were some switches in >> >>> the >> >>> opentheory tool to produce an article with certain redundant commands >> >>> expanded out into a minimal non-redundant core set of commands. >> >> >> >> >> > >> > >> > _______________________________________________ >> > 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 at member.fsf.org Sat Oct 31 08:42:02 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Sat, 31 Oct 2015 19:42:02 +1100 Subject: [opentheory-users] theory file format specification Message-ID: I believe there is an error in http://www.gilith.com/research/opentheory/theory.html The regular expression which a version must satisfy does not look right. Could somebody check it for me? I also have a request that package names be more liberal, for example allowing numbers or uppercase letters. But this is not an urgent request, we'll see what happens when more packages flow into the gilith repo... -------------- next part -------------- An HTML attachment was scrubbed... URL: From di.gama at gmail.com Sat Oct 31 08:48:04 2015 From: di.gama at gmail.com (Mario Carneiro) Date: Sat, 31 Oct 2015 04:48:04 -0400 Subject: [opentheory-users] theory file format specification In-Reply-To: References: Message-ID: My guess is it should be "[0-9]+([.][0-9]+)*" instead of "[0-9]+([.][0.9]+)*". This will allow strings like "123.54.2356.0101" instead of "123.0909.0...9.0099", which looks more version string-like. Mario On Sat, Oct 31, 2015 at 4:42 AM, Ramana Kumar wrote: > I believe there is an error in > http://www.gilith.com/research/opentheory/theory.html > > The regular expression which a version must satisfy does not look right. > Could somebody check it for me? > > I also have a request that package names be more liberal, for example > allowing numbers or uppercase letters. But this is not an urgent request, > we'll see what happens when more packages flow into the gilith repo... > > _______________________________________________ > 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 at member.fsf.org Sat Oct 31 08:49:17 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Sat, 31 Oct 2015 19:49:17 +1100 Subject: [opentheory-users] theory file format specification In-Reply-To: References: Message-ID: Yes I agree, Mario. On this topic, the specification is also confusing in that it specifies a regular expression for "PACKAGE-NAME" in the Package Information section, but later, in the Package Blocks section, "PACKAGE-NAME" is again used but this time with a different expectation for what regular expression it should satisfy. I would suggest that in Package Blocks both "PACKAGE-NAME" and "PACKAGE-VERSION" are re-used. On 31 October 2015 at 19:48, Mario Carneiro wrote: > My guess is it should be "[0-9]+([.][0-9]+)*" instead of > "[0-9]+([.][0.9]+)*". This will allow strings like "123.54.2356.0101" > instead of "123.0909.0...9.0099", which looks more version string-like. > > Mario > > On Sat, Oct 31, 2015 at 4:42 AM, Ramana Kumar > wrote: > >> I believe there is an error in >> http://www.gilith.com/research/opentheory/theory.html >> >> The regular expression which a version must satisfy does not look right. >> Could somebody check it for me? >> >> I also have a request that package names be more liberal, for example >> allowing numbers or uppercase letters. But this is not an urgent request, >> we'll see what happens when more packages flow into the gilith repo... >> >> _______________________________________________ >> 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: