From joe at gilith.com Fri Jan 2 08:15:55 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Fri, 2 Jan 2015 00:15:55 -0800 Subject: [opentheory-users] duplicate assumptions for "thm" In-Reply-To: References: Message-ID: Hi Ramana, Thanks for bringing this up. I would expect most use-cases of the article format to export theorems with no hypotheses, but it's good to clarify the desired behaviour on all inputs. In this case I think there is a missing constraint on the thm command that the hypothesis list is distinct w.r.t. alpha-equivalence. I've now made this constraint explicit in the standard: http://www.gilith.com/research/opentheory/article.html#thmCommand I've also updated the opentheory tool to detect violations of this constraint, so from version 1.3 (release 20150102) it will produce errors of the following form: $ opentheory info foo.art FATAL ERROR: opentheory failed: error in file "foo.art" around line 31: thm 4 remove while executing thm command: alpha-equivalent hypotheses in sequent Cheers, Joe On Thu, Dec 25, 2014 at 5:01 AM, Ramana Kumar wrote: > Hi all, > > I have a nitpicking question about the "thm" command for OpenTheory > articles. If the list of terms (t1,...,tn) contains two alpha-equivalent but > syntactically distinct terms, which one of them should be chosen as the > representative in the resulting Thm object? Or can we assume that the list > is all distinct (up to alpha) (in which case, could that be noted > explicitly)? > > Cheers, > Ramana > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From joe at gilith.com Fri Jan 2 08:31:19 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Fri, 2 Jan 2015 00:31:19 -0800 Subject: [opentheory-users] extracting intermediate theorems In-Reply-To: References: Message-ID: Hi Ramana, What you're proposing is certainly possible, but first I'd like to understand a bit more about your use-case for accessing intermediate theorems. At present the article standard and opentheory tool conspire to create an illusion that the intermediate theorems of the theory are irrelevant, and that only the imported assumptions and exported theorems are important. As a consequence of this abstraction, tools that process articles may feel free to replace any or all intermediate theorems so long as the assumption/theorem interface is maintained. Supporting post-hoc extraction of intermediate theorems and promoting them to exported theorems goes against this philosophy, because an article processing tool that changed intermediate theorems could break something downstream that was relying on them having a particular form to extract and export. Given the above, could you please elaborate on your use-case for accessing intermediate theorems of articles? Cheers, Joe On Sat, Dec 20, 2014 at 9:31 PM, Ramana Kumar wrote: > Hi Joe, > > On Sat, Dec 20, 2014 at 9:09 PM, Joe Leslie-Hurd wrote: >> >> > Show me the intermediate (i.e. unexported) theorems that arise when >> > running >> > an article. >> >> No, unfortunately not. The best it can do is tell you *how many* >> theorems are generated, by using the --inference option. >> >> Did you have any thoughts on a way to present intermediate theorems to the >> user? > > > What would be useful to me is if I could search for intermediate theorems > with a pattern. I'd guess you'd rather stay away from specifying parsing of > such patterns. I wouldn't mind, however, writing my pattern as OpenTheory > article commands for creating a term. I'd then like to get back all > intermediate theorems that match. > >> >> > Create an article that exports a previously unexported theorem, taking >> > an >> > existing article as input. >> >> Also no I'm afraid. > > > That's a pity. Would it be hard to add? Presuming we solve the problem above > of specifying an intermediate theorem. > > I guess for the moment I can get around this by using a custom reader that > looks for the theorem I want and cuts off the article as soon as it finds it > (and adds on an export). It would be nice if the opentheory tool had enough > features to support this itself, but maybe it's a little outside your design > goals? On the other hand, I think a good suite of powerful manipulations on > OpenTheory packages for a variety of purposes would help buy-in. > >> >> > Minimise an article for what is required for a particular theorem (I >> > think >> > the answer here is yes, by creating a package with the desired theorem >> > and >> > then asking for an article for it to be generated...?) >> >> Indeed. Suppose article foo.art exports a set of theorems containing a >> theorem T of interest, then you can create an article bar.art that >> proves T by axiom, and then run >> >> echo 'a { article: "foo.art" } main { import: a article: "bar.art" }' >> | opentheory info --article -o baz.art theory:- >> >> to get a minimal article baz.art proving T. > > > Great, thanks. > > _______________________________________________ > opentheory-users mailing list > opentheory-users at gilith.com > http://www.gilith.com/mailman/listinfo/opentheory-users > From di.gama at gmail.com Fri Jan 2 09:49:42 2015 From: di.gama at gmail.com (Mario Carneiro) Date: Fri, 2 Jan 2015 04:49:42 -0500 Subject: [opentheory-users] Preprint of OT->Metamath conversion paper, thoughts on MM->OT conversion Message-ID: Hello all, Although the implementation is still in progress, I've completed a writeup of the algorithm for converting OT article files into valid Metamath proofs, to be published in the Journal of Formalized Reasoning. You can find the preprint on arXiv, http://arxiv.org/abs/1412.8091 . I've also been thinking about the reverse conversion process, but before I get into the details I'd like to establish what are the usual conventions are for producing good output, since so far I've only looked at the article level and haven't even touched any theory files. In particular, how should I structure the theory division process, and what OT base definitions should I import? For context, a Metamath file is a list of theorems, where each theorem has a derivation that refers to textually previous theorems or axioms. The entire metamath database is one (rather large) file, and there are section headers, but they are just comments (although they are machine-readable for presentation purposes). I expect that the different theorems correspond well to "thm" exports, and perhaps the section headers correspond to theory files (although there are quite a few, perhaps a few thousand section headers). The sections come in three levels, from the 14 major "parts" to the "chapters" and then "sections", each of which might have from 1 or 2 to a couple hundred theorems each. (see: http://us2.metamath.org:88/mpegif/mmtheorems.html) Also, Metamath is built on ZFC foundations, although we also have the Tarski-Grothendieck axiom defined. However, Metamath tracks axiom usage, and there is a conscious effort to limit unnecessary axiom usage (most other systems don't seem to do this, i.e. using the axiom of choice to prove the law of excluded middle is rather overkill), so it is possible that some of the weaker subsystems fit in vanilla HOL. However, it is well-known that ZFC is stronger than HOL, and so the general approach I was intending is to add some kind of universe axiom to say that "ind" is a really big set, big enough for some construction of an epsilon-relation to satisfy the axioms of ZFC. Does anyone know of research and/or existing definitions along these lines? Mario Carneiro -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Mon Jan 5 23:10:27 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Mon, 5 Jan 2015 15:10:27 -0800 Subject: [opentheory-users] Preprint of OT->Metamath conversion paper, thoughts on MM->OT conversion In-Reply-To: References: Message-ID: Hi Mario, > Although the implementation is still in progress, I've completed a writeup > of the algorithm for converting OT article files into valid Metamath proofs, > to be published in the Journal of Formalized Reasoning. You can find the > preprint on arXiv, http://arxiv.org/abs/1412.8091 . That's a nice write-up of your work. I particularly enjoyed your discussion comparing the different forms of the Axiom of Choice in HOL and ZFC: "HOL is based on a version of the Axiom of Choice that is stronger than the usual one in ZFC. Instead of asserting that for any set there exists a choice function on that set, it asserts that a specific function is a choice function on the universe. If the HOL universe were a proper class, this would be problematic, but luckily it can be entirely contained within V?2, which is a set in ZFC, and thus the ZFC axiom of choice gives us a single choice function on all of V?2." It's nice to know that HOL is "small" enough to fit cleanly into ZFC in that way. > I've also been thinking about the reverse conversion process, but before I > get into the details I'd like to establish what are the usual conventions > are for producing good output, since so far I've only looked at the article > level and haven't even touched any theory files. In particular, how should I > structure the theory division process, and what OT base definitions should I > import? How to divide your theories is mainly a question of taste. I recommend aiming to base your theories on top of the standard theory library: http://opentheory.gilith.com/?pkg=base which contains many basic definitions, plus whatever other theories on the public OpenTheory repo http://opentheory.gilith.com/ that you find useful. Looking at the theories on the public repo may also provide some good examples of how to export Metamath theories into OpenTheory format. > Also, Metamath is built on ZFC foundations, although we also have the > Tarski-Grothendieck axiom defined. However, Metamath tracks axiom usage, and > there is a conscious effort to limit unnecessary axiom usage (most other > systems don't seem to do this, i.e. using the axiom of choice to prove the > law of excluded middle is rather overkill), so it is possible that some of > the weaker subsystems fit in vanilla HOL. However, it is well-known that ZFC > is stronger than HOL, and so the general approach I was intending is to add > some kind of universe axiom to say that "ind" is a really big set, big > enough for some construction of an epsilon-relation to satisfy the axioms of > ZFC. Does anyone know of research and/or existing definitions along these > lines? Your "large ind" proposal sounds similar to the "HOL + V" model in Mike Gordon's classic paper on merging HOL and Set Theory: https://www.cl.cam.ac.uk/~mjcg/papers/holst/index.html Though it would be even better if Metamath theories could be converted into "pure HOL". Cheers, Joe From di.gama at gmail.com Tue Jan 6 09:43:48 2015 From: di.gama at gmail.com (Mario Carneiro) Date: Tue, 6 Jan 2015 04:43:48 -0500 Subject: [opentheory-users] Preprint of OT->Metamath conversion paper, thoughts on MM->OT conversion In-Reply-To: References: Message-ID: On Mon, Jan 5, 2015 at 6:10 PM, Joe Leslie-Hurd wrote: > Your "large ind" proposal sounds similar to the "HOL + V" model in > Mike Gordon's classic paper on merging HOL and Set Theory: > > https://www.cl.cam.ac.uk/~mjcg/papers/holst/index.html > > Though it would be even better if Metamath theories could be converted > into "pure HOL". > Great, a paper like that is exactly what I was hoping for. Of course I would like to map as much as possible of Metamath into pure HOL, and since Metamath tracks axioms in a proof and theorems are generally proven in the weakest possible subsystems, this may well be possible for those theorems that are in fact embeddable in HOL. But what subsystem would that be? My gut tells me that Z should fit in HOL, but it seems a bit tricky to do properly. My thoughts: HOL contains types of cardinality om, ~P om, ~P ~P om, etc for any finite number of ~P's (that's the powerset operation, btw). Since any particular proof in Z will use the theorems "om e. V" (omega exists) and "x e. V -> ~P x e. V" (a powerset exists) finitely many times, you could define a function on types (does such a thing exist?) saying that a type A is "n-large" meaning there is an injection from ~P ~P ... ~P om to A (where there are n ~P symbols), and then a proof in Z would get V mapped to an arbitrary type A, and if there are n ~P's used in the proof you would preface the entire proof with "A is n-large". When you are done and ready to map the model back to the regular HOL notions, you replace A with ind->bool->...->bool (n times), and then prove that this type is n-large to discharge the extra assumption. Do you know of any papers or work done in the direction of embedding fragments of ZFC in HOL like this? Mario -------------- next part -------------- An HTML attachment was scrubbed... URL: From di.gama at gmail.com Tue Jan 6 09:48:51 2015 From: di.gama at gmail.com (Mario Carneiro) Date: Tue, 6 Jan 2015 04:48:51 -0500 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL Message-ID: Hello all, I'm trying to locate any research done on what kinds of subsystems of ZFC can be embedded into higher order logic. My initial approach on the subject leads me to believe that HOL can embed any proof in Z, using the following method: HOL contains types of cardinality om (omega), ~P om, ~P ~P om, etc for any finite number of ~P's (the powerset operation). Since any particular proof in Z will use the theorems "om e. V" (omega exists) and "x e. V -> ~P x e. V" (a powerset exists) finitely many times, you could define a function on types (does such a thing exist?) saying that a type A is "n-large" meaning there is an injection from ~P ~P ... ~P om to A (where there are n ~P symbols), and then a proof in Z would get V mapped to an arbitrary type A, and if there are n ~P's used in the proof you would preface the entire proof with "A is n-large". When you are done and ready to map the model back to the regular HOL notions, you replace A with ind->bool->...->bool (n times), and then prove that this type is n-large to discharge the extra assumption. Does anyone know of any papers or work done in the direction of embedding fragments of ZFC in HOL like this? Mario Carneiro -------------- next part -------------- An HTML attachment was scrubbed... URL: From rbj at rbjones.com Wed Jan 7 15:55:33 2015 From: rbj at rbjones.com (Roger Bishop Jones) Date: Wed, 07 Jan 2015 15:55:33 +0000 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL Message-ID: <54AD56F5.9060108@rbjones.com> A good place to look for the low-down on the relationship between HOL and set theory is a paper by Thomas Forster written originally for (and published in the proceedings of) HUG94. "Weak systems of set theory related to HOL" This has however been subsequently augmented and corrected so it is better to go to Thomas Forster's web page https://www.dpmms.cam.ac.uk/~tf/ or to write to him for a copy (tf at maths.cam.ac.uk). The essence of his conclusions as far as the present issue is concerned, (as I understand it) are as follows: HOL has the same consistency strength as Maclane Set theory, which is strictly weaker than Zermelo set theory. Therefore an embedding of Zemelo into HOL will not be possible without axiomatic extension of HOL, for which a strengthening of the axiom of infinity would suffice. For a typed Zermelo, and hence for the Z specification language the situation is different, and a full embedding of the Z specification language into HOL has been available in ProofPower since about 1994. What I address here is what is generally called a "shallow semantic embedding" or any embedding method which one would expect to be constrained by relative consistency strength. For a "deep" semantic embedding the constraints are more strict and a deep embedding of the Z specification language would also fail (without axiomatic extension). The question of "embedding a proof in Z" might be interpreted in a way not subject to such constraints, since the notion of proof in Z (as opposed to "truth in Z") is semi-decidable and fully formalisable in HOL. On the more detailed suggestions, the only functions over types, /as such/, are type constructors, which cannot take numeric parameters. However the effect of functions over types, insofar as they depend only on the cardinality of the type, can be realised. A predicate of type: num -> * -> BOOL could be defined which would ignore the value of the second parameter but would indicate whether the size of its type is or is not greater than the nth power of Nat. However, the principled objections mentioned above suggest that this would not suffice to secure the desired embedding. Roger Jones -------------- next part -------------- An HTML attachment was scrubbed... URL: From freek at cs.ru.nl Wed Jan 7 16:56:34 2015 From: freek at cs.ru.nl (Freek Wiedijk) Date: Wed, 7 Jan 2015 17:56:34 +0100 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL In-Reply-To: <54AD56F5.9060108@rbjones.com> References: <54AD56F5.9060108@rbjones.com> Message-ID: <20150107165634.GC2238@wheezy.localdomain> Dear Roger Jones, >On the more detailed suggestions, the only functions >over types, /as such/, are type constructors, which cannot >take numeric parameters. Of course there is John Harrison's trick of using a type as if it were a number, which he uses to define finite dimensional vectors: let dimindex = new_definition `dimindex(s:A->bool) = if FINITE(:A) then CARD(:A) else 1`;; let finite_image_tybij = new_type_definition "finite_image" ("finite_index","dest_finite_image") (prove (`?x. x IN 1..dimindex(:A)`, EXISTS_TAC `1` THEN REWRITE_TAC[IN_NUMSEG; LE_REFL; DIMINDEX_GE_1]));; let cart_tybij = new_type_definition "cart" ("mk_cart","dest_cart") (prove(`?f:(B)finite_image->A. T`,REWRITE_TAC[]));; After that you can write A^N (as syntax for `:(A,N)cart`), where you can "think" of N as a natural number. This is an engineered version of what you wrote after this: that you can have functions that ignore their argument, and just return information about the type of the argument (`dimindex` in this case). Freek From rbj at rbjones.com Wed Jan 7 20:58:41 2015 From: rbj at rbjones.com (Roger Jones) Date: Wed, 07 Jan 2015 20:58:41 +0000 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL Message-ID: <20150107205848.CBA1CADD8A@relay.mailchannels.net> On 7 Jan 2015 16:56, Freek Wiedijk wrote: > > This is an engineered version of what you wrote after this: > that you can have functions that ignore their argument, > and just return information about the type of the argument > The underlying phenomenon necessitated? constraints on definitions introduced into HOL in about 1988 and further discussed in Rob Arthan's recent HOLS conference paper. Roger Jones From Ramana.Kumar at cl.cam.ac.uk Thu Jan 8 06:17:10 2015 From: Ramana.Kumar at cl.cam.ac.uk (Ramana Kumar) Date: Thu, 8 Jan 2015 17:17:10 +1100 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL In-Reply-To: <54AD56F5.9060108@rbjones.com> References: <54AD56F5.9060108@rbjones.com> Message-ID: On Thu, Jan 8, 2015 at 2:55 AM, Roger Bishop Jones wrote: > HOL has the same consistency strength as Maclane Set theory, > which is strictly weaker than Zermelo set theory. > Therefore an embedding of Zemelo into HOL will not be possible > without axiomatic extension of HOL, for which a strengthening > of the axiom of infinity would suffice. > Somewhat related work on specifying Zermelo set theory in HOL (and using this to prove HOL's consistency in HOL, under the above-mentioned assumption) can be found at https://cakeml.org/jarhol.pdf (under review). -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ramana.Kumar at cl.cam.ac.uk Thu Jan 8 07:18:33 2015 From: Ramana.Kumar at cl.cam.ac.uk (Ramana Kumar) Date: Thu, 8 Jan 2015 18:18:33 +1100 Subject: [opentheory-users] extracting intermediate theorems In-Reply-To: References: Message-ID: I was mainly just being lazy about trying to generate an article for a theorem that I "know must be somewhere as an intermediate in the standard library" (although maybe it actually wasn't). I ended up generating an article for it in HOL4, so I don't have a particularly strong need for these features any more. Thanks for your help though - the tips for putting together packages with exact dependencies etc. were useful. On Fri, Jan 2, 2015 at 7:31 PM, Joe Leslie-Hurd wrote: > Hi Ramana, > > What you're proposing is certainly possible, but first I'd like to > understand a bit more about your use-case for accessing intermediate > theorems. > > At present the article standard and opentheory tool conspire to create > an illusion that the intermediate theorems of the theory are > irrelevant, and that only the imported assumptions and exported > theorems are important. As a consequence of this abstraction, tools > that process articles may feel free to replace any or all intermediate > theorems so long as the assumption/theorem interface is maintained. > > Supporting post-hoc extraction of intermediate theorems and promoting > them to exported theorems goes against this philosophy, because an > article processing tool that changed intermediate theorems could break > something downstream that was relying on them having a particular form > to extract and export. > > Given the above, could you please elaborate on your use-case for > accessing intermediate theorems of articles? > > Cheers, > > Joe > > On Sat, Dec 20, 2014 at 9:31 PM, Ramana Kumar > wrote: > > Hi Joe, > > > > On Sat, Dec 20, 2014 at 9:09 PM, Joe Leslie-Hurd wrote: > >> > >> > Show me the intermediate (i.e. unexported) theorems that arise when > >> > running > >> > an article. > >> > >> No, unfortunately not. The best it can do is tell you *how many* > >> theorems are generated, by using the --inference option. > >> > >> Did you have any thoughts on a way to present intermediate theorems to > the > >> user? > > > > > > What would be useful to me is if I could search for intermediate theorems > > with a pattern. I'd guess you'd rather stay away from specifying parsing > of > > such patterns. I wouldn't mind, however, writing my pattern as OpenTheory > > article commands for creating a term. I'd then like to get back all > > intermediate theorems that match. > > > >> > >> > Create an article that exports a previously unexported theorem, taking > >> > an > >> > existing article as input. > >> > >> Also no I'm afraid. > > > > > > That's a pity. Would it be hard to add? Presuming we solve the problem > above > > of specifying an intermediate theorem. > > > > I guess for the moment I can get around this by using a custom reader > that > > looks for the theorem I want and cuts off the article as soon as it > finds it > > (and adds on an export). It would be nice if the opentheory tool had > enough > > features to support this itself, but maybe it's a little outside your > design > > goals? On the other hand, I think a good suite of powerful manipulations > on > > OpenTheory packages for a variety of purposes would help buy-in. > > > >> > >> > Minimise an article for what is required for a particular theorem (I > >> > think > >> > the answer here is yes, by creating a package with the desired theorem > >> > and > >> > then asking for an article for it to be generated...?) > >> > >> Indeed. Suppose article foo.art exports a set of theorems containing a > >> theorem T of interest, then you can create an article bar.art that > >> proves T by axiom, and then run > >> > >> echo 'a { article: "foo.art" } main { import: a article: "bar.art" }' > >> | opentheory info --article -o baz.art theory:- > >> > >> to get a minimal article baz.art proving T. > > > > > > Great, thanks. > > > > _______________________________________________ > > 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 rbj at rbjones.com Thu Jan 8 15:42:16 2015 From: rbj at rbjones.com (Roger Jones) Date: Thu, 08 Jan 2015 15:42:16 +0000 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL Message-ID: On 8 Jan 2015 06:17, Ramana Kumar wrote: > > > > Somewhat related work on specifying Zermelo set theory in HOL (and using this to prove HOL's consistency in HOL, under the above-mentioned assumption) can be found at https://cakeml.org/jarhol.pdf (under review). That is the paper I had intended to mention in my second post.? My apologies for incorrectly attributing it to Rob Arthan rather than to the team of which you and he were members. Roger Jones From tf at dpmms.cam.ac.uk Wed Jan 7 20:08:23 2015 From: tf at dpmms.cam.ac.uk (Thomas Forster) Date: 07 Jan 2015 20:08:23 +0000 Subject: [opentheory-users] Embedding Z (or other ZFC fragments) in HOL In-Reply-To: <54AD56F5.9060108@rbjones.com> References: <54AD56F5.9060108@rbjones.com> Message-ID: Roger, Thanks for copying me in and reminding me. It's probably time i had another look at this question, but it does sound as if HOL should be equivalent to Mac/KF. Since i wrote that article i have been exposed to the notion of *synonymy* and a good question might be whether or not HOL is synonymous with Mac and KF... On Jan 7 2015, Roger Bishop Jones wrote: >A good place to look for the low-down on the relationship between >HOL and set theory is a paper by Thomas Forster written originally >for (and published in the proceedings of) HUG94. > >"Weak systems of set theory related to HOL" > >This has however been subsequently augmented and corrected >so it is better to go to Thomas Forster's web page > https://www.dpmms.cam.ac.uk/~tf/ >or to write to him for a copy (tf at maths.cam.ac.uk). > >The essence of his conclusions as far as the present issue is >concerned, (as I understand it) are as follows: > >HOL has the same consistency strength as Maclane Set theory, >which is strictly weaker than Zermelo set theory. >Therefore an embedding of Zemelo into HOL will not be possible >without axiomatic extension of HOL, for which a strengthening >of the axiom of infinity would suffice. >For a typed Zermelo, and hence for the Z specification language >the situation is different, and a full embedding of the Z specification >language into HOL has been available in ProofPower since about >1994. > >What I address here is what is generally called a "shallow semantic >embedding" >or any embedding method which one would expect to be >constrained by relative consistency strength. >For a "deep" semantic embedding the constraints are more strict >and a deep embedding of the Z specification language would also >fail (without axiomatic extension). > >The question of "embedding a proof in Z" might be interpreted >in a way not subject to such constraints, since the notion of >proof in Z (as opposed to "truth in Z") is semi-decidable and fully >formalisable in HOL. > >On the more detailed suggestions, the only functions over types, >/as such/, are type constructors, which cannot take numeric >parameters. However the effect of functions over types, insofar >as they depend only on the cardinality of the type, can be realised. >A predicate of type: > > num -> * -> BOOL > >could be defined which would ignore the value of the second >parameter but would indicate whether the size of its type is >or is not greater than the nth power of Nat. >However, the principled objections mentioned above suggest >that this would not suffice to secure the desired embedding. > >Roger Jones > > > > > > > From cody.roux at gmail.com Wed Jan 7 22:07:08 2015 From: cody.roux at gmail.com (roux cody) Date: Wed, 7 Jan 2015 17:07:08 -0500 Subject: [opentheory-users] [FOM] Embedding Z (or other ZFC fragments) in HOL In-Reply-To: References: Message-ID: Hi Mario, You've probably found Forster's "Weak systems of Set Theory Related to HOL" https://www.dpmms.cam.ac.uk/~tf/maltapaper.ps Which clarifies things a bit: HOL is *exactly* as strong as "Mac Lane set theory", which is Zermelo set theory with only *bounded* comprehension (no quantifiers over all sets) and so is quite weaker than Zermelo set theory *per se*. A nice article by Alexandre Miquel describes a variant of HOL (which allows additional quantifications) that is *exactly* as powerful as Z: they are equiconsistent (in PA). "lambda Z: Zermelo's Set Theory as a PTS with 4 Sorts" http://dl.acm.org/citation.cfm?id=2150524 This rather nicely settles the question of finding a type theory as powerful as Z set theory. I think ZF is considerably more difficult, and as far as I know the question is still open. Best, Cody On Tue, Jan 6, 2015 at 4:48 AM, Mario Carneiro wrote: > Hello all, > > I'm trying to locate any research done on what kinds of subsystems of ZFC > can be embedded into higher order logic. My initial approach on the subject > leads me to believe that HOL can embed any proof in Z, using the following > method: > > HOL contains types of cardinality om (omega), ~P om, ~P ~P om, etc for any > finite number of ~P's (the powerset operation). Since any particular proof > in Z will use the theorems "om e. V" (omega exists) and "x e. V -> ~P x e. > V" (a powerset exists) finitely many times, you could define a function on > types (does such a thing exist?) saying that a type A is "n-large" meaning > there is an injection from ~P ~P ... ~P om to A (where there are n ~P > symbols), and then a proof in Z would get V mapped to an arbitrary type A, > and if there are n ~P's used in the proof you would preface the entire > proof with "A is n-large". When you are done and ready to map the model > back to the regular HOL notions, you replace A with ind->bool->...->bool (n > times), and then prove that this type is n-large to discharge the extra > assumption. > > Does anyone know of any papers or work done in the direction of embedding > fragments of ZFC in HOL like this? > > Mario Carneiro > > _______________________________________________ > FOM mailing list > FOM at cs.nyu.edu > http://www.cs.nyu.edu/mailman/listinfo/fom > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From josef.urban at gmail.com Thu Jan 8 05:12:23 2015 From: josef.urban at gmail.com (Josef Urban) Date: Thu, 8 Jan 2015 06:12:23 +0100 Subject: [opentheory-users] [FOM] Embedding Z (or other ZFC fragments) in HOL In-Reply-To: References: Message-ID: Hi Mario, I do not know the Z fragment, but the main issues in ZFC vs HOL seem to be: (1) the HOL type discipline prevents you to mix sets of different types, and (2) the HOL axioms are too weak to allow transfinite constructions. Off the top of my head, I am aware of the following: - the HOLZF work in Isabelle by Obua, just axiomatizing ZF(C?) as a type (practically adding an inaccessible cardinal axiom instead of just omega) - a bridge between Isabelle/ZF and Isabelle/Hol by Krauss (I do not know the details) - Kuncar's MS work on importing the Mizar soft typing mechanisms into HOL (Light), again embedding the whole ZFC there as a separate type - Mike Gordon's older paper discussing various options how to link ZF and HOL Josef On Jan 8, 2015 1:32 AM, "Mario Carneiro" wrote: > Hello all, > > I'm trying to locate any research done on what kinds of subsystems of ZFC > can be embedded into higher order logic. My initial approach on the subject > leads me to believe that HOL can embed any proof in Z, using the following > method: > > HOL contains types of cardinality om (omega), ~P om, ~P ~P om, etc for any > finite number of ~P's (the powerset operation). Since any particular proof > in Z will use the theorems "om e. V" (omega exists) and "x e. V -> ~P x e. > V" (a powerset exists) finitely many times, you could define a function on > types (does such a thing exist?) saying that a type A is "n-large" meaning > there is an injection from ~P ~P ... ~P om to A (where there are n ~P > symbols), and then a proof in Z would get V mapped to an arbitrary type A, > and if there are n ~P's used in the proof you would preface the entire > proof with "A is n-large". When you are done and ready to map the model > back to the regular HOL notions, you replace A with ind->bool->...->bool (n > times), and then prove that this type is n-large to discharge the extra > assumption. > > Does anyone know of any papers or work done in the direction of embedding > fragments of ZFC in HOL like this? > > Mario Carneiro > > _______________________________________________ > FOM mailing list > FOM at cs.nyu.edu > http://www.cs.nyu.edu/mailman/listinfo/fom > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From di.gama at gmail.com Thu Jan 8 17:37:27 2015 From: di.gama at gmail.com (Mario Carneiro) Date: Thu, 8 Jan 2015 12:37:27 -0500 Subject: [opentheory-users] [FOM] Embedding Z (or other ZFC fragments) in HOL In-Reply-To: References: Message-ID: Thank you to everyone who has provided such great references; this is exactly what I was looking for. I think I can see why my proposed translation would fail, since there is a possibility that unbounded quantifiers in the separation scheme, which would be translated to bounded quantifiers over a "large enough" set, could still detect that they are bounded. To take a simple example, the proposition ( om e. x /\ A. x E. y rank(y) > rank(x) ) would be true in the intended model V_2om of HOL but false in any type (assuming that types are mapped to elements of V_2om), no matter how large. The claim that Z (just so we're on the same page, Z means Zermelo set theory here) proves Con(HOL) leads me to consider the reverse embedding, however, by roughly the same method. Define the types 2 = bool and om = ind as 0-large, and define an n-large set inductively as sets of the form A, A^B for any n-1-large sets A, B. This is definable in Z, and the set of all n-large sets for fixed n provably exists in Z. Then any given proof in HOL will use only n-large sets up to some fixed n, and all these can be proven to exist. Furthermore, this approach allows one to map HOL + global choice (which is the way AC is usually formulated in HOL) to ZC, because if you assume that f is a choice function on all n-large sets for some n large enough for all the types in the proof, then f can play the role of the @ choice function, and at the end of the proof you can discharge the assumption by AC. Mario On Wed, Jan 7, 2015 at 5:07 PM, roux cody wrote: > Hi Mario, > > You've probably found Forster's "Weak systems of Set Theory Related to > HOL" > > https://www.dpmms.cam.ac.uk/~tf/maltapaper.ps > > Which clarifies things a bit: HOL is *exactly* as strong as "Mac Lane set > theory", which is Zermelo set theory with only *bounded* comprehension (no > quantifiers over all sets) > and so is quite weaker than Zermelo set theory *per se*. > > A nice article by Alexandre Miquel describes a variant of HOL (which > allows additional quantifications) that is *exactly* as powerful as Z: they > are equiconsistent (in PA). > > "lambda Z: Zermelo's Set Theory as a PTS with 4 Sorts" > > http://dl.acm.org/citation.cfm?id=2150524 > > This rather nicely settles the question of finding a type theory as > powerful as Z set theory. I think ZF is considerably more difficult, and as > far as I know the question is still open. > > Best, > > Cody > > > On Tue, Jan 6, 2015 at 4:48 AM, Mario Carneiro wrote: > >> Hello all, >> >> I'm trying to locate any research done on what kinds of subsystems of ZFC >> can be embedded into higher order logic. My initial approach on the subject >> leads me to believe that HOL can embed any proof in Z, using the following >> method: >> >> HOL contains types of cardinality om (omega), ~P om, ~P ~P om, etc for >> any finite number of ~P's (the powerset operation). Since any particular >> proof in Z will use the theorems "om e. V" (omega exists) and "x e. V -> ~P >> x e. V" (a powerset exists) finitely many times, you could define a >> function on types (does such a thing exist?) saying that a type A is >> "n-large" meaning there is an injection from ~P ~P ... ~P om to A (where >> there are n ~P symbols), and then a proof in Z would get V mapped to an >> arbitrary type A, and if there are n ~P's used in the proof you would >> preface the entire proof with "A is n-large". When you are done and ready >> to map the model back to the regular HOL notions, you replace A with >> ind->bool->...->bool (n times), and then prove that this type is n-large to >> discharge the extra assumption. >> >> Does anyone know of any papers or work done in the direction of embedding >> fragments of ZFC in HOL like this? >> >> Mario Carneiro >> >> _______________________________________________ >> FOM mailing list >> FOM at cs.nyu.edu >> http://www.cs.nyu.edu/mailman/listinfo/fom >> >> > > _______________________________________________ > FOM mailing list > FOM at cs.nyu.edu > http://www.cs.nyu.edu/mailman/listinfo/fom > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at gilith.com Thu Jan 8 21:44:35 2015 From: joe at gilith.com (Joe Leslie-Hurd) Date: Thu, 8 Jan 2015 13:44:35 -0800 Subject: [opentheory-users] extracting intermediate theorems In-Reply-To: References: Message-ID: Hi Ramana, Sure thing, thanks for letting me know you were able to solve your problem in another way. Please let me know if you run across another use-case for searching and/or extracting intermediate theorems. Cheers, Joe On Wed, Jan 7, 2015 at 11:18 PM, Ramana Kumar wrote: > I was mainly just being lazy about trying to generate an article for a > theorem that I "know must be somewhere as an intermediate in the standard > library" (although maybe it actually wasn't). I ended up generating an > article for it in HOL4, so I don't have a particularly strong need for these > features any more. Thanks for your help though - the tips for putting > together packages with exact dependencies etc. were useful. > > On Fri, Jan 2, 2015 at 7:31 PM, Joe Leslie-Hurd wrote: >> >> Hi Ramana, >> >> What you're proposing is certainly possible, but first I'd like to >> understand a bit more about your use-case for accessing intermediate >> theorems. >> >> At present the article standard and opentheory tool conspire to create >> an illusion that the intermediate theorems of the theory are >> irrelevant, and that only the imported assumptions and exported >> theorems are important. As a consequence of this abstraction, tools >> that process articles may feel free to replace any or all intermediate >> theorems so long as the assumption/theorem interface is maintained. >> >> Supporting post-hoc extraction of intermediate theorems and promoting >> them to exported theorems goes against this philosophy, because an >> article processing tool that changed intermediate theorems could break >> something downstream that was relying on them having a particular form >> to extract and export. >> >> Given the above, could you please elaborate on your use-case for >> accessing intermediate theorems of articles? >> >> Cheers, >> >> Joe >> >> On Sat, Dec 20, 2014 at 9:31 PM, Ramana Kumar >> wrote: >> > Hi Joe, >> > >> > On Sat, Dec 20, 2014 at 9:09 PM, Joe Leslie-Hurd wrote: >> >> >> >> > Show me the intermediate (i.e. unexported) theorems that arise when >> >> > running >> >> > an article. >> >> >> >> No, unfortunately not. The best it can do is tell you *how many* >> >> theorems are generated, by using the --inference option. >> >> >> >> Did you have any thoughts on a way to present intermediate theorems to >> >> the >> >> user? >> > >> > >> > What would be useful to me is if I could search for intermediate >> > theorems >> > with a pattern. I'd guess you'd rather stay away from specifying parsing >> > of >> > such patterns. I wouldn't mind, however, writing my pattern as >> > OpenTheory >> > article commands for creating a term. I'd then like to get back all >> > intermediate theorems that match. >> > >> >> >> >> > Create an article that exports a previously unexported theorem, >> >> > taking >> >> > an >> >> > existing article as input. >> >> >> >> Also no I'm afraid. >> > >> > >> > That's a pity. Would it be hard to add? Presuming we solve the problem >> > above >> > of specifying an intermediate theorem. >> > >> > I guess for the moment I can get around this by using a custom reader >> > that >> > looks for the theorem I want and cuts off the article as soon as it >> > finds it >> > (and adds on an export). It would be nice if the opentheory tool had >> > enough >> > features to support this itself, but maybe it's a little outside your >> > design >> > goals? On the other hand, I think a good suite of powerful manipulations >> > on >> > OpenTheory packages for a variety of purposes would help buy-in. >> > >> >> >> >> > Minimise an article for what is required for a particular theorem (I >> >> > think >> >> > the answer here is yes, by creating a package with the desired >> >> > theorem >> >> > and >> >> > then asking for an article for it to be generated...?) >> >> >> >> Indeed. Suppose article foo.art exports a set of theorems containing a >> >> theorem T of interest, then you can create an article bar.art that >> >> proves T by axiom, and then run >> >> >> >> echo 'a { article: "foo.art" } main { import: a article: "bar.art" }' >> >> | opentheory info --article -o baz.art theory:- >> >> >> >> to get a minimal article baz.art proving T. >> > >> > >> > Great, thanks. >> > >> > _______________________________________________ >> > 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 >