(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following 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)

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following 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)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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

The TRS R consists of the following 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)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(5) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FOLDF(x, cons(y, z)) → FOLDF(x, z)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
F(x0, x1, x2)  =  F(x0, x1)
F'(x0, x1, x2)  =  F'(x1, x2)
F''(x0, x1)  =  F''(x0, x1)
FOLDF(x0, x1, x2)  =  FOLDF(x0, x1)

Tags:
F has argument tags [0,0,0] and root tag 0
F' has argument tags [1,0,0] and root tag 0
F'' has argument tags [0,0] and root tag 0
FOLDF has argument tags [0,0,8] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(A) = 0   
POL(B) = 1   
POL(C) = 1   
POL(F(x1, x2)) = 1   
POL(F'(x1, x2)) = 0   
POL(F''(x1)) = 0   
POL(FOLDF(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 1 + x2   
POL(f(x1, x2)) = 1 + x1   
POL(f'(x1, x2)) = x1 + x2   
POL(f''(x1)) = x1   
POL(foldf(x1, x2)) = x1 + x2   
POL(g(x1)) = 1   
POL(nil) = 0   
POL(triple(x1, x2, x3)) = x2 + x3   

The following usable rules [FROCOS05] were oriented: none

(6) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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

The TRS R consists of the following 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)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(7) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


F'(triple(a, b, c), B) → F(triple(a, b, c), A)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
F(x0, x1, x2)  =  F(x0)
F'(x0, x1, x2)  =  F'(x0, x1, x2)
F''(x0, x1)  =  F''(x1)
FOLDF(x0, x1, x2)  =  FOLDF(x0, x1, x2)

Tags:
F has argument tags [0,8,7] and root tag 0
F' has argument tags [0,0,0] and root tag 0
F'' has argument tags [4,0] and root tag 0
FOLDF has argument tags [0,0,0] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(A) = 0   
POL(B) = 1   
POL(C) = 1   
POL(F(x1, x2)) = x1 + x2   
POL(F'(x1, x2)) = x1 + x2   
POL(F''(x1)) = 1   
POL(FOLDF(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(f(x1, x2)) = x1 + x2   
POL(f'(x1, x2)) = x1 + x2   
POL(f''(x1)) = x1   
POL(foldf(x1, x2)) = x1 + x2   
POL(g(x1)) = x1   
POL(nil) = 0   
POL(triple(x1, x2, x3)) = x2 + x3   

The following usable rules [FROCOS05] were 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), 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)
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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

The TRS R consists of the following 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)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(9) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


F(t, x) → F'(t, g(x))
F'(triple(a, b, c), A) → F''(foldf(triple(cons(A, a), nil, c), b))
FOLDF(x, cons(y, z)) → F(foldf(x, z), y)
F'(triple(a, b, c), A) → FOLDF(triple(cons(A, a), nil, c), b)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
F(x0, x1, x2)  =  F(x0, x1)
F'(x0, x1, x2)  =  F'(x1)
F''(x0, x1)  =  F''(x0, x1)
FOLDF(x0, x1, x2)  =  FOLDF(x0, x2)

Tags:
F has argument tags [4,10,0] and root tag 0
F' has argument tags [0,9,4] and root tag 2
F'' has argument tags [8,4] and root tag 3
FOLDF has argument tags [0,12,4] and root tag 3

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(A) = 0   
POL(B) = 0   
POL(C) = 0   
POL(F(x1, x2)) = 1   
POL(F'(x1, x2)) = x2   
POL(F''(x1)) = 0   
POL(FOLDF(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 1 + x2   
POL(f(x1, x2)) = 1 + x1   
POL(f'(x1, x2)) = 1 + x1   
POL(f''(x1)) = x1   
POL(foldf(x1, x2)) = x1 + x2   
POL(g(x1)) = x1   
POL(nil) = 0   
POL(triple(x1, x2, x3)) = x2 + x3   

The following usable rules [FROCOS05] were oriented:

g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

F''(triple(a, b, c)) → FOLDF(triple(a, b, nil), c)

The TRS R consists of the following 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)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(11) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(12) TRUE