Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex5_Zan97_Z)

The rewrite relation of the following TRS is considered.

f(X) if(X,c,n__f(true)) (1)
if(true,X,Y) X (2)
if(false,X,Y) activate(Y) (3)
f(X) n__f(X) (4)
activate(n__f(X)) f(X) (5)
activate(X) 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
[f(x1)] = 1 + 2 · x1
[if(x1, x2, x3)] = 1 + 2 · x1 + 1 · x2 + 2 · x3
[c] = 0
[n__f(x1)] = 1 · x1
[true] = 0
[false] = 2
[activate(x1)] = 2 + 2 · x1
all of the following rules can be deleted.
if(true,X,Y) X (2)
if(false,X,Y) activate(Y) (3)
f(X) n__f(X) (4)
activate(n__f(X)) f(X) (5)
activate(X) X (6)

1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(c) = 2 weight(c) = 1
prec(true) = 4 weight(true) = 1
prec(f) = 1 weight(f) = 3
prec(n__f) = 3 weight(n__f) = 1
prec(if) = 0 weight(if) = 0
all of the following rules can be deleted.
f(X) if(X,c,n__f(true)) (1)

1.1.1 R is empty

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