Certification Problem

Input (TPDB TRS_Standard/CiME_04/filliatre)

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)
foldf(x,nil) x (7)
foldf(x,cons(y,z)) f(foldf(x,z),y) (8)
f(t,x) f'(t,g(x)) (9)
f'(triple(a,b,c),C) triple(a,b,cons(C,c)) (10)
f'(triple(a,b,c),B) f(triple(a,b,c),A) (11)
f'(triple(a,b,c),A) f''(foldf(triple(cons(A,a),nil,c),b)) (12)
f''(triple(a,b,c)) foldf(triple(a,b,nil),c) (13)

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

1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[nil] =
0 0 0
0 0 0
0 0 0
[f'(x1, x2)] =
1 0 0
0 1 0
0 0 0
· x1 +
1 0 1
1 0 0
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
[g(x1)] =
1 1 0
0 0 0
0 0 1
· x1 +
0 0 0
1 0 0
0 0 0
[C] =
0 0 0
0 0 0
0 0 0
[foldf(x1, x2)] =
1 0 0
0 1 0
0 0 1
· x1 +
1 0 1
0 0 1
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
[f''(x1)] =
1 0 0
1 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
[A] =
0 0 0
1 0 0
0 0 0
[f(x1, x2)] =
1 0 0
0 1 0
0 0 0
· x1 +
1 1 1
1 1 0
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
[triple(x1, x2, x3)] =
1 0 0
1 0 0
0 0 0
· x1 +
1 0 1
1 0 1
0 0 0
· x2 +
1 0 1
1 0 1
0 0 0
· x3 +
0 0 0
0 0 0
0 0 0
[cons(x1, x2)] =
1 0 1
0 0 0
1 1 0
· x1 +
1 0 0
0 0 0
0 0 1
· x2 +
0 0 0
0 0 0
0 0 0
[B] =
0 0 0
0 0 0
0 0 0
all of the following rules can be deleted.
g(A) A (1)

1.1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[nil] =
1 0 0
0 0 0
0 0 0
[f'(x1, x2)] =
1 0 0
0 1 0
0 0 1
· x1 +
1 1 0
0 1 0
1 1 0
· x2 +
1 0 0
1 0 0
1 0 0
[g(x1)] =
1 0 0
0 1 0
0 1 1
· x1 +
0 0 0
0 0 0
0 0 0
[C] =
0 0 0
1 0 0
0 0 0
[foldf(x1, x2)] =
1 0 0
0 1 0
0 0 1
· x1 +
1 0 1
0 1 0
0 1 0
· x2 +
0 0 0
0 0 0
0 0 0
[f''(x1)] =
1 0 0
0 0 1
0 0 1
· x1 +
1 0 0
0 0 0
1 0 0
[A] =
0 0 0
1 0 0
0 0 0
[f(x1, x2)] =
1 0 0
0 1 0
0 0 1
· x1 +
1 1 0
1 1 0
1 1 0
· x2 +
1 0 0
1 0 0
1 0 0
[triple(x1, x2, x3)] =
1 0 0
0 0 0
0 0 0
· x1 +
1 0 1
1 1 0
1 1 0
· x2 +
1 0 1
0 1 0
0 1 0
· x3 +
0 0 0
0 0 0
0 0 0
[cons(x1, x2)] =
1 0 1
1 1 0
0 1 1
· x1 +
1 0 0
0 1 0
0 0 1
· x2 +
0 0 0
1 0 0
1 0 0
[B] =
0 0 0
1 0 0
1 0 0
all of the following rules can be deleted.
foldf(x,nil) x (7)

1.1.1.1 Rule Removal

Using the linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the naturals
[nil] =
0 0 0
0 0 0
0 0 0
[f'(x1, x2)] =
1 0 1
0 1 1
0 1 1
· x1 +
1 1 1
1 0 0
1 0 1
· x2 +
0 0 0
1 0 0
0 0 0
[g(x1)] =
1 0 0
0 0 1
0 0 0
· x1 +
0 0 0
0 0 0
1 0 0
[C] =
1 0 0
0 0 0
1 0 0
[foldf(x1, x2)] =
1 0 0
0 0 0
0 0 0
· x1 +
1 1 1
1 0 1
1 0 1
· x2 +
1 0 0
0 0 0
0 0 0
[f''(x1)] =
1 0 1
0 1 1
0 1 1
· x1 +
1 0 0
0 0 0
0 0 0
[A] =
1 0 0
1 0 0
1 0 0
[f(x1, x2)] =
1 0 1
0 1 1
0 1 1
· x1 +
1 0 1
1 0 0
1 0 0
· x2 +
1 0 0
1 0 0
1 0 0
[triple(x1, x2, x3)] =
1 0 0
0 0 0
0 0 1
· x1 +
1 0 1
1 0 1
1 1 1
· x2 +
1 0 0
1 0 0
0 1 1
· x3 +
0 0 0
1 0 0
0 0 0
[cons(x1, x2)] =
1 0 0
0 0 0
0 0 1
· x1 +
1 0 1
0 1 0
1 0 1
· x2 +
0 0 0
1 0 0
1 0 0
[B] =
1 0 0
0 0 0
1 0 0
all of the following rules can be deleted.
foldf(x,cons(y,z)) f(foldf(x,z),y) (8)
f'(triple(a,b,c),C) triple(a,b,cons(C,c)) (10)

1.1.1.1.1 Rule Removal

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

1.1.1.1.1.1 R is empty

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