Certification Problem

Input (TPDB TRS_Standard/AG01/#3.12)

The rewrite relation of the following TRS is considered.

app(nil,y) y (1)
app(add(n,x),y) add(n,app(x,y)) (2)
reverse(nil) nil (3)
reverse(add(n,x)) app(reverse(x),add(n,nil)) (4)
shuffle(nil) nil (5)
shuffle(add(n,x)) add(n,shuffle(reverse(x))) (6)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by ttt2 @ termCOMP 2023)

1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[shuffle(x1)] =
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
[app(x1, x2)] =
1 0 0
1 0 0
0 0 0
· x1 +
1 0 1
0 1 0
0 0 1
· x2 +
0 0 0
0 0 0
0 0 0
[reverse(x1)] =
1 0 0
1 0 0
0 0 0
· x1 +
0 0 0
0 0 0
1 0 0
[nil] =
0 0 0
0 0 0
0 0 0
[add(x1, x2)] =
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
all of the following rules can be deleted.
shuffle(nil) nil (5)

1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[shuffle(x1)] =
1 0 1
1 0 1
0 0 1
· x1 +
0 0 0
0 0 0
0 0 0
[app(x1, x2)] =
1 0 0
1 0 0
0 0 1
· x1 +
1 0 0
0 1 0
0 0 1
· x2 +
0 0 0
0 0 0
0 0 0
[reverse(x1)] =
1 0 0
1 0 0
0 0 1
· x1 +
0 0 0
0 0 0
0 0 0
[nil] =
0 0 0
0 0 0
0 0 0
[add(x1, x2)] =
1 0 0
1 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 1
· x2 +
0 0 0
0 0 0
1 0 0
all of the following rules can be deleted.
shuffle(add(n,x)) add(n,shuffle(reverse(x))) (6)

1.1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[app(x1, x2)] =
1 0 0
0 0 0
1 0 0
· x1 +
1 1 0
0 1 0
1 0 1
· x2 +
0 0 0
0 0 0
0 0 0
[reverse(x1)] =
1 0 1
0 0 0
1 1 1
· x1 +
0 0 0
1 0 0
1 0 0
[nil] =
1 0 0
1 0 0
0 0 0
[add(x1, x2)] =
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 1
· x2 +
1 0 0
0 0 0
1 0 0
all of the following rules can be deleted.
app(nil,y) y (1)

1.1.1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[app(x1, x2)] =
1 0 0
0 0 0
0 0 1
· x1 +
1 0 0
0 0 1
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
[reverse(x1)] =
1 0 1
1 0 0
0 0 0
· x1 +
1 0 0
1 0 0
0 0 0
[nil] =
1 0 0
0 0 0
0 0 0
[add(x1, x2)] =
1 0 0
0 0 0
1 0 0
· x1 +
1 0 0
0 1 0
0 0 1
· x2 +
0 0 0
0 0 0
1 0 0
all of the following rules can be deleted.
reverse(nil) nil (3)

1.1.1.1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[app(x1, x2)] =
1 1 1
0 1 0
0 0 1
· x1 +
1 1 0
0 0 0
0 0 0
· x2 +
0 0 0
0 0 0
1 0 0
[reverse(x1)] =
1 0 1
0 0 0
0 0 1
· x1 +
0 0 0
0 0 0
0 0 0
[nil] =
0 0 0
0 0 0
0 0 0
[add(x1, x2)] =
1 0 0
1 0 0
1 0 0
· x1 +
1 0 1
0 1 0
0 1 1
· x2 +
0 0 0
0 0 0
1 0 0
all of the following rules can be deleted.
reverse(add(n,x)) app(reverse(x),add(n,nil)) (4)

1.1.1.1.1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(add) = 0 weight(add) = 0
prec(app) = 1 weight(app) = 0
all of the following rules can be deleted.
app(add(n,x),y) add(n,app(x,y)) (2)

1.1.1.1.1.1.1 R is empty

There are no rules in the TRS. Hence, it is terminating.