From andres.sicard.ramirez at gmail.com Fri Apr 1 10:55:40 2011 From: andres.sicard.ramirez at gmail.com (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 1 Apr 2011 05:55:40 -0500 Subject: [metis-users] Hypothesis and axioms in Metis Message-ID: Dear Joe, From bogus@does.not.exist.com Fri Apr 1 10:56:29 2011 From: bogus@does.not.exist.com () Date: Fri, 01 Apr 2011 10:56:29 -0000 Subject: No subject Message-ID: "hypothesis" to annotate a TPTP formula. Is there some difference from Metis's point of view? Best regards, --=20 Andr=C3=A9s From joe at gilith.com Fri Apr 1 17:08:27 2011 From: joe at gilith.com (Joe Hurd) Date: Fri, 1 Apr 2011 10:08:27 -0700 Subject: [metis-users] Hypothesis and axioms in Metis In-Reply-To: References: Message-ID: Hi Andres, I've just had a look at the sources, and I don't think Metis ever generates a new formula with a "hypothesis" role in a proof (it would use an "axiom" for this purpose), but it should preserve the role of a "hypothesis" input formula that occurs in a problem. I agree with you that I don't believe there is a practical difference between the two roles. Cheers, Joe 2011/4/1 Andr?s Sicard-Ram?rez : > Dear Joe, > > From TPTP semantics, it seems there is no difference in use "axiom" or > "hypothesis" to annotate a TPTP formula. Is there some difference > from Metis's point of view? > > Best regards, > > -- > Andr?s > > _______________________________________________ > metis-users mailing list > metis-users at gilith.com > http://www.gilith.com/mailman/listinfo/metis-users > From joe at gilith.com Thu Apr 7 17:24:29 2011 From: joe at gilith.com (Joe Hurd) Date: Thu, 7 Apr 2011 10:24:29 -0700 Subject: [metis-users] rewrite structure in Metis In-Reply-To: References: Message-ID: Hi James, [This is just the kind of technical information that I'm trying to archive on the metis-users list, so I'll take up your offer to cc: my reply to the list.] The Rewrite structure is pretty complex inside, but it seems for your task you only need to use its API, which is a little easier to explain. In fact, if you're maintaining a backtracking tree then you might just be able to store the Rewrite structure that is in effect at the splitting point, and then use this as the starting point when you return from one branch and go down the other. Since the Rewrite structure is purely functional, the version you store is guaranteed not to change while you explore. Does this address your needs, or is there a reason why you can't use this technique? Also, if the obscure bug you discovered lives in the Metis code, I'd appreciate knowing more details. Cheers, Joe On Thu, Apr 7, 2011 at 6:29 AM, James Bridge wrote: > Hi Joe, > > As you know, I am implementing splitting with backtracking in MetiTarski and > to do this properly I need to be able to remove equations from the rewrite > structure as well as adding them (i.e. when backtracking). > > I initially did this by creating a new rewrite structure and passing > equations from one to the other, filtering out any that had been made > redundant by the backtracking. Unfortunately this seems to lead to an > obscure bug by which an axiom equational clause is repeatedly returned by > extract_rewritable. > > It would be very useful if you could explain the various parts of the > rewrite structure. > > I didn't copy in the Metis-Users group on this e-mail as I didn't know if it > was of general interest, but I am of course quite happy for you to do so in > your reply. > > Best Regards, > > James > From jpb65 at cam.ac.uk Thu Apr 7 21:31:04 2011 From: jpb65 at cam.ac.uk (James Bridge) Date: 07 Apr 2011 22:31:04 +0100 Subject: [metis-users] rewrite structure in Metis In-Reply-To: References: Message-ID: Hi Joe, Sadly it is not a simple backtracking tree - a split doesn't freeze conditions at the split point because heavier clauses coming out of waiting, that don't depend on the split, may combine with other clauses that don't depend on the split and thus it may be possible that new equations are written to the rewrite structure that need to be retained even after backtracking. Each clause carries a label indicating which splits it depends on so it is possible to determine which should be deleted on backtracking (and in some cases which should be restored). So what I want to be able to do is run through the rewrite structure and remove any equations, and related data items, which have redundant labels. I had a similar problem with the waiting clause set which, as you know, is stored as a functional heap. To avoid destroying the heap and reforming it I use a lazy approach and check each clause as it is removed from the heap. (I would like to improve on this at some stage but it is not an urgent priority.) As far as the bug is concerned, I don't think this is in the Metis code per se, rather it arises because of my attempt to filter the rewrite structure. What happens is that an equational axiom is placed in the original structure and stays there quite happily (i.e. it is not removed as a potentially simplyfiable clause by extract_rewritable). Then after I have done my filtering process as part of backtracking it is extracted from the new rewrite structure. So the problem arises in my attempt at reproducing the rewrite structure. I can think of work-arounds, such as keeping a list copy of everything added to the rewrite structure and then filter this list and recreate the rewrite structure on backtracking but this seems to be a bit extravagant on storage space. (Though I think that the rewrite structure is probably small compared to other storage structures such as waiting.) In general, the problem with backtracking is that most Metis structures are well set up to accept new clauses but are much less happy about giving them back again! (This is not a criticism of Metis, I think most theorem provers are written in the same way.) James On Apr 7 2011, Joe Hurd wrote: >Hi James, > >[This is just the kind of technical information that I'm trying to >archive on the metis-users list, so I'll take up your offer to cc: my >reply to the list.] > >The Rewrite structure is pretty complex inside, but it seems for your >task you only need to use its API, which is a little easier to >explain. > >In fact, if you're maintaining a backtracking tree then you might just >be able to store the Rewrite structure that is in effect at the >splitting point, and then use this as the starting point when you >return from one branch and go down the other. Since the Rewrite >structure is purely functional, the version you store is guaranteed >not to change while you explore. > >Does this address your needs, or is there a reason why you can't use >this technique? > >Also, if the obscure bug you discovered lives in the Metis code, I'd >appreciate knowing more details. > >Cheers, > >Joe > >On Thu, Apr 7, 2011 at 6:29 AM, James Bridge wrote: >> Hi Joe, >> >> As you know, I am implementing splitting with backtracking in >> MetiTarski and to do this properly I need to be able to remove equations >> from the rewrite structure as well as adding them (i.e. when >> backtracking). >> >> I initially did this by creating a new rewrite structure and passing >> equations from one to the other, filtering out any that had been made >> redundant by the backtracking. Unfortunately this seems to lead to an >> obscure bug by which an axiom equational clause is repeatedly returned by >> extract_rewritable. >> >> It would be very useful if you could explain the various parts of the >> rewrite structure. >> >> I didn't copy in the Metis-Users group on this e-mail as I didn't know >> if it was of general interest, but I am of course quite happy for you to >> do so in your reply. >> >> Best Regards, >> >> James >> > From joe at gilith.com Thu Apr 7 22:20:31 2011 From: joe at gilith.com (Joe Hurd) Date: Thu, 7 Apr 2011 15:20:31 -0700 Subject: [metis-users] rewrite structure in Metis In-Reply-To: References: Message-ID: Hi James, > In general, the problem with backtracking is that most Metis structures are > well set up to accept new clauses but are much less happy about giving them > back again! (This is not a criticism of Metis, I think most theorem provers > are written in the same way.) I think you have put your finger on the root of the problem here, and I can illustrate why this is in a simple example. Suppose the rewrite set contains one equation { a = b } and down one branch of a split the same equation happens to be added (which I will mark with a *): { a = b, a =* b } During inter-reduction it might be the case that the original equation is rewritten: { b = b, a =* b } which would then get thrown out as a useless instance of reflexivity: { a =* b } If you attempted to modify this rewrite set when going down the other branch you would be left with the empty set of rewrites { } which is incomplete. This is a simple example which would probably not appear in practice because the second equation would be simplified before it could be added to the rewrite set and inter-reduced, but it is illustrative of a class of problems deriving from an attempt to delete rewrites after they have affected the state in hard-to-undo ways. One solution to this is save the original rewrite set at the split point, and then add extra equations that have been derived down one branch that do not depend on the split. Then you're only adding equations but obtaining the benefit of the extra equations that do not depend on the split. Does this strategy work in your use-case? Cheers, Joe From jpb65 at cam.ac.uk Thu Apr 7 22:55:18 2011 From: jpb65 at cam.ac.uk (James Bridge) Date: 07 Apr 2011 23:55:18 +0100 Subject: [metis-users] rewrite structure in Metis In-Reply-To: References: Message-ID: Thanks Joe. I'll need to think about your idea - it is nearly midnight here so I'm not thinking all that clearly. One issue with saving structures and adding new clauses of the appropriate type is that it gets rather complicated when there are multiple split points. (Backtracking may occur at any split point, with lower split points being simply deleted, so all split points would need to have their rewrite structures saved and updated in parallel.) Anyway, you've highlighted why my rather naive approach can run into trouble, which is useful, thankyou. James On Apr 7 2011, Joe Hurd wrote: >Hi James, > >> In general, the problem with backtracking is that most Metis structures >> are well set up to accept new clauses but are much less happy about >> giving them back again! (This is not a criticism of Metis, I think most >> theorem provers are written in the same way.) > >I think you have put your finger on the root of the problem here, and >I can illustrate why this is in a simple example. > >Suppose the rewrite set contains one equation > >{ a = b } > >and down one branch of a split the same equation happens to be added >(which I will mark with a *): > >{ a = b, a =* b } > >During inter-reduction it might be the case that the original equation >is rewritten: > >{ b = b, a =* b } > >which would then get thrown out as a useless instance of reflexivity: > >{ a =* b } > >If you attempted to modify this rewrite set when going down the other >branch you would be left with the empty set of rewrites > >{ } > >which is incomplete. > >This is a simple example which would probably not appear in practice >because the second equation would be simplified before it could be >added to the rewrite set and inter-reduced, but it is illustrative of >a class of problems deriving from an attempt to delete rewrites after >they have affected the state in hard-to-undo ways. > >One solution to this is save the original rewrite set at the split >point, and then add extra equations that have been derived down one >branch that do not depend on the split. Then you're only adding >equations but obtaining the benefit of the extra equations that do not >depend on the split. > >Does this strategy work in your use-case? > >Cheers, > >Joe >