Resolution.
Function or value | Description | ||||||
Full Usage:
mgu l env
Parameters:
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
Throws System.Exception: cyclic .
ExampleImpossible unification
Throws System.Exception: impossible unification .
ExampleInvalid input
Throws System.Exception: Can't unify literals .
|
||||||
|
Example
Evaluates to true .
Example
Evaluates to false .
|
Function or value | Description | ||
|
Keeps generating resolvents till the empty clause is derived.
Note
Prints diagnostic informations to the Example
Evaluates to true and prints to the stdout
Example
Throws System.Exception: No proof found .
|
||
Full Usage:
basic_resolution fm
Parameters: Returns: bool list
The 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 the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found .
ExampleUnsatisfiable formula
Throws System.Exception: No proof found .
|
||
|
Note
Prints diagnostic informations to the ExampleUnsatisfiable formula
Evaluates to true and prints to the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found and prints to the
stdout :
ExampleValid formula
Throws System.Exception: No proof found and prints to the
stdout :
|
||
|
Example
Evaluates to [`P(old_x)`; `Q(old_y)`] .
|
||
Example
Evaluates to
|
|||
Full Usage:
resolvents cl1 cl2 p acc
Parameters:
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 list
The result of resolving cl1 and cl2 on the literal
p .
|
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
Throws System.Exception: term_match .
Example
Throws System.Exception: match_literals .
|
||||
Full Usage:
term_match env eqs
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.
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
Throws System.Exception: term_match .
|
Function or value | Description |
Full Usage:
incorporate gcl cl unused
Parameters:
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 list
The input list unused incremented by cl , if this latter
passes the check; otherwise, the input list unused unchanged.
|
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 to true .
Example
Evaluates to false .
|
Function or value | Description | ||
|
Note
Prints diagnostic informations to the ExampleUnsatisfiable formula
Evaluates to true and prints to the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found and prints to the
stdout :
ExampleValid formula
Throws System.Exception: No proof found and prints to the
stdout :
|
||
|
Note
Prints diagnostic informations to the Example
Evaluates to true and prints to the stdout
Example
Throws System.Exception: No proof found .
|
||
Full Usage:
resolution_wsubs fm
Parameters: Returns: bool list
The 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 the stdout :
Note how much the number of clauses generated has been reduced compared
to Resolution.basic_resolution.
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found .
ExampleUnsatisfiable formula
Throws System.Exception: No proof found .
|
Function or value | Description | ||
|
Note
Prints diagnostic informations to the Example
Evaluates to true and prints to the stdout
Example
Throws System.Exception: No proof found .
|
||
Full Usage:
presolution fm
Parameters: Returns: bool list
The 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 the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found .
ExampleUnsatisfiable formula
Throws System.Exception: No proof found .
|
||
Example
Evaluates to
Example
Evaluates to [] .
|
|||
|
Note
Prints diagnostic informations to the ExampleUnsatisfiable formula
Evaluates to true and prints to the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found and prints to the
stdout :
ExampleValid formula
Throws System.Exception: No proof found and prints to the
stdout :
|
Function or value | Description | ||
|
Note
Prints diagnostic informations to the ExampleUnsatisfiable formula
Evaluates to true and prints to the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found and prints to the
stdout :
ExampleValid formula
Throws System.Exception: No proof found and prints to the
stdout :
|
||
Full Usage:
resolution_wsos fm
Parameters: Returns: bool list
The 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 the stdout :
ExampleSatisfiable (not valid) formula
Throws System.Exception: No proof found .
ExampleUnsatisfiable formula
Throws System.Exception: No proof found .
|