The rewrite relation of the following TRS is considered.
minus(x,0) |
→ |
x |
(1) |
minus(s(x),s(y)) |
→ |
minus(x,y) |
(2) |
double(0) |
→ |
0 |
(3) |
double(s(x)) |
→ |
s(s(double(x))) |
(4) |
plus(s(x),s(y)) |
→ |
s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) |
(5) |
plus(s(x),x) |
→ |
plus(if(gt(x,x),id(x),id(x)),s(x)) |
(6) |
plus(zero,y) |
→ |
y |
(7) |
plus(id(x),s(y)) |
→ |
s(plus(x,if(gt(s(y),y),y,s(y)))) |
(8) |
id(x) |
→ |
x |
(9) |
if(true,x,y) |
→ |
x |
(10) |
if(false,x,y) |
→ |
y |
(11) |
not(x) |
→ |
if(x,false,true) |
(12) |
gt(s(x),zero) |
→ |
true |
(13) |
gt(zero,y) |
→ |
false |
(14) |
gt(s(x),s(y)) |
→ |
gt(x,y) |
(15) |
minus#(s(x),s(y)) |
→ |
minus#(x,y) |
(16) |
double#(s(x)) |
→ |
double#(x) |
(17) |
plus#(s(x),s(y)) |
→ |
plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) |
(18) |
plus#(s(x),s(y)) |
→ |
if#(gt(x,y),x,y) |
(19) |
plus#(s(x),s(y)) |
→ |
gt#(x,y) |
(20) |
plus#(s(x),s(y)) |
→ |
if#(not(gt(x,y)),id(x),id(y)) |
(21) |
plus#(s(x),s(y)) |
→ |
not#(gt(x,y)) |
(22) |
plus#(s(x),s(y)) |
→ |
id#(x) |
(23) |
plus#(s(x),s(y)) |
→ |
id#(y) |
(24) |
plus#(s(x),x) |
→ |
plus#(if(gt(x,x),id(x),id(x)),s(x)) |
(25) |
plus#(s(x),x) |
→ |
if#(gt(x,x),id(x),id(x)) |
(26) |
plus#(s(x),x) |
→ |
gt#(x,x) |
(27) |
plus#(s(x),x) |
→ |
id#(x) |
(28) |
plus#(id(x),s(y)) |
→ |
plus#(x,if(gt(s(y),y),y,s(y))) |
(29) |
plus#(id(x),s(y)) |
→ |
if#(gt(s(y),y),y,s(y)) |
(30) |
plus#(id(x),s(y)) |
→ |
gt#(s(y),y) |
(31) |
not#(x) |
→ |
if#(x,false,true) |
(32) |
gt#(s(x),s(y)) |
→ |
gt#(x,y) |
(33) |
The dependency pairs are split into 4
components.
-
The
1st
component contains the
pair
plus#(s(x),x) |
→ |
plus#(if(gt(x,x),id(x),id(x)),s(x)) |
(25) |
plus#(s(x),s(y)) |
→ |
plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) |
(18) |
plus#(id(x),s(y)) |
→ |
plus#(x,if(gt(s(y),y),y,s(y))) |
(29) |
1.1.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
[plus#(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
|
[zero] |
= |
|
[true] |
= |
|
[false] |
= |
|
together with the usable
rules
gt(s(x),zero) |
→ |
true |
(13) |
gt(zero,y) |
→ |
false |
(14) |
gt(s(x),s(y)) |
→ |
gt(x,y) |
(15) |
id(x) |
→ |
x |
(9) |
if(true,x,y) |
→ |
x |
(10) |
if(false,x,y) |
→ |
y |
(11) |
not(x) |
→ |
if(x,false,true) |
(12) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
plus#(s(x),x) |
→ |
plus#(if(gt(x,x),id(x),id(x)),s(x)) |
(25) |
could be deleted.
1.1.1.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
[plus#(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
|
[zero] |
= |
|
[true] |
= |
|
[false] |
= |
|
together with the usable
rules
if(true,x,y) |
→ |
x |
(10) |
if(false,x,y) |
→ |
y |
(11) |
id(x) |
→ |
x |
(9) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
plus#(s(x),s(y)) |
→ |
plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) |
(18) |
could be deleted.
1.1.1.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
plus#(id(x),s(y)) |
→ |
plus#(x,if(gt(s(y),y),y,s(y))) |
(29) |
|
1 |
> |
1 |
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#(x,y) |
(16) |
1.1.2 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.2.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) |
(16) |
|
1 |
> |
1 |
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
3rd
component contains the
pair
double#(s(x)) |
→ |
double#(x) |
(17) |
1.1.3 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[s(x1)] |
= |
1 · x1
|
[double#(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.3.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
double#(s(x)) |
→ |
double#(x) |
(17) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
4th
component contains the
pair
gt#(s(x),s(y)) |
→ |
gt#(x,y) |
(33) |
1.1.4 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.4.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) |
(33) |
|
1 |
> |
1 |
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.