Certification Problem
Input (TPDB TRS_Standard/SK90/4.29)
The rewrite relation of the following TRS is considered.
merge(x,nil) |
→ |
x |
(1) |
merge(nil,y) |
→ |
y |
(2) |
merge(++(x,y),++(u,v)) |
→ |
++(x,merge(y,++(u,v))) |
(3) |
merge(++(x,y),++(u,v)) |
→ |
++(u,merge(++(x,y),v)) |
(4) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(nil) |
= |
0 |
|
weight(nil) |
= |
1 |
|
|
|
prec(u) |
= |
3 |
|
weight(u) |
= |
3 |
|
|
|
prec(v) |
= |
4 |
|
weight(v) |
= |
1 |
|
|
|
prec(merge) |
= |
2 |
|
weight(merge) |
= |
0 |
|
|
|
prec(++) |
= |
1 |
|
weight(++) |
= |
0 |
|
|
|
all of the following rules can be deleted.
merge(x,nil) |
→ |
x |
(1) |
merge(nil,y) |
→ |
y |
(2) |
merge(++(x,y),++(u,v)) |
→ |
++(x,merge(y,++(u,v))) |
(3) |
merge(++(x,y),++(u,v)) |
→ |
++(u,merge(++(x,y),v)) |
(4) |
1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.