Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/Ex7_BLR02_FR)
The rewrite relation of the following TRS is considered.
from(X) |
→ |
cons(X,n__from(n__s(X))) |
(1) |
head(cons(X,XS)) |
→ |
X |
(2) |
2nd(cons(X,XS)) |
→ |
head(activate(XS)) |
(3) |
take(0,XS) |
→ |
nil |
(4) |
take(s(N),cons(X,XS)) |
→ |
cons(X,n__take(N,activate(XS))) |
(5) |
sel(0,cons(X,XS)) |
→ |
X |
(6) |
sel(s(N),cons(X,XS)) |
→ |
sel(N,activate(XS)) |
(7) |
from(X) |
→ |
n__from(X) |
(8) |
s(X) |
→ |
n__s(X) |
(9) |
take(X1,X2) |
→ |
n__take(X1,X2) |
(10) |
activate(n__from(X)) |
→ |
from(activate(X)) |
(11) |
activate(n__s(X)) |
→ |
s(activate(X)) |
(12) |
activate(n__take(X1,X2)) |
→ |
take(activate(X1),activate(X2)) |
(13) |
activate(X) |
→ |
X |
(14) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by ttt2 @ termCOMP 2023)
1 Rule Removal
Using the
Weighted Path Order with the following precedence and status
prec(sel) |
= |
0 |
|
status(sel) |
= |
[1, 2] |
|
list-extension(sel) |
= |
Lex |
prec(n__take) |
= |
0 |
|
status(n__take) |
= |
[2, 1] |
|
list-extension(n__take) |
= |
Lex |
prec(s) |
= |
2 |
|
status(s) |
= |
[1] |
|
list-extension(s) |
= |
Lex |
prec(nil) |
= |
0 |
|
status(nil) |
= |
[] |
|
list-extension(nil) |
= |
Lex |
prec(take) |
= |
2 |
|
status(take) |
= |
[1, 2] |
|
list-extension(take) |
= |
Lex |
prec(0) |
= |
0 |
|
status(0) |
= |
[] |
|
list-extension(0) |
= |
Lex |
prec(activate) |
= |
3 |
|
status(activate) |
= |
[1] |
|
list-extension(activate) |
= |
Lex |
prec(2nd) |
= |
0 |
|
status(2nd) |
= |
[1] |
|
list-extension(2nd) |
= |
Lex |
prec(head) |
= |
0 |
|
status(head) |
= |
[1] |
|
list-extension(head) |
= |
Lex |
prec(cons) |
= |
0 |
|
status(cons) |
= |
[1, 2] |
|
list-extension(cons) |
= |
Lex |
prec(n__from) |
= |
0 |
|
status(n__from) |
= |
[1] |
|
list-extension(n__from) |
= |
Lex |
prec(n__s) |
= |
0 |
|
status(n__s) |
= |
[1] |
|
list-extension(n__s) |
= |
Lex |
prec(from) |
= |
1 |
|
status(from) |
= |
[1] |
|
list-extension(from) |
= |
Lex |
and the following
Max-polynomial interpretation
[sel(x1, x2)] |
=
|
max(6, 2 + 1 · x1, 1 + 1 · x2) |
[n__take(x1, x2)] |
=
|
1 + 1 · x1 + 1 · x2
|
[s(x1)] |
=
|
max(0, 0 + 1 · x1) |
[nil] |
=
|
max(0) |
[take(x1, x2)] |
=
|
1 + 1 · x1 + 1 · x2
|
[0] |
=
|
max(4) |
[activate(x1)] |
=
|
max(0, 0 + 1 · x1) |
[2nd(x1)] |
=
|
2 + 1 · x1
|
[head(x1)] |
=
|
0 + 1 · x1
|
[cons(x1, x2)] |
=
|
max(0, 0 + 1 · x1, 0 + 1 · x2) |
[n__from(x1)] |
=
|
max(4, 0 + 1 · x1) |
[n__s(x1)] |
=
|
max(0, 0 + 1 · x1) |
[from(x1)] |
=
|
max(4, 0 + 1 · x1) |
all of the following rules can be deleted.
from(X) |
→ |
cons(X,n__from(n__s(X))) |
(1) |
head(cons(X,XS)) |
→ |
X |
(2) |
2nd(cons(X,XS)) |
→ |
head(activate(XS)) |
(3) |
take(0,XS) |
→ |
nil |
(4) |
take(s(N),cons(X,XS)) |
→ |
cons(X,n__take(N,activate(XS))) |
(5) |
sel(0,cons(X,XS)) |
→ |
X |
(6) |
sel(s(N),cons(X,XS)) |
→ |
sel(N,activate(XS)) |
(7) |
from(X) |
→ |
n__from(X) |
(8) |
s(X) |
→ |
n__s(X) |
(9) |
take(X1,X2) |
→ |
n__take(X1,X2) |
(10) |
activate(n__from(X)) |
→ |
from(activate(X)) |
(11) |
activate(n__s(X)) |
→ |
s(activate(X)) |
(12) |
activate(n__take(X1,X2)) |
→ |
take(activate(X1),activate(X2)) |
(13) |
activate(X) |
→ |
X |
(14) |
1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.