The rewrite relation of the following TRS is considered.
Hence, it suffices to show innermost termination in the following.
The dependency pairs are split into 4
components.
-
The
1st
component contains the
pair
fac#(s(x),y) |
→ |
fac#(p(s(x)),times(s(x),y)) |
(16) |
1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
times(s(x),y) |
→ |
plus(y,times(p(s(x)),y)) |
(4) |
times(0,y) |
→ |
0 |
(3) |
plus(0,x) |
→ |
x |
(1) |
plus(s(x),y) |
→ |
s(plus(p(s(x)),y)) |
(2) |
1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
plus(0,x0) |
plus(s(x0),x1) |
times(0,x0) |
times(s(x0),x1) |
p(s(0)) |
p(s(s(x0))) |
1.1.1.1.1.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[fac#(x1, x2)] |
= |
x1 |
[plus(x1, x2)] |
= |
2 + 2 · x2
|
[s(x1)] |
= |
2 + x1
|
[times(x1, x2)] |
= |
-2 + 2 · x2
|
[p(x1)] |
= |
-2 + x1
|
[0] |
= |
1 |
together with the usable
rules
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
fac#(s(x),y) |
→ |
fac#(p(s(x)),times(s(x),y)) |
(16) |
could be deleted.
1.1.1.1.1.1.1 P is empty
There are no pairs anymore.
-
The
2nd
component contains the
pair
times#(s(x),y) |
→ |
times#(p(s(x)),y) |
(13) |
1.1.1.2 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
1.1.1.2.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
1.1.1.2.1.1 Monotonic Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[p(x1)] |
= |
1 · x1
|
[s(x1)] |
= |
2 · x1
|
[0] |
= |
2 |
[times#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
the
rules
plus(0,x) |
→ |
x |
(1) |
plus(s(x),y) |
→ |
s(plus(p(s(x)),y)) |
(2) |
times(0,y) |
→ |
0 |
(3) |
times(s(x),y) |
→ |
plus(y,times(p(s(x)),y)) |
(4) |
p(s(0)) |
→ |
0 |
(5) |
fac(0,x) |
→ |
x |
(7) |
fac(s(x),y) |
→ |
fac(p(s(x)),times(s(x),y)) |
(8) |
factorial(x) |
→ |
fac(x,s(0)) |
(9) |
could be deleted.
1.1.1.2.1.1.1 Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[times#(x1, x2)] |
= |
2 + 2 · x1
|
[p(x1)] |
= |
-1 + x1
|
[s(x1)] |
= |
2 + 2 · x1
|
the
pair
times#(s(x),y) |
→ |
times#(p(s(x)),y) |
(13) |
could be deleted.
1.1.1.2.1.1.1.1 P is empty
There are no pairs anymore.
-
The
3rd
component contains the
pair
plus#(s(x),y) |
→ |
plus#(p(s(x)),y) |
(10) |
1.1.1.3 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
1.1.1.3.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
1.1.1.3.1.1 Monotonic Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[p(x1)] |
= |
1 · x1
|
[s(x1)] |
= |
2 · x1
|
[0] |
= |
2 |
[plus#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
the
rules
plus(0,x) |
→ |
x |
(1) |
plus(s(x),y) |
→ |
s(plus(p(s(x)),y)) |
(2) |
times(0,y) |
→ |
0 |
(3) |
times(s(x),y) |
→ |
plus(y,times(p(s(x)),y)) |
(4) |
p(s(0)) |
→ |
0 |
(5) |
fac(0,x) |
→ |
x |
(7) |
fac(s(x),y) |
→ |
fac(p(s(x)),times(s(x),y)) |
(8) |
factorial(x) |
→ |
fac(x,s(0)) |
(9) |
could be deleted.
1.1.1.3.1.1.1 Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[plus#(x1, x2)] |
= |
2 + 2 · x1
|
[p(x1)] |
= |
-1 + x1
|
[s(x1)] |
= |
2 + 2 · x1
|
the
pair
plus#(s(x),y) |
→ |
plus#(p(s(x)),y) |
(10) |
could be deleted.
1.1.1.3.1.1.1.1 P is empty
There are no pairs anymore.
-
The
4th
component contains the
pair
p#(s(s(x))) |
→ |
p#(s(x)) |
(15) |
1.1.1.4 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
1.1.1.4.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
1.1.1.4.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
p#(s(s(x))) |
→ |
p#(s(x)) |
(15) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.