CN113379051B - Automatic theorem proving method, device and storage medium based on unit result deduction - Google Patents

Automatic theorem proving method, device and storage medium based on unit result deduction Download PDF

Info

Publication number
CN113379051B
CN113379051B CN202110647011.9A CN202110647011A CN113379051B CN 113379051 B CN113379051 B CN 113379051B CN 202110647011 A CN202110647011 A CN 202110647011A CN 113379051 B CN113379051 B CN 113379051B
Authority
CN
China
Prior art keywords
deduction
clause
unit
contradiction
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110647011.9A
Other languages
Chinese (zh)
Other versions
CN113379051A (en
Inventor
曹锋
易见兵
黄江燕
陈鸿坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi University of Science and Technology
Original Assignee
Jiangxi University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi University of Science and Technology filed Critical Jiangxi University of Science and Technology
Priority to CN202110647011.9A priority Critical patent/CN113379051B/en
Publication of CN113379051A publication Critical patent/CN113379051A/en
Application granted granted Critical
Publication of CN113379051B publication Critical patent/CN113379051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • G06N5/013Automatic theorem proving
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A10/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE at coastal zones; at river basins
    • Y02A10/40Controlling or monitoring, e.g. of flood or hurricane; Forecasting, e.g. risk assessment or mapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an automatic theorem proving method, a device and a storage medium based on unit result deduction, wherein for a first-order logical clause set S, a unit clause C is selected, a deduction clause set Q is selected in S according to C, and a contradiction body separation type R is constructed by adopting a unit clause set V formed by the rest unit clauses in C, S and the clause selected in Q; if R is a null clause, the theorem is proved; if R is effective and is a unit clause, adding R into S, reselecting clause in Q to continue deduction, selecting other clauses in S to continue deduction when Q is traversed, and ending the deduction of the contradictory body separation unit result when S is traversed or the deduction termination condition is met. By the implementation of the invention, the contradiction body separation unit results deduction fully plays the cooperative relationship among a plurality of clauses, can effectively reduce the path search space of the multi-element deduction, improve the deduction efficiency, and enhance the first-order logic automatic theorem proving capability of the multi-element deduction reasoning system.

Description

Automatic theorem proving method, device and storage medium based on unit result deduction
Technical Field
The present invention relates to the field of automatic reasoning technology, and in particular, to a method, an apparatus, and a storage medium for automatic theorem proving based on unit result deduction.
Background
The automatic reasoning is to automatically make a series of reasoning on the logic formula by using the technical means such as a computer, logic reasoning and the like, and automatically judge the attribute of the logic formula by using the symbol algorithm form. Automatic reasoning is important content in the field of artificial intelligence, and main research content of the automatic reasoning comprises solution of a proposition logic formula and proof of a first-order logic theorem. In practical applications, many problems (such as mathematical theorem proving, program verification, rule checking, personalized customization, intelligent information processing, knowledge representation, management and decision making, information security, transportation and the like) can be represented in a logic system form, and further can be automatically processed by an automatic reasoning technology. Compared with a propositional logic system, the first-order logic system is composed of predicate characters, arguments, chang Yuan, functional characters and logic connecting words, and has more abundant formalized expression capability. Therefore, the automatic theorem proving method of the first-order logic system can be widely applied to solving all practical problems which can be expressed by logic.
The current mainstream first order logic automatic theorem prover generally adopts a traditional unit result reduction method, and the chain reduction method also processes a plurality of clauses, but is basically a binary reduction method. Binary summarization is a static summarization, i.e. only 2 clauses are limited at a time to summarize, 1 set of complementary pairs are eliminated, and the extraction of the remaining text is used as a deductive summarization. Because binary homing is a static deduction method, the binary homing mode often contains more words, and can not well exert the cooperative relation among multiple clauses, has reduced deduction efficiency.
Disclosure of Invention
The embodiment of the invention mainly aims to provide an automatic theorem proving method, device and storage medium based on unit result deduction, which at least can solve the problem of lower deduction efficiency caused by performing first-order logic automatic theorem proving by adopting a traditional unit result homing method in the related technology.
To achieve the above object, a first aspect of the present invention provides an automatic theorem proving method based on a contradictory body separation unit result deduction, applied to an automatic theorem proving system, the method comprising:
step A, selecting a starting unit clause from a first-order logical clause set, selecting a remaining unit clause to form a unit clause set, selecting a candidate clause set based on the starting unit clause, and constructing a deduction clause set by adopting the starting unit clause, the unit clause set and the candidate clause selected from the candidate clause set;
step B, traversing characters contained in the deduction clause set, integrating complementary predicates of different clauses, and generating contradiction body separation unit result deduction separation;
step C, outputting a judgment result of which the theorem is proved when the contradiction body separation unit result deduction separation is a null clause;
step D, when the result deduction separation of the contradiction body separation unit is not an empty clause, if the result deduction separation of the contradiction body separation unit is an effective unit clause, adding the result deduction separation of the contradiction body separation unit into the first-order logical clause set, and returning to the step A to continue the next round of result deduction of the contradiction body separation unit; if the contradiction body separation unit result deduction separation meets the preset deduction rollback condition, adding 1 to the invalid deduction weight of clauses participating in deduction, and returning to the step A to continue the next round of contradiction body separation unit result deduction; when the preset system deduction termination condition is met, the deduction is stopped and the judgment result which cannot be proved by theorem is output.
To achieve the above object, a second aspect of the embodiments of the present invention provides an automatic theorem proving apparatus based on a contradictory body separating unit result deduction, applied to an automatic theorem proving system, the apparatus comprising:
the construction module is used for selecting a starting unit clause from a first-order logical clause set, selecting a remaining unit clause to form a unit clause set, selecting a candidate clause set based on the starting unit clause, and constructing a deduction clause set by adopting the starting unit clause, the unit clause set and the candidate clause selected from the candidate clause set;
the generation module is used for traversing characters contained in the deduction clause set, integrating complementary predicates of different clauses, and generating contradiction body separation unit result deduction separation;
the output module is used for outputting a judgment result of which the theorem is proved when the result deduction separation of the contradiction body separation unit is a null clause;
the iteration module is used for adding the contradiction separation unit result deduction separation formula into the first-order logic clause set when the contradiction separation unit result deduction separation formula is not a null clause, and triggering the construction module to continuously execute the function of the contradiction separation unit result deduction formula, and continuously carrying out the next round of contradiction separation unit result deduction; if the contradiction body separation unit result deduction separation meets the preset deduction rollback condition, adding 1 to the invalid deduction weight of clauses participating in deduction, and triggering the construction module to continue to execute the function of the clauses, and continuing to execute the next round of contradiction body separation unit result deduction; when the preset system deduction termination condition is met, the deduction is stopped and the judgment result which cannot be proved by theorem is output.
To achieve the above object, a third aspect of an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of any one of the automatic theorem proving methods described above.
To achieve the above object, a fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of any one of the automatic theorem proving methods described above.
According to the automatic theorem proving method, the device and the storage medium based on the unit result deduction provided by the embodiment of the invention, for a first-order logical clause set S, a unit clause C is selected, a deduction clause set Q is selected in S according to C, and a contradiction body separation type R is constructed by adopting a unit clause set V formed by the residual unit clauses in C, S and the clause selected in Q; if R is a null clause, the theorem is proved; if R is effective and is a unit clause, adding R into S, reselecting clause in Q to continue deduction, selecting other clauses in S to continue deduction when Q is traversed, and ending the deduction of the contradictory body separation unit result when S is traversed or the deduction termination condition is met. By the implementation of the invention, the contradiction body separation unit results deduction fully plays the cooperative relationship among a plurality of clauses, can effectively reduce the path search space of the multi-element deduction and improve the deduction efficiency, can improve the path search capability in the first-order logic theorem judgment process, and enhances the first-order logic automatic theorem proving capability of the multi-element deduction reasoning system.
Additional features and corresponding effects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other drawings may be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a basic flow of an automatic theorem proving method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for generating a deductive separation according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a program module of an automatic theorem proving apparatus according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention will be clearly described in conjunction with the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment proves that the automatic theorem is carried out by a multi-element deduction method (contradiction body separation rule), and the multi-element deduction method can process a plurality of clauses in each deduction step, can further embody the logic deduction relation among the clauses, has the characteristic of deduction separation type containing fewer text numbers under the control of a proper algorithm, and improves deduction effectThe rate. In this embodiment, the automatic reasoning technology is used to determine the logic formula, and the logic formula is converted into the clause set form, i.e. the first-order logic clause set s= { C 1 ,C 2 ,…,C n A clause set comprising a plurality of words, wherein C i =P 1 ∨P 2 ∨···∨P k Wherein P is j (j=1, 2, …, k) is expressed as one letter. For the first order language G, if there is I (G) =0 for any interpretation I, G cannot be satisfied; if there is interpretation I, there is I (G) =1, then G may be satisfied. The first order logic theorem is often inferred in such a way that: i.e. known A 1 ,A 2 ,...,A n And asking for evidence A. Its logical meaning means A 1 ,A 2 ,...,A n On the premise, A is the conclusion. Proof A 1 ∧A 2 ∧...∧A n A is a valid logical formula, i.e. logically equivalent to prove its negative form A 1 ∧A 2 ∧...∧A n And a to A are contradictory.
First embodiment:
in order to solve the space problem of the multi-component deduction path search and develop the collaborative deduction capability between unit clauses and multiple clauses to improve the deduction efficiency, the embodiment provides an automatic theorem proving method, which is applied to an automatic theorem proving system, as shown in fig. 1, which is a basic flow diagram of the automatic theorem proving method provided by the embodiment, and the automatic theorem proving method provided by the embodiment comprises the following steps:
step 101, selecting a starting unit clause from the first-order logical clause set, selecting a remaining unit clause to form a unit clause set, selecting a candidate clause set based on the starting unit clause, and constructing a deduction clause set by adopting the starting unit clause, the unit clause set and the candidate clause selected from the candidate clause set.
Specifically, in this embodiment, first, the clause is performed on the first-order logic formula, and the clause set is processed to include redundant clauses; then for clause set s= { C in first order logic 1 ,C 2 ,…,C n Selecting a starting unit clause C according to clause attributes and deduction weights, and generating a root of the unit clause CAnd selecting a candidate clause set Q in S according to the existence of the unified complementary text, and continuously selecting the rest unit clauses in S to form a unit clause set V. Q and V are ordered according to clause attributes and deduction weights, which are dynamically updated according to each deduction step, so that the order of the clause sets Q and V is changed each time.
And 102, traversing characters contained in the clause set of the deduction clause, and integrating complementary predicates of different clauses to generate a contradiction body separation unit result deduction separation unit.
Specifically, the present embodiment defines the contradictory body separation unit results as follows: definition 1, in the contradictory body separation deduction process, if the deduction steps are satisfied as follows: (1) there are at least 1 unit clauses in the clause that participates in the deduction; (2) the contradictory body separation is a unit clause or an empty clause; such a contradictory separation deduction procedure is called a contradictory separation unit outcome deduction. Definition 2, set clause set s= { C in first order logic 1 ,C 2 ,…,C n "phi 1 ,Φ 2 ,…,Φ t S to clause phi for a contradictory body separation unit result deduction method based on a first order logic t If for i=1, 2, …, t: (1) phi i E S; or (2) r is present 1 ,r 2 ,…,r ki <i, substitutionMake->Wherein the method comprises the steps ofIs obtained according to a contradictory body separation unit result deduction method.
Compared with the traditional automatic deduction reasoning method based on the homing principle, the contradiction body separation unit result deduction method has the characteristic of multiple deductions, namely each deduction step can process multiple clauses, the characteristics of multiple clauses, such as multiple, dynamic, cooperativity, guidance and the like are brought into play, the method can fully utilize unit clauses to conduct multiple collaborative deductions, effectively reduce the path search space of the multiple contradiction body separation deduction, simplify the path search of the multiple deductions, and provide a feasible and scientific path search method for the first-order logic automatic theorem demonstration.
In addition, it should be noted that, in the present embodiment, the starting unit clause has iterative deduction, the candidate clause set Q has a difference in arrangement order, and the remaining unit clause set V and its arrangement order have a difference, so as to ensure the difference of each deduction path search; the selection sequence of the starting unit clauses is determined by clause attributes or deduction weights, and after the starting unit clauses are determined, a candidate deduction clause set is determined in the clause set S according to whether complementary integrated characters exist or not; the sorting mode of the candidate deduction clause set and the rest unit clause set is determined according to clause attributes or deduction weights so as to cope with different first-order logic clause set decisions. Clause attribute values are derived by counting the literal (term) or descriptive literal (term) structural metrics of the clause, and deduction weights are derived based on whether the clause participates in the deduction to produce a valid deduction statistic.
As shown in fig. 2, which is a schematic flow chart of a deduction separation type generating method provided in this embodiment, in an alternative implementation manner of this embodiment, the steps of traversing characters included in clauses in a set of clauses, unifying complementary predicates of different clauses, and generating a contradiction separation unit result deduction separation type specifically include the following flows:
step 1021, traversing the characters contained in the clause set in the deduction clause set, and replacing and checking whether the characters can be combined through the argument;
step 1022, merging the candidate clause Chinese characters if other characters in the candidate clause can be combined with the current deduction text, and marking the unit clause Chinese characters if the starting unit clause and the unit clause set text can be complementary with the candidate clause Chinese characters;
step 1023, adding all the effective unified characters into the standard contradiction body, and extracting the non-effective unified characters in clauses participating in deduction to generate a contradiction body separation unit result deduction separation.
In addition, before the step of adding all the valid unification characters to the standard contradiction body and extracting the non-valid unification character in the clause participating in the deduction to generate the contradiction body separation unit result deduction separation, the method may further include: evaluating the unification validity according to a preset unification rule; when the candidate clause is constant, the unification is invalid; when the total number of words which do not participate in effective unification in clauses participating in deduction is larger than a set threshold value, unification is invalid; when identity appears in the equivalent terms, the unification is invalid.
Specifically, in this embodiment, the characters contained in the candidate clause are traversed, the starting unit clause C and the unit clause set V are traversed, and whether the characters in the candidate clause and the characters in the unit clause have a complementary character or not is checked through argument replacement; if the candidate clauses can be combined, combining the candidate clause Chinese characters. In addition, the embodiment also needs to perform a rule check: if the candidate clauses are of a constant true type after unification, unification is invalid; if other words in the candidate clause can be combined with the current deduction word, after the candidate clause word or unit clause set is traversed, calculating the total number T of words which do not participate in the effective combination in the clause participating in deduction (the words are respectively recorded as Q) 1 ,Q 2 ,...,Q T ) If T is greater than 1, then a unification is not valid (here T is 0 or 1 is required to be satisfied); if the identity appears in the equivalent terms, then the unification is invalid. When the rule is satisfied, generating a result deduction of the effective contradiction body separation unit of the current clause; if the unit clause set is not traversed, the node traversed by the unit clause is reserved for subsequent continued deduction after the unit clause set is required to be returned, and the exit condition of the traversing process is that the candidate clause text is traversed or the unit clause set is traversed. In addition, the embodiment renames the homonym arguments of different clauses in the first-order logical clause set before so that the different clauses contain different arguments, and then records the argument replacement items effectively generated in a unified way in the traversal process through the list L in the unified flow.
It should be understood that, in the present embodiment, when a candidate clause is traversed, and a word in the clause has been effectively integrated, the word is added to the standard contradictory body; when the starting unit clause and the unit clause set are traversed, when the starting unit clause and a certain word of the candidate clause are effectively combined, the word in the unit clause is added into a standard contradiction body, and when the candidate clause does not participate in the effectively combined word, a unit result deduction contradiction body separation type R is constructed (when the candidate clause is effectively combined, the R only contains 1 word or does not contain words). When the unification is invalid, the unified argument replacement is cleared, and the next unification complementary text is continuously traversed and searched.
Step 103, judging whether the result deduction separation unit of the contradictory body is an empty clause or not; if yes, go to step 104, if not, go to steps 105 and 106;
and 104, outputting a judgment result of which the theorem is proved.
Specifically, in this embodiment, the contradictory body separation formula R is evaluated, and if R is a null clause, the theorem is proved, and a conclusion that cannot be satisfied is obtained, and the theorem determination is ended.
Step 105, if the contradictory body separation unit result deduction separation is a valid unit clause, adding the contradictory body separation unit result deduction separation to the first-order logical clause set, and returning to step 101.
Step 106, if the contradictory body separation unit results deduction separation meets the preset deduction rollback condition, the invalid deduction weight of the clause participating in deduction is added by 1, and then the step 101 is returned.
Specifically, in this embodiment, for the case that the deduction separation is not a null clause, if R is that the clause set S includes a redundant clause or its attribute value exceeds a set threshold (deduction rollback condition), the deduction is evaluated as invalid, the unit clause set is required to be continuously deducted, and if the unit clause is completely traversed, a new clause is selected in the candidate clause set to be continuously deducted; if the redundant clause is not contained or the attribute value of the redundant clause does not exceed the set threshold value, and R is a unit clause, the deduction is evaluated as effective deduction, then R is added into a clause set S, the effective deduction weight of the clause participating in deduction is added by 1, the effective deduction weight of the characters participating in deduction is added by 1, a new clause is selected in a candidate clause set to continue deduction, and if the candidate clause set is traversed, the new clause is selected in the clause set S to continue deduction. It should be understood that if the current candidate clause is not able to generate a valid deduction after being integrated according to the above-mentioned integration procedure, the argument replacement item generated in the process of integrating the current candidate clause in the list L needs to be removed, the text in the clause currently participating in deduction is removed in the separation of the standard contradiction and the contradiction, the invalid deduction weight of the current candidate clause and the clause participating in deduction is set, the invalid deduction weight of the text of the current candidate clause participating in deduction is set, and then deduction backspacing is performed.
In addition, if the iterative deduction is not performed when the preset system deduction termination condition is met, the deduction is stopped, and a judgment result which cannot be proved by theorem is output. It should be noted that under iterative deduction, the starting unit clause of the last deduction needs to be selected fixedly, and when the iteration exceeds the threshold value, the new starting unit clause needs to be selected again for further deduction. It should also be appreciated that the system deduction termination condition of this embodiment includes that the set theorem proving time arrives or that the system remaining memory is below the set memory threshold.
Further, in an optional implementation manner of this embodiment, after the step of generating the contradictory body separation unit result deduction separation, the method further includes: recording clauses participating in deduction when the result deduction of each round of contradiction body separation unit is performed and the generated result deduction separation of the contradiction body separation unit, and generating a deduction search path; outputting the deduction search path; wherein the deductive search path is used for the correctness check of the theorem proving process or for the auxiliary proving of the theorem.
Specifically, in the present embodiment, a unit result deduction contradiction is generated from the continuous selection of candidate deduction clauses to participate in deduction: σ i representing the transformation alternatives in the deduction process, constructing all generated clauses in the deduction process into new onesThe clause set W, thereby generating a deductive search path for use in the theorem proving process correctness checking, or for use in the auxiliary proving of theorem.
According to the automatic theorem proving method based on unit result deduction provided by the embodiment of the invention, for a first-order logical clause set S, a unit clause C is selected, a deduction clause set Q is selected in S according to C, and a contradiction body separation type R is constructed by adopting a unit clause set V formed by the rest unit clauses in C, S and the clause selected in Q; if R is a null clause, the theorem is proved; if R is effective and is a unit clause, adding R into S, reselecting clause in Q to continue deduction, selecting other clauses in S to continue deduction when Q is traversed, and ending the deduction of the contradictory body separation unit result when S is traversed or the deduction termination condition is met. By the implementation of the invention, the contradiction body separation unit results deduction fully plays the cooperative relationship among a plurality of clauses, can effectively reduce the path search space of the multi-element deduction and improve the deduction efficiency, can improve the path search capability in the first-order logic theorem judgment process, and enhances the first-order logic automatic theorem proving capability of the multi-element deduction reasoning system.
Second embodiment:
in order to solve the spatial problem of the multi-component deduction path search and to develop the collaborative deduction capability between the unit clause and the multi-clause to improve the deduction efficiency, the embodiment shows an automatic theorem proving device, specifically please refer to fig. 3, the automatic theorem proving device of the embodiment includes:
a construction module 301, configured to select a starting unit clause from the first-order logical clause set, select remaining unit clauses to form a unit clause set, select a candidate clause set based on the starting unit clause, and construct a deduction clause set by using the starting unit clause, the unit clause set, and the candidate clause selected from the candidate clause set;
the generating module 302 is configured to traverse the text included in the clause set to unify complementary predicates of different clauses, and generate a contradictory body separation unit result deduction separation unit;
an output module 303, configured to output a determination result in which the theorem is proved when the contradictory body separation unit result deduction separation is a null clause;
the iteration module 304 is configured to, when the contradiction separating unit result deduction separating formula is not a null clause, add the contradiction separating unit result deduction separating formula to the first-order logical clause set if the contradiction separating unit result deduction separating formula is a valid unit clause, and then trigger the construction module 301 to continue to execute the function thereof, and continue to perform the next round of contradiction separating unit result deduction; if the contradictory body separation unit result deduction separation meets the preset deduction rollback condition, adding 1 to the invalid deduction weight of the clauses participating in deduction, and triggering the construction module 301 to continue to execute the function of the clauses, and continuing to execute the next round of contradictory body separation unit result deduction; when the preset system deduction termination condition is met, the deduction is stopped and the judgment result which cannot be proved by theorem is output.
In some implementations of this embodiment, the generating module is specifically configured to: traversing the characters contained in the clause set in the deduction clause set, and replacing and checking whether the characters can be combined through the argument; if other characters in the candidate clause can be combined with the current deduction characters, combining the characters in the candidate clause, and if the starting unit clause and the characters in the unit clause set can be complementary with the characters in the candidate clause, marking the characters in the unit clause; adding all the effective characters into the standard contradiction body, and extracting the non-effective characters in clauses participating in deduction to generate a contradiction body separation unit result deduction separation.
Further, in some implementations of the present embodiment, the automatic theorem proving device further includes: the evaluation module is used for evaluating the unification validity according to a preset unification rule; when the candidate clause is constant, the unification is invalid; when the total number of words which do not participate in effective unification in clauses participating in deduction is larger than a set threshold value, unification is invalid; when identity appears in the equivalent terms, the unification is invalid.
In some implementations of this embodiment, the generating module is further configured to: recording clauses participating in deduction when the result deduction of each round of contradiction body separation unit is performed and the generated result deduction separation of the contradiction body separation unit, and generating a deduction search path; correspondingly, the output module is further configured to: outputting the deduction search path; wherein the deductive search path is used for the correctness check of the theorem proving process or for the auxiliary proving of the theorem.
It should be noted that, the automatic theorem proving method in the foregoing embodiment may be implemented based on the automatic theorem proving device provided in the present embodiment, and those skilled in the art can clearly understand that, for convenience and brevity of description, the specific working process of the automatic theorem proving device described in the present embodiment may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
With the automatic theorem proving device based on unit result deduction provided by the embodiment, for the first-order logical clause set S, selecting a unit clause C, selecting a deduction clause set Q in S according to C, and constructing a contradiction body separation type R by adopting selected clauses in the unit clause set V and Q formed by the remaining unit clauses in C, S; if R is a null clause, the theorem is proved; if R is effective and is a unit clause, adding R into S, reselecting clause in Q to continue deduction, selecting other clauses in S to continue deduction when Q is traversed, and ending the deduction of the contradictory body separation unit result when S is traversed or the deduction termination condition is met. By the implementation of the invention, the contradiction body separation unit results deduction fully plays the cooperative relationship among a plurality of clauses, can effectively reduce the path search space of the multi-element deduction and improve the deduction efficiency, can improve the path search capability in the first-order logic theorem judgment process, and enhances the first-order logic automatic theorem proving capability of the multi-element deduction reasoning system.
Third embodiment:
the present embodiment provides an electronic device, referring to fig. 4, which includes a processor 401, a memory 402, and a communication bus 403, wherein: a communication bus 403 is used to enable connection communication between the processor 401 and the memory 402; the processor 401 is configured to execute one or more computer programs stored in the memory 402 to implement at least one step of the automatic theorem proving method in the above-described embodiment one.
The present embodiments also provide a computer-readable storage medium including volatile or nonvolatile, removable or non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media includes, but is not limited to, RAM (Random Access Memory ), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory, charged erasable programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact Disc Read-Only Memory), digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The computer readable storage medium in this embodiment may be used to store one or more computer programs, where the stored one or more computer programs may be executed by a processor to implement at least one step of the method in the first embodiment.
The present embodiment also provides a computer program which can be distributed on a computer readable medium and executed by a computable device to implement at least one step of the method of the above embodiment; and in some cases at least one of the steps shown or described may be performed in a different order than that described in the above embodiments.
The present embodiment also provides a computer program product comprising computer readable means having stored thereon a computer program as shown above. The computer readable means in this embodiment may comprise a computer readable storage medium as shown above.
It will be apparent to one skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the apparatus disclosed above may be implemented as software (which may be implemented in computer program code executable by a computing apparatus), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and may include any information delivery media. Therefore, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a further detailed description of embodiments of the invention in connection with the specific embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (8)

1. An automatic theorem proving method based on contradiction body separation unit result deduction, applied to an automatic theorem proving system, characterized by comprising the following steps:
step A, selecting a starting unit clause from a first-order logical clause set, selecting a remaining unit clause to form a unit clause set, selecting a candidate clause set based on the starting unit clause, and constructing a deduction clause set by adopting the starting unit clause, the unit clause set and the candidate clause selected from the candidate clause set;
step B, traversing characters contained in the deduction clause set, integrating complementary predicates of different clauses, and generating contradiction body separation unit result deduction separation;
step C, outputting a judgment result of which the theorem is proved when the contradiction body separation unit result deduction separation is a null clause;
step D, when the result deduction separation of the contradiction body separation unit is not an empty clause, if the result deduction separation of the contradiction body separation unit is an effective unit clause, adding the result deduction separation of the contradiction body separation unit into the first-order logical clause set, and returning to the step A to continue the next round of result deduction of the contradiction body separation unit; if the contradiction body separation unit result deduction separation meets the preset deduction rollback condition, adding 1 to the invalid deduction weight of clauses participating in deduction, and returning to the step A to continue the next round of contradiction body separation unit result deduction; when the preset system deduction termination condition is met, the deduction is stopped and a judgment result which cannot be proved by theorem is output;
the step of traversing the words contained in the deduction clause set, integrating the complementary predicates of different clauses, and generating contradiction separating unit result deduction separation comprises the following steps:
traversing the characters contained in the clause set, and checking whether the characters can be combined through the replacement of the arguments;
if other characters in the candidate clause can be combined with the current deduction characters, combining the candidate clause Chinese characters, and if the starting unit clause and the unit clause set characters can be complementary with the candidate clause Chinese characters, marking the unit clause Chinese characters;
adding all the effective characters into the standard contradiction body, and extracting the non-effective characters in clauses participating in deduction to generate a contradiction body separation unit result deduction separation.
2. The automated theorem proving method of claim 1, wherein the step of adding all valid unification scripts to the standard contradictors and extracting non-valid unification scripts from clauses involved in the deduction to generate a contradiction separating unit result deduction separating further comprises, prior to:
evaluating the unification validity according to a preset unification rule;
wherein, when the candidate clause is of the constant-true type, the unification is invalid;
when the total number of words which do not participate in effective unification in clauses participating in deduction is larger than a set threshold value, unification is invalid;
when identity appears in the equivalent terms, the unification is invalid.
3. The automated theorem proving method according to any one of claims 1 to 2, characterized by further comprising, after the step of generating the contradictory body separating unit result deductive separating:
recording clauses participating in deduction when the result deduction of each round of contradiction body separation unit is performed and the generated result deduction separation of the contradiction body separation unit, and generating a deduction search path;
outputting the deduction search path; the deduction search path is used for checking correctness of theorem proving process or used for auxiliary proving of theorem.
4. An automatic theorem proving device based on contradiction body separation unit result deduction, applied to an automatic theorem proving system, characterized by comprising:
the construction module is used for selecting a starting unit clause from a first-order logical clause set, selecting a remaining unit clause to form a unit clause set, selecting a candidate clause set based on the starting unit clause, and constructing a deduction clause set by adopting the starting unit clause, the unit clause set and the candidate clause selected from the candidate clause set;
the generation module is used for traversing characters contained in the deduction clause set, integrating complementary predicates of different clauses, and generating contradiction body separation unit result deduction separation;
the output module is used for outputting a judgment result of which the theorem is proved when the result deduction separation of the contradiction body separation unit is a null clause;
the iteration module is used for adding the contradiction separation unit result deduction separation formula into the first-order logic clause set when the contradiction separation unit result deduction separation formula is not a null clause, and triggering the construction module to continuously execute the function of the contradiction separation unit result deduction formula, and continuously carrying out the next round of contradiction separation unit result deduction; if the contradiction body separation unit result deduction separation meets the preset deduction rollback condition, adding 1 to the invalid deduction weight of clauses participating in deduction, and triggering the construction module to continue to execute the function of the clauses, and continuing to execute the next round of contradiction body separation unit result deduction; when the preset system deduction termination condition is met, the deduction is stopped and a judgment result which cannot be proved by theorem is output;
the generating module is specifically configured to: traversing the characters contained in the clause set, and checking whether the characters can be combined through the replacement of the arguments; if other characters in the candidate clause can be combined with the current deduction characters, combining the candidate clause Chinese characters, and if the starting unit clause and the unit clause set characters can be complementary with the candidate clause Chinese characters, marking the unit clause Chinese characters; adding all the effective characters into the standard contradiction body, and extracting the non-effective characters in clauses participating in deduction to generate a contradiction body separation unit result deduction separation.
5. The automated theorem proving device as claimed in claim 4, further comprising: the evaluation module is used for evaluating the unification validity according to a preset unification rule; wherein, when the candidate clause is of the constant-true type, the unification is invalid; when the total number of words which do not participate in effective unification in clauses participating in deduction is larger than a set threshold value, unification is invalid; when identity appears in the equivalent terms, the unification is invalid.
6. The automated theorem proving device of any one of claims 4 to 5, wherein the generating module is further configured to: recording clauses participating in deduction when the result deduction of each round of contradiction body separation unit is performed and the generated result deduction separation of the contradiction body separation unit, and generating a deduction search path;
the output module is further configured to: outputting the deduction search path; the deduction search path is used for checking correctness of theorem proving process or used for auxiliary proving of theorem.
7. An electronic device, comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the automatic theorem proving method according to any one of claims 1 to 3.
8. A computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of the automatic theorem proving method as claimed in any one of claims 1 to 3.
CN202110647011.9A 2021-06-10 2021-06-10 Automatic theorem proving method, device and storage medium based on unit result deduction Active CN113379051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110647011.9A CN113379051B (en) 2021-06-10 2021-06-10 Automatic theorem proving method, device and storage medium based on unit result deduction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110647011.9A CN113379051B (en) 2021-06-10 2021-06-10 Automatic theorem proving method, device and storage medium based on unit result deduction

Publications (2)

Publication Number Publication Date
CN113379051A CN113379051A (en) 2021-09-10
CN113379051B true CN113379051B (en) 2023-08-25

Family

ID=77573568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110647011.9A Active CN113379051B (en) 2021-06-10 2021-06-10 Automatic theorem proving method, device and storage medium based on unit result deduction

Country Status (1)

Country Link
CN (1) CN113379051B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0351842A2 (en) * 1988-07-20 1990-01-24 Kabushiki Kaisha Toshiba Method and apparatus of automated theorem proving for information processing
US6424962B1 (en) * 1993-11-26 2002-07-23 Bull S.A. Method of automated proving for unrestricted first-order logic
CN108875949A (en) * 2017-05-12 2018-11-23 西南交通大学 Reverse parallel deduction method in first order logic based on paradox separate type
CN110989997A (en) * 2019-12-04 2020-04-10 电子科技大学 Formal verification method based on theorem verification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0351842A2 (en) * 1988-07-20 1990-01-24 Kabushiki Kaisha Toshiba Method and apparatus of automated theorem proving for information processing
US6424962B1 (en) * 1993-11-26 2002-07-23 Bull S.A. Method of automated proving for unrestricted first-order logic
CN108875949A (en) * 2017-05-12 2018-11-23 西南交通大学 Reverse parallel deduction method in first order logic based on paradox separate type
CN110989997A (en) * 2019-12-04 2020-04-10 电子科技大学 Formal verification method based on theorem verification

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多元动态演绎在Prover9证明器中的应用;曹 锋,徐扬,吴贯锋,钟建;《计算机工程与科学》;第1686-1692页 *

Also Published As

Publication number Publication date
CN113379051A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
US8457950B1 (en) System and method for coreference resolution
US11132624B2 (en) Model integration method and device
US8949166B2 (en) Creating and processing a data rule for data quality
US9020872B2 (en) Detecting missing rules with most general conditions
US9009029B1 (en) Semantic hashing in entity resolution
CN110633989A (en) Method and device for determining risk behavior generation model
CN110674188A (en) Feature extraction method, device and equipment
CN110806962B (en) Log level prediction method, device and storage medium
Huang et al. Can large language models explain themselves? a study of llm-generated self-explanations
Satish et al. Big data processing with harnessing hadoop-MapReduce for optimizing analytical workloads
CN102929596A (en) Code checking method and device
CN113379051B (en) Automatic theorem proving method, device and storage medium based on unit result deduction
US11308130B1 (en) Constructing ground truth when classifying data
CN103377378B (en) Generate the method and apparatus of assembled classifier and image search method and device
CN115577147A (en) Visual information map retrieval method and device, electronic equipment and storage medium
CN110457455B (en) Ternary logic question-answer consultation optimization method, system, medium and equipment
US20180157988A1 (en) Rule set induction
CN113379050A (en) Automatic theorem proving method, device and storage medium based on super deduction
US20180232210A1 (en) System and method for representing software development requirements into standard diagrams
CN113379052A (en) Automatic theorem proving method, device and storage medium based on conflict deduction
Yang et al. Not all demonstration examples are equally beneficial: Reweighting demonstration examples for in-context learning
KR101697992B1 (en) System and Method for Recommending Bug Fixing Developers based on Multi-Developer Network
Maisonnave et al. Improving Event Detection using Contextual Word and Sentence Embeddings
CN113128217B (en) Public opinion disposition decision-making method based on network twinning space
US20220309384A1 (en) Selecting representative features for machine learning models

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant