Resolution.
| Function or value | Description | ||||||
| 
                
              
                  Full Usage: 
                   mgu l envParameters: 
 formula<fol> list- 
                      The input list of literals.env : func<string, term>- 
                      An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.Returns: func<string, term>An MGU, if the unification is possible and there are no 
 cycles. | The difference with Tableaux.unify_literals is that this function can be applied to a list of literals instead of a pair and also that it returns an MGU and not a simple unifier. 
 
 NoteSee also Tableaux.unify_literals, Unif.solve ExampleSuccessful unification Evaluates to[("x", ``f(y)``)].ExampleDegenerated case Evaluates to[].ExampleCyclic assignment ThrowsSystem.Exception: cyclic.ExampleImpossible unification ThrowsSystem.Exception: impossible unification.ExampleInvalid input ThrowsSystem.Exception: Can't unify literals. | ||||||
| 
                
               | 
 Example
 Evaluates totrue.Example
 Evaluates tofalse. | 
| Function or value | Description | ||
| 
                
               | Keeps generating resolvents till the empty clause is derived. 
 
 
 Note
                
 Prints diagnostic informations to the  Example
 Evaluates totrueand prints to thestdoutExample
 ThrowsSystem.Exception: No proof found. | ||
| 
                
              
                  Full Usage: 
                   basic_resolution fmParameters: Returns: bool listThe list of the results of 
 Resolution.pure_basic_resolution on each 
 subproblems, if the formula is valid and a proof could be found. | 
 
 Note
                
 Prints diagnostic informations to the  ExampleValid formula (example from Davis and Putnam (1960)) Evaluates to[true]and prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof found.ExampleUnsatisfiable formula ThrowsSystem.Exception: No proof found. | ||
| 
                
               | 
 
 Note
                
 Prints diagnostic informations to the  ExampleUnsatisfiable formula Evaluates totrueand prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof foundand prints to thestdout:ExampleValid formula ThrowsSystem.Exception: No proof foundand prints to thestdout: | ||
| 
                
               | Example
 Evaluates to[`P(old_x)`; `Q(old_y)`]. | ||
| Example
 Evaluates to | |||
| 
                
              
                  Full Usage: 
                   resolvents cl1 cl2 p accParameters: 
 formula<fol> list- 
                      The first input clause.cl2 : formula<fol> list- 
                      The second input clause.p : formula<fol>- 
                      The given literal.acc : formula<fol> list list- 
                      The supporting accumulator.Returns: formula<fol> list listThe result of resolvingcl1andcl2on the literalp. | 
 Example
 Evaluates to | 
| Function or value | Description | ||||
| 
                
              
                  Full Usage: 
                   match_literals env (p, q)Parameters: 
 func<string, term>- 
                      An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.p : formula<fol>- 
                      The first input literal.q : formula<fol>- 
                      The second input literal.Returns: func<string, term>The resulting matching, if there is. | Matching is a cut-down version of unification in which the instantiation of variables is allowed only in the first term. 
 
 Example
 Evaluates to[("x", ``f(y)``)].Example
 ThrowsSystem.Exception: term_match.Example
 ThrowsSystem.Exception: match_literals. | ||||
| 
                
              
                  Full Usage: 
                   term_match env eqsParameters: 
 func<string, term>- 
                      An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.eqs : (term * term) list- 
                      The input list of term-term pairs to be matched.Returns: func<string, term>The resulting matchings, if there are. | Matching is a cut-down version of unification in which the instantiation of variables is allowed only in the first term. 
 
 Example
 Evaluates to[("x", ``f(y)``)].Example
 ThrowsSystem.Exception: term_match. | 
| Function or value | Description | 
| 
                
              
                  Full Usage: 
                   incorporate gcl cl unusedParameters: 
 formula<fol> list- 
                      The given clause.cl : formula<fol> list- 
                      The clause to be inserted after checking.unused : formula<fol> list list- 
                      The input list fo clauses.Returns: formula<fol> list listThe input listunusedincremented bycl, if this latter 
 passes the check; otherwise, the input listunusedunchanged. | 
 
 ExampleInserted since neither tautological nor subsumed Evaluates to[[`P(x)`]; [`Q(y)`]; [`R(f(z))`]].ExampleNot inserted since subsumed by gcl Evaluates to[[`P(x)`]; [`Q(y)`]].ExampleNot inserted since subsumed by another clause in the list Evaluates to[[`P(x)`]; [`Q(y)`]].ExampleNot inserted since tautological Evaluates to[[`P(x)`]; [`Q(y)`]]. | 
| 
 
 Example
 Evaluates to[[`P(x)`]; [`P(x)`; `~P(x)`]]. | |
| 
                
               | 
 Example
 Evaluates totrue.Example
 Evaluates tofalse. | 
| Function or value | Description | ||
| 
                
               | 
 
 Note
                
 Prints diagnostic informations to the  ExampleUnsatisfiable formula Evaluates totrueand prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof foundand prints to thestdout:ExampleValid formula ThrowsSystem.Exception: No proof foundand prints to thestdout: | ||
| 
                
               | 
 
 
 Note
                
 Prints diagnostic informations to the  Example
 Evaluates totrueand prints to thestdoutExample
 ThrowsSystem.Exception: No proof found. | ||
| 
                
              
                  Full Usage: 
                   resolution_wsubs fmParameters: Returns: bool listThe list of the results of 
 Resolution.pure_resolution_wsubs on each 
 subproblems, if the formula is valid and a proof could be found. | 
 
 Note
                
 Prints diagnostic informations to the  ExampleValid formula (example from Davis and Putnam (1960)) Evaluates to[true]and prints to thestdout:Note how much the number of clauses generated has been reduced compared 
 to Resolution.basic_resolution.ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof found.ExampleUnsatisfiable formula ThrowsSystem.Exception: No proof found. | 
| Function or value | Description | ||
| 
                
               | 
 
 
 Note
                
 Prints diagnostic informations to the  Example
 Evaluates totrueand prints to thestdoutExample
 ThrowsSystem.Exception: No proof found. | ||
| 
                
              
                  Full Usage: 
                   presolution fmParameters: Returns: bool listThe list of the results of 
 Resolution.pure_presolution on each 
 subproblems, if the formula is valid and a proof could be found. | 
 
 Note
                
 Prints diagnostic informations to the  ExampleValid formula (Łoś example) Evaluates to[true]and prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof found.ExampleUnsatisfiable formula ThrowsSystem.Exception: No proof found. | ||
| 
 Example
 Evaluates toExample
 Evaluates to[]. | |||
| 
                
               | 
 
 Note
                
 Prints diagnostic informations to the  ExampleUnsatisfiable formula Evaluates totrueand prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof foundand prints to thestdout:ExampleValid formula ThrowsSystem.Exception: No proof foundand prints to thestdout: | 
| Function or value | Description | ||
| 
                
               | 
 
 Note
                
 Prints diagnostic informations to the  ExampleUnsatisfiable formula Evaluates totrueand prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof foundand prints to thestdout:ExampleValid formula ThrowsSystem.Exception: No proof foundand prints to thestdout: | ||
| 
                
              
                  Full Usage: 
                   resolution_wsos fmParameters: Returns: bool listThe list of the results of 
 Resolution.pure_resolution_wsos on each 
 subproblems, if the formula is valid and a proof could be found. | 
 
 Note
                
 Prints diagnostic informations to the  ExampleValid formula (Łoś example) Evaluates to[true]and prints to thestdout:ExampleSatisfiable (not valid) formula ThrowsSystem.Exception: No proof found.ExampleUnsatisfiable formula ThrowsSystem.Exception: No proof found. |