(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) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
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)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: a → Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: a → Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_a2_0 :: a
hole_Leaf:Node3_0 :: Leaf:Node
gen_Nil:Cons4_0 :: Nat → Nil:Cons
gen_Leaf:Node5_0 :: Nat → Leaf:Node

(5) OrderProof (LOWER BOUND(ID) transformation)

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

(6) Obligation:

Innermost TRS:
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)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: a → Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: a → Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_a2_0 :: a
hole_Leaf:Node3_0 :: Leaf:Node
gen_Nil:Cons4_0 :: Nat → Nil:Cons
gen_Leaf:Node5_0 :: Nat → Leaf:Node

Generator Equations:
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(hole_a2_0, gen_Nil:Cons4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf(hole_a2_0)
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf(hole_a2_0), gen_Leaf:Node5_0(x))

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

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
revApp#2(gen_Nil:Cons4_0(n7_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

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

Induction Step:
revApp#2(gen_Nil:Cons4_0(+(n7_0, 1)), gen_Nil:Cons4_0(b)) →RΩ(1)
revApp#2(gen_Nil:Cons4_0(n7_0), Cons(hole_a2_0, gen_Nil:Cons4_0(b))) →IH
gen_Nil:Cons4_0(+(+(b, 1), c8_0))

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

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
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)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: a → Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: a → Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_a2_0 :: a
hole_Leaf:Node3_0 :: Leaf:Node
gen_Nil:Cons4_0 :: Nat → Nil:Cons
gen_Leaf:Node5_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons4_0(n7_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

Generator Equations:
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(hole_a2_0, gen_Nil:Cons4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf(hole_a2_0)
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf(hole_a2_0), gen_Leaf:Node5_0(x))

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

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
dfsAcc#3(gen_Leaf:Node5_0(n590_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(+(1, n590_0), b)), rt ∈ Ω(1 + n5900)

Induction Base:
dfsAcc#3(gen_Leaf:Node5_0(0), gen_Nil:Cons4_0(b)) →RΩ(1)
Cons(hole_a2_0, gen_Nil:Cons4_0(b))

Induction Step:
dfsAcc#3(gen_Leaf:Node5_0(+(n590_0, 1)), gen_Nil:Cons4_0(b)) →RΩ(1)
dfsAcc#3(gen_Leaf:Node5_0(n590_0), dfsAcc#3(Leaf(hole_a2_0), gen_Nil:Cons4_0(b))) →RΩ(1)
dfsAcc#3(gen_Leaf:Node5_0(n590_0), Cons(hole_a2_0, gen_Nil:Cons4_0(b))) →IH
gen_Nil:Cons4_0(+(+(1, +(b, 1)), c591_0))

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

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
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)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: a → Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: a → Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_a2_0 :: a
hole_Leaf:Node3_0 :: Leaf:Node
gen_Nil:Cons4_0 :: Nat → Nil:Cons
gen_Leaf:Node5_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons4_0(n7_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dfsAcc#3(gen_Leaf:Node5_0(n590_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(+(1, n590_0), b)), rt ∈ Ω(1 + n5900)

Generator Equations:
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(hole_a2_0, gen_Nil:Cons4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf(hole_a2_0)
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf(hole_a2_0), gen_Leaf:Node5_0(x))

No more defined symbols left to analyse.

(13) LowerBoundsProof (EQUIVALENT transformation)

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

(14) BOUNDS(n^1, INF)

(15) Obligation:

Innermost TRS:
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)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: a → Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: a → Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_a2_0 :: a
hole_Leaf:Node3_0 :: Leaf:Node
gen_Nil:Cons4_0 :: Nat → Nil:Cons
gen_Leaf:Node5_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons4_0(n7_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dfsAcc#3(gen_Leaf:Node5_0(n590_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(+(1, n590_0), b)), rt ∈ Ω(1 + n5900)

Generator Equations:
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(hole_a2_0, gen_Nil:Cons4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf(hole_a2_0)
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf(hole_a2_0), gen_Leaf:Node5_0(x))

No more defined symbols left to analyse.

(16) LowerBoundsProof (EQUIVALENT transformation)

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

(17) BOUNDS(n^1, INF)

(18) Obligation:

Innermost TRS:
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)

Types:
revApp#2 :: Nil:Cons → Nil:Cons → Nil:Cons
Nil :: Nil:Cons
Cons :: a → Nil:Cons → Nil:Cons
dfsAcc#3 :: Leaf:Node → Nil:Cons → Nil:Cons
Leaf :: a → Leaf:Node
Node :: Leaf:Node → Leaf:Node → Leaf:Node
main :: Leaf:Node → Nil:Cons
hole_Nil:Cons1_0 :: Nil:Cons
hole_a2_0 :: a
hole_Leaf:Node3_0 :: Leaf:Node
gen_Nil:Cons4_0 :: Nat → Nil:Cons
gen_Leaf:Node5_0 :: Nat → Leaf:Node

Lemmas:
revApp#2(gen_Nil:Cons4_0(n7_0), gen_Nil:Cons4_0(b)) → gen_Nil:Cons4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

Generator Equations:
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(hole_a2_0, gen_Nil:Cons4_0(x))
gen_Leaf:Node5_0(0) ⇔ Leaf(hole_a2_0)
gen_Leaf:Node5_0(+(x, 1)) ⇔ Node(Leaf(hole_a2_0), gen_Leaf:Node5_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

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

(20) BOUNDS(n^1, INF)