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.



   R
Removing Redundant Rules



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(C)=  1  
  POL(0)=  0  
  POL(g(x1))=  x1  
  POL(B)=  1  
  POL(foldB(x1, x2))=  x1 + 2·x2  
  POL(triple(x1, x2, x3))=  x1 + 2·x2 + 2·x3  
  POL(s(x1))=  1 + x1  
  POL(f'(x1, x2))=  1 + x1 + x2  
  POL(f''(x1))=  x1  
  POL(A)=  0  
  POL(f(x1, x2))=  1 + x1 + x2  
  POL(foldC(x1, x2))=  x1 + 2·x2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

foldC(t, 0) -> t
foldB(t, 0) -> t

where the Polynomial interpretation:
  POL(C)=  0  
  POL(0)=  1  
  POL(g(x1))=  x1  
  POL(B)=  0  
  POL(foldB(x1, x2))=  x1 + x2  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(s(x1))=  x1  
  POL(f'(x1, x2))=  x1 + x2  
  POL(f''(x1))=  1 + x1  
  POL(foldC(x1, x2))=  x1 + x2  
  POL(f(x1, x2))=  x1 + x2  
  POL(A)=  2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
Removing Redundant Rules



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(C)=  0  
  POL(0)=  0  
  POL(g(x1))=  2·x1  
  POL(B)=  0  
  POL(foldB(x1, x2))=  x1 + x2  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(s(x1))=  x1  
  POL(f'(x1, x2))=  x1 + x2  
  POL(f''(x1))=  x1  
  POL(foldC(x1, x2))=  x1 + x2  
  POL(f(x1, x2))=  x1 + 2·x2  
  POL(A)=  1  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS4
Removing Redundant Rules



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(C)=  0  
  POL(0)=  0  
  POL(g(x1))=  x1  
  POL(B)=  0  
  POL(foldB(x1, x2))=  x1 + x2  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(f'(x1, x2))=  1 + x1 + x2  
  POL(s(x1))=  1 + x1  
  POL(f''(x1))=  2·x1  
  POL(f(x1, x2))=  1 + x1 + x2  
  POL(foldC(x1, x2))=  x1 + 2·x2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS5
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

g(B) -> B
g(C) -> C
g(C) -> B

where the Polynomial interpretation:
  POL(C)=  0  
  POL(0)=  0  
  POL(g(x1))=  1 + x1  
  POL(B)=  0  
  POL(foldB(x1, x2))=  x1 + 2·x2  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(f'(x1, x2))=  1 + x1 + x2  
  POL(s(x1))=  1 + x1  
  POL(f''(x1))=  x1  
  POL(f(x1, x2))=  2 + x1 + x2  
  POL(foldC(x1, x2))=  x1 + x2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS6
Removing Redundant Rules



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(0)=  0  
  POL(C)=  1  
  POL(g(x1))=  x1  
  POL(foldB(x1, x2))=  x1 + x2  
  POL(B)=  0  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(f'(x1, x2))=  x1 + x2  
  POL(s(x1))=  x1  
  POL(f''(x1))=  x1  
  POL(f(x1, x2))=  x1 + x2  
  POL(foldC(x1, x2))=  x1 + x2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS7
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

f(t, x) -> f'(t, g(x))

where the Polynomial interpretation:
  POL(0)=  0  
  POL(foldB(x1, x2))=  x1 + x2  
  POL(B)=  0  
  POL(g(x1))=  x1  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(s(x1))=  1 + x1  
  POL(f'(x1, x2))=  x1 + x2  
  POL(f''(x1))=  x1  
  POL(foldC(x1, x2))=  x1 + x2  
  POL(f(x1, x2))=  1 + x1 + x2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS8
Removing Redundant Rules



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(0)=  0  
  POL(foldB(x1, x2))=  x1 + x2  
  POL(B)=  0  
  POL(triple(x1, x2, x3))=  x1 + x2 + x3  
  POL(s(x1))=  x1  
  POL(f''(x1))=  1 + x1  
  POL(f(x1, x2))=  x1 + x2  
  POL(foldC(x1, x2))=  x1 + x2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS9
Removing Redundant Rules



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(foldB(x1, x2))=  x1 + x2  
  POL(B)=  0  
  POL(s(x1))=  1 + x1  
  POL(f(x1, x2))=  x1 + x2  
was used.

All Rules of R can be deleted.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS10
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS11
Dependency Pair Analysis



R contains no Dependency Pairs and therefore no SCCs.

Termination of R successfully shown.
Duration:
0:04 minutes