1 Manual En
User Manual: Pdf
Open the PDF directly: View PDF
.
Page Count: 24
| Download | |
| Open PDF In Browser | View PDF |
MUSCADET version 4 User's Manual http://www.normalesup.org/~pastre/muscadet/manuel-en.pdf 1 03/22//2018 Dominique PASTRE 2 pastre@phare.normalesup.org 1. Introduction......................................................................................................................................1 2. Examples..........................................................................................................................................2 2.1. Transitivity of inclusion.............................................................................................................2 2.2. Power set of the intersection of two sets...................................................................................3 3. From Muscadet1 to Muscadet4........................................................................................................4 4. Machine representations ..................................................................................................................7 4.1. Expression of mathematical statements.....................................................................................7 4.2. Expression of facts....................................................................................................................8 4.3. Expression of rules....................................................................................................................8 4.4. Expression of super-actions.......................................................................................................9 5. How to use Muscadet4...................................................................................................................10 5.1. Direct proof .............................................................................................................................11 5.2 From files containing theorems and definitions.......................................................................11 5.3. From the TPTP library.............................................................................................................13 5.4 Modification of default options................................................................................................13 6. Definitions and lemmas..................................................................................................................14 7. Elimination of functional symbols.................................................................................................16 8. Building rules.................................................................................................................................17 9. Activation and order of rules..........................................................................................................17 10. Some strategies.............................................................................................................................18 10.1. Processing of universal conclusions and of implications......................................................18 10.2. Processing of conjunctive conclusions .................................................................................18 10.3. Processing of universal hypotheses ......................................................................................19 10.4. Processing of existential conclusions ...................................................................................19 10.5. Processing of existential hypotheses ....................................................................................19 10.6. Processing of disjunctive conclusions ..................................................................................19 10.7. Processing of disjunctive hypotheses ...................................................................................19 10.8. Knowledge specific to certain domains.................................................................................20 11. Second order statements ..............................................................................................................20 12. Distribution...................................................................................................................................21 13. References....................................................................................................................................21 1. Introduction The MUSCADET theorem prover is a knowledge-based system. It is based on natural deduction, following the terminology of Bledsoe (Bledsoe[71, 77]), and uses methods which resemble those used by humans. It is composed of an inference engine, which interprets and executes rules, and of one or several bases of facts, which are the internal representations of “theorems to be proved”. 1 French version in http://www.normalesup.org/~pastre/muscadet/manuel-fr.pdf 2 LAFORIA, University Pierre et Marie Curie (Paris 6) then CRIP5/LIPADE, University Paris Descartes (Paris 5) -1- last update March 22, 2018 Rules are either universal and put into the system, or built by the system itself by metarules from data (definitions and lemmas) given by the user. They are in the form if, then
. Conditions are normally properties that are quickly verified. Actions may be either elementary actions which are quickly executed, or “super-actions” which are defined by packs of rules. The representation of a “theorem to be proved” (or a sub-theorem) is a description of its state during the proof. It is composed of objects that were created, of hypotheses, of a conclusion to be proved, of rules called active rules, possibly of sub-theorems, etc. At the beginning, it is only composed of a conclusion, which is the initial statement of the theorem to be proved, and of a list of rules, which are called active, i.e. relevant for this theorem, and which were built automatically. Active rules, when applied, may add new hypotheses, modify the conclusion, create new elements, create sub-theorems or build new rules which are local for a (sub-)theorem. If the conclusion was set to true - for example, if the conclusion to be proved was added as a new hypothesis or if there is an existential conclusion X p(X) and a hypothesis p(a) - then the theorem is proved. If it is only a sub-theorem, this information is transmitted up to the theorem that created it. 2. Examples In all this text, PROLOG conventions will be used to write constants (names starting with a lowercase letter) or variables (names starting with an uppercase letter or with the symbol “_”). Moreover, in informal parts, these conventions will be extended to predicates (which is not possible in PROLOG), and by extension, P(X) will be used to write whatever expression which depends on X. 2.1. Transitivity of inclusion Prove the transitivity of inclusion ABC (AB ∧ BC AC) with the definition of inclusion AB X (XA XB) To prove this theorem MUSCADET creates objects a, b and c by applying three times the rule Rule : if the conclusion is X C(X) then create a new object x and the new conclusion is C(x) and the new conclusion is a b b c a c Then the rule Rule : if the conclusion is H C then add the hypothesis H and the new conclusion is C replaces the conclusion by a c and adds the two hypotheses a b and b c . In effect, hypotheses H are analyzed before being added: a super-action addhyp(H) contains, among others, the rule if H is a conjunction, then successively add all the elements of the conjunction (This rule is of course recursively applied if necessary). The conclusion is then replaced by its definition X (Xa Xc) by applying the rule -2- last update March 22, 2018 Rule def_concl_pred : if the conclusion is C there exists a definition of the form C D then the new conclusion is D By the preceding rules and , there is then a new object x, a new hypothesis xa, and the conclusion is now xc. The following rule Rule : if there are hypotheses AB and XA then add the hypothesis XB is a rule that was automatically built by MUSCADET from the definition of inclusion. Here it is applied twice, adds the hypotheses xb then xc, which is the same as the conclusion to be proved. The proof ends by applying the rule Rule stop_hyp_concl : if the conclusion C is also a hypothesis then set the conclusion to true MUSCADET is able to work in second order predicate calculus, and the preceding example may be written in the form transitive() with the definition of the transitivity of a relation R transitive(R) ABC [ R(A,B) ∧ R(B,C) R(A,C) ] 3 After the conclusion transitive() is replaced by its definition, the proof is the same as above. One may also work with the power set of a set E transitive(, P(E)) with transitive(R,E) ABC ( AE BE CE [ R(A,B) R(B,C) R(A,C) ] ) and X P(E) X (XE XE Relativized4 quantifiers may be used in order to reduce writing: transitive(R,E) AE BE CE [R(A,B) R(B,C) R(A,C)] XP(E) XE XE 2.2. Power set of the intersection of two sets Prove the following theorem AB (P(AB) =set P(A) P(B)) with the definition of the intersection XAB XA XB or AB = {X ; XA XB} of the power set of a set X P(E) X (XE XE) or P(A) = {X ; XA} and of the equality of sets A = set B AB BA After the creation of objects a and b, as in the preceding example, by a rather complex mechanism which will be described in section 7, MUSCADET “eliminates functional symbols” and P. To do this 3 4 As predicate variables are not possible in PROLOG, we will see in section 11 how to express R(A,B) XA P(X) is short for X (XA P(X)), XA P(X) for X (XA P(X)) -3- last update March 22, 2018 it creates, by means of the operator “:”, the objects ab:c, P(a):pa, P(b):pb and papb:pd. The new conclusion is then pc =set pd After replacement of the equality of the conclusion by its definition, that is pcpd pdpc the rule Rule concl_ : if the conclusion is a conjunction then successively prove all elements of the conjunction creates two sub-theorems with numbers 1 and 2. The conclusion of the first sub-theorem is pcpd and it is replaced by its definition X (Xpc Xpd) A new object x is created, a new hypothesis xpc is added and the new conclusion is xpd. The following rule, which was automatically created from the definition of the power set, Rule P : if there are hypotheses P(A):B and XB then add the hypothesis XA gives the hypothesis xc. The following rule 5 Rule defconcl_elt : if the conclusion is AB there is a hypothesis Term:B and a definition XTerm P(X) then the new conclusion is P(A) replaces the conclusion by xpa xpb The rule concl_ leads to a new splitting, the conclusion of sub-theorem 11 is xpa which is replaced by xa by the rule defconcl_elt. By the rules def_concl_pred, and , t is created, the hypothesis tx is added and the new conclusion is ta, then the rule gives the hypothesis tc. The following rules were automatically created from the definition of the intersection Rule 1: if there are hypotheses AB:C and XC then add the hypothesis XA Rule 2: if there are hypotheses AB:C and XC then add the hypothesis XB Rule 3: if there are hypotheses AB:C, XA and XB then add the hypothesis XC The rule 1 then gives the hypothesis ta which ends the proof of sub-theorem 11. Sub-theorems 12 then 2, corresponding to other cases coming from splitting, are then proved. 3. From MUSCADET1 to MUSCADET4 Historical details of this section will be useful, in particular to users of an old version and to readers of old papers. 3.1 MUSCADET1 A first version of MUSCADET, which is now called MUSCADET1, was described and analyzed in [Pastre 89, 89a, 93, 95]. 5 This was a rule in the first versions of MUSCADET. It has been replaced by a more general rule because “belonging to a set” could no longer be known by the system (this was a constraint of the TPTP Library, see section 3.2). -4- last update March 22, 2018 MUSCADET1 came after an initial program (DATTE, written in Fortran!) [Pastre 76; 78] which was already based on natural deduction (in the sense of Bledsoe[71, 77]), and used methods which resemble those used by humans. The inference engine of MUSCADET1 was written in PASCAL, and knowledge (rules, metarules and super-actions) was written in a language that was considered simple and declarative. MUSCADET1 produced good results; it was evaluated for several years but its use was limited. In particular, the language was not adapted to the expression of procedural strategies. Writing such strategies was complex and it was difficult to read and understand them. 3.2 MUSCADET2 The following version, called MUSCADET2 (versions 2.0 to 2.7)[Pastre 01a, 01b, 02, 06, 07], has been completely written in PROLOG. The reason for this is that it is possible to use the same language to express declarative knowledge such as rules, definitions, hypotheses, etc., more procedural knowledge such as proof strategies, and the inference engine itself. The inference engine contains only few predicates since it is completed by the PROLOG interpreter. This leads to more flexibility, more facilities for writing, and even more efficiency. Moreover it was possible to carry out many improvements and to write new strategies, which were not possible in the first version. It was also possible to use, without having to implement them, all the facilities of expression of PROLOG such as numerical calculus (missing in MUSCADET1) or infix and partially parenthesized notations by simply defining operators and precedences (but this is not compulsory, it is only more convenient for the user). To indicate mathematical variables or constants, PROLOG conventions are used (variables start with upper-case letters whereas constants start with low-case letters). So it is no longer necessary to precise if a symbol is a variable or a constant (but this convention must imperatively be used). MUSCADET2 was able to work on problems of the TPTP Problem Library (Thousands of Problems for Theorem Provers, http://www.cs.miami.edu/~tptp). New strategies were added, which were better adapted to the style and to the axiomatizations of this library. Moreover, two convenient capabilities of MUSCADET had to be left out. The first one was the possibility to declare that some statements are either definitions, or lemmas (or know theorems). These two types of statements are not treated in the same manner and MUSCADET must now analyse them to recognize them (see section 6). The second capability was the fact that MUSCADET1 knew the set belonging symbol, and that it is not possible in the TPTP library. Rules which used it had to be generalized. For example, the rule defconcl_rel seen in section 2.2 has been replaced by the more general rule Rule defconcl_rel : if the conclusion is R(A,B) there is a hypothesis Term:B and a definition XTerm Def then the new conclusion is the expression obtained by replacing X by A in Def MUSCADET has participated to CASC competitions (http://www.cs.miami.edu/~CASC) since 1999. MUSCADET, of course, could only compete in the “first order” divisions, that is FOF (FEQ and NEQ), since it does not work with clauses. The results [Pastre 06, 07] show the complementarity of MUSCADET with regard to provers based on the resolution principle. [Pastre 99] gives an analysis of some insufficiencies of MUSCADET1, which were tackled in MUSCADET2, and the description of some new strategies which were conceived during the work on the TPTP library. The users of MUSCADET1 could also find in [Pastre 98] a more detailed correspondence between some of the techniques of both versions. In addition to unceasing enlargement of the bases of rules and improvements of proof strategies, in the last versions of Muscadet2, for TPTP problems, the user could call, under Linux, an executable -5- last update March 22, 2018 C file which itself called PROLOG and the prover. The interest is that it is easier to use and that it is possible to write scripts to solve lists of problems 6. On the other hand working under PROLOG allows to look at the bases of facts after an execution or an interruption, and even to test a rule by forcing it to be applied. 3.3 MUSCADET3 Since 2008, the syntax of MUSCADET3 [Pastre 10a, 10b] has been that of the TPTP library. Although this was not absolutely necessary, the “:” symbol used in the expression “for the only Y:f(X) such that p(Y)” was replaced by “::” to avoid the confusion with the “:” of TPTP used in writing quantified formulas. for_all(X,p(X)) exists(X,p(X)) for_all(X,for_all(Y,p(X,Y))) exists(X,exists(Y,p(X,Y))) A and B A or B not A only(f(X):Y,PY) are written ! [X] : p(X) ? [X] : p(X) ! [X,Y] : p(X,Y) ? [X,Y] : p(X,Y) A & B A | B ~ A only(f(X)::Y,PY) The second important modification of version 3 is the possibility of getting and displaying the “useful” trace. For this, it was necessary to be able to go back from the final step to antecedent steps. To this end, steps have been numbered and became new parameters for facts, rules, conditions and super-actions. A step corresponds to the effective application of a rule. So a step may involve several actions. Facts as hypotheses and conclusions are memorized with the number of the step where they have been obtained. So, several facts may have the same step number. The successful and effective application of a rule is memorized. To allow to go back and also to be able to write a detailed justification, and not only the sequence of steps, the system also memorizes the name of the rule, the new step, the instantiated conditions, the list of the steps of the conditions, the instantiated and explicit actions and a text giving a justification. This text is either given for general rules (generally a logical explication), or automatically built in the rule (for example, rule built from the definition of such concept or such axiom with their name, or local rule built from such universal hypothesis). This memorization is done either in the rule or in the super-action, in particular in the case of a recursive super-action such as adding a hypothesis or proving a conjunctive conclusion. 3.4 MUSCADET4 In version 4, in addition to other small improvements, the most important changes concern the writing of the useful trace (version 4.0 submitted to the CASC competition) and the user interface (version 4.1). The interface is more easily used and more complete, either under Linux or under PROLOG . Options allow to directly modify the time limit, the display level (entire trace / useful trace / result according to the SZS ontology) and the language. In particular, slides of [Pastre 10] contain extracts of useful traces. The version “th” is set up again and may be used under Linux or under PROLOG. The system can prove one or several theorems the statements of which are in one or several files, so as the statements of definitions and lemmas. 6 There was already such an executable in CASC versions but it gave only the result (prove or not proved) and not the proof or the search of the proof. -6- last update March 22, 2018 4. Machine representations Everything is expressed in PROLOG. Mathematical statements are PROLOG expressions. Facts are unit PROLOG clauses. Rules are PROLOG clauses expressing declarative knowledge. Elementary actions and some strategies are PROLOG clauses defining procedural actions. And super-actions are PROLOG clauses grouping packs of rules for a given goal. The inference engine is composed of the PROLOG interpreter and of some clauses which process the application of rules (applyrulactiv and applyrul). 4.1. Expression of mathematical statements The syntax is that of the TPTP library. The logical connectives & (and), | (or), ~ (not), =>, <=> are defined as infix operators with precedences in the order as the connectives are written down in mathematics. They are right associative. The universally quantified formulas are written ! [X,Y,...] :
. The existentially quantified formulas are written ? [X,Y,...] : . 7 The true and false constants may also be used. The example theorem introduced in section 2.1 is written ![A,B,C]:(subset(A,B) & subset(B,C) => subset(A,C)) The proof of the theorem T will be requested by the PROLOG call prove(T). The definition of subset is subset(A,B) <=> ![X]:(elt(X,A) => elt(X,B)) . This definition is given by definition(subset(A,B) <=> ![X]:(elt(X,A) => elt(X,B))). where definition is a PROLOG predicate stating that the argument statement is a mathematical definition. The definitions of intersection and of power set are ![X]:(elt(X,inter(A,B)) <=> elt(X,A) & elt(X,B)) ![X]:(elt(X,power_set(A)) <=> subset(X,A)) It is possible, as mathematicians do, to use infix operators elt, subset, inter by defining them with their precedences by the PROLOG directives op(200,xfy,elt) op(200,xfy,subset) op(150,xfy,inter) then statements may be written ![A,B,C]:(A subset B & B subset C => A subset C) A subset B <=> ![X]:(X elt A => X elt B) ![X]:(X elt A inter B <=> X elt A & X elt B) ![X]:(X elt power_set(A) <=> X subset A) but PROLOG will display A subset B&B subset C=>A subset C we loose more than we gain in the readability of display ! 7 In MUSCADET2 (and in the corresponding publications, they were written for_all(X, ) and exists(X, and the connectives were written and, or, not. -7- last update March 22, 2018 Mathematicians usually write set definitions in the form f(X,..) = {X ; p(X,…)}, for example AB = { X; XA XB } or P(A) = {X; XA }. This possibility 8 also exists in MUSCADET in the form A inter B = [X,X elt A & X elt B] power_set(A) = [X, X subset A] but the symbol used for set belonging must be explicitly indicated by the predicate “+++”, that is +++(elt). In order to reduce writing mathematicians also currently use relativized quantifiers XA YB p(X,Y) and XA YB p(X,Y) which are abbreviations for X Y(XA YB p(X, Y)) and X Y (XA YB p(X,Y)) . In MUSCADET2, it was possible to write for_all(X elt A,for_all(Y elt B,p(X,Y))) and exists(X elt E, exists(Y elt B, p(X,Y))), (elt having been defined infix), This possibility will be restored in the next version of Muscadet in the form ![X elt A, Y elt B]: p(X,Y) and ?[X elt A, Y elt B]: p(X,Y) or, more generally, with any formula instead of X elt A, … . Remark: the statements of theorems must be closed; the statements of definitions may contain variables which are implicitly universal. 4.2. Expression of facts The fact that the statement C is the conclusion of the (sub-)theorem to be proved with number N is represented by the unit PROLOg clause concl(N,C,I), where I est the number of the step where this fact was created. Some other properties are handled in the same manner, such as to be a hypothesis (hyp(N,H,I)), an object (obj(N,O)), a sub-theorem (subth(N,N1)), etc.. For active rules exceptionally, the whole list of rules that are active for a (sub-)theorem to be proved is memorized by the fact rulactiv(N,[R1,R2,…]); [R1,R2,…] is a list of names of rules that were automatically activated in an order that is important. 4.3. Expression of rules Here are the expression of some rules (simplified) used in the example of section 2. - rules given to the system : rule(N, =>) :- concl(N,A=>B,Step), addhyp(N,A,NewStep), newconcl(N,B,NewStep). rule(N, !) :- concl(N,(!XX:C),Step), create_objects_and_replace(N,XX,C,C1,Objects), newconcl(N,C1,NewStep). rule(N, def_concl_pred) :- concl(N,C,Step),definition(Name, C<=>D), newconcl(N,D,NewStep). rule(N,stop_hyp_concl):- concl(N,C,Step1),ground(C), hyp(N,C,Step2), not hyp(N,elt(X,B),_), newconcl(N,true,NewStep). - rule built by the system : rule(N, subset) :- hyp(N, subset(A,B,Step1), hyp(N, elt(X,A,Step2), not hyp(N, elt(X,B),_), addhyp(N, elt(X,B,NewStep). The parameter N is used to apply a rule to the (sub-)theorem numbered N. 8 which disappeared in MUSCADET3 but was restored in MUSCADET4.1 -8- last update March 22, 2018 Notice that if … then … is implicit. It would have been possible to define PROLOG operator symbols if … then …, but this was not indispensable, since all is translated into PROLOG with predicates. Conditions are generally the verification of the existence (or of the absence) of facts, which are unit PROLOG clauses (hyp, concl, see the preceding section), or of a definition which is in a certain form. There may also be elementary conditions. Actions are either elementary actions, which are expressed as PROLOG predicates and express elementary programs (create_objects_and_replace), or super-actions which are defined by packs of rules (addhyp, newconcl, etc, see next section). The condition not hyp(N, elt(X,B),_) avoids applying the rule if the theorem of number N already contains the hypothesis elt(X,B). (In the example, this condition only avoids the call addhyp, which would have no effect here, but in other cases it is essential; for example to avoid an infinite creation of objects.) For MUSCADET1, this condition was not necessary because a rule could not be applied twice for the same instantiations. This had other disadvantages; for example it was not possible to force a rule to be applied again for the same instantiations. The elementary action create_objects_and_replace(N,XX,C,C1,Objects) returns in Objects a list of constants z, z1, z2,… etc which have not yet been used and replaces in C the variables of XX by these constants to give C1. Actually operational rules are more complex, they contain additional conditions and actions, which have been added by hand 9 for the rules given to the system, but which are automatically added for rules built by the system. The first rules may be seen in the file muscadet-en, the last ones in the files of built rules rul_... Among the conditions : - the Step number which will be used in traces (see below). Among the actions : - steps numbering, - messages writing, - traces(N,rule(Name), , , , , ) memorizes the informations which will be later necessary to extract the useful trace. 4.4. Expression of super-actions Super-actions are generally expressed by packs of rules if … then … or if … then … else … To action(X) : if … then … if … then … else … is easily written in PROLOG action(X) :- ( ; ; ) … -> … … -> … … % by default (optional) . The super-action newconcl, which contains only one rule, replaces the conclusion of the (sub-)theorem of number N by C if the conclusion is not already equal to C. newconcl(N,C,Step) :- not concl(N,C,_), 9 because gradually added during experimentations, but they could have been automatically added from simplified rules -9- last update March 22, 2018 step_action(Step), assign(concl(N,C,Step)). with step_action(E1) :- ( var(E1),step(E) -> E1 is E+1,assign(step(E1)) ; true). If E1 has not yet been instantiated, which is the case in the rule “ !”, the step number is incremented by 1. If E1 has been instantiated, which is the case in the rule =>, where E1 has been instantiated by the first action addhyp (described hereafter), it is the same step. assign updates the conclusion and the number step. The super-action addhyp handles the hypotheses that have to be “added” in order to finally add only hypotheses that are elementary and not universal. Conjunctions are split. Universal hypotheses are not added. Rather, in the place of universal hypotheses, new rules, which are local for the (sub-)theorem, are created. Here are some of the rules that define this super-action addhyp(N,H,E) :- step_action(E), ( % to add a conjunction, the elements of the conjunction % are successively (and recursively) added H = A & B -> addhyp(N,A,E), addhyp(N,B,E) ; if H is already a hypothesis, nothing is done ; hyp(N,H,_) -> true ; % the same for a trivial equality H = (X = X) -> true ; % lexicographic order except for created objects z
% which are in the order of their creation (numerical) H = (Y=X), atom(X), atom(Y), before(X,Y), addhyp(N,(X=Y),E2) ; % if H is universal or is a implication, rule(s) are % created, which are local for the theorem of number N H = ( !_: _) -> create_name_rule(rulehyp,Name), buildrules(H,_,N,Name,[]) ; H = A => B -> create_name_rule(rulehyp,Name), buildrules( H,_,N,Name,[]) ... ; % else H is added assert(hyp(N,H,E)), ) . 5. How to use MUSCADET4 The package contains a PROLOG source file muscadet-en, a script musca-en which allows to work under PROLOG and two small C files th-en.c and tptp-en.c 10 which can be compiled and which allow to work under Linux. The obtained executables will be named later in this paper th and tptp. It is also possible to work under PROLOG, this allows in particular to have access, at the end of the proof (or more important in case of failure or crash !) to all facts representing the state of the theorem to be proved : hyp, concl, sousth, rules (in particular built rules), etc ; and even to directly test the application of a rule on the current state. 10 muscadet-fr, musca-fr, th-fr.c and tptp-fr.c - 10 - for the French version last update March 22, 2018 It is possible to work from a file containing a list of definitions and one or several theorems to be proved. It is also possible to directly work on the problems of the TPTP library, after having defined an environment shell variable TPTP to the TPTP library (setenv TPTP ). Under PROLOG, it is also possible to call directly the predicate prove with as a parameter the statement of the theorem to be proved, after having given the definitions of the mathematical concepts eventually used. The PROLOG used is SWI-Prolog, which is freeware downloaded at the following address http://www.swi.psy.uva.nl/projects/SWI-Prolog/download.html, and which is called by the command swipl. Be careful : from SWI-Prolog 7 version, a version of Muscadet from 4.6.2 must be used.11 In all cases you have to be in a directory that contains the PROLOG file muscadet-en name link to this file). 12 (or a same- 5.1. Direct proof (only under PROLOG) Call the Unix command musca-en . This invokes SWI-Prolog and loads the file muscadet-en. 13 To prove p∧q (p⇔q) simply type prove(p & q => (p <=> q)). Do not forget the dot at the end. No space before the bracket. Let us come back to the first example. Introduce the definition of the inclusion by the PROLOG command assert(definition(subset(A,B) <=> ![X]:(elt(X,A) => elt(X,B)))). Then call for the proof prove(![A,B,C]:(subset(A,B) & subset(B,C) => subset(A,C))). Do not forget dots. The proof will be displayed on the standard output. If you prefer use infix operators, type then op(200,xfy,elt). op(200,xfy,subset). assert(definition(A subset B) <=> ![X]:(X elt A => X elt B))). prove(![A,B,C] : A subset B & B subset C => A subset C). 5.2 From files containing theorems and definitions Data must be written as below : : op( , , ). (eventually) theorem( , ). 11 because of the modification of the type of the empty list [] (which was an atom in previous versions) 12 muscadet-fr for the French version 13 musca-fr for the French version - 11 - last update March 22, 2018 definition( ). lemme( , ). include(). % Do not forget the dots ! (They are PROLOG terms.) All this data may be written in whatever order. There may be several theorems which will be proved one after the other. include allows to write data in one or several other file(s) . Files examples : example1 : definition(subset(A,B) <=> ! [X]:(elt(X,A) => elt(X,B))). theorem(thI03,![A,B,C]:(subset(A,B) & subset(B,C) => subset(A,C))). example1bis : :- op(200,xfy,elt). :- op(200,xfy,subset). theorem(thI03,![A,B,C]:(A subset B & B subset C => A subset C)). definition(A subset B <=> ! [X]: X elt A => X elt B)). example2 : include(example2_definitions). % transitivity of subset theorem(thI03,![A,B,C]:(subset(A,B) & subset(B,C) => subset(A,C))). % the power set of an intersection is equal to the intersection of the power sets theorem(thI21,![A,B]:subset(powerset(inter(A,B), inter(powerset(A),powerset(B))))). with exemple2_definitions : definition(subset(A,B) <=> ! [X]:(elt(X,A) => elt(X,B))). definition(elt(X,powerset(A))<=> subset(X,A)). definition(elt(X,inter(A,B)) <=> elt(X,A) & elt(X,B)). example2bis : include(example2bis-definitions). :- op(200, xfy, elt). :- op(200, xfy, subset). :- op(150,xfx,inter). % transitivity of subset theorem(thI03,![A,B,C]:(A subset B & B subset C => A subset C)). % the power set of an intersection is equal to the intersection of the power sets theorem(thI21,![A,B]:(powerset(A inter B) subset powerset(A) inter powerset(B))). with example2bis_definitions : :- op(200, xfy, elt). :- op(200, xfy, subset). :- op(150,xfx,inter). definition(A subset B <=> ! [X]:(X elt A => X elt B)). definition((X elt powerset(A))<=> X subset A). definition(X elt A inter B <=> X elt A & X elt B). Remark :defining infix operators must be done in all files where they occur. - 12 - last update March 22, 2018 Under Linux (resp. PROLOG), call the executable (resp. predicate) th with as an argument a file (or a path to a file). Under PROLOG this argument must be an atom. It must be written between quotes if necessary according to PROLOG conventions. Examples th example1 (resp. th(example1).) Under PROLOG it is also possible to call th with a file containing only definitions which will be read and memorized. In this case do not put the corresponding include in the file of theorems, this would duplicate the definitions (then also the rules).14 The proof will be saved in a file named res_ (for example res_th1). Moreover some messages are displayed on the terminal to follow the prover's work. 5.3. From the TPTP library (http://www.cs.miami.edu/~tptp) Under Linux (resp. PROLOG) call the executable (resp. predicate) tptp with as an argument a path to a TPTP problem file or a TPTP problem name. In this last case, it is necessary to have defined an environment shell variable TPTP to the TPTP library (setenv TPTP ). Examples tptp /home/dominique/$TPTP/Problems/SET/SET002+4.p tptp SET027+4.p Under PROLOG, the argument must be an PROLOG atom, then quotes are necessary (occurrences of -, +, ., /, capital letters) tptp('/home/dominique/$TPTP/Problems/SET/SET0 02+4.p'). tptp('SET027+4.p'). The proof will be saved in a file named res_ (for example res_SET002+4.p). Moreover some messages are displayed on the terminal to follow the prover's work. 5.4 Modification of default options 5.4.1 Default options Default options (file muscadet-en) are : - time limit (timelimit) : 10 seconds - display of the trace of the complete search of the proof (tr) : no - display of the useful proof (pr) : yes - result according to the SZS ontology (szs) : no They may be modified. To display them type listing(timelimit). or l(timelimit). or timelimit(T). listing(display). or l(display). or display(A). 14 Until version 2.6, it was possible to read definitions alone, build and memorize the built rules in a file which could be read in a later execution. This was because building rules was relatively long comparatively to proving theorems This possibility was removed in version 2.7. Because of the improvements in execution time of modern machines, restoring it seems to me unnecessary. For very large date bases (as for the very large TPTP problems), it would be necessary to select definitions and axioms in function of the given problems, before building rules, not only select rules after having building them. - 13 - last update March 22, 2018 5.4.2 Modifications in a proof call Additional arguments may be given, in whatever order : a new time limit and new display options in the form ±
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.4 Linearized : No Page Count : 24 Language : en-US Title : 1 Author : dominique Creator : Writer Producer : LibreOffice 5.1 Create Date : 2018:03:26 17:24:27+02:00EXIF Metadata provided by EXIF.tools