Term Rewriting System R: [X, Y, X1, X2, X3, Z] a__and(true, X) -> mark(X) a__and(false, Y) -> false a__and(X1, X2) -> and(X1, X2) a__if(true, X, Y) -> mark(X) a__if(false, X, Y) -> mark(Y) a__if(X1, X2, X3) -> if(X1, X2, X3) a__add(0, X) -> mark(X) a__add(s(X), Y) -> s(add(X, Y)) a__add(X1, X2) -> add(X1, X2) a__first(0, X) -> nil a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) a__first(X1, X2) -> first(X1, X2) a__from(X) -> cons(X, from(s(X))) a__from(X) -> from(X) mark(and(X1, X2)) -> a__and(mark(X1), X2) mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3) mark(add(X1, X2)) -> a__add(mark(X1), X2) mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) mark(from(X)) -> a__from(X) mark(true) -> true mark(false) -> false mark(0) -> 0 mark(s(X)) -> s(X) mark(nil) -> nil mark(cons(X1, X2)) -> cons(X1, X2) Termination of R to be shown. Removing the following rules from R which fullfill a polynomial ordering: a__and(true, X) -> mark(X) a__and(false, Y) -> false mark(and(X1, X2)) -> a__and(mark(X1), X2) where the Polynomial interpretation: POL(add(x_1, x_2)) = x_1 + x_2 POL(nil) = 0 POL(a__and(x_1, x_2)) = 1 + x_1 + 2*x_2 POL(s(x_1)) = x_1 POL(and(x_1, x_2)) = 1 + x_1 + x_2 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + 2*x_2 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 POL(first(x_1, x_2)) = x_1 + x_2 POL(a__from(x_1)) = 2*x_1 POL(true) = 0 POL(a__if(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(from(x_1)) = x_1 POL(if(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(false) = 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: a__and(X1, X2) -> and(X1, X2) where the Polynomial interpretation: POL(nil) = 0 POL(add(x_1, x_2)) = x_1 + x_2 POL(a__and(x_1, x_2)) = 1 + x_1 + x_2 POL(s(x_1)) = x_1 POL(and(x_1, x_2)) = x_1 + x_2 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + 2*x_2 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 POL(first(x_1, x_2)) = x_1 + x_2 POL(a__from(x_1)) = 2*x_1 POL(true) = 0 POL(a__if(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(from(x_1)) = x_1 POL(if(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(false) = 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: a__if(true, X, Y) -> mark(X) mark(true) -> true where the Polynomial interpretation: POL(nil) = 0 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + 2*x_2 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 POL(first(x_1, x_2)) = x_1 + x_2 POL(a__from(x_1)) = 2*x_1 POL(true) = 1 POL(a__if(x_1, x_2, x_3)) = x_1 + 2*x_2 + 2*x_3 POL(from(x_1)) = x_1 POL(if(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(false) = 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: a__if(false, X, Y) -> mark(Y) mark(if(X1, X2, X3)) -> a__if(mark(X1), X2, X3) where the Polynomial interpretation: POL(add(x_1, x_2)) = x_1 + x_2 POL(nil) = 0 POL(s(x_1)) = x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + 2*x_2 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 POL(first(x_1, x_2)) = x_1 + x_2 POL(a__from(x_1)) = 2*x_1 POL(a__if(x_1, x_2, x_3)) = 1 + x_1 + x_2 + 2*x_3 POL(from(x_1)) = x_1 POL(if(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(false) = 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: a__if(X1, X2, X3) -> if(X1, X2, X3) where the Polynomial interpretation: POL(add(x_1, x_2)) = x_1 + x_2 POL(nil) = 0 POL(s(x_1)) = x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + 2*x_2 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 POL(first(x_1, x_2)) = x_1 + x_2 POL(a__from(x_1)) = 2*x_1 POL(a__if(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(from(x_1)) = x_1 POL(if(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(false) = 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: mark(add(X1, X2)) -> a__add(mark(X1), X2) a__add(0, X) -> mark(X) where the Polynomial interpretation: POL(first(x_1, x_2)) = x_1 + x_2 POL(nil) = 0 POL(add(x_1, x_2)) = 1 + x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 2*x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = 1 + x_1 + 2*x_2 POL(from(x_1)) = x_1 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(false) = 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: mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) a__first(0, X) -> nil where the Polynomial interpretation: POL(nil) = 0 POL(first(x_1, x_2)) = 1 + x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 2*x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(from(x_1)) = x_1 POL(a__first(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 POL(false) = 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: mark(from(X)) -> a__from(X) where the Polynomial interpretation: POL(nil) = 0 POL(first(x_1, x_2)) = x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 1 + 2*x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(from(x_1)) = 1 + x_1 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(false) = 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: mark(false) -> false where the Polynomial interpretation: POL(nil) = 0 POL(first(x_1, x_2)) = x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 2*x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(from(x_1)) = x_1 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(false) = 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: mark(0) -> 0 where the Polynomial interpretation: POL(nil) = 0 POL(first(x_1, x_2)) = x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 2*x_1 POL(mark(x_1)) = 2*x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(from(x_1)) = x_1 POL(a__first(x_1, x_2)) = x_1 + x_2 POL(0) = 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: mark(s(X)) -> s(X) mark(nil) -> nil mark(cons(X1, X2)) -> cons(X1, X2) where the Polynomial interpretation: POL(nil) = 0 POL(first(x_1, x_2)) = x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 2*x_1 POL(mark(x_1)) = 1 + x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(from(x_1)) = x_1 POL(a__first(x_1, x_2)) = x_1 + x_2 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: a__from(X) -> cons(X, from(s(X))) a__from(X) -> from(X) where the Polynomial interpretation: POL(first(x_1, x_2)) = x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__from(x_1)) = 1 + 2*x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(from(x_1)) = x_1 POL(a__first(x_1, x_2)) = x_1 + x_2 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: a__first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) a__first(X1, X2) -> first(X1, X2) where the Polynomial interpretation: POL(first(x_1, x_2)) = x_1 + x_2 POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__add(x_1, x_2)) = x_1 + x_2 POL(a__first(x_1, x_2)) = 1 + x_1 + x_2 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: a__add(s(X), Y) -> s(add(X, Y)) a__add(X1, X2) -> add(X1, X2) where the Polynomial interpretation: POL(add(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(a__add(x_1, x_2)) = 1 + x_1 + x_2 was used. All Rules of R can be deleted. Termination of R successfully shown. Duration: 0.788 seconds.