Certification Problem
Input (TPDB TRS_Innermost/Transformed_CSR_innermost_04/Ex5_Zan97_GM)
The rewrite relation of the following TRS is considered.
a__f(X) |
→ |
a__if(mark(X),c,f(true)) |
(1) |
a__if(true,X,Y) |
→ |
mark(X) |
(2) |
a__if(false,X,Y) |
→ |
mark(Y) |
(3) |
mark(f(X)) |
→ |
a__f(mark(X)) |
(4) |
mark(if(X1,X2,X3)) |
→ |
a__if(mark(X1),mark(X2),X3) |
(5) |
mark(c) |
→ |
c |
(6) |
mark(true) |
→ |
true |
(7) |
mark(false) |
→ |
false |
(8) |
a__f(X) |
→ |
f(X) |
(9) |
a__if(X1,X2,X3) |
→ |
if(X1,X2,X3) |
(10) |
The evaluation strategy is innermost.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
[a__f(x1)] |
= |
2 · x1
|
[a__if(x1, x2, x3)] |
= |
2 · x1 + 1 · x2 + 2 · x3
|
[mark(x1)] |
= |
1 · x1
|
[c] |
= |
0 |
[f(x1)] |
= |
2 · x1
|
[true] |
= |
0 |
[false] |
= |
2 |
[if(x1, x2, x3)] |
= |
2 · x1 + 1 · x2 + 2 · x3
|
all of the following rules can be deleted.
a__if(false,X,Y) |
→ |
mark(Y) |
(3) |
1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[a__f(x1)] |
= |
2 · x1
|
[a__if(x1, x2, x3)] |
= |
1 · x1 + 2 · x2 + 2 · x3
|
[mark(x1)] |
= |
2 · x1
|
[c] |
= |
0 |
[f(x1)] |
= |
2 · x1
|
[true] |
= |
0 |
[if(x1, x2, x3)] |
= |
1 · x1 + 2 · x2 + 2 · x3
|
[false] |
= |
2 |
all of the following rules can be deleted.
1.1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[a__f(x1)] |
= |
1 + 2 · x1
|
[a__if(x1, x2, x3)] |
= |
1 · x1 + 2 · x2 + 1 · x3
|
[mark(x1)] |
= |
2 · x1
|
[c] |
= |
0 |
[f(x1)] |
= |
1 + 2 · x1
|
[true] |
= |
0 |
[if(x1, x2, x3)] |
= |
1 · x1 + 2 · x2 + 1 · x3
|
all of the following rules can be deleted.
mark(f(X)) |
→ |
a__f(mark(X)) |
(4) |
1.1.1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(c) |
= |
1 |
|
weight(c) |
= |
1 |
|
|
|
prec(true) |
= |
2 |
|
weight(true) |
= |
1 |
|
|
|
prec(a__f) |
= |
0 |
|
weight(a__f) |
= |
4 |
|
|
|
prec(mark) |
= |
6 |
|
weight(mark) |
= |
0 |
|
|
|
prec(f) |
= |
3 |
|
weight(f) |
= |
1 |
|
|
|
prec(a__if) |
= |
5 |
|
weight(a__if) |
= |
0 |
|
|
|
prec(if) |
= |
4 |
|
weight(if) |
= |
0 |
|
|
|
all of the following rules can be deleted.
a__f(X) |
→ |
a__if(mark(X),c,f(true)) |
(1) |
a__if(true,X,Y) |
→ |
mark(X) |
(2) |
mark(if(X1,X2,X3)) |
→ |
a__if(mark(X1),mark(X2),X3) |
(5) |
mark(c) |
→ |
c |
(6) |
mark(true) |
→ |
true |
(7) |
a__f(X) |
→ |
f(X) |
(9) |
a__if(X1,X2,X3) |
→ |
if(X1,X2,X3) |
(10) |
1.1.1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.