Term Rewriting System R: [t, n, x, a, b, c] g(A) -> A g(B) -> A g(B) -> B g(C) -> A g(C) -> B g(C) -> C foldB(t, 0) -> t foldB(t, s(n)) -> f(foldB(t, n), B) foldC(t, 0) -> t foldC(t, s(n)) -> f(foldC(t, n), C) f(t, x) -> f'(t, g(x)) f'(triple(a, b, c), C) -> triple(a, b, s(c)) f'(triple(a, b, c), B) -> f(triple(a, b, c), A) f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b)) f''(triple(a, b, c)) -> foldC(triple(a, b, 0), 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(f''(x_1)) = x_1 POL(s(x_1)) = 1 + x_1 POL(B) = 1 POL(triple(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(foldC(x_1, x_2)) = x_1 + 2*x_2 POL(A) = 0 POL(f(x_1, x_2)) = 1 + x_1 + x_2 POL(f'(x_1, x_2)) = 1 + x_1 + x_2 POL(foldB(x_1, x_2)) = x_1 + 2*x_2 POL(0) = 0 POL(C) = 1 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 f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b)) where the Polynomial interpretation: POL(g(x_1)) = 2*x_1 POL(f''(x_1)) = x_1 POL(s(x_1)) = x_1 POL(B) = 0 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + x_2 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(foldB(x_1, x_2)) = x_1 + x_2 POL(0) = 0 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: g(B) -> B g(C) -> B g(C) -> C where the Polynomial interpretation: POL(g(x_1)) = 1 + x_1 POL(f''(x_1)) = 2*x_1 POL(s(x_1)) = 1 + x_1 POL(B) = 0 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + 2*x_2 POL(f(x_1, x_2)) = 2 + x_1 + x_2 POL(f'(x_1, x_2)) = 1 + x_1 + x_2 POL(foldB(x_1, x_2)) = x_1 + 2*x_2 POL(0) = 0 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: foldB(t, 0) -> t foldC(t, 0) -> t where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(f''(x_1)) = 1 + x_1 POL(s(x_1)) = x_1 POL(B) = 0 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = x_1 + x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(foldB(x_1, x_2)) = x_1 + x_2 POL(0) = 1 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: foldB(t, s(n)) -> f(foldB(t, n), B) where the Polynomial interpretation: POL(g(x_1)) = x_1 POL(f''(x_1)) = x_1 POL(s(x_1)) = 1 + x_1 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(B) = 0 POL(foldC(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = x_1 + x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(foldB(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(C) = 1 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(g(x_1)) = x_1 POL(f''(x_1)) = 2*x_1 POL(s(x_1)) = 1 + x_1 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + 2*x_2 POL(f'(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 POL(C) = 1 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, s(c)) where the Polynomial interpretation: POL(f''(x_1)) = x_1 POL(s(x_1)) = x_1 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = x_1 + x_2 POL(f'(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 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: foldC(t, s(n)) -> f(foldC(t, n), C) where the Polynomial interpretation: POL(f''(x_1)) = x_1 POL(s(x_1)) = 1 + x_1 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = x_1 + x_2 POL(0) = 0 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: f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c) where the Polynomial interpretation: POL(f''(x_1)) = 1 + x_1 POL(triple(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(foldC(x_1, x_2)) = x_1 + x_2 POL(0) = 0 was used. All Rules of R can be deleted. Termination of R successfully shown. Duration: 0.969 seconds.