(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

revApp#2(Nil, x16) → x16
revApp#2(Cons(x6, x4), x2) → revApp#2(x4, Cons(x6, x2))
dfsAcc#3(Leaf(x8), x16) → Cons(x8, x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

revApp#2(Nil, x16) → x16
revApp#2(Cons(x6, x4), x2) → revApp#2(x4, Cons(x6, x2))
dfsAcc#3(Leaf(x8), x16) → Cons(x8, x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

S is empty.
Rewrite Strategy: INNERMOST

(3) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
Cons/0
Leaf/0

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

S is empty.
Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Innermost TRS:
Rules:
revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_Leaf:Node2_0 :: Leaf:Node
gen_Nil:Cons3_0 :: Nat → Nil:Cons
gen_Leaf:Node4_0 :: Nat → Leaf:Node

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
revApp#2, dfsAcc#3

(8) Obligation:

Innermost TRS:
Rules:
revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_Leaf:Node2_0 :: Leaf:Node
gen_Nil:Cons3_0 :: Nat → Nil:Cons
gen_Leaf:Node4_0 :: Nat → Leaf:Node

Generator Equations:
gen_Nil:Cons3_0(0) ⇔ Nil
gen_Nil:Cons3_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons3_0(x))
gen_Leaf:Node4_0(0) ⇔ Leaf
gen_Leaf:Node4_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node4_0(x))

The following defined symbols remain to be analysed:
revApp#2, dfsAcc#3

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
revApp#2(gen_Nil:Cons3_0(0), gen_Nil:Cons3_0(b)) →RΩ(1)
gen_Nil:Cons3_0(b)

Induction Step:
revApp#2(gen_Nil:Cons3_0(+(n6_0, 1)), gen_Nil:Cons3_0(b)) →RΩ(1)
revApp#2(gen_Nil:Cons3_0(n6_0), Cons(gen_Nil:Cons3_0(b))) →IH
gen_Nil:Cons3_0(+(+(b, 1), c7_0))

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

(10) Complex Obligation (BEST)

(11) Obligation:

Innermost TRS:
Rules:
revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_Leaf:Node2_0 :: Leaf:Node
gen_Nil:Cons3_0 :: Nat → Nil:Cons
gen_Leaf:Node4_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_Nil:Cons3_0(0) ⇔ Nil
gen_Nil:Cons3_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons3_0(x))
gen_Leaf:Node4_0(0) ⇔ Leaf
gen_Leaf:Node4_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node4_0(x))

The following defined symbols remain to be analysed:
dfsAcc#3

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
dfsAcc#3(gen_Leaf:Node4_0(n571_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(+(1, n571_0), b)), rt ∈ Ω(1 + n5710)

Induction Base:
dfsAcc#3(gen_Leaf:Node4_0(0), gen_Nil:Cons3_0(b)) →RΩ(1)
Cons(gen_Nil:Cons3_0(b))

Induction Step:
dfsAcc#3(gen_Leaf:Node4_0(+(n571_0, 1)), gen_Nil:Cons3_0(b)) →RΩ(1)
dfsAcc#3(gen_Leaf:Node4_0(n571_0), dfsAcc#3(Leaf, gen_Nil:Cons3_0(b))) →RΩ(1)
dfsAcc#3(gen_Leaf:Node4_0(n571_0), Cons(gen_Nil:Cons3_0(b))) →IH
gen_Nil:Cons3_0(+(+(1, +(b, 1)), c572_0))

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

(13) Complex Obligation (BEST)

(14) Obligation:

Innermost TRS:
Rules:
revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_Leaf:Node2_0 :: Leaf:Node
gen_Nil:Cons3_0 :: Nat → Nil:Cons
gen_Leaf:Node4_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dfsAcc#3(gen_Leaf:Node4_0(n571_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(+(1, n571_0), b)), rt ∈ Ω(1 + n5710)

Generator Equations:
gen_Nil:Cons3_0(0) ⇔ Nil
gen_Nil:Cons3_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons3_0(x))
gen_Leaf:Node4_0(0) ⇔ Leaf
gen_Leaf:Node4_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node4_0(x))

No more defined symbols left to analyse.

(15) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(16) BOUNDS(n^1, INF)

(17) Obligation:

Innermost TRS:
Rules:
revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_Leaf:Node2_0 :: Leaf:Node
gen_Nil:Cons3_0 :: Nat → Nil:Cons
gen_Leaf:Node4_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dfsAcc#3(gen_Leaf:Node4_0(n571_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(+(1, n571_0), b)), rt ∈ Ω(1 + n5710)

Generator Equations:
gen_Nil:Cons3_0(0) ⇔ Nil
gen_Nil:Cons3_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons3_0(x))
gen_Leaf:Node4_0(0) ⇔ Leaf
gen_Leaf:Node4_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node4_0(x))

No more defined symbols left to analyse.

(18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(19) BOUNDS(n^1, INF)

(20) Obligation:

Innermost TRS:
Rules:
revApp#2(Nil, x16) → x16
revApp#2(Cons(x4), x2) → revApp#2(x4, Cons(x2))
dfsAcc#3(Leaf, x16) → Cons(x16)
dfsAcc#3(Node(x6, x4), x2) → dfsAcc#3(x4, dfsAcc#3(x6, x2))
main(x1) → revApp#2(dfsAcc#3(x1, Nil), Nil)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_Leaf:Node2_0 :: Leaf:Node
gen_Nil:Cons3_0 :: Nat → Nil:Cons
gen_Leaf:Node4_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_Nil:Cons3_0(0) ⇔ Nil
gen_Nil:Cons3_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons3_0(x))
gen_Leaf:Node4_0(0) ⇔ Leaf
gen_Leaf:Node4_0(+(x, 1)) ⇔ Node(Leaf, gen_Leaf:Node4_0(x))

No more defined symbols left to analyse.

(21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
revApp#2(gen_Nil:Cons3_0(n6_0), gen_Nil:Cons3_0(b)) → gen_Nil:Cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(22) BOUNDS(n^1, INF)