Certification Problem
Input (TPDB TRS_Equational/Mixed_AC_and_C/AC29)
The rewrite relation of the following equational TRS is considered.
| 1 |
→ |
s(0) |
(1) |
| 2 |
→ |
s(1) |
(2) |
| 3 |
→ |
s(2) |
(3) |
| 4 |
→ |
s(3) |
(4) |
| 5 |
→ |
s(4) |
(5) |
| 6 |
→ |
s(5) |
(6) |
| 7 |
→ |
s(6) |
(7) |
| 8 |
→ |
s(7) |
(8) |
| 9 |
→ |
s(8) |
(9) |
|
max'(0,x) |
→ |
x |
(10) |
|
max'(s(x),s(y)) |
→ |
s(max'(x,y)) |
(11) |
|
app(empty,X) |
→ |
X |
(12) |
|
max(singl(x)) |
→ |
x |
(13) |
|
max(app(singl(x),Y)) |
→ |
max2(x,Y) |
(14) |
|
max2(x,empty) |
→ |
x |
(15) |
|
max2(x,singl(y)) |
→ |
max'(x,y) |
(16) |
|
max2(x,app(singl(y),Z)) |
→ |
max2(max'(x,y),Z) |
(17) |
Associative symbols: app
Commutative symbols: max', app
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 AC Rule Removal
Using the
non-linear polynomial interpretation over the naturals
| [max'(x1, x2)] |
= |
1 · x2 + 1 · x1
|
| [app(x1, x2)] |
= |
1 · x2 + 1 · x1 + 2 · x1 · x2
|
| [1] |
= |
0 |
| [s(x1)] |
= |
1 · x1
|
| [0] |
= |
0 |
| [2] |
= |
0 |
| [3] |
= |
0 |
| [4] |
= |
0 |
| [5] |
= |
0 |
| [6] |
= |
2 |
| [7] |
= |
3 |
| [8] |
= |
3 |
| [9] |
= |
3 |
| [empty] |
= |
0 |
| [max(x1)] |
= |
2 · x1
|
| [singl(x1)] |
= |
2 + 1 · x1 + 3 · x1 · x1
|
| [max2(x1, x2)] |
= |
3 + 1 · x2 + 1 · x1 + 2 · x1 · x2
|
the
rules
| 6 |
→ |
s(5) |
(6) |
| 7 |
→ |
s(6) |
(7) |
|
max(singl(x)) |
→ |
x |
(13) |
|
max(app(singl(x),Y)) |
→ |
max2(x,Y) |
(14) |
|
max2(x,empty) |
→ |
x |
(15) |
|
max2(x,singl(y)) |
→ |
max'(x,y) |
(16) |
|
max2(x,app(singl(y),Z)) |
→ |
max2(max'(x,y),Z) |
(17) |
can be deleted.
1.1 AC Rule Removal
Using the
linear polynomial interpretation over the naturals
| [max'(x1, x2)] |
= |
1 · x2 + 1 · x1
|
| [app(x1, x2)] |
= |
1 · x2 + 1 · x1
|
| [1] |
= |
0 |
| [s(x1)] |
= |
1 · x1
|
| [0] |
= |
0 |
| [2] |
= |
0 |
| [3] |
= |
1 |
| [4] |
= |
2 |
| [5] |
= |
3 |
| [8] |
= |
0 |
| [7] |
= |
0 |
| [9] |
= |
3 |
| [empty] |
= |
1 |
the
rules
| 3 |
→ |
s(2) |
(3) |
| 4 |
→ |
s(3) |
(4) |
| 5 |
→ |
s(4) |
(5) |
| 9 |
→ |
s(8) |
(9) |
|
app(empty,X) |
→ |
X |
(12) |
can be deleted.
1.1.1 AC Rule Removal
Using the
non-linear polynomial interpretation over the naturals
| [max'(x1, x2)] |
= |
1 · x2 + 1 · x1
|
| [app(x1, x2)] |
= |
3 + 3 · x2 + 3 · x1 + 2 · x1 · x2
|
| [1] |
= |
1 |
| [s(x1)] |
= |
1 + 1 · x1
|
| [0] |
= |
0 |
| [2] |
= |
3 |
| [8] |
= |
1 |
| [7] |
= |
0 |
the
rules
| 2 |
→ |
s(1) |
(2) |
|
max'(s(x),s(y)) |
→ |
s(max'(x,y)) |
(11) |
can be deleted.
1.1.1.1 AC Rule Removal
Using the
non-linear polynomial interpretation over the naturals
| [max'(x1, x2)] |
= |
2 + 1 · x2 + 1 · x1
|
| [app(x1, x2)] |
= |
1 + 2 · x2 + 2 · x1 + 2 · x1 · x2
|
| [1] |
= |
1 |
| [s(x1)] |
= |
2 · x1 · x1
|
| [0] |
= |
0 |
| [8] |
= |
0 |
| [7] |
= |
0 |
the
rules
| 1 |
→ |
s(0) |
(1) |
|
max'(0,x) |
→ |
x |
(10) |
can be deleted.
1.1.1.1.1 AC Rule Removal
Using the
non-linear polynomial interpretation over the naturals
| [max'(x1, x2)] |
= |
1 + 2 · x2 + 2 · x1 + 2 · x1 · x2
|
| [app(x1, x2)] |
= |
1 + 2 · x2 + 2 · x1 + 2 · x1 · x2
|
| [8] |
= |
3 |
| [s(x1)] |
= |
1 + 3 · x1 · x1
|
| [7] |
= |
0 |
the
rule
can be deleted.
1.1.1.1.1.1 R is empty
There are no rules in the TRS. Hence, it is AC-terminating.