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 AProVE @ termCOMP 2023)

1 Rule Removal

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

1.1 Rule Removal

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

1.1.1 Rule Removal

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

1.1.1.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(app) = 2 weight(app) = 0
prec(add) = 1 weight(add) = 0
all of the following rules can be deleted.
app(nil,y) y (1)
app(add(n,x),y) add(n,app(x,y)) (2)

1.1.1.1.1 R is empty

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