Knuth-Bendix completion.
Function or value | Description |
Example
val eq: obj
Evaluates to [`f(g(x0)) = g(f(x0))`; `g(x1) = g(x1)`] .
|
|
Full Usage:
listcases fn rfn lis acc
Parameters:
'a -> ('b -> 'a -> 'c) -> 'd list
rfn : 'b -> 'a list -> 'c
lis : 'a list
acc : 'd list
Returns: 'd list
|
|
Full Usage:
overlaps (l, r) tm rfn
Parameters:
term
-
The LHS of the input equation.
r : term
-
The RHS of the input equation.
tm : term
-
The input term.
rfn : func<string, term> -> term -> 'a
-
The function that applied to the resulting instantiation gives the critical pair arising from that overlap.
Returns: 'a list
All possibile overlaps of the equation l = r with the tm .
|
Defines all ways of overlapping an equation
Example
Evaluates to [`f(g(x)) = g(f(x))`; `g(y) = g(y)`] .
|
Function or value | Description |
Full Usage:
complete ord (eqs, def, crits)
Parameters:
term -> term -> bool
-
The given ordering: actually an LPO's reflective version is expected.
eqs : formula<fol> list
-
The given set of equations.
def : formula<fol> list
-
The accumulator list of deferred critical pairs initially empty.
crits : formula<fol> list
-
The critical pairs, initially from the eqs equations.
Returns: formula<fol> list
The completed set of equations that defines a confluent term
rewriting system, if the procedure has success.
|
It is a semi-decision algorithm.
Note
Prints to the Example
val ord: obj
Evaluates to
and prints to the stdout :
|
Full Usage:
normalize_and_orient ord eqs atm
Parameters:
term -> term -> bool
-
The given ordering.
eqs : formula<fol> list
-
The given set of equations.
atm : formula<fol>
-
The input equation to normalize and orient.
Returns: term * term
The pair of LHS and RHS of the normalized and oriented equation.
|
Example
val ord: obj
Evaluates to (``i(x * y)``, ``i(y) * i(x)``) .
|
Full Usage:
status (eqs, def, crs) eqs0
Parameters:
'a list
-
The current set of equations.
def : 'b list
-
The current list of deferred critical pairs.
crs : 'c list
-
The current list of critical pairs.
eqs0 : 'a list
-
The initial set of equations.
|
Function or value | Description |
|
Note
Prints to the Example
Evaluates to
[`x0 * i(x0) * x3 = x3`; `i(i(x0)) * x1 = x0 * x1`; `i(a) * a * b = b`] and prints to the stdout :
|
Example
Evaluates to
|