Term Rewriting System R: [x, y, z, t, a, b, c] g(A) -> A g(B) -> A g(B) -> B g(C) -> A g(C) -> B g(C) -> C foldf(x, nil) -> x foldf(x, cons(y, z)) -> f(foldf(x, z), y) f(t, x) -> f'(t, g(x)) f'(triple(a, b, c), C) -> triple(a, b, cons(C, c)) f'(triple(a, b, c), B) -> f(triple(a, b, c), A) f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b)) f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c) Termination of R to be shown. Removing the following rules from R which fullfill a polynomial ordering: g(B) -> A g(C) -> A f'(triple(a, b, c), B) -> f(triple(a, b, c), A) where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(nil) = 0 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + x_2 POL(B) = 1 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(A) = 0 POL(f(x_1, x_2)) = x_1 + x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(C) = 1 POL(cons(x_1, x_2)) = x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: g(A) -> A where the Polynomial interpretation: POL(g(x_1)) = 2*x_1 POL(nil) = 0 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + 2*x_2 POL(B) = 0 POL(triple(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(A) = 1 POL(f(x_1, x_2)) = x_1 + 2*x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(C) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: g(C) -> B where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(nil) = 0 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + x_2 POL(B) = 0 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(A) = 0 POL(f(x_1, x_2)) = x_1 + x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(C) = 1 POL(cons(x_1, x_2)) = x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: g(B) -> B where the Polynomial interpretation: POL(g(x_1)) = 2*x_1 POL(nil) = 0 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + x_2 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(B) = 1 POL(A) = 0 POL(f(x_1, x_2)) = x_1 + 2*x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(C) = 0 POL(cons(x_1, x_2)) = 2*x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: foldf(x, nil) -> x where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(nil) = 0 POL(f''(x_1)) = 1 + x_1 POL(foldf(x_1, x_2)) = 1 + x_1 + 2*x_2 POL(triple(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(A) = 2 POL(f(x_1, x_2)) = x_1 + 2*x_2 POL(f'(x_1, x_2)) = x_1 + 2*x_2 POL(C) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b)) where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(nil) = 0 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + 2*x_2 POL(triple(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(A) = 0 POL(f(x_1, x_2)) = 2 + x_1 + x_2 POL(f'(x_1, x_2)) = 2 + x_1 + x_2 POL(C) = 0 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: g(C) -> C where the Polynomial interpretation: POL(g(x_1)) = 1 + x_1 POL(nil) = 0 POL(f''(x_1)) = 2*x_1 POL(foldf(x_1, x_2)) = x_1 + 2*x_2 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(f(x_1, x_2)) = 2 + x_1 + x_2 POL(f'(x_1, x_2)) = 1 + x_1 + x_2 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 POL(C) = 0 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: foldf(x, cons(y, z)) -> f(foldf(x, z), y) where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(nil) = 0 POL(f''(x_1)) = 2*x_1 POL(foldf(x_1, x_2)) = x_1 + 2*x_2 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(f(x_1, x_2)) = 1 + x_1 + x_2 POL(f'(x_1, x_2)) = 1 + x_1 + x_2 POL(C) = 0 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: f(t, x) -> f'(t, g(x)) where the Polynomial interpretation: POL(nil) = 0 POL(g(x_1)) = x_1 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + x_2 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(f'(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = 1 + x_1 + x_2 POL(C) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: f'(triple(a, b, c), C) -> triple(a, b, cons(C, c)) where the Polynomial interpretation: POL(nil) = 0 POL(f''(x_1)) = x_1 POL(foldf(x_1, x_2)) = x_1 + x_2 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(f'(x_1, x_2)) = 1 + x_1 + x_2 POL(C) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 was used. Not all Rules of R can be deleted, so we still have to regard a part of R. Removing the following rules from R which fullfill a polynomial ordering: f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c) where the Polynomial interpretation: POL(nil) = 0 POL(f''(x_1)) = 1 + x_1 POL(foldf(x_1, x_2)) = x_1 + x_2 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 was used. All Rules of R can be deleted. Termination of R successfully shown. Duration: 2.430 seconds.