Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/PALINDROME_nosorts_C)
The rewrite relation of the following TRS is considered.
active(__(__(X,Y),Z)) |
→ |
mark(__(X,__(Y,Z))) |
(1) |
active(__(X,nil)) |
→ |
mark(X) |
(2) |
active(__(nil,X)) |
→ |
mark(X) |
(3) |
active(and(tt,X)) |
→ |
mark(X) |
(4) |
active(isNePal(__(I,__(P,I)))) |
→ |
mark(tt) |
(5) |
active(__(X1,X2)) |
→ |
__(active(X1),X2) |
(6) |
active(__(X1,X2)) |
→ |
__(X1,active(X2)) |
(7) |
active(and(X1,X2)) |
→ |
and(active(X1),X2) |
(8) |
active(isNePal(X)) |
→ |
isNePal(active(X)) |
(9) |
__(mark(X1),X2) |
→ |
mark(__(X1,X2)) |
(10) |
__(X1,mark(X2)) |
→ |
mark(__(X1,X2)) |
(11) |
and(mark(X1),X2) |
→ |
mark(and(X1,X2)) |
(12) |
isNePal(mark(X)) |
→ |
mark(isNePal(X)) |
(13) |
proper(__(X1,X2)) |
→ |
__(proper(X1),proper(X2)) |
(14) |
proper(nil) |
→ |
ok(nil) |
(15) |
proper(and(X1,X2)) |
→ |
and(proper(X1),proper(X2)) |
(16) |
proper(tt) |
→ |
ok(tt) |
(17) |
proper(isNePal(X)) |
→ |
isNePal(proper(X)) |
(18) |
__(ok(X1),ok(X2)) |
→ |
ok(__(X1,X2)) |
(19) |
and(ok(X1),ok(X2)) |
→ |
ok(and(X1,X2)) |
(20) |
isNePal(ok(X)) |
→ |
ok(isNePal(X)) |
(21) |
top(mark(X)) |
→ |
top(proper(X)) |
(22) |
top(ok(X)) |
→ |
top(active(X)) |
(23) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 · x1
|
[__(x1, x2)] |
= |
2 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 · x1
|
[nil] |
= |
0 |
[and(x1, x2)] |
= |
1 + 1 · x1 + 1 · x2
|
[tt] |
= |
0 |
[isNePal(x1)] |
= |
2 · x1
|
[proper(x1)] |
= |
1 · x1
|
[ok(x1)] |
= |
1 · x1
|
[top(x1)] |
= |
1 · x1
|
all of the following rules can be deleted.
active(and(tt,X)) |
→ |
mark(X) |
(4) |
1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 · x1
|
[__(x1, x2)] |
= |
1 + 1 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 · x1
|
[nil] |
= |
0 |
[isNePal(x1)] |
= |
2 · x1
|
[tt] |
= |
0 |
[and(x1, x2)] |
= |
2 · x1 + 2 · x2
|
[proper(x1)] |
= |
1 · x1
|
[ok(x1)] |
= |
1 · x1
|
[top(x1)] |
= |
1 · x1
|
all of the following rules can be deleted.
active(__(X,nil)) |
→ |
mark(X) |
(2) |
active(__(nil,X)) |
→ |
mark(X) |
(3) |
active(isNePal(__(I,__(P,I)))) |
→ |
mark(tt) |
(5) |
1.1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 · x1
|
[__(x1, x2)] |
= |
1 + 2 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 + 1 · x1
|
[and(x1, x2)] |
= |
2 · x1 + 1 · x2
|
[isNePal(x1)] |
= |
2 · x1
|
[proper(x1)] |
= |
1 · x1
|
[nil] |
= |
0 |
[ok(x1)] |
= |
1 · x1
|
[tt] |
= |
0 |
[top(x1)] |
= |
2 · x1
|
all of the following rules can be deleted.
__(mark(X1),X2) |
→ |
mark(__(X1,X2)) |
(10) |
and(mark(X1),X2) |
→ |
mark(and(X1,X2)) |
(12) |
isNePal(mark(X)) |
→ |
mark(isNePal(X)) |
(13) |
top(mark(X)) |
→ |
top(proper(X)) |
(22) |
1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 + 2 · x1
|
[__(x1, x2)] |
= |
2 + 1 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 · x1
|
[and(x1, x2)] |
= |
2 + 1 · x1 + 1 · x2
|
[isNePal(x1)] |
= |
1 · x1
|
[proper(x1)] |
= |
2 + 2 · x1
|
[nil] |
= |
0 |
[ok(x1)] |
= |
2 + 2 · x1
|
[tt] |
= |
0 |
[top(x1)] |
= |
1 · x1
|
all of the following rules can be deleted.
active(__(__(X,Y),Z)) |
→ |
mark(__(X,__(Y,Z))) |
(1) |
active(__(X1,X2)) |
→ |
__(active(X1),X2) |
(6) |
active(__(X1,X2)) |
→ |
__(X1,active(X2)) |
(7) |
active(and(X1,X2)) |
→ |
and(active(X1),X2) |
(8) |
top(ok(X)) |
→ |
top(active(X)) |
(23) |
1.1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[active(x1)] |
= |
1 + 2 · x1
|
[isNePal(x1)] |
= |
2 + 2 · x1
|
[__(x1, x2)] |
= |
2 + 2 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 · x1
|
[proper(x1)] |
= |
1 + 2 · x1
|
[nil] |
= |
0 |
[ok(x1)] |
= |
1 + 1 · x1
|
[and(x1, x2)] |
= |
1 + 1 · x1 + 1 · x2
|
[tt] |
= |
0 |
all of the following rules can be deleted.
active(isNePal(X)) |
→ |
isNePal(active(X)) |
(9) |
proper(isNePal(X)) |
→ |
isNePal(proper(X)) |
(18) |
__(ok(X1),ok(X2)) |
→ |
ok(__(X1,X2)) |
(19) |
and(ok(X1),ok(X2)) |
→ |
ok(and(X1,X2)) |
(20) |
isNePal(ok(X)) |
→ |
ok(isNePal(X)) |
(21) |
1.1.1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[__(x1, x2)] |
= |
2 + 2 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 · x1
|
[proper(x1)] |
= |
1 + 2 · x1
|
[nil] |
= |
0 |
[ok(x1)] |
= |
1 · x1
|
[and(x1, x2)] |
= |
2 + 2 · x1 + 1 · x2
|
[tt] |
= |
2 |
all of the following rules can be deleted.
proper(nil) |
→ |
ok(nil) |
(15) |
proper(tt) |
→ |
ok(tt) |
(17) |
1.1.1.1.1.1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(mark) |
= |
0 |
|
weight(mark) |
= |
1 |
|
|
|
prec(proper) |
= |
3 |
|
weight(proper) |
= |
0 |
|
|
|
prec(__) |
= |
1 |
|
weight(__) |
= |
0 |
|
|
|
prec(and) |
= |
2 |
|
weight(and) |
= |
0 |
|
|
|
all of the following rules can be deleted.
__(X1,mark(X2)) |
→ |
mark(__(X1,X2)) |
(11) |
proper(__(X1,X2)) |
→ |
__(proper(X1),proper(X2)) |
(14) |
proper(and(X1,X2)) |
→ |
and(proper(X1),proper(X2)) |
(16) |
1.1.1.1.1.1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.