### (0) Obligation:

Runtime Complexity TRS:
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)

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
foldf(x, cons(y, z)) →+ f(foldf(x, z), y)
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [z / cons(y, z)].
The result substitution is [ ].

### (3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

### (4) Obligation:

Runtime Complexity Relative TRS:
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)

S is empty.
Rewrite Strategy: FULL

### (5) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
triple/0

### (6) Obligation:

Runtime Complexity Relative TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

S is empty.
Rewrite Strategy: FULL

Infered types.

### (8) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

### (9) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
foldf, f, f', f''

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (10) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
f, foldf, f', f''

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (11) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol f.

### (12) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
f', foldf, f''

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol f'.

### (14) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
f'', foldf

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol f''.

### (16) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
foldf

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (17) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

Induction Base:
foldf(triple(nil, nil), gen_nil:cons4_0(0)) →RΩ(1)
triple(nil, nil)

Induction Step:
foldf(triple(nil, nil), gen_nil:cons4_0(+(n153_0, 1))) →RΩ(1)
f(foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)), A) →IH
f(triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), A) →RΩ(1)
f'(triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), g(A)) →RΩ(1)
f'(triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), A) →RΩ(1)
f''(foldf(triple(nil, gen_nil:cons4_0(0)), gen_nil:cons4_0(0))) →RΩ(1)
f''(triple(nil, gen_nil:cons4_0(0))) →RΩ(1)
foldf(triple(nil, nil), gen_nil:cons4_0(0)) →RΩ(1)
triple(nil, nil)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

### (19) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Lemmas:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
f, f', f''

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol f.

### (21) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Lemmas:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
f', f''

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (22) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol f'.

### (23) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Lemmas:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

The following defined symbols remain to be analysed:
f''

They will be analysed ascendingly in the following order:
foldf = f
foldf = f'
foldf = f''
f = f'
f = f''
f' = f''

### (24) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol f''.

### (25) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Lemmas:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

No more defined symbols left to analyse.

### (26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

### (28) Obligation:

TRS:
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(b, c), C) → triple(b, cons(C, c))
f'(triple(b, c), B) → f(triple(b, c), A)
f'(triple(b, c), A) → f''(foldf(triple(nil, c), b))
f''(triple(b, c)) → foldf(triple(b, nil), c)

Types:
g :: A:B:C → A:B:C
A :: A:B:C
B :: A:B:C
C :: A:B:C
foldf :: triple → nil:cons → triple
nil :: nil:cons
cons :: A:B:C → nil:cons → nil:cons
f :: triple → A:B:C → triple
f' :: triple → A:B:C → triple
triple :: nil:cons → nil:cons → triple
f'' :: triple → triple
hole_A:B:C1_0 :: A:B:C
hole_triple2_0 :: triple
hole_nil:cons3_0 :: nil:cons
gen_nil:cons4_0 :: Nat → nil:cons

Lemmas:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(A, gen_nil:cons4_0(x))

No more defined symbols left to analyse.

### (29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
foldf(triple(nil, nil), gen_nil:cons4_0(n153_0)) → triple(gen_nil:cons4_0(0), gen_nil:cons4_0(0)), rt ∈ Ω(1 + n1530)