Certification Problem

Input (TPDB TRS_Standard/CiME_04/filliatre2)

The rewrite relation of the following TRS is considered.

g(A) A (1)
g(B) A (2)
g(B) B (3)
g(C) A (4)
g(C) B (5)
g(C) C (6)
foldB(t,0) t (7)
foldB(t,s(n)) f(foldB(t,n),B) (8)
foldC(t,0) t (9)
foldC(t,s(n)) f(foldC(t,n),C) (10)
f(t,x) f'(t,g(x)) (11)
f'(triple(a,b,c),C) triple(a,b,s(c)) (12)
f'(triple(a,b,c),B) f(triple(a,b,c),A) (13)
f'(triple(a,b,c),A) f''(foldB(triple(s(a),0,c),b)) (14)
f''(triple(a,b,c)) foldC(triple(a,b,0),c) (15)

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
[g(x1)] = 1 · x1
[A] = 2
[B] = 2
[C] = 2
[foldB(x1, x2)] = 1 · x1 + 2 · x2
[0] = 0
[s(x1)] = 2 + 1 · x1
[f(x1, x2)] = 1 · x1 + 2 · x2
[foldC(x1, x2)] = 1 · x1 + 2 · x2
[f'(x1, x2)] = 1 · x1 + 2 · x2
[triple(x1, x2, x3)] = 1 · x1 + 2 · x2 + 2 · x3
[f''(x1)] = 1 · x1
all of the following rules can be deleted.
f'(triple(a,b,c),A) f''(foldB(triple(s(a),0,c),b)) (14)

1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(A) = 10 weight(A) = 1
prec(B) = 2 weight(B) = 2
prec(C) = 0 weight(C) = 3
prec(0) = 3 weight(0) = 2
prec(g) = 11 weight(g) = 0
prec(s) = 4 weight(s) = 3
prec(f'') = 9 weight(f'') = 3
prec(foldB) = 1 weight(foldB) = 0
prec(f) = 7 weight(f) = 0
prec(foldC) = 8 weight(foldC) = 0
prec(f') = 6 weight(f') = 0
prec(triple) = 5 weight(triple) = 0
all of the following rules can be deleted.
g(A) A (1)
g(B) A (2)
g(B) B (3)
g(C) A (4)
g(C) B (5)
g(C) C (6)
foldB(t,0) t (7)
foldB(t,s(n)) f(foldB(t,n),B) (8)
foldC(t,0) t (9)
foldC(t,s(n)) f(foldC(t,n),C) (10)
f(t,x) f'(t,g(x)) (11)
f'(triple(a,b,c),C) triple(a,b,s(c)) (12)
f'(triple(a,b,c),B) f(triple(a,b,c),A) (13)
f''(triple(a,b,c)) foldC(triple(a,b,0),c) (15)

1.1.1 R is empty

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