Simple term orderings including LPO.
Function or value | Description |
Full Usage:
lexord ord l1 l2
Parameters:
'a -> 'a -> bool
-
The input relation.
l1 : 'a list
-
The first input items to be compared.
l2 : 'a list
-
The second input items to be compared.
Returns: bool
true, if the input list are equally long and reading from
left to right the items in the first list are not less then the
second's and there is at least one greater;otherwise false.
|
Example
|
Full Usage:
lpo_ge w s t
Parameters:
string * int -> string * int -> bool
-
The function that `weights' the function symbols.
s : term
-
The first input term supposed greater than the second.
t : term
-
The second input term to be compared.
Returns: bool
true, if the first input term is greater than the second based on the
reflexive lexicographic path order parametrized by w .
|
ExampleThe second term is a variable contained in the free variables of the first.
Evaluates to true .
ExampleThe second term is a variable not contained in the free variables of the first.
Evaluates to false .
ExampleThe inputs are function terms with the same function symbol but the arguments sequence of the first is greater than that of the second:
Evaluates to true .
ExampleThe first term is a function term and at least one of its arguments is greater or equal than the second term
Evaluates to true .
ExampleThe inputs are function terms and the function symbol of the first is greater than the second based on the precedence defined by the weighting function
Evaluates to true .
ExampleThe input terms are function terms and all arguments of the first are greater than the whole second term.
Evaluates to true .
ExampleThe input terms are the same
Evaluates to true .
|
Full Usage:
lpo_gt w s t
Parameters:
string * int -> string * int -> bool
-
The function that `weights' the function symbols.
s : term
-
The first input term supposed greater than the second.
t : term
-
The second input term to be compared.
Returns: bool
true, if the first input term is greater than the second based on the
irreflexive lexicographic path order parametrized by w .
|
ExampleThe second term is a variable contained in the free variables of the first.
Evaluates to true .
ExampleThe second term is a variable not contained in the free variables of the first.
Evaluates to false .
ExampleThe inputs are function terms with the same function symbol but the arguments sequence of the first is greater than that of the second:
Evaluates to true .
ExampleThe first term is a function term and at least one of its arguments is greater or equal than the second term
Evaluates to true .
ExampleThe inputs are function terms and the function symbol of the first is greater than the second based on the precedence defined by the weighting function
Evaluates to true .
ExampleThe input terms are function terms and all arguments of the first are greater than the whole second term.
Evaluates to true .
ExampleThe input terms are the same
Evaluates to false .
|
Full Usage:
termsize tm
Parameters:
term
-
The input term.
Returns: int
The sum of the number of variables and function symbols in the term.
|
Example
Evaluates to 4 .
|
Full Usage:
weight lis (f, n) (g, m)
Parameters:
'a list
-
The list that defines the precedence of function symbols.
f : 'a
-
The first input function symbol, supposed bigger than the second.
n : 'b
-
The arity of the first function symbol.
g : 'a
-
The second input function symbol to be compared.
m : 'b
-
The arity of the second function symbol.
Returns: bool
true, if f comes after g in lis , or f and
g are the same symbol but n > m ; otherwise, false.
|
Example
|