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)
fold(t, x, 0) -> t
fold(t, x, s(n)) -> f(fold(t, x, n), x)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FOLDB(t, s(n)) -> F(foldB(t, n), B)
FOLDB(t, s(n)) -> FOLDB(t, n)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
FOLDC(t, s(n)) -> FOLDC(t, n)
F(t, x) -> F'(t, g(x))
F(t, x) -> G(x)
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), A) -> FOLDB(triple(s(a), 0, c), b)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
FOLD(t, x, s(n)) -> F(fold(t, x, n), x)
FOLD(t, x, s(n)) -> FOLD(t, x, n)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Narrowing Transformation
       →DP Problem 2
Remaining


Dependency Pairs:

FOLDB(t, s(n)) -> FOLDB(t, n)
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
FOLDC(t, s(n)) -> FOLDC(t, n)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDB(t, s(n)) -> F(foldB(t, n), B)


Rules:


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)
fold(t, x, 0) -> t
fold(t, x, s(n)) -> f(fold(t, x, n), x)


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

F(t, x) -> F'(t, g(x))
six new Dependency Pairs are created:

F(t, A) -> F'(t, A)
F(t, B) -> F'(t, A)
F(t, B) -> F'(t, B)
F(t, C) -> F'(t, A)
F(t, C) -> F'(t, B)
F(t, C) -> F'(t, C)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Narrowing Transformation
       →DP Problem 2
Remaining


Dependency Pairs:

F(t, B) -> F'(t, B)
FOLDC(t, s(n)) -> FOLDC(t, n)
F(t, A) -> F'(t, A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, C) -> F'(t, B)
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
F(t, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F(t, B) -> F'(t, A)
FOLDB(t, s(n)) -> F(foldB(t, n), B)
FOLDB(t, s(n)) -> FOLDB(t, n)


Rules:


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)
fold(t, x, 0) -> t
fold(t, x, s(n)) -> f(fold(t, x, n), x)


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
two new Dependency Pairs are created:

F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F'(triple(a', s(n'), c'), A) -> F''(f(foldB(triple(s(a'), 0, c'), n'), B))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 4
Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pairs:

FOLDB(t, s(n)) -> FOLDB(t, n)
FOLDC(t, s(n)) -> FOLDC(t, n)
F(t, C) -> F'(t, B)
F'(triple(a', s(n'), c'), A) -> F''(f(foldB(triple(s(a'), 0, c'), n'), B))
F(t, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F(t, B) -> F'(t, A)
FOLDB(t, s(n)) -> F(foldB(t, n), B)
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
F(t, A) -> F'(t, A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, B) -> F'(t, B)


Rules:


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)
fold(t, x, 0) -> t
fold(t, x, s(n)) -> f(fold(t, x, n), x)


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

F(t, A) -> F'(t, A)
one new Dependency Pair is created:

F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)




The following remains to be proven:

Innermost Termination of R could not be shown.
Duration:
0:01 minutes