Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/Ex26_Luc03b_L)
The rewrite relation of the following TRS is considered.
terms(N) |
→ |
cons(recip(sqr(N))) |
(1) |
sqr(0) |
→ |
0 |
(2) |
sqr(s) |
→ |
s |
(3) |
dbl(0) |
→ |
0 |
(4) |
dbl(s) |
→ |
s |
(5) |
add(0,X) |
→ |
X |
(6) |
add(s,Y) |
→ |
s |
(7) |
first(0,X) |
→ |
nil |
(8) |
first(s,cons(Y)) |
→ |
cons(Y) |
(9) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by ttt2 @ termCOMP 2023)
1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(nil) |
= |
3 |
|
weight(nil) |
= |
4 |
|
|
|
prec(first) |
= |
8 |
|
weight(first) |
= |
4 |
|
|
|
prec(add) |
= |
7 |
|
weight(add) |
= |
0 |
|
|
|
prec(dbl) |
= |
10 |
|
weight(dbl) |
= |
1 |
|
|
|
prec(s) |
= |
1 |
|
weight(s) |
= |
1 |
|
|
|
prec(0) |
= |
2 |
|
weight(0) |
= |
4 |
|
|
|
prec(cons) |
= |
12 |
|
weight(cons) |
= |
1 |
|
|
|
prec(recip) |
= |
0 |
|
weight(recip) |
= |
1 |
|
|
|
prec(sqr) |
= |
5 |
|
weight(sqr) |
= |
4 |
|
|
|
prec(terms) |
= |
14 |
|
weight(terms) |
= |
6 |
|
|
|
all of the following rules can be deleted.
terms(N) |
→ |
cons(recip(sqr(N))) |
(1) |
sqr(0) |
→ |
0 |
(2) |
sqr(s) |
→ |
s |
(3) |
dbl(0) |
→ |
0 |
(4) |
dbl(s) |
→ |
s |
(5) |
add(0,X) |
→ |
X |
(6) |
add(s,Y) |
→ |
s |
(7) |
first(0,X) |
→ |
nil |
(8) |
first(s,cons(Y)) |
→ |
cons(Y) |
(9) |
1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.