From ai.robert.wangshuai at gmail.com Tue May 19 12:54:30 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 19 May 2015 14:54:30 +0200 Subject: [opentheory-users] Question about the OpenTheory Repo Message-ID: Dear OpenTheory users and developers, Hello. I wonder if there is any reason there is a "Haskell" part in the base ? And what does that mean exactly? Thanks! -- Regards, Robert White (Shuai Wang) INRIA Deducteam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ai.robert.wangshuai at gmail.com Tue May 19 13:29:33 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 19 May 2015 15:29:33 +0200 Subject: [opentheory-users] Version problem Message-ID: Hi all, Just another quick question: I noticed that we have bool-def.art and also bool-def-1.11.art I noticed that bool-def.art is in version 6. I wonder if bool-def-1.11.art is just the same thing in the old version? Since the page bool-def-1.11.html gives me no further idea of bool-def-1.11.art, shall I just ignore that file in use? Thanks very much again. -- Regards, Robert White (Shuai Wang) INRIA Deducteam -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Tue May 19 17:09:01 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Tue, 19 May 2015 10:09:01 -0700 Subject: [opentheory-users] Question about the OpenTheory Repo In-Reply-To: References: Message-ID: Hi Robert, This is something I've been working on recently - it means that there are definitions in the theory package that can be exported as a Haskell package. For example, the definitions in base are exported to the "opentheory" package on Hackage: http://hackage.haskell.org/package/opentheory In general, the Haskell package name is simply the theory name with "opentheory-" prepended, unless there is an explicit haskell-name declaration in the theory file that overrides this. You can find some (mostly outdated) information on a previous version of this Haskell export in the "Maintaining Verified Software" paper and talk at the bottom of http://www.gilith.com/research/opentheory/ Cheers, Joe On Tue, May 19, 2015 at 5:54 AM, Robert White wrote: > Dear OpenTheory users and developers, > > Hello. > I wonder if there is any reason there is a "Haskell" part in the base? And > what does that mean exactly? > > Thanks! > > -- > > Regards, > Robert White (Shuai Wang) > INRIA Deducteam From joe at gilith.com Tue May 19 17:10:27 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Tue, 19 May 2015 10:10:27 -0700 Subject: [opentheory-users] Version problem In-Reply-To: References: Message-ID: Hi Robert, This is covered in the FAQ: http://www.gilith.com/research/opentheory/faq.html#what-are-theorem-files Please let me know if you need more information about this topic. Cheers, Joe On Tue, May 19, 2015 at 6:29 AM, Robert White wrote: > Hi all, > > Just another quick question: > > I noticed that we have bool-def.art and also bool-def-1.11.art > I noticed that bool-def.art is in version 6. I wonder if bool-def-1.11.art > is just the same thing in the old version? > > Since the page bool-def-1.11.html gives me no further idea of > bool-def-1.11.art, shall I just ignore that file in use? > > Thanks very much again. > > -- > > Regards, > Robert White (Shuai Wang) > INRIA Deducteam > > _______________________________________________ > 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 May 19 18:35:28 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Tue, 19 May 2015 20:35:28 +0200 Subject: [opentheory-users] Question about the OpenTheory Repo In-Reply-To: References: Message-ID: Dear Joe, Thanks very much for the reply. It looks interesting that we can also play with it in Haskell but I'm not good at Haskell yet. Thanks again! Regards Robert On 19 May 2015 at 19:09, Joe Leslie-Hurd wrote: > Hi Robert, > > This is something I've been working on recently - it means that there > are definitions in the theory package that can be exported as a > Haskell package. For example, the definitions in base are exported to > the "opentheory" package on Hackage: > > http://hackage.haskell.org/package/opentheory > > In general, the Haskell package name is simply the theory name with > "opentheory-" prepended, unless there is an explicit haskell-name > declaration in the theory file that overrides this. > > You can find some (mostly outdated) information on a previous version > of this Haskell export in the "Maintaining Verified Software" paper > and talk at the bottom of > > http://www.gilith.com/research/opentheory/ > > Cheers, > > Joe > > On Tue, May 19, 2015 at 5:54 AM, Robert White > wrote: > > Dear OpenTheory users and developers, > > > > Hello. > > I wonder if there is any reason there is a "Haskell" part in the base? > And > > what does that mean exactly? > > > > Thanks! > > > > -- > > > > Regards, > > Robert White (Shuai Wang) > > INRIA Deducteam > -- Regards, Robert White (Shuai Wang) INRIA Deducteam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ai.robert.wangshuai at gmail.com Wed May 20 16:27:20 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Wed, 20 May 2015 18:27:20 +0200 Subject: [opentheory-users] Question about defineConstList Message-ID: Dear Joe and other users, I wonder if in the defineConstList , do you actually define the consts first? Or simply use the const "from construction" [1]. This function is now causing problems in my code and I can't find out where exact the problem is. It would be very nice if you can explain a bit more. Thanks a lot. [1] By this, I mean, did you used defineConst or anything to do the definition for individual constants there or simply getting the list pushed as > > List [Const c1, ..., Const ck] -- Regards, Robert White (Shuai Wang) INRIA Deducteam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramana at member.fsf.org Wed May 20 16:31:44 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Wed, 20 May 2015 17:31:44 +0100 Subject: [opentheory-users] Question about defineConstList In-Reply-To: References: Message-ID: defineConstList defines the constants, they do not need to be defined before that command is executed. On 20 May 2015 at 17:27, Robert White wrote: > Dear Joe and other users, > > I wonder if in the defineConstList > , > do you actually define the consts first? Or simply use the const "from > construction" [1]. This function is now causing problems in my code and I > can't find out where exact the problem is. It would be very nice if you can > explain a bit more. > > Thanks a lot. > > > [1] By this, I mean, did you used defineConst or anything to do the > definition for individual constants there or simply getting the list pushed > as > >> > List [Const c1, ..., Const ck] > > -- > > Regards, > Robert White (Shuai Wang) > INRIA Deducteam > > _______________________________________________ > 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 Wed May 20 17:01:20 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Wed, 20 May 2015 10:01:20 -0700 Subject: [opentheory-users] Question about defineConstList In-Reply-To: References: Message-ID: Hi Robert, One thing that may be useful to you when implementing a reader for the defineConstList command: if you have an article foo.art you are trying to read, then the command opentheory info --article --output-version 5 -o bar.art foo.art will generate a version 5 article file bar.art that is *logically equivalent* to foo.art. And since defineConstList did not exist in version 5 of the article format, the same definitions will be made using only defineConst. I hope that helps, Joe On Wed, May 20, 2015 at 9:31 AM, Ramana Kumar wrote: > defineConstList defines the constants, they do not need to be defined before > that command is executed. > > On 20 May 2015 at 17:27, Robert White wrote: >> >> Dear Joe and other users, >> >> I wonder if in the defineConstList , do you actually define the consts >> first? Or simply use the const "from construction" [1]. This function is now >> causing problems in my code and I can't find out where exact the problem is. >> It would be very nice if you can explain a bit more. >> >> Thanks a lot. >> >> >> [1] By this, I mean, did you used defineConst or anything to do the >> definition for individual constants there or simply getting the list pushed >> as >> >> > List [Const c1, ..., Const ck] >> >> -- >> >> Regards, >> Robert White (Shuai Wang) >> INRIA Deducteam >> >> _______________________________________________ >> 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 ai.robert.wangshuai at gmail.com Thu May 21 11:42:51 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Thu, 21 May 2015 13:42:51 +0200 Subject: [opentheory-users] Question about defineConstList In-Reply-To: References: Message-ID: Dear Joe, Thanks. That helps a lot. Regards, Robert Hi Robert, One thing that may be useful to you when implementing a reader for the defineConstList command: if you have an article foo.art you are trying to read, then the command opentheory info --article --output-version 5 -o bar.art foo.art will generate a version 5 article file bar.art that is *logically equivalent* to foo.art. And since defineConstList did not exist in version 5 of the article format, the same definitions will be made using only defineConst. I hope that helps, Joe On 20 May 2015 at 18:27, Robert White wrote: > Dear Joe and other users, > > I wonder if in the defineConstList > , > do you actually define the consts first? Or simply use the const "from > construction" [1]. This function is now causing problems in my code and I > can't find out where exact the problem is. It would be very nice if you can > explain a bit more. > > Thanks a lot. > > > [1] By this, I mean, did you used defineConst or anything to do the > definition for individual constants there or simply getting the list pushed > as > >> > List [Const c1, ..., Const ck] > > -- > > Regards, > Robert White (Shuai Wang) > INRIA Deducteam > -- Regards, Robert White (Shuai Wang) INRIA Deducteam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramana at member.fsf.org Sat May 23 12:13:38 2015 From: ramana at member.fsf.org (Ramana Kumar) Date: Sat, 23 May 2015 13:13:38 +0100 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: 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 brianh at cs.pdx.edu Sat May 23 14:52:02 2015 From: brianh at cs.pdx.edu (Brian Huffman) Date: Sat, 23 May 2015 07:52:02 -0700 Subject: [opentheory-users] importer for Isabelle In-Reply-To: References: Message-ID: 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 ai.robert.wangshuai at gmail.com Thu May 28 18:13:07 2015 From: ai.robert.wangshuai at gmail.com (Robert White) Date: Thu, 28 May 2015 20:13:07 +0200 Subject: [opentheory-users] question about camlp5 Message-ID: Dear all, I wonder if there is a way I can get rid of the error of : Error: Unbound value set_jrh_lexer Sometimes it is working sometimes it is not. I am very confused. Is there any advice? Thanks a lot -- Regards, Robert White (Shuai Wang) INRIA Deducteam -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Thu May 28 20:06:24 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 28 May 2015 13:06:24 -0700 Subject: [opentheory-users] question about camlp5 In-Reply-To: References: Message-ID: Hi Robert, I am afraid I cannot help with this, but I see you have already asked the hol-info list so hopefully the HOL Light experts there will be able to answer your question. Cheers, Joe On Thu, May 28, 2015 at 11:13 AM, Robert White wrote: > Dear all, > > I wonder if there is a way I can get rid of the error of : > Error: Unbound value set_jrh_lexer > > Sometimes it is working sometimes it is not. I am very confused. Is there > any advice? > > Thanks a lot > > -- > > Regards, > Robert White (Shuai Wang) > INRIA Deducteam > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users >