Term Rewriting System R:
[x, y, z, t, a, b, c]
g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

FOLDF(x, cons(y, z)) -> F(foldf(x, z), y)
FOLDF(x, cons(y, z)) -> FOLDF(x, z)
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''(foldf(triple(cons(A, a), nil, c), b))
F'(triple(a, b, c), A) -> FOLDF(triple(cons(A, a), nil, c), b)
F''(triple(a, b, c)) -> FOLDF(triple(a, b, nil), c)

Furthermore, R contains one SCC.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polynomial Ordering`

Dependency Pairs:

F'(triple(a, b, c), A) -> FOLDF(triple(cons(A, a), nil, c), b)
FOLDF(x, cons(y, z)) -> FOLDF(x, z)
F''(triple(a, b, c)) -> FOLDF(triple(a, b, nil), c)
F'(triple(a, b, c), A) -> F''(foldf(triple(cons(A, a), nil, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDF(x, cons(y, z)) -> F(foldf(x, z), y)

Rules:

g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

The following dependency pairs can be strictly oriented:

FOLDF(x, cons(y, z)) -> FOLDF(x, z)
FOLDF(x, cons(y, z)) -> F(foldf(x, z), y)

Additionally, the following rules can be oriented:

g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(triple(x1, x2, x3)) =  x2 + x3 POL(f'(x1, x2)) =  1 + x1 POL(F(x1, x2)) =  x1 POL(f(x1, x2)) =  1 + x1 POL(FOLDF(x1, x2)) =  x1 + x2 POL(F''(x1)) =  x1 POL(C) =  0 POL(g(x1)) =  0 POL(B) =  0 POL(cons(x1, x2)) =  1 + x2 POL(nil) =  0 POL(F'(x1, x2)) =  x1 POL(foldf(x1, x2)) =  x1 + x2 POL(f''(x1)) =  x1 POL(A) =  0

resulting in one new DP problem.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`           →DP Problem 2`
`             ↳Dependency Graph`

Dependency Pairs:

F'(triple(a, b, c), A) -> FOLDF(triple(cons(A, a), nil, c), b)
F''(triple(a, b, c)) -> FOLDF(triple(a, b, nil), c)
F'(triple(a, b, c), A) -> F''(foldf(triple(cons(A, a), nil, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))

Rules:

g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

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

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`           →DP Problem 2`
`             ↳DGraph`
`             ...`
`               →DP Problem 3`
`                 ↳Polynomial Ordering`

Dependency Pairs:

F(t, x) -> F'(t, g(x))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)

Rules:

g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

The following dependency pair can be strictly oriented:

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

Additionally, the following rules can be oriented:

g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(triple(x1, x2, x3)) =  0 POL(f'(x1, x2)) =  0 POL(f(x1, x2)) =  0 POL(F(x1, x2)) =  x2 POL(C) =  1 POL(g(x1)) =  x1 POL(B) =  1 POL(cons(x1, x2)) =  0 POL(nil) =  0 POL(F'(x1, x2)) =  x2 POL(foldf(x1, x2)) =  x1 POL(f''(x1)) =  0 POL(A) =  0

resulting in one new DP problem.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`           →DP Problem 2`
`             ↳DGraph`
`             ...`
`               →DP Problem 4`
`                 ↳Dependency Graph`

Dependency Pair:

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

Rules:

g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldf(x, nil) -> x
foldf(x, cons(y, z)) -> f(foldf(x, z), y)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, cons(C, c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) -> foldf(triple(a, b, nil), c)

Using the Dependency Graph resulted in no new DP problems.

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