<div dir="ltr">Hi Joe,<br><br>Sorry, but I feel like we are talking past each other at the moment. I asked a<br>few questions in my last email which I don't think you addressed. Let me<br>address the concerns in your email first, then I will try to ask my questions<br>again.<br><br>I agree with you about the value of underspecified constants in the standard<br>library. The source of value is that they put fewer constraints on readers,<br>thereby making theories based on the standard library more widely readable.<br><br>On creating theories in the HOL4 namespace, and depending on the hol-base<br>package: I see these as interim measures, with my desired goal being that the<br>theorems and additional constants eventually all make it into the standard<br>namespace and depend on a nicely organised, unified, tree of packages. I think<br>we probably agree on that goal, but I'm not sure. What do you say?<br><br>More generally, my goal is to put together OpenTheory packages that are so<br>compelling in their organisation and coverage, having taken theorems from all<br>the existing HOL provers, that everyone wants to use them. I want to move<br>towards unification and away from fragmentation. I would be sad if OpenTheory<br>simply becomes a mirror of the existing fragmentation and incompatibility<br>between the various theorem prover libraries today. Do you agree with this more<br>general goal?<br><br>I would like to discuss how to achieve the HOL4-specific goal now, because I<br>think we have enough information to make progress on such a discussion (enough<br>HOL4 packages are already created). (This is in response to "When the HOL4<br>theory packages are in place...".)<br><br>Now back to the questions from my previous email:<br><br> - Do you agree with the three pieces of my solution to issue (2)? How do you<br> think responsibility for those tasks should be divided between readers and<br> creators?<br><br> - I guess your response "I'm loath to totalize any of the constants..." was<br> mainly to my suggested solution 0 to issue (3). That is a reasonable<br> objection to solution 0.<br> But:<br> What do you think of solution 1, namely, providing multiple versions of<br> constants that can be overspecified (in addition to the underspecified<br> version), together with theorems relating them?<br><br>Thanks for bearing with me.<br><br>Cheers,<br>Ramana<br><br><div class="gmail_extra"><br><div class="gmail_quote">On 12 May 2016 at 09:19, Joe Leslie-Hurd <span dir="ltr"><<a href="mailto:joe@gilith.com" target="_blank">joe@gilith.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ramana,<br>
<br>
The problem I found with totalized constants is that the extra<br>
properties (e.g., inv 0 = 0) quickly infect a whole theory, which<br>
makes it useless for reading into an environment where the constant is<br>
defined differently.<br>
<br>
I'm loath to totalize any of the constants in the OpenTheory standard<br>
library just because there's an open world assumption that new<br>
environments might come along---beyond the HOL4, HOL Light and<br>
ProofPower theorem provers---with different policies on whether and<br>
how to totalize constants, but would still be able to read in current<br>
OpenTheory theories with underspecified constants.<br>
<br>
>From your perspective as a theory creator I say just create theories<br>
in OpenTheory format that depend on your hol-base theory with its HOL4<br>
flavour of constants. Incidentally, you also asked about naming<br>
schemes in the hol-base theory, and I think it is set up perfectly<br>
with everything under a HOL4 namespace. Within that you can do<br>
whatever makes sense within a HOL4 context, which is the theory name<br>
followed by the symbol name. I do the same thing with HOL Light<br>
symbols, where there is no notion of theory name so it is even<br>
flatter.<br>
<br>
When the HOL4 theory packages are in place we can assess how feasible<br>
and desirable it is to remove their dependency on the hol-base<br>
package, so they can be read into any environment.<br>
<br>
Does that sound reasonable?<br>
<br>
Cheers,<br>
<br>
Joe<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, May 10, 2016 at 11:40 PM, Ramana Kumar <<a href="mailto:ramana@member.fsf.org">ramana@member.fsf.org</a>> wrote:<br>
> Hi Joe,<br>
><br>
> Thanks for your reply, which expresses the problem clearly.<br>
> There are the three issues with the standard theory library you listed, and<br>
> there are two perspectives to consider: reading an OpenTheory proof into a<br>
> theorem prover ("reading"), and creating an OpenTheory proof from a native<br>
> theory ("creating").<br>
><br>
> Before considering issue (3), I want clarify what to do about the other two<br>
> issues from the creating perspective. For (1), there is no problem since the<br>
> extra constant can be ignored. For (2), I think some variation on your<br>
> solution<br>
> for the reading perspective could work. There are three pieces to the<br>
> solution:<br>
><br>
> A: Define the native version of the constant<br>
> B: Prove an equation relating the native version to the OpenTheory version<br>
> C: Use the theorem from B to rewrite theorems mentioning the native<br>
> constant<br>
> into theorems mentioning only the OpenTheory version of the constant.<br>
><br>
> How should responsibility for these tasks be divided between readers and<br>
> creators? Initially, in the creator role, I am tempted to do only A, and<br>
> leave<br>
> B and C to the readers. I would expect you to eventually want all three to<br>
> be<br>
> done by the creator. I think there is some variation in how desirable C<br>
> might<br>
> be for different readers.<br>
><br>
> Now for issue (3) from the creating perspective. I agree that it is a real<br>
> problem. I have a couple of ideas for possible solutions.<br>
><br>
> 0. If the constant only has one natural candidate for how it might be<br>
> overspecified, and all theorem provers overspecify it that way, simply<br>
> do<br>
> so in the OpenTheory standard library too.<br>
> 1. Provide multiple versions of the constant in the standard library for<br>
> each<br>
> of the natural ways of overspecifying it, and prove theorems relating<br>
> them<br>
> (under appropriate conditions). Theorems that can be stated using the<br>
> underspecified version should be (and readers should prefer these), but<br>
> theorems that require overspecification can also be included (and<br>
> readers<br>
> can handle these as they do issue (2)).<br>
><br>
> Indeed, I think issue (3) is a variant of issue (2) where we cannot prove an<br>
> unconditional equation between different versions of the constants, but<br>
> where<br>
> we can still prove a conditional one.<br>
><br>
> Do you have any other ideas for how to deal with these issues?<br>
><br>
> Cheers,<br>
> Ramana<br>
><br>
> On 10 May 2016 at 16:04, Joe Leslie-Hurd <<a href="mailto:joe@gilith.com">joe@gilith.com</a>> wrote:<br>
>><br>
>> Hi Ramana,<br>
>><br>
>> Despite the radio silence, I have been thinking about your question<br>
>> off and on since you asked it.<br>
>><br>
>> The essential problem is that the different HOL theorem provers have<br>
>> slightly different definitions of fundamental constants, and so all<br>
>> the theories that are built on top of them are incompatible with other<br>
>> theorem provers.<br>
>><br>
>> The standard theory library uploaded to the Gilith OpenTheory repo is<br>
>> my attempt at defining a common base that is implemented by all<br>
>> theorem provers, but it is imperfect in several ways:<br>
>><br>
>> 1. It defines constants (such as Data.List.nub) that are not<br>
>> implemented in all the HOL theorem provers.<br>
>> 2. It defines constants (such as Data.List.zip) that exist in some HOL<br>
>> theorem provers with a different type.<br>
>> 3. It defines constants (such as Number.Real.inv) that are<br>
>> underspecified compared to their definitions in some HOL theorem<br>
>> provers.<br>
>><br>
>> When we are reading an OpenTheory proof into a HOL theorem prover,<br>
>> then I don't believe any of these imperfections present any real<br>
>> obstacle:<br>
>><br>
>> 1. If the proof relies on Data.List.nub, then this can simply be<br>
>> defined in the theorem prover. As you rightly say, such constants<br>
>> shouldn't really be part of the standard theory library, but I believe<br>
>> there are few enough of them that we can just add to the theorem<br>
>> provers.<br>
>> 2. In principle the OpenTheory interface in the HOL theorem prover<br>
>> would be able to translate constants from one type to an isomorphic<br>
>> one. One way to do this would be to define the OpenTheory versions of<br>
>> the constants in terms of the native ones and then "clean up" the<br>
>> resulting theorems by replacing the OpenTheory versions of the<br>
>> constants by expanding their definitions.<br>
>> 3. The OpenTheory proof will rely on fewer properties of such<br>
>> constants than are available in the native version, so the proof will<br>
>> go through.<br>
>><br>
>> However, when creating OpenTheory proofs from native theories, then<br>
>> (3) appears to be a real problem. In my work I've tried to create a<br>
>> body of theories that rely only on the underspecified properties of<br>
>> such constants, but when I tried to translate some existing HOL Light<br>
>> proofs I found it hard going (I think I was trying to eliminate the<br>
>> saturated subtraction property: !n. 0 - n = 0).<br>
>><br>
>> Do you have any ideas for how to overcome obstacle (3) so that we can<br>
>> start to build up a body of theories that can be read into any HOL<br>
>> theorem prover?<br>
>><br>
>> Cheers,<br>
>><br>
>> Joe<br>
>><br>
>><br>
> _______________________________________________<br>
> opentheory-users mailing list<br>
> <a href="mailto:opentheory-users@gilith.com">opentheory-users@gilith.com</a><br>
> <a href="http://www.gilith.com/opentheory/mailing-list" rel="noreferrer" target="_blank">http://www.gilith.com/opentheory/mailing-list</a><br></div></div></blockquote></div></div></div>