The rewrite relation of the following TRS is considered.
active(filter(cons(X,Y),0,M)) |
→ |
mark(cons(0,filter(Y,M,M))) |
(1) |
active(filter(cons(X,Y),s(N),M)) |
→ |
mark(cons(X,filter(Y,N,M))) |
(2) |
active(sieve(cons(0,Y))) |
→ |
mark(cons(0,sieve(Y))) |
(3) |
active(sieve(cons(s(N),Y))) |
→ |
mark(cons(s(N),sieve(filter(Y,N,N)))) |
(4) |
active(nats(N)) |
→ |
mark(cons(N,nats(s(N)))) |
(5) |
active(zprimes) |
→ |
mark(sieve(nats(s(s(0))))) |
(6) |
mark(filter(X1,X2,X3)) |
→ |
active(filter(mark(X1),mark(X2),mark(X3))) |
(7) |
mark(cons(X1,X2)) |
→ |
active(cons(mark(X1),X2)) |
(8) |
mark(0) |
→ |
active(0) |
(9) |
mark(s(X)) |
→ |
active(s(mark(X))) |
(10) |
mark(sieve(X)) |
→ |
active(sieve(mark(X))) |
(11) |
mark(nats(X)) |
→ |
active(nats(mark(X))) |
(12) |
mark(zprimes) |
→ |
active(zprimes) |
(13) |
filter(mark(X1),X2,X3) |
→ |
filter(X1,X2,X3) |
(14) |
filter(X1,mark(X2),X3) |
→ |
filter(X1,X2,X3) |
(15) |
filter(X1,X2,mark(X3)) |
→ |
filter(X1,X2,X3) |
(16) |
filter(active(X1),X2,X3) |
→ |
filter(X1,X2,X3) |
(17) |
filter(X1,active(X2),X3) |
→ |
filter(X1,X2,X3) |
(18) |
filter(X1,X2,active(X3)) |
→ |
filter(X1,X2,X3) |
(19) |
cons(mark(X1),X2) |
→ |
cons(X1,X2) |
(20) |
cons(X1,mark(X2)) |
→ |
cons(X1,X2) |
(21) |
cons(active(X1),X2) |
→ |
cons(X1,X2) |
(22) |
cons(X1,active(X2)) |
→ |
cons(X1,X2) |
(23) |
s(mark(X)) |
→ |
s(X) |
(24) |
s(active(X)) |
→ |
s(X) |
(25) |
sieve(mark(X)) |
→ |
sieve(X) |
(26) |
sieve(active(X)) |
→ |
sieve(X) |
(27) |
nats(mark(X)) |
→ |
nats(X) |
(28) |
nats(active(X)) |
→ |
nats(X) |
(29) |
active#(filter(cons(X,Y),0,M)) |
→ |
mark#(cons(0,filter(Y,M,M))) |
(30) |
active#(filter(cons(X,Y),0,M)) |
→ |
cons#(0,filter(Y,M,M)) |
(31) |
active#(filter(cons(X,Y),0,M)) |
→ |
filter#(Y,M,M) |
(32) |
active#(filter(cons(X,Y),s(N),M)) |
→ |
mark#(cons(X,filter(Y,N,M))) |
(33) |
active#(filter(cons(X,Y),s(N),M)) |
→ |
cons#(X,filter(Y,N,M)) |
(34) |
active#(filter(cons(X,Y),s(N),M)) |
→ |
filter#(Y,N,M) |
(35) |
active#(sieve(cons(0,Y))) |
→ |
mark#(cons(0,sieve(Y))) |
(36) |
active#(sieve(cons(0,Y))) |
→ |
cons#(0,sieve(Y)) |
(37) |
active#(sieve(cons(0,Y))) |
→ |
sieve#(Y) |
(38) |
active#(sieve(cons(s(N),Y))) |
→ |
mark#(cons(s(N),sieve(filter(Y,N,N)))) |
(39) |
active#(sieve(cons(s(N),Y))) |
→ |
cons#(s(N),sieve(filter(Y,N,N))) |
(40) |
active#(sieve(cons(s(N),Y))) |
→ |
sieve#(filter(Y,N,N)) |
(41) |
active#(sieve(cons(s(N),Y))) |
→ |
filter#(Y,N,N) |
(42) |
active#(nats(N)) |
→ |
mark#(cons(N,nats(s(N)))) |
(43) |
active#(nats(N)) |
→ |
cons#(N,nats(s(N))) |
(44) |
active#(nats(N)) |
→ |
nats#(s(N)) |
(45) |
active#(nats(N)) |
→ |
s#(N) |
(46) |
active#(zprimes) |
→ |
mark#(sieve(nats(s(s(0))))) |
(47) |
active#(zprimes) |
→ |
sieve#(nats(s(s(0)))) |
(48) |
active#(zprimes) |
→ |
nats#(s(s(0))) |
(49) |
active#(zprimes) |
→ |
s#(s(0)) |
(50) |
active#(zprimes) |
→ |
s#(0) |
(51) |
mark#(filter(X1,X2,X3)) |
→ |
active#(filter(mark(X1),mark(X2),mark(X3))) |
(52) |
mark#(filter(X1,X2,X3)) |
→ |
filter#(mark(X1),mark(X2),mark(X3)) |
(53) |
mark#(filter(X1,X2,X3)) |
→ |
mark#(X1) |
(54) |
mark#(filter(X1,X2,X3)) |
→ |
mark#(X2) |
(55) |
mark#(filter(X1,X2,X3)) |
→ |
mark#(X3) |
(56) |
mark#(cons(X1,X2)) |
→ |
active#(cons(mark(X1),X2)) |
(57) |
mark#(cons(X1,X2)) |
→ |
cons#(mark(X1),X2) |
(58) |
mark#(cons(X1,X2)) |
→ |
mark#(X1) |
(59) |
mark#(0) |
→ |
active#(0) |
(60) |
mark#(s(X)) |
→ |
active#(s(mark(X))) |
(61) |
mark#(s(X)) |
→ |
s#(mark(X)) |
(62) |
mark#(s(X)) |
→ |
mark#(X) |
(63) |
mark#(sieve(X)) |
→ |
active#(sieve(mark(X))) |
(64) |
mark#(sieve(X)) |
→ |
sieve#(mark(X)) |
(65) |
mark#(sieve(X)) |
→ |
mark#(X) |
(66) |
mark#(nats(X)) |
→ |
active#(nats(mark(X))) |
(67) |
mark#(nats(X)) |
→ |
nats#(mark(X)) |
(68) |
mark#(nats(X)) |
→ |
mark#(X) |
(69) |
mark#(zprimes) |
→ |
active#(zprimes) |
(70) |
filter#(mark(X1),X2,X3) |
→ |
filter#(X1,X2,X3) |
(71) |
filter#(X1,mark(X2),X3) |
→ |
filter#(X1,X2,X3) |
(72) |
filter#(X1,X2,mark(X3)) |
→ |
filter#(X1,X2,X3) |
(73) |
filter#(active(X1),X2,X3) |
→ |
filter#(X1,X2,X3) |
(74) |
filter#(X1,active(X2),X3) |
→ |
filter#(X1,X2,X3) |
(75) |
filter#(X1,X2,active(X3)) |
→ |
filter#(X1,X2,X3) |
(76) |
cons#(mark(X1),X2) |
→ |
cons#(X1,X2) |
(77) |
cons#(X1,mark(X2)) |
→ |
cons#(X1,X2) |
(78) |
cons#(active(X1),X2) |
→ |
cons#(X1,X2) |
(79) |
cons#(X1,active(X2)) |
→ |
cons#(X1,X2) |
(80) |
s#(mark(X)) |
→ |
s#(X) |
(81) |
s#(active(X)) |
→ |
s#(X) |
(82) |
sieve#(mark(X)) |
→ |
sieve#(X) |
(83) |
sieve#(active(X)) |
→ |
sieve#(X) |
(84) |
nats#(mark(X)) |
→ |
nats#(X) |
(85) |
nats#(active(X)) |
→ |
nats#(X) |
(86) |
The dependency pairs are split into 6
components.
-
The
1st
component contains the
pair
mark#(filter(X1,X2,X3)) |
→ |
active#(filter(mark(X1),mark(X2),mark(X3))) |
(52) |
active#(filter(cons(X,Y),0,M)) |
→ |
mark#(cons(0,filter(Y,M,M))) |
(30) |
mark#(filter(X1,X2,X3)) |
→ |
mark#(X1) |
(54) |
mark#(filter(X1,X2,X3)) |
→ |
mark#(X2) |
(55) |
mark#(filter(X1,X2,X3)) |
→ |
mark#(X3) |
(56) |
mark#(cons(X1,X2)) |
→ |
active#(cons(mark(X1),X2)) |
(57) |
active#(filter(cons(X,Y),s(N),M)) |
→ |
mark#(cons(X,filter(Y,N,M))) |
(33) |
mark#(cons(X1,X2)) |
→ |
mark#(X1) |
(59) |
mark#(s(X)) |
→ |
active#(s(mark(X))) |
(61) |
active#(sieve(cons(0,Y))) |
→ |
mark#(cons(0,sieve(Y))) |
(36) |
mark#(s(X)) |
→ |
mark#(X) |
(63) |
mark#(sieve(X)) |
→ |
active#(sieve(mark(X))) |
(64) |
active#(sieve(cons(s(N),Y))) |
→ |
mark#(cons(s(N),sieve(filter(Y,N,N)))) |
(39) |
mark#(sieve(X)) |
→ |
mark#(X) |
(66) |
mark#(nats(X)) |
→ |
active#(nats(mark(X))) |
(67) |
active#(nats(N)) |
→ |
mark#(cons(N,nats(s(N)))) |
(43) |
mark#(nats(X)) |
→ |
mark#(X) |
(69) |
mark#(zprimes) |
→ |
active#(zprimes) |
(70) |
active#(zprimes) |
→ |
mark#(sieve(nats(s(s(0))))) |
(47) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[mark#(x1)] |
= |
1 |
[filter(x1, x2, x3)] |
= |
1 |
[active#(x1)] |
= |
1 · x1
|
[mark(x1)] |
= |
0 |
[cons(x1, x2)] |
= |
0 |
[0] |
= |
0 |
[s(x1)] |
= |
0 |
[sieve(x1)] |
= |
1 |
[nats(x1)] |
= |
1 |
[zprimes] |
= |
1 |
[active(x1)] |
= |
0 |
together with the usable
rules
filter(X1,mark(X2),X3) |
→ |
filter(X1,X2,X3) |
(15) |
filter(mark(X1),X2,X3) |
→ |
filter(X1,X2,X3) |
(14) |
filter(X1,X2,mark(X3)) |
→ |
filter(X1,X2,X3) |
(16) |
filter(active(X1),X2,X3) |
→ |
filter(X1,X2,X3) |
(17) |
filter(X1,active(X2),X3) |
→ |
filter(X1,X2,X3) |
(18) |
filter(X1,X2,active(X3)) |
→ |
filter(X1,X2,X3) |
(19) |
cons(X1,mark(X2)) |
→ |
cons(X1,X2) |
(21) |
cons(mark(X1),X2) |
→ |
cons(X1,X2) |
(20) |
cons(active(X1),X2) |
→ |
cons(X1,X2) |
(22) |
cons(X1,active(X2)) |
→ |
cons(X1,X2) |
(23) |
s(active(X)) |
→ |
s(X) |
(25) |
s(mark(X)) |
→ |
s(X) |
(24) |
sieve(active(X)) |
→ |
sieve(X) |
(27) |
sieve(mark(X)) |
→ |
sieve(X) |
(26) |
nats(active(X)) |
→ |
nats(X) |
(29) |
nats(mark(X)) |
→ |
nats(X) |
(28) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pairs
mark#(cons(X1,X2)) |
→ |
active#(cons(mark(X1),X2)) |
(57) |
mark#(s(X)) |
→ |
active#(s(mark(X))) |
(61) |
could be deleted.
1.1.1.1 Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[mark#(x1)] |
= |
1 · x1
|
[filter(x1, x2, x3)] |
= |
1 · x1 + 1 · x2 + 1 · x3
|
[active#(x1)] |
= |
1 · x1
|
[mark(x1)] |
= |
1 · x1
|
[cons(x1, x2)] |
= |
1 · x1
|
[0] |
= |
0 |
[s(x1)] |
= |
1 · x1
|
[sieve(x1)] |
= |
1 · x1
|
[nats(x1)] |
= |
1 · x1
|
[zprimes] |
= |
1 |
[active(x1)] |
= |
1 · x1
|
the
pair
active#(zprimes) |
→ |
mark#(sieve(nats(s(s(0))))) |
(47) |
could be deleted.
1.1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 1
component.
-
The
2nd
component contains the
pair
filter#(X1,mark(X2),X3) |
→ |
filter#(X1,X2,X3) |
(72) |
filter#(mark(X1),X2,X3) |
→ |
filter#(X1,X2,X3) |
(71) |
filter#(X1,X2,mark(X3)) |
→ |
filter#(X1,X2,X3) |
(73) |
filter#(active(X1),X2,X3) |
→ |
filter#(X1,X2,X3) |
(74) |
filter#(X1,active(X2),X3) |
→ |
filter#(X1,X2,X3) |
(75) |
filter#(X1,X2,active(X3)) |
→ |
filter#(X1,X2,X3) |
(76) |
1.1.2 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[mark(x1)] |
= |
1 · x1
|
[active(x1)] |
= |
1 · x1
|
[filter#(x1, x2, x3)] |
= |
1 · x1 + 1 · x2 + 1 · x3
|
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.
filter#(X1,mark(X2),X3) |
→ |
filter#(X1,X2,X3) |
(72) |
|
1 |
≥ |
1 |
2 |
> |
2 |
3 |
≥ |
3 |
filter#(mark(X1),X2,X3) |
→ |
filter#(X1,X2,X3) |
(71) |
|
1 |
> |
1 |
2 |
≥ |
2 |
3 |
≥ |
3 |
filter#(X1,X2,mark(X3)) |
→ |
filter#(X1,X2,X3) |
(73) |
|
1 |
≥ |
1 |
2 |
≥ |
2 |
3 |
> |
3 |
filter#(active(X1),X2,X3) |
→ |
filter#(X1,X2,X3) |
(74) |
|
1 |
> |
1 |
2 |
≥ |
2 |
3 |
≥ |
3 |
filter#(X1,active(X2),X3) |
→ |
filter#(X1,X2,X3) |
(75) |
|
1 |
≥ |
1 |
2 |
> |
2 |
3 |
≥ |
3 |
filter#(X1,X2,active(X3)) |
→ |
filter#(X1,X2,X3) |
(76) |
|
1 |
≥ |
1 |
2 |
≥ |
2 |
3 |
> |
3 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
3rd
component contains the
pair
cons#(X1,mark(X2)) |
→ |
cons#(X1,X2) |
(78) |
cons#(mark(X1),X2) |
→ |
cons#(X1,X2) |
(77) |
cons#(active(X1),X2) |
→ |
cons#(X1,X2) |
(79) |
cons#(X1,active(X2)) |
→ |
cons#(X1,X2) |
(80) |
1.1.3 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[mark(x1)] |
= |
1 · x1
|
[active(x1)] |
= |
1 · x1
|
[cons#(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.3.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
cons#(X1,mark(X2)) |
→ |
cons#(X1,X2) |
(78) |
|
1 |
≥ |
1 |
2 |
> |
2 |
cons#(mark(X1),X2) |
→ |
cons#(X1,X2) |
(77) |
|
1 |
> |
1 |
2 |
≥ |
2 |
cons#(active(X1),X2) |
→ |
cons#(X1,X2) |
(79) |
|
1 |
> |
1 |
2 |
≥ |
2 |
cons#(X1,active(X2)) |
→ |
cons#(X1,X2) |
(80) |
|
1 |
≥ |
1 |
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
4th
component contains the
pair
s#(active(X)) |
→ |
s#(X) |
(82) |
s#(mark(X)) |
→ |
s#(X) |
(81) |
1.1.4 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 · x1
|
[mark(x1)] |
= |
1 · x1
|
[s#(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.
s#(active(X)) |
→ |
s#(X) |
(82) |
|
1 |
> |
1 |
s#(mark(X)) |
→ |
s#(X) |
(81) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
5th
component contains the
pair
sieve#(active(X)) |
→ |
sieve#(X) |
(84) |
sieve#(mark(X)) |
→ |
sieve#(X) |
(83) |
1.1.5 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 · x1
|
[mark(x1)] |
= |
1 · x1
|
[sieve#(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.5.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
sieve#(active(X)) |
→ |
sieve#(X) |
(84) |
|
1 |
> |
1 |
sieve#(mark(X)) |
→ |
sieve#(X) |
(83) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
6th
component contains the
pair
nats#(active(X)) |
→ |
nats#(X) |
(86) |
nats#(mark(X)) |
→ |
nats#(X) |
(85) |
1.1.6 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 · x1
|
[mark(x1)] |
= |
1 · x1
|
[nats#(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.6.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
nats#(active(X)) |
→ |
nats#(X) |
(86) |
|
1 |
> |
1 |
nats#(mark(X)) |
→ |
nats#(X) |
(85) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.