The rewrite relation of the following TRS is considered.
|
g(s(x),s(y)) |
→ |
if(and(f(s(x)),f(s(y))),t(g(k(minus(m(x,y),n(x,y)),s(s(0))),k(n(s(x),s(y)),s(s(0))))),g(minus(m(x,y),n(x,y)),n(s(x),s(y)))) |
(1) |
|
n(0,y) |
→ |
0 |
(2) |
|
n(x,0) |
→ |
0 |
(3) |
|
n(s(x),s(y)) |
→ |
s(n(x,y)) |
(4) |
|
m(0,y) |
→ |
y |
(5) |
|
m(x,0) |
→ |
x |
(6) |
|
m(s(x),s(y)) |
→ |
s(m(x,y)) |
(7) |
|
k(0,s(y)) |
→ |
0 |
(8) |
|
k(s(x),s(y)) |
→ |
s(k(minus(x,y),s(y))) |
(9) |
|
t(x) |
→ |
p(x,x) |
(10) |
|
p(s(x),s(y)) |
→ |
s(s(p(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) |
(11) |
|
p(s(x),x) |
→ |
p(if(gt(x,x),id(x),id(x)),s(x)) |
(12) |
|
p(0,y) |
→ |
y |
(13) |
|
p(id(x),s(y)) |
→ |
s(p(x,if(gt(s(y),y),y,s(y)))) |
(14) |
|
minus(x,0) |
→ |
x |
(15) |
|
minus(s(x),s(y)) |
→ |
minus(x,y) |
(16) |
|
id(x) |
→ |
x |
(17) |
|
if(true,x,y) |
→ |
x |
(18) |
|
if(false,x,y) |
→ |
y |
(19) |
|
not(x) |
→ |
if(x,false,true) |
(20) |
|
and(x,false) |
→ |
false |
(21) |
|
and(true,true) |
→ |
true |
(22) |
|
f(0) |
→ |
true |
(23) |
|
f(s(x)) |
→ |
h(x) |
(24) |
|
h(0) |
→ |
false |
(25) |
|
h(s(x)) |
→ |
f(x) |
(26) |
|
gt(s(x),0) |
→ |
true |
(27) |
|
gt(0,y) |
→ |
false |
(28) |
|
gt(s(x),s(y)) |
→ |
gt(x,y) |
(29) |
|
g#(s(x),s(y)) |
→ |
if#(and(f(s(x)),f(s(y))),t(g(k(minus(m(x,y),n(x,y)),s(s(0))),k(n(s(x),s(y)),s(s(0))))),g(minus(m(x,y),n(x,y)),n(s(x),s(y)))) |
(30) |
|
g#(s(x),s(y)) |
→ |
and#(f(s(x)),f(s(y))) |
(31) |
|
g#(s(x),s(y)) |
→ |
f#(s(x)) |
(32) |
|
g#(s(x),s(y)) |
→ |
f#(s(y)) |
(33) |
|
g#(s(x),s(y)) |
→ |
t#(g(k(minus(m(x,y),n(x,y)),s(s(0))),k(n(s(x),s(y)),s(s(0))))) |
(34) |
|
g#(s(x),s(y)) |
→ |
g#(k(minus(m(x,y),n(x,y)),s(s(0))),k(n(s(x),s(y)),s(s(0)))) |
(35) |
|
g#(s(x),s(y)) |
→ |
k#(minus(m(x,y),n(x,y)),s(s(0))) |
(36) |
|
g#(s(x),s(y)) |
→ |
minus#(m(x,y),n(x,y)) |
(37) |
|
g#(s(x),s(y)) |
→ |
m#(x,y) |
(38) |
|
g#(s(x),s(y)) |
→ |
n#(x,y) |
(39) |
|
g#(s(x),s(y)) |
→ |
k#(n(s(x),s(y)),s(s(0))) |
(40) |
|
g#(s(x),s(y)) |
→ |
n#(s(x),s(y)) |
(41) |
|
g#(s(x),s(y)) |
→ |
g#(minus(m(x,y),n(x,y)),n(s(x),s(y))) |
(42) |
|
n#(s(x),s(y)) |
→ |
n#(x,y) |
(43) |
|
m#(s(x),s(y)) |
→ |
m#(x,y) |
(44) |
|
k#(s(x),s(y)) |
→ |
k#(minus(x,y),s(y)) |
(45) |
|
k#(s(x),s(y)) |
→ |
minus#(x,y) |
(46) |
|
t#(x) |
→ |
p#(x,x) |
(47) |
|
p#(s(x),s(y)) |
→ |
p#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) |
(48) |
|
p#(s(x),s(y)) |
→ |
if#(gt(x,y),x,y) |
(49) |
|
p#(s(x),s(y)) |
→ |
gt#(x,y) |
(50) |
|
p#(s(x),s(y)) |
→ |
if#(not(gt(x,y)),id(x),id(y)) |
(51) |
|
p#(s(x),s(y)) |
→ |
not#(gt(x,y)) |
(52) |
|
p#(s(x),s(y)) |
→ |
id#(x) |
(53) |
|
p#(s(x),s(y)) |
→ |
id#(y) |
(54) |
|
p#(s(x),x) |
→ |
p#(if(gt(x,x),id(x),id(x)),s(x)) |
(55) |
|
p#(s(x),x) |
→ |
if#(gt(x,x),id(x),id(x)) |
(56) |
|
p#(s(x),x) |
→ |
gt#(x,x) |
(57) |
|
p#(s(x),x) |
→ |
id#(x) |
(58) |
|
p#(id(x),s(y)) |
→ |
p#(x,if(gt(s(y),y),y,s(y))) |
(59) |
|
p#(id(x),s(y)) |
→ |
if#(gt(s(y),y),y,s(y)) |
(60) |
|
p#(id(x),s(y)) |
→ |
gt#(s(y),y) |
(61) |
|
minus#(s(x),s(y)) |
→ |
minus#(x,y) |
(62) |
|
not#(x) |
→ |
if#(x,false,true) |
(63) |
|
f#(s(x)) |
→ |
h#(x) |
(64) |
|
h#(s(x)) |
→ |
f#(x) |
(65) |
|
gt#(s(x),s(y)) |
→ |
gt#(x,y) |
(66) |
The dependency pairs are split into 8
components.
-
The
1st
component contains the
pair
|
g#(s(x),s(y)) |
→ |
g#(minus(m(x,y),n(x,y)),n(s(x),s(y))) |
(42) |
|
g#(s(x),s(y)) |
→ |
g#(k(minus(m(x,y),n(x,y)),s(s(0))),k(n(s(x),s(y)),s(s(0)))) |
(35) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [g#(x1, x2)] |
= |
-2 + 2 · x1 + x2
|
| [minus(x1, x2)] |
= |
x1 |
| [m(x1, x2)] |
= |
x1 + x2
|
| [0] |
= |
0 |
| [s(x1)] |
= |
1 + 2 · x1
|
| [n(x1, x2)] |
= |
x1 |
| [k(x1, x2)] |
= |
x1 |
together with the usable
rules
|
m(0,y) |
→ |
y |
(5) |
|
m(x,0) |
→ |
x |
(6) |
|
m(s(x),s(y)) |
→ |
s(m(x,y)) |
(7) |
|
n(0,y) |
→ |
0 |
(2) |
|
n(x,0) |
→ |
0 |
(3) |
|
n(s(x),s(y)) |
→ |
s(n(x,y)) |
(4) |
|
minus(x,0) |
→ |
x |
(15) |
|
minus(s(x),s(y)) |
→ |
minus(x,y) |
(16) |
|
k(0,s(y)) |
→ |
0 |
(8) |
|
k(s(x),s(y)) |
→ |
s(k(minus(x,y),s(y))) |
(9) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pairs
|
g#(s(x),s(y)) |
→ |
g#(minus(m(x,y),n(x,y)),n(s(x),s(y))) |
(42) |
|
g#(s(x),s(y)) |
→ |
g#(k(minus(m(x,y),n(x,y)),s(s(0))),k(n(s(x),s(y)),s(s(0)))) |
(35) |
could be deleted.
1.1.1.1 P is empty
There are no pairs anymore.
-
The
2nd
component contains the
pair
|
k#(s(x),s(y)) |
→ |
k#(minus(x,y),s(y)) |
(45) |
1.1.2 Reduction Pair Processor with Usable Rules
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
| prec(s) |
= |
0 |
|
weight(s) |
= |
1 |
|
|
|
in combination with the following argument filter
| π(k#) |
= |
1 |
| π(s) |
= |
[1] |
| π(minus) |
= |
1 |
together with the usable
rules
|
minus(x,0) |
→ |
x |
(15) |
|
minus(s(x),s(y)) |
→ |
minus(x,y) |
(16) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
|
k#(s(x),s(y)) |
→ |
k#(minus(x,y),s(y)) |
(45) |
could be deleted.
1.1.2.1 P is empty
There are no pairs anymore.
-
The
3rd
component contains the
pair
|
p#(s(x),x) |
→ |
p#(if(gt(x,x),id(x),id(x)),s(x)) |
(55) |
|
p#(s(x),s(y)) |
→ |
p#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) |
(48) |
|
p#(id(x),s(y)) |
→ |
p#(x,if(gt(s(y),y),y,s(y))) |
(59) |
1.1.3 Reduction Pair Processor with Usable Rules
Using the matrix interpretations of dimension 1 with strict dimension 1 over the arctic semiring over the naturals
| [p#(x1, x2)] |
= |
+ · x1 + · x2
|
| [s(x1)] |
= |
+ · x1
|
| [if(x1, x2, x3)] |
= |
+ · x1 + · x2 + · x3
|
| [gt(x1, x2)] |
= |
+ · x1 + · x2
|
| [id(x1)] |
= |
+ · x1
|
| [not(x1)] |
= |
+ · x1
|
| [0] |
= |
|
| [true] |
= |
|
| [false] |
= |
|
together with the usable
rules
|
gt(s(x),0) |
→ |
true |
(27) |
|
gt(0,y) |
→ |
false |
(28) |
|
gt(s(x),s(y)) |
→ |
gt(x,y) |
(29) |
|
id(x) |
→ |
x |
(17) |
|
if(true,x,y) |
→ |
x |
(18) |
|
if(false,x,y) |
→ |
y |
(19) |
|
not(x) |
→ |
if(x,false,true) |
(20) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
|
p#(s(x),x) |
→ |
p#(if(gt(x,x),id(x),id(x)),s(x)) |
(55) |
could be deleted.
1.1.3.1 Reduction Pair Processor with Usable Rules
Using the matrix interpretations of dimension 1 with strict dimension 1 over the arctic semiring over the naturals
| [p#(x1, x2)] |
= |
+ · x1 + · x2
|
| [s(x1)] |
= |
+ · x1
|
| [if(x1, x2, x3)] |
= |
+ · x1 + · x2 + · x3
|
| [gt(x1, x2)] |
= |
+ · x1 + · x2
|
| [not(x1)] |
= |
+ · x1
|
| [id(x1)] |
= |
+ · x1
|
| [0] |
= |
|
| [true] |
= |
|
| [false] |
= |
|
together with the usable
rules
|
if(true,x,y) |
→ |
x |
(18) |
|
if(false,x,y) |
→ |
y |
(19) |
|
id(x) |
→ |
x |
(17) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
|
p#(s(x),s(y)) |
→ |
p#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) |
(48) |
could be deleted.
1.1.3.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
p#(id(x),s(y)) |
→ |
p#(x,if(gt(s(y),y),y,s(y))) |
(59) |
|
| 1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
4th
component contains the
pair
|
n#(s(x),s(y)) |
→ |
n#(x,y) |
(43) |
1.1.4 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [s(x1)] |
= |
1 · x1
|
| [n#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.4.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
n#(s(x),s(y)) |
→ |
n#(x,y) |
(43) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
5th
component contains the
pair
|
m#(s(x),s(y)) |
→ |
m#(x,y) |
(44) |
1.1.5 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [s(x1)] |
= |
1 · x1
|
| [m#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.5.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
m#(s(x),s(y)) |
→ |
m#(x,y) |
(44) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
6th
component contains the
pair
|
minus#(s(x),s(y)) |
→ |
minus#(x,y) |
(62) |
1.1.6 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [s(x1)] |
= |
1 · x1
|
| [minus#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.6.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
minus#(s(x),s(y)) |
→ |
minus#(x,y) |
(62) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
7th
component contains the
pair
|
h#(s(x)) |
→ |
f#(x) |
(65) |
|
f#(s(x)) |
→ |
h#(x) |
(64) |
1.1.7 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [s(x1)] |
= |
1 · x1
|
| [f#(x1)] |
= |
1 · x1
|
| [h#(x1)] |
= |
1 · x1
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.7.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
f#(s(x)) |
→ |
h#(x) |
(64) |
|
| 1 |
> |
1 |
|
h#(s(x)) |
→ |
f#(x) |
(65) |
|
| 1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
8th
component contains the
pair
|
gt#(s(x),s(y)) |
→ |
gt#(x,y) |
(66) |
1.1.8 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [s(x1)] |
= |
1 · x1
|
| [gt#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.8.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
gt#(s(x),s(y)) |
→ |
gt#(x,y) |
(66) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.