(0) Obligation:

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

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
mark(p(diff(X126506_4, X226507_4))) →+ a__p(a__if(a__leq(mark(mark(X126506_4)), mark(mark(X226507_4))), 0, s(diff(p(mark(X126506_4)), mark(X226507_4)))))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,0,0,0].
The pumping substitution is [X126506_4 / p(diff(X126506_4, X226507_4))].
The result substitution is [ ].

The rewrite sequence
mark(p(diff(X126506_4, X226507_4))) →+ a__p(a__if(a__leq(mark(mark(X126506_4)), mark(mark(X226507_4))), 0, s(diff(p(mark(X126506_4)), mark(X226507_4)))))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,2,0,0,0].
The pumping substitution is [X126506_4 / p(diff(X126506_4, X226507_4))].
The result substitution is [ ].

(2) BOUNDS(2^n, INF)

(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:

a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

S is empty.
Rewrite Strategy: FULL

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

Infered types.

(6) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

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

Heuristically decided to analyse the following defined symbols:
a__p, mark, a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(8) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
mark, a__p, a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

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

Proved the following rewrite lemma:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Induction Base:
mark(gen_0':s:true:false:p:diff:leq:if2_0(0)) →RΩ(1)
0'

Induction Step:
mark(gen_0':s:true:false:p:diff:leq:if2_0(+(n4_0, 1))) →RΩ(1)
s(mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0))) →IH
s(gen_0':s:true:false:p:diff:leq:if2_0(c5_0))

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

(10) Complex Obligation (BEST)

(11) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__p, a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(12) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

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

(13) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(14) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Induction Base:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(0), gen_0':s:true:false:p:diff:leq:if2_0(0)) →RΩ(1)
true

Induction Step:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(+(n1457_0, 1)), gen_0':s:true:false:p:diff:leq:if2_0(+(n1457_0, 1))) →RΩ(1)
a__leq(mark(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)), mark(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0))) →LΩ(1 + n14570)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), mark(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0))) →LΩ(1 + n14570)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) →IH
true

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

(15) Complex Obligation (BEST)

(16) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__if, a__p, mark

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(17) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

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

(18) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
mark, a__p

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(19) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2035_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2035_0), rt ∈ Ω(1 + n20350)

Induction Base:
mark(gen_0':s:true:false:p:diff:leq:if2_0(0)) →RΩ(1)
0'

Induction Step:
mark(gen_0':s:true:false:p:diff:leq:if2_0(+(n2035_0, 1))) →RΩ(1)
s(mark(gen_0':s:true:false:p:diff:leq:if2_0(n2035_0))) →IH
s(gen_0':s:true:false:p:diff:leq:if2_0(c2036_0))

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

(20) Complex Obligation (BEST)

(21) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2035_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2035_0), rt ∈ Ω(1 + n20350)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__p

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

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

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

(23) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2035_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2035_0), rt ∈ Ω(1 + n20350)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(24) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

(25) BOUNDS(n^2, INF)

(26) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2035_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2035_0), rt ∈ Ω(1 + n20350)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(27) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

(28) BOUNDS(n^2, INF)

(29) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(30) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1457_0), gen_0':s:true:false:p:diff:leq:if2_0(n1457_0)) → true, rt ∈ Ω(1 + n14570 + n145702)

(31) BOUNDS(n^2, INF)

(32) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(33) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

(34) BOUNDS(n^1, INF)