The rewrite relation of the following TRS is considered.
The dependency pairs are split into 4
components.
-
The
1st
component contains the
pair
div#(plus(x,y),z) |
→ |
div#(x,z) |
(20) |
div#(s(x),s(y)) |
→ |
div#(minus(x,y),s(y)) |
(17) |
div#(plus(x,y),z) |
→ |
div#(y,z) |
(21) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(plus) |
= |
1 |
|
weight(plus) |
= |
1 |
|
|
|
prec(0) |
= |
2 |
|
weight(0) |
= |
2 |
|
|
|
prec(p) |
= |
0 |
|
weight(p) |
= |
1 |
|
|
|
in combination with the following argument filter
π(div#) |
= |
1 |
π(plus) |
= |
[1,2] |
π(s) |
= |
1 |
π(minus) |
= |
1 |
π(0) |
= |
[] |
π(p) |
= |
[] |
together with the usable
rules
minus(x,0) |
→ |
x |
(1) |
minus(0,y) |
→ |
0 |
(2) |
minus(x,plus(y,z)) |
→ |
minus(minus(x,y),z) |
(4) |
minus(s(x),s(y)) |
→ |
minus(p(s(x)),p(s(y))) |
(3) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pairs
div#(plus(x,y),z) |
→ |
div#(x,z) |
(20) |
div#(plus(x,y),z) |
→ |
div#(y,z) |
(21) |
could be deleted.
1.1.1.1 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 |
|
|
|
prec(0) |
= |
1 |
|
weight(0) |
= |
1 |
|
|
|
in combination with the following argument filter
π(div#) |
= |
1 |
π(s) |
= |
[1] |
π(minus) |
= |
1 |
π(0) |
= |
[] |
π(p) |
= |
1 |
together with the usable
rules
minus(x,0) |
→ |
x |
(1) |
minus(0,y) |
→ |
0 |
(2) |
minus(x,plus(y,z)) |
→ |
minus(minus(x,y),z) |
(4) |
minus(s(x),s(y)) |
→ |
minus(p(s(x)),p(s(y))) |
(3) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
div#(s(x),s(y)) |
→ |
div#(minus(x,y),s(y)) |
(17) |
could be deleted.
1.1.1.1.1 P is empty
There are no pairs anymore.
-
The
2nd
component contains the
pair
plus#(s(x),y) |
→ |
plus#(y,minus(s(x),s(0))) |
(22) |
1.1.2 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[minus(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[plus(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[s(x1)] |
= |
1 · x1
|
[p(x1)] |
= |
1 · x1
|
[0] |
= |
0 |
[plus#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
together with the usable
rules
minus(x,plus(y,z)) |
→ |
minus(minus(x,y),z) |
(4) |
minus(s(x),s(y)) |
→ |
minus(p(s(x)),p(s(y))) |
(3) |
minus(x,0) |
→ |
x |
(1) |
minus(0,y) |
→ |
0 |
(2) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
(w.r.t. the implicit argument filter of the reduction pair),
the
rule
could be deleted.
1.1.2.1 Switch to Innermost Termination
The TRS does not have overlaps with the pairs and is locally confluent:
20
Hence, it suffices to show innermost termination in the following.
1.1.2.1.1 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[minus(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[s(x1)] |
= |
1 · x1
|
[p(x1)] |
= |
1 · x1
|
[plus(x1, x2)] |
= |
2 + 2 · x1 + 2 · x2
|
[0] |
= |
0 |
[plus#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
together with the usable
rules
minus(s(x),s(y)) |
→ |
minus(p(s(x)),p(s(y))) |
(3) |
minus(x,plus(y,z)) |
→ |
minus(minus(x,y),z) |
(4) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
minus(x,0) |
→ |
x |
(1) |
minus(0,y) |
→ |
0 |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
rule
minus(x,plus(y,z)) |
→ |
minus(minus(x,y),z) |
(4) |
could be deleted.
1.1.2.1.1.1 Rewriting Processor
We rewrite the right hand side of the pair
resulting in
1.1.2.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
minus(0,y) |
→ |
0 |
(2) |
1.1.2.1.1.1.1.1 Reduction Pair Processor with Usable Rules
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(plus#) |
= |
1 |
|
weight(plus#) |
= |
1 |
|
|
|
prec(s) |
= |
0 |
|
weight(s) |
= |
3 |
|
|
|
prec(minus) |
= |
3 |
|
weight(minus) |
= |
2 |
|
|
|
prec(0) |
= |
2 |
|
weight(0) |
= |
1 |
|
|
|
in combination with the following argument filter
π(plus#) |
= |
[1,2] |
π(s) |
= |
[] |
π(minus) |
= |
[] |
π(0) |
= |
[] |
together with the usable
rule
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
plus#(s(x),y) |
→ |
plus#(y,minus(p(s(x)),p(s(0)))) |
(24) |
could be deleted.
1.1.2.1.1.1.1.1.1 P is empty
There are no pairs anymore.
-
The
3rd
component contains the
pair
minus#(x,plus(y,z)) |
→ |
minus#(minus(x,y),z) |
(14) |
minus#(s(x),s(y)) |
→ |
minus#(p(s(x)),p(s(y))) |
(11) |
minus#(x,plus(y,z)) |
→ |
minus#(x,y) |
(15) |
1.1.3 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[p(x1)] |
= |
1 · x1
|
[s(x1)] |
= |
1 · x1
|
[minus(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[0] |
= |
0 |
[plus(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[minus#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
together with the usable
rules
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
minus(x,0) |
→ |
x |
(1) |
minus(0,y) |
→ |
0 |
(2) |
minus(x,plus(y,z)) |
→ |
minus(minus(x,y),z) |
(4) |
minus(s(x),s(y)) |
→ |
minus(p(s(x)),p(s(y))) |
(3) |
(w.r.t. the implicit argument filter of the reduction pair),
the
rule
could be deleted.
1.1.3.1 Switch to Innermost Termination
The TRS does not have overlaps with the pairs and is locally confluent:
20
Hence, it suffices to show innermost termination in the following.
1.1.3.1.1 Dependency Graph Processor
The dependency pairs are split into 2
components.
-
The
1st
component contains the
pair
minus#(x,plus(y,z)) |
→ |
minus#(x,y) |
(15) |
minus#(x,plus(y,z)) |
→ |
minus#(minus(x,y),z) |
(14) |
1.1.3.1.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
minus#(x,plus(y,z)) |
→ |
minus#(x,y) |
(15) |
|
1 |
≥ |
1 |
2 |
> |
2 |
minus#(x,plus(y,z)) |
→ |
minus#(minus(x,y),z) |
(14) |
|
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
2nd
component contains the
pair
minus#(s(x),s(y)) |
→ |
minus#(p(s(x)),p(s(y))) |
(11) |
1.1.3.1.1.2 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(s(x))) |
→ |
s(p(s(x))) |
(5) |
1.1.3.1.1.2.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
1.1.3.1.1.2.1.1 Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[minus#(x1, x2)] |
= |
2 + 2 · x1 + 2 · x2
|
[p(x1)] |
= |
-2 + x1
|
[s(x1)] |
= |
1 + 2 · x1
|
the
pair
minus#(s(x),s(y)) |
→ |
minus#(p(s(x)),p(s(y))) |
(11) |
could be deleted.
1.1.3.1.1.2.1.1.1 P is empty
There are no pairs anymore.
-
The
4th
component contains the
pair
p#(s(s(x))) |
→ |
p#(s(x)) |
(16) |
1.1.4 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[s(x1)] |
= |
1 · x1
|
[p#(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.4.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)) |
(16) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.