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
FwdInst


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
FwdInst


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
Narrowing Transformation
       →DP Problem 2
FwdInst


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, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

F'(triple(a', s(n'), c'), A) -> F''(f(foldB(triple(s(a'), 0, c'), n'), B))
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 5
Instantiation Transformation
       →DP Problem 2
FwdInst


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'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(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'(triple(a, b, c), A) -> 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, 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 3
Nar
             ...
               →DP Problem 6
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


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(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(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(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), 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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLDB(t, s(n)) -> FOLDB(t, n)
one new Dependency Pair is created:

FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 7
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(t, C) -> F'(t, B)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, B) -> F'(t, B)
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
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, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
FOLDC(t, s(n)) -> FOLDC(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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLDC(t, s(n)) -> FOLDC(t, n)
one new Dependency Pair is created:

FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 8
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F(t, B) -> F'(t, B)
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(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(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, C) -> 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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

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

F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 9
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(t, B) -> F'(t, B)
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, C) -> F'(t, B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(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)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

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

F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 10
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(t, C) -> F'(t, B)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F(t, B) -> F'(t, A)
FOLDB(t, s(n)) -> F(foldB(t, n), B)
F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(t, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), 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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

F(t, B) -> F'(t, A)
six new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 11
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
F(triple(a''', 0, c'''), B) -> F'(triple(a''', 0, c'''), A)
F(t, B) -> F'(t, B)
FOLDB(t, s(n)) -> F(foldB(t, n), B)
F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(t, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, C) -> 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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 12
Narrowing Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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

FOLDB(t, s(n)) -> F(foldB(t, n), B)
two new Dependency Pairs are created:

FOLDB(t'', s(0)) -> F(t'', B)
FOLDB(t'', s(s(n''))) -> F(f(foldB(t'', n''), B), B)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 13
Narrowing Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), B)
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t'', s(s(n''))) -> F(f(foldB(t'', n''), B), B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
F(triple(a''', 0, c'''), B) -> F'(triple(a''', 0, c'''), A)
FOLDB(t'', s(0)) -> F(t'', B)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(t, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, C) -> 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, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

FOLDB(t'', s(s(n''))) -> F(f(foldB(t'', n''), B), B)
three new Dependency Pairs are created:

FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 14
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(t, C) -> F'(t, B)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
F(triple(a''', 0, c'''), B) -> F'(triple(a''', 0, c'''), A)
FOLDB(t'', s(0)) -> F(t'', B)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(t, C) -> F'(t, A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

F(t, C) -> F'(t, A)
six new Dependency Pairs are created:

F(triple(a''', 0, c'''), C) -> F'(triple(a''', 0, c'''), A)
F(triple(a'''', s(n''''), c''''), C) -> F'(triple(a'''', s(n''''), c''''), A)
F(triple(a'''', s(0), c''''), C) -> F'(triple(a'''', s(0), c''''), A)
F(triple(a'''', s(s(n'''')), c''''), C) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a''', s(n''''), c'''), C) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a''', s(s(n'''''')), c'''), C) -> F'(triple(a''', s(s(n'''''')), c'''), A)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 15
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(triple(a''', s(s(n'''''')), c'''), C) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), C) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a'''', s(s(n'''')), c''''), C) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), C) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), B)
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
F(triple(a''', 0, c'''), B) -> F'(triple(a''', 0, c'''), A)
FOLDB(t'', s(0)) -> F(t'', B)
FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(triple(a'''', s(n''''), c''''), C) -> F'(triple(a'''', s(n''''), c''''), A)
F(triple(a''', 0, c'''), C) -> F'(triple(a''', 0, c'''), A)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F'(triple(a', 0, c'), A) -> F''(triple(s(a'), 0, c'))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, C) -> 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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

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

F(triple(a'', b'', c''), C) -> F'(triple(a'', b'', c''), B)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 16
Narrowing Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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

FOLDC(t, s(n)) -> F(foldC(t, n), C)
two new Dependency Pairs are created:

FOLDC(t'', s(0)) -> F(t'', C)
FOLDC(t'', s(s(n''))) -> F(f(foldC(t'', n''), C), C)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 17
Narrowing Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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

FOLDC(t'', s(s(n''))) -> F(f(foldC(t'', n''), C), C)
three new Dependency Pairs are created:

FOLDC(t''', s(s(n'''))) -> F(f'(foldC(t''', n'''), g(C)), C)
FOLDC(t''', s(s(0))) -> F(f(t''', C), C)
FOLDC(t''', s(s(s(n')))) -> F(f(f(foldC(t''', n'), C), C), C)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 18
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

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

F'(triple(a''', 0, s(n'''')), A) -> F''(triple(s(a'''), 0, s(n'''')))
F'(triple(a''', 0, s(s(n''''''))), A) -> F''(triple(s(a'''), 0, s(s(n''''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 19
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLDB(t'', s(s(n''))) -> FOLDB(t'', s(n''))
five new Dependency Pairs are created:

FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(n'''')))
FOLDB(t'''', s(s(0))) -> FOLDB(t'''', s(0))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t''', s(s(s(0)))) -> FOLDB(t''', s(s(0)))
FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 20
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLDC(t'', s(s(n''))) -> FOLDC(t'', s(n''))
five new Dependency Pairs are created:

FOLDC(t'''', s(s(s(n'''')))) -> FOLDC(t'''', s(s(n'''')))
FOLDC(t'''', s(s(0))) -> FOLDC(t'''', s(0))
FOLDC(t''', s(s(s(n''''')))) -> FOLDC(t''', s(s(n''''')))
FOLDC(t''', s(s(s(0)))) -> FOLDC(t''', s(s(0)))
FOLDC(t''', s(s(s(s(n''''))))) -> FOLDC(t''', s(s(s(n''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 21
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

F'(triple(a', s(n''), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(n''))
eight new Dependency Pairs are created:

F'(triple(a'', s(0), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(0))
F'(triple(a'', s(s(n''''')), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(n''''')))
F'(triple(a'', s(s(0)), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(0)))
F'(triple(a'', s(s(s(n''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''))))
F'(triple(a'', s(s(s(n''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''''))))
F'(triple(a'', s(s(s(n'''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n'''''''))))
F'(triple(a'', s(s(s(0))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(0))))
F'(triple(a'', s(s(s(s(n'''''')))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(s(n'''''')))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 22
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

FOLDC(t''', s(s(s(0)))) -> FOLDC(t''', s(s(0)))
FOLDC(t''', s(s(s(n''''')))) -> FOLDC(t''', s(s(n''''')))
FOLDC(t'''', s(s(0))) -> FOLDC(t'''', s(0))
FOLDC(t'''', s(s(s(n'''')))) -> FOLDC(t'''', s(s(n'''')))
FOLDC(t''', s(s(s(n')))) -> F(f(f(foldC(t''', n'), C), C), C)
F(triple(a'', b'', c''), C) -> F'(triple(a'', b'', c''), B)
F(triple(a''', s(s(n'''''')), c'''), C) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), C) -> F'(triple(a''', s(n''''), c'''), A)
F(triple(a'''', s(s(n'''')), c''''), C) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), B)
F'(triple(a'', s(s(s(s(n'''''')))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(s(n'''''')))))
F'(triple(a'', s(s(s(0))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(0))))
F'(triple(a'', s(s(s(n'''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n'''''''))))
FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))
FOLDB(t''', s(s(s(0)))) -> FOLDB(t''', s(s(0)))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(n'''')))
F'(triple(a'', s(s(s(n''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''''))))
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)
F'(triple(a'', s(s(s(n''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''))))
FOLDB(t'''', s(s(0))) -> FOLDB(t'''', s(0))
F'(triple(a'', s(s(0)), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(0)))
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
F'(triple(a'', s(s(n''''')), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(n''''')))
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
F'(triple(a''', 0, s(s(n''''''))), A) -> F''(triple(s(a'''), 0, s(s(n''''''))))
F(triple(a''', 0, c'''), B) -> F'(triple(a''', 0, c'''), A)
FOLDB(t'', s(0)) -> F(t'', B)
F'(triple(a'', s(0), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(0))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F(triple(a'''', s(0), c''''), C) -> F'(triple(a'''', s(0), c''''), A)
FOLDC(t''', s(s(0))) -> F(f(t''', C), C)
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(triple(a'''', s(n''''), c''''), C) -> F'(triple(a'''', s(n''''), c''''), A)
FOLDC(t'', s(0)) -> F(t'', C)
F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
F'(triple(a''', 0, s(n'''')), A) -> F''(triple(s(a'''), 0, s(n'''')))
F(triple(a''', 0, c'''), C) -> F'(triple(a''', 0, c'''), A)
FOLDC(t''', s(s(n'''))) -> F(f'(foldC(t''', n'''), g(C)), C)
FOLDC(t''', s(s(s(s(n''''))))) -> FOLDC(t''', s(s(s(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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

F''(triple(a', b', s(n''))) -> FOLDC(triple(a', b', 0), s(n''))
eight new Dependency Pairs are created:

F''(triple(a'', b'', s(0))) -> FOLDC(triple(a'', b'', 0), s(0))
F''(triple(a'', b'', s(s(n''''')))) -> FOLDC(triple(a'', b'', 0), s(s(n''''')))
F''(triple(a'', b'', s(s(0)))) -> FOLDC(triple(a'', b'', 0), s(s(0)))
F''(triple(a'', b'', s(s(s(n''''))))) -> FOLDC(triple(a'', b'', 0), s(s(s(n''''))))
F''(triple(a'', b'', s(s(s(n''''''))))) -> FOLDC(triple(a'', b'', 0), s(s(s(n''''''))))
F''(triple(a'', b'', s(s(s(n'''''''))))) -> FOLDC(triple(a'', b'', 0), s(s(s(n'''''''))))
F''(triple(a'', b'', s(s(s(0))))) -> FOLDC(triple(a'', b'', 0), s(s(s(0))))
F''(triple(a'', b'', s(s(s(s(n'''''')))))) -> FOLDC(triple(a'', b'', 0), s(s(s(s(n'''''')))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 23
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLDB(t'', s(0)) -> F(t'', B)
seven new Dependency Pairs are created:

FOLDB(triple(a''''', 0, c'''''), s(0)) -> F(triple(a''''', 0, c'''''), B)
FOLDB(triple(a'''''', s(n''''''), c''''''), s(0)) -> F(triple(a'''''', s(n''''''), c''''''), B)
FOLDB(triple(a'''''', s(0), c''''''), s(0)) -> F(triple(a'''''', s(0), c''''''), B)
FOLDB(triple(a'''''', s(s(n'''''')), c''''''), s(0)) -> F(triple(a'''''', s(s(n'''''')), c''''''), B)
FOLDB(triple(a''''', s(n''''''), c'''''), s(0)) -> F(triple(a''''', s(n''''''), c'''''), B)
FOLDB(triple(a''''', s(s(n'''''''')), c'''''), s(0)) -> F(triple(a''''', s(s(n'''''''')), c'''''), B)
FOLDB(triple(a'''', b'''', c''''), s(0)) -> F(triple(a'''', b'''', c''''), B)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 24
Forward Instantiation Transformation
       →DP Problem 2
FwdInst


Dependency Pairs:

F(triple(a''', s(s(n'''''')), c'''), C) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F(triple(a''', s(n''''), c'''), C) -> F'(triple(a''', s(n''''), c'''), A)
FOLDB(triple(a'''', b'''', c''''), s(0)) -> F(triple(a'''', b'''', c''''), B)
FOLDB(triple(a''''', s(s(n'''''''')), c'''''), s(0)) -> F(triple(a''''', s(s(n'''''''')), c'''''), B)
FOLDB(triple(a''''', s(n''''''), c'''''), s(0)) -> F(triple(a''''', s(n''''''), c'''''), B)
FOLDB(triple(a'''''', s(s(n'''''')), c''''''), s(0)) -> F(triple(a'''''', s(s(n'''''')), c''''''), B)
FOLDB(triple(a'''''', s(0), c''''''), s(0)) -> F(triple(a'''''', s(0), c''''''), B)
F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), B)
F'(triple(a'', s(s(s(s(n'''''')))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(s(n'''''')))))
F'(triple(a'', s(s(s(0))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(0))))
F'(triple(a'', s(s(s(n'''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n'''''''))))
FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))
FOLDB(t''', s(s(s(0)))) -> FOLDB(t''', s(s(0)))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(n'''')))
F'(triple(a'', s(s(s(n''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''''))))
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)
F'(triple(a'', s(s(s(n''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''))))
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
FOLDB(triple(a'''''', s(n''''''), c''''''), s(0)) -> F(triple(a'''''', s(n''''''), c''''''), B)
FOLDB(t'''', s(s(0))) -> FOLDB(t'''', s(0))
F'(triple(a'', s(s(0)), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(0)))
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
F'(triple(a'', s(s(n''''')), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(n''''')))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(n'''')))
F''(triple(a'', b'', s(s(s(s(n'''''')))))) -> FOLDC(triple(a'', b'', 0), s(s(s(s(n'''''')))))
F''(triple(a'', b'', s(s(s(0))))) -> FOLDC(triple(a'', b'', 0), s(s(s(0))))
F''(triple(a'', b'', s(s(s(n'''''''))))) -> FOLDC(triple(a'', b'', 0), s(s(s(n'''''''))))
FOLDC(t''', s(s(s(s(n''''))))) -> FOLDC(t''', s(s(s(n''''))))
FOLDC(t''', s(s(s(0)))) -> FOLDC(t''', s(s(0)))
FOLDC(t''', s(s(s(n''''')))) -> FOLDC(t''', s(s(n''''')))
FOLDC(t'''', s(s(s(n'''')))) -> FOLDC(t'''', s(s(n'''')))
F''(triple(a'', b'', s(s(s(n''''''))))) -> FOLDC(triple(a'', b'', 0), s(s(s(n''''''))))
F'(triple(a'', s(s(n'')), c''), A) -> F''(f(f(foldB(triple(s(a''), 0, c''), n''), B), B))
F(triple(a'''', s(s(n'''')), c''''), C) -> F'(triple(a'''', s(s(n'''')), c''''), A)
FOLDC(t''', s(s(s(n')))) -> F(f(f(foldC(t''', n'), C), C), C)
F''(triple(a'', b'', s(s(s(n''''))))) -> FOLDC(triple(a'', b'', 0), s(s(s(n''''))))
FOLDC(t'''', s(s(0))) -> FOLDC(t'''', s(0))
F''(triple(a'', b'', s(s(0)))) -> FOLDC(triple(a'', b'', 0), s(s(0)))
F'(triple(a''', 0, s(s(n''''''))), A) -> F''(triple(s(a'''), 0, s(s(n''''''))))
F(triple(a''', 0, c'''), B) -> F'(triple(a''', 0, c'''), A)
FOLDB(triple(a''''', 0, c'''''), s(0)) -> F(triple(a''''', 0, c'''''), B)
F'(triple(a'', s(0), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(0))
F(triple(a'''', s(0), c''''), C) -> F'(triple(a'''', s(0), c''''), A)
FOLDC(t''', s(s(0))) -> F(f(t''', C), C)
F''(triple(a'', b'', s(s(n''''')))) -> FOLDC(triple(a'', b'', 0), s(s(n''''')))
F'(triple(a'', s(0), c''), A) -> F''(f(triple(s(a''), 0, c''), B))
F(triple(a'''', s(n''''), c''''), C) -> F'(triple(a'''', s(n''''), c''''), A)
FOLDC(t'', s(0)) -> F(t'', C)
F''(triple(a'', b'', s(0))) -> FOLDC(triple(a'', b'', 0), s(0))
F'(triple(a''', 0, s(n'''')), A) -> F''(triple(s(a'''), 0, s(n'''')))
F(triple(a''', 0, c'''), C) -> F'(triple(a''', 0, c'''), A)
FOLDC(t''', s(s(n'''))) -> F(f'(foldC(t''', n'''), g(C)), C)
F''(triple(a', b', s(s(n'''')))) -> FOLDC(triple(a', b', 0), s(s(n'''')))
F'(triple(a'', s(n''), c''), A) -> F''(f'(foldB(triple(s(a''), 0, c''), n''), g(B)))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(triple(a'', b'', c''), C) -> F'(triple(a'', b'', c''), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLDC(t'', s(0)) -> F(t'', C)
seven new Dependency Pairs are created:

FOLDC(triple(a''''', 0, c'''''), s(0)) -> F(triple(a''''', 0, c'''''), C)
FOLDC(triple(a'''''', s(n''''''), c''''''), s(0)) -> F(triple(a'''''', s(n''''''), c''''''), C)
FOLDC(triple(a'''''', s(0), c''''''), s(0)) -> F(triple(a'''''', s(0), c''''''), C)
FOLDC(triple(a'''''', s(s(n'''''')), c''''''), s(0)) -> F(triple(a'''''', s(s(n'''''')), c''''''), C)
FOLDC(triple(a''''', s(n''''''), c'''''), s(0)) -> F(triple(a''''', s(n''''''), c'''''), C)
FOLDC(triple(a''''', s(s(n'''''''')), c'''''), s(0)) -> F(triple(a''''', s(s(n'''''''')), c'''''), C)
FOLDC(triple(a'''', b'''', c''''), s(0)) -> F(triple(a'''', b'''', c''''), C)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 25
Polynomial Ordering
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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




The following dependency pairs can be strictly oriented:

FOLDC(triple(a'''', b'''', c''''), s(0)) -> F(triple(a'''', b'''', c''''), C)
FOLDC(triple(a''''', s(s(n'''''''')), c'''''), s(0)) -> F(triple(a''''', s(s(n'''''''')), c'''''), C)
FOLDC(triple(a''''', s(n''''''), c'''''), s(0)) -> F(triple(a''''', s(n''''''), c'''''), C)
FOLDC(triple(a'''''', s(s(n'''''')), c''''''), s(0)) -> F(triple(a'''''', s(s(n'''''')), c''''''), C)
FOLDC(triple(a'''''', s(0), c''''''), s(0)) -> F(triple(a'''''', s(0), c''''''), C)
FOLDC(t''', s(s(s(s(n''''))))) -> FOLDC(t''', s(s(s(n''''))))
FOLDC(t''', s(s(s(0)))) -> FOLDC(t''', s(s(0)))
FOLDC(t''', s(s(s(n''''')))) -> FOLDC(t''', s(s(n''''')))
FOLDC(t'''', s(s(s(n'''')))) -> FOLDC(t'''', s(s(n'''')))
FOLDC(t''', s(s(s(n')))) -> F(f(f(foldC(t''', n'), C), C), C)
FOLDC(triple(a'''''', s(n''''''), c''''''), s(0)) -> F(triple(a'''''', s(n''''''), c''''''), C)
FOLDC(t'''', s(s(0))) -> FOLDC(t'''', s(0))
FOLDC(t''', s(s(0))) -> F(f(t''', C), C)
FOLDC(triple(a''''', 0, c'''''), s(0)) -> F(triple(a''''', 0, c'''''), C)
FOLDC(t''', s(s(n'''))) -> F(f'(foldC(t''', n'''), g(C)), C)


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

foldB(t, 0) -> t
foldB(t, s(n)) -> f(foldB(t, n), B)
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)
foldC(t, 0) -> t
foldC(t, s(n)) -> f(foldC(t, n), C)
f(t, x) -> f'(t, g(x))
g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(foldB(x1, x2))=  x1  
  POL(FOLDC(x1, x2))=  x1 + x2  
  POL(triple(x1, x2, x3))=  x3  
  POL(f'(x1, x2))=  x1 + x2  
  POL(F(x1, x2))=  x1  
  POL(f(x1, x2))=  x1 + x2  
  POL(foldC(x1, x2))=  x1 + x2  
  POL(FOLDB(x1, x2))=  x1  
  POL(F''(x1))=  x1  
  POL(0)=  0  
  POL(C)=  1  
  POL(B)=  0  
  POL(g(x1))=  x1  
  POL(F'(x1, x2))=  x1  
  POL(s(x1))=  1 + x1  
  POL(f''(x1))=  x1  
  POL(A)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 26
Dependency Graph
       →DP Problem 2
FwdInst


Dependency Pairs:

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


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




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 27
Polynomial Ordering
       →DP Problem 2
FwdInst


Dependency Pairs:

FOLDB(triple(a'''', b'''', c''''), s(0)) -> F(triple(a'''', b'''', c''''), B)
FOLDB(triple(a''''', s(s(n'''''''')), c'''''), s(0)) -> F(triple(a''''', s(s(n'''''''')), c'''''), B)
FOLDB(triple(a''''', s(n''''''), c'''''), s(0)) -> F(triple(a''''', s(n''''''), c'''''), B)
FOLDB(triple(a'''''', s(s(n'''''')), c''''''), s(0)) -> F(triple(a'''''', s(s(n'''''')), c''''''), B)
FOLDB(triple(a'''''', s(0), c''''''), s(0)) -> F(triple(a'''''', s(0), c''''''), B)
F'(triple(a'', s(s(s(s(n'''''')))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(s(n'''''')))))
F'(triple(a'', s(s(s(0))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(0))))
F'(triple(a'', s(s(s(n'''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n'''''''))))
FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))
FOLDB(t''', s(s(s(0)))) -> FOLDB(t''', s(s(0)))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(n'''')))
F'(triple(a'', s(s(s(n''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''''))))
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)
F'(triple(a'', s(s(s(n''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''))))
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
FOLDB(triple(a'''''', s(n''''''), c''''''), s(0)) -> F(triple(a'''''', s(n''''''), c''''''), B)
FOLDB(t'''', s(s(0))) -> FOLDB(t'''', s(0))
F'(triple(a'', s(s(0)), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(0)))
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
F'(triple(a'', s(s(n''''')), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(n''''')))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), B)
FOLDB(triple(a''''', 0, c'''''), s(0)) -> F(triple(a''''', 0, c'''''), B)
F'(triple(a'', s(0), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(0))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(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




The following dependency pairs can be strictly oriented:

FOLDB(triple(a'''', b'''', c''''), s(0)) -> F(triple(a'''', b'''', c''''), B)
FOLDB(triple(a''''', s(s(n'''''''')), c'''''), s(0)) -> F(triple(a''''', s(s(n'''''''')), c'''''), B)
FOLDB(triple(a''''', s(n''''''), c'''''), s(0)) -> F(triple(a''''', s(n''''''), c'''''), B)
FOLDB(triple(a'''''', s(s(n'''''')), c''''''), s(0)) -> F(triple(a'''''', s(s(n'''''')), c''''''), B)
FOLDB(triple(a'''''', s(0), c''''''), s(0)) -> F(triple(a'''''', s(0), c''''''), B)
FOLDB(t''', s(s(s(n')))) -> F(f(f(foldB(t''', n'), B), B), B)
FOLDB(triple(a'''''', s(n''''''), c''''''), s(0)) -> F(triple(a'''''', s(n''''''), c''''''), B)
FOLDB(t''', s(s(0))) -> F(f(t''', B), B)
FOLDB(triple(a''''', 0, c'''''), s(0)) -> F(triple(a''''', 0, c'''''), B)
FOLDB(t''', s(s(n'''))) -> F(f'(foldB(t''', n'''), g(B)), B)


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

foldB(t, 0) -> t
foldB(t, s(n)) -> f(foldB(t, n), B)
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)
foldC(t, 0) -> t
foldC(t, s(n)) -> f(foldC(t, n), C)
f(t, x) -> f'(t, g(x))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(foldB(x1, x2))=  x1  
  POL(triple(x1, x2, x3))=  x2  
  POL(f'(x1, x2))=  x1  
  POL(F(x1, x2))=  x1  
  POL(f(x1, x2))=  x1  
  POL(foldC(x1, x2))=  x1  
  POL(FOLDB(x1, x2))=  1 + x1  
  POL(0)=  0  
  POL(C)=  0  
  POL(B)=  0  
  POL(g(x1))=  0  
  POL(F'(x1, x2))=  x1  
  POL(s(x1))=  1  
  POL(f''(x1))=  x1  
  POL(A)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 28
Dependency Graph
       →DP Problem 2
FwdInst


Dependency Pairs:

F'(triple(a'', s(s(s(s(n'''''')))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(s(n'''''')))))
F'(triple(a'', s(s(s(0))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(0))))
F'(triple(a'', s(s(s(n'''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n'''''''))))
FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))
FOLDB(t''', s(s(s(0)))) -> FOLDB(t''', s(s(0)))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(n'''')))
F'(triple(a'', s(s(s(n''''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''''))))
F(triple(a''', s(s(n'''''')), c'''), B) -> F'(triple(a''', s(s(n'''''')), c'''), A)
F'(triple(a'', s(s(s(n''''))), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(s(n''''))))
F(triple(a''', s(n''''), c'''), B) -> F'(triple(a''', s(n''''), c'''), A)
FOLDB(t'''', s(s(0))) -> FOLDB(t'''', s(0))
F'(triple(a'', s(s(0)), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(0)))
F(triple(a'''', s(s(n'''')), c''''), B) -> F'(triple(a'''', s(s(n'''')), c''''), A)
F(triple(a'''', s(0), c''''), B) -> F'(triple(a'''', s(0), c''''), A)
F'(triple(a'', s(s(n''''')), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(s(n''''')))
F(triple(a'', b'', c''), A) -> F'(triple(a'', b'', c''), A)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(triple(a'', b'', c''), B) -> F'(triple(a'', b'', c''), B)
F'(triple(a'', s(0), c''), A) -> FOLDB(triple(s(a''), 0, c''), s(0))
F(triple(a'''', s(n''''), c''''), B) -> F'(triple(a'''', s(n''''), c''''), A)
F'(triple(a', s(s(n'''')), c'), A) -> FOLDB(triple(s(a'), 0, c'), s(s(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




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 29
Polynomial Ordering
       →DP Problem 2
FwdInst


Dependency Pairs:

FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(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




The following dependency pairs can be strictly oriented:

FOLDB(t''', s(s(s(s(n''''))))) -> FOLDB(t''', s(s(s(n''''))))
FOLDB(t''', s(s(s(n''''')))) -> FOLDB(t''', s(s(n''''')))
FOLDB(t'''', s(s(s(n'''')))) -> FOLDB(t'''', s(s(n'''')))


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  
  POL(FOLDB(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 30
Dependency Graph
       →DP Problem 2
FwdInst


Dependency Pair:


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




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Forward Instantiation Transformation


Dependency Pair:

FOLD(t, x, s(n)) -> FOLD(t, x, 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLD(t, x, s(n)) -> FOLD(t, x, n)
one new Dependency Pair is created:

FOLD(t'', x'', s(s(n''))) -> FOLD(t'', x'', s(n''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
FwdInst
           →DP Problem 31
Forward Instantiation Transformation


Dependency Pair:

FOLD(t'', x'', s(s(n''))) -> FOLD(t'', x'', s(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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

FOLD(t'', x'', s(s(n''))) -> FOLD(t'', x'', s(n''))
one new Dependency Pair is created:

FOLD(t'''', x'''', s(s(s(n'''')))) -> FOLD(t'''', x'''', s(s(n'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
FwdInst
           →DP Problem 31
FwdInst
             ...
               →DP Problem 32
Polynomial Ordering


Dependency Pair:

FOLD(t'''', x'''', s(s(s(n'''')))) -> FOLD(t'''', x'''', s(s(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




The following dependency pair can be strictly oriented:

FOLD(t'''', x'''', s(s(s(n'''')))) -> FOLD(t'''', x'''', s(s(n'''')))


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  
  POL(FOLD(x1, x2, x3))=  1 + x3  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
FwdInst
           →DP Problem 31
FwdInst
             ...
               →DP Problem 33
Dependency Graph


Dependency Pair:


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




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:35 minutes