Certification Problem
Input (TPDB TRS_Standard/CiME_04/list-sum-prod-assoc-append)
The rewrite relation of the following TRS is considered.
+(x,0) |
→ |
x |
(1) |
+(0,x) |
→ |
x |
(2) |
+(s(x),s(y)) |
→ |
s(s(+(x,y))) |
(3) |
+(+(x,y),z) |
→ |
+(x,+(y,z)) |
(4) |
*(x,0) |
→ |
0 |
(5) |
*(0,x) |
→ |
0 |
(6) |
*(s(x),s(y)) |
→ |
s(+(*(x,y),+(x,y))) |
(7) |
*(*(x,y),z) |
→ |
*(x,*(y,z)) |
(8) |
app(nil,l) |
→ |
l |
(9) |
app(cons(x,l1),l2) |
→ |
cons(x,app(l1,l2)) |
(10) |
sum(nil) |
→ |
0 |
(11) |
sum(cons(x,l)) |
→ |
+(x,sum(l)) |
(12) |
sum(app(l1,l2)) |
→ |
+(sum(l1),sum(l2)) |
(13) |
prod(nil) |
→ |
s(0) |
(14) |
prod(cons(x,l)) |
→ |
*(x,prod(l)) |
(15) |
prod(app(l1,l2)) |
→ |
*(prod(l1),prod(l2)) |
(16) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by NaTT @ termCOMP 2023)
1 Dependency Pair Transformation
The following set of initial dependency pairs has been identified.
sum#(app(l1,l2)) |
→ |
sum#(l1) |
(17) |
*#(s(x),s(y)) |
→ |
+#(*(x,y),+(x,y)) |
(18) |
+#(s(x),s(y)) |
→ |
+#(x,y) |
(19) |
app#(cons(x,l1),l2) |
→ |
app#(l1,l2) |
(20) |
prod#(app(l1,l2)) |
→ |
prod#(l1) |
(21) |
prod#(app(l1,l2)) |
→ |
prod#(l2) |
(22) |
*#(*(x,y),z) |
→ |
*#(x,*(y,z)) |
(23) |
*#(s(x),s(y)) |
→ |
*#(x,y) |
(24) |
prod#(app(l1,l2)) |
→ |
*#(prod(l1),prod(l2)) |
(25) |
sum#(cons(x,l)) |
→ |
sum#(l) |
(26) |
prod#(cons(x,l)) |
→ |
prod#(l) |
(27) |
+#(+(x,y),z) |
→ |
+#(y,z) |
(28) |
prod#(cons(x,l)) |
→ |
*#(x,prod(l)) |
(29) |
sum#(app(l1,l2)) |
→ |
sum#(l2) |
(30) |
sum#(app(l1,l2)) |
→ |
+#(sum(l1),sum(l2)) |
(31) |
*#(s(x),s(y)) |
→ |
+#(x,y) |
(32) |
*#(*(x,y),z) |
→ |
*#(y,z) |
(33) |
sum#(cons(x,l)) |
→ |
+#(x,sum(l)) |
(34) |
+#(+(x,y),z) |
→ |
+#(x,+(y,z)) |
(35) |
1.1 Dependency Graph Processor
The dependency pairs are split into 5
components.
-
The
1st
component contains the
pair
app#(cons(x,l1),l2) |
→ |
app#(l1,l2) |
(20) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[prod(x1)] |
=
|
0 |
[s(x1)] |
=
|
0 |
[prod#(x1)] |
=
|
0 |
[*#(x1, x2)] |
=
|
0 |
[sum(x1)] |
=
|
0 |
[0] |
=
|
0 |
[nil] |
=
|
0 |
[app#(x1, x2)] |
=
|
x1 + 0 |
[cons(x1, x2)] |
=
|
x2 + 1 |
[+(x1, x2)] |
=
|
0 |
[sum#(x1)] |
=
|
0 |
[+#(x1, x2)] |
=
|
0 |
[*(x1, x2)] |
=
|
0 |
[app(x1, x2)] |
=
|
0 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pair
app#(cons(x,l1),l2) |
→ |
app#(l1,l2) |
(20) |
could be deleted.
1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
2nd
component contains the
pair
prod#(app(l1,l2)) |
→ |
prod#(l2) |
(22) |
prod#(app(l1,l2)) |
→ |
prod#(l1) |
(21) |
prod#(cons(x,l)) |
→ |
prod#(l) |
(27) |
1.1.2 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[prod(x1)] |
=
|
0 |
[s(x1)] |
=
|
0 |
[prod#(x1)] |
=
|
x1 + 0 |
[*#(x1, x2)] |
=
|
0 |
[sum(x1)] |
=
|
0 |
[0] |
=
|
0 |
[nil] |
=
|
0 |
[app#(x1, x2)] |
=
|
0 |
[cons(x1, x2)] |
=
|
x2 + 1 |
[+(x1, x2)] |
=
|
0 |
[sum#(x1)] |
=
|
0 |
[+#(x1, x2)] |
=
|
0 |
[*(x1, x2)] |
=
|
0 |
[app(x1, x2)] |
=
|
x1 + x2 + 1 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pairs
prod#(app(l1,l2)) |
→ |
prod#(l2) |
(22) |
prod#(app(l1,l2)) |
→ |
prod#(l1) |
(21) |
prod#(cons(x,l)) |
→ |
prod#(l) |
(27) |
could be deleted.
1.1.2.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
3rd
component contains the
pair
*#(*(x,y),z) |
→ |
*#(x,*(y,z)) |
(23) |
*#(*(x,y),z) |
→ |
*#(y,z) |
(33) |
*#(s(x),s(y)) |
→ |
*#(x,y) |
(24) |
1.1.3 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[prod(x1)] |
=
|
0 |
[s(x1)] |
=
|
x1 + 1 |
[prod#(x1)] |
=
|
0 |
[*#(x1, x2)] |
=
|
x1 + 0 |
[sum(x1)] |
=
|
0 |
[0] |
=
|
1 |
[nil] |
=
|
0 |
[app#(x1, x2)] |
=
|
0 |
[cons(x1, x2)] |
=
|
1 |
[+(x1, x2)] |
=
|
x1 + x2 + 1 |
[sum#(x1)] |
=
|
0 |
[+#(x1, x2)] |
=
|
0 |
[*(x1, x2)] |
=
|
x1 + x2 + 2438 |
[app(x1, x2)] |
=
|
1 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pairs
*#(*(x,y),z) |
→ |
*#(x,*(y,z)) |
(23) |
*#(*(x,y),z) |
→ |
*#(y,z) |
(33) |
*#(s(x),s(y)) |
→ |
*#(x,y) |
(24) |
could be deleted.
1.1.3.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
4th
component contains the
pair
sum#(app(l1,l2)) |
→ |
sum#(l2) |
(30) |
sum#(cons(x,l)) |
→ |
sum#(l) |
(26) |
sum#(app(l1,l2)) |
→ |
sum#(l1) |
(17) |
1.1.4 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[prod(x1)] |
=
|
0 |
[s(x1)] |
=
|
x1 + 1 |
[prod#(x1)] |
=
|
0 |
[*#(x1, x2)] |
=
|
0 |
[sum(x1)] |
=
|
0 |
[0] |
=
|
1 |
[nil] |
=
|
0 |
[app#(x1, x2)] |
=
|
0 |
[cons(x1, x2)] |
=
|
x2 + 1 |
[+(x1, x2)] |
=
|
x1 + x2 + 8366 |
[sum#(x1)] |
=
|
x1 + 0 |
[+#(x1, x2)] |
=
|
0 |
[*(x1, x2)] |
=
|
x1 + x2 + 2438 |
[app(x1, x2)] |
=
|
x1 + x2 + 1 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pairs
sum#(app(l1,l2)) |
→ |
sum#(l2) |
(30) |
sum#(cons(x,l)) |
→ |
sum#(l) |
(26) |
sum#(app(l1,l2)) |
→ |
sum#(l1) |
(17) |
could be deleted.
1.1.4.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
5th
component contains the
pair
+#(+(x,y),z) |
→ |
+#(x,+(y,z)) |
(35) |
+#(s(x),s(y)) |
→ |
+#(x,y) |
(19) |
+#(+(x,y),z) |
→ |
+#(y,z) |
(28) |
1.1.5 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[prod(x1)] |
=
|
0 |
[s(x1)] |
=
|
x1 + 1 |
[prod#(x1)] |
=
|
0 |
[*#(x1, x2)] |
=
|
0 |
[sum(x1)] |
=
|
0 |
[0] |
=
|
28382 |
[nil] |
=
|
0 |
[app#(x1, x2)] |
=
|
0 |
[cons(x1, x2)] |
=
|
1 |
[+(x1, x2)] |
=
|
x1 + x2 + 1143 |
[sum#(x1)] |
=
|
0 |
[+#(x1, x2)] |
=
|
x1 + 0 |
[*(x1, x2)] |
=
|
x1 + x2 + 1 |
[app(x1, x2)] |
=
|
1 |
together with the usable
rules
+(+(x,y),z) |
→ |
+(x,+(y,z)) |
(4) |
+(x,0) |
→ |
x |
(1) |
+(s(x),s(y)) |
→ |
s(s(+(x,y))) |
(3) |
+(0,x) |
→ |
x |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pairs
+#(+(x,y),z) |
→ |
+#(x,+(y,z)) |
(35) |
+#(s(x),s(y)) |
→ |
+#(x,y) |
(19) |
+#(+(x,y),z) |
→ |
+#(y,z) |
(28) |
could be deleted.
1.1.5.1 Dependency Graph Processor
The dependency pairs are split into 0
components.