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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'


Heuristically decided to analyse the following defined symbols:
active', leq', if', s', diff', p', proper', top'

They will be analysed ascendingly in the following order:
leq' < active'
if' < active'
s' < active'
diff' < active'
p' < active'
active' < top'
leq' < proper'
if' < proper'
s' < proper'
diff' < proper'
p' < proper'
proper' < top'


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
leq', active', if', s', diff', p', proper', top'

They will be analysed ascendingly in the following order:
leq' < active'
if' < active'
s' < active'
diff' < active'
p' < active'
active' < top'
leq' < proper'
if' < proper'
s' < proper'
diff' < proper'
p' < proper'
proper' < top'


Proved the following rewrite lemma:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)

Induction Base:
leq'(_gen_0':mark':true':false':ok'3(+(1, 0)), _gen_0':mark':true':false':ok'3(b))

Induction Step:
leq'(_gen_0':mark':true':false':ok'3(+(1, +(_$n6, 1))), _gen_0':mark':true':false':ok'3(_b826)) →RΩ(1)
mark'(leq'(_gen_0':mark':true':false':ok'3(+(1, _$n6)), _gen_0':mark':true':false':ok'3(_b826))) →IH
mark'(_*4)

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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
if', active', s', diff', p', proper', top'

They will be analysed ascendingly in the following order:
if' < active'
s' < active'
diff' < active'
p' < active'
active' < top'
if' < proper'
s' < proper'
diff' < proper'
p' < proper'
proper' < top'


Proved the following rewrite lemma:
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)

Induction Base:
if'(_gen_0':mark':true':false':ok'3(+(1, 0)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c))

Induction Step:
if'(_gen_0':mark':true':false':ok'3(+(1, +(_$n2478, 1))), _gen_0':mark':true':false':ok'3(_b3976), _gen_0':mark':true':false':ok'3(_c3977)) →RΩ(1)
mark'(if'(_gen_0':mark':true':false':ok'3(+(1, _$n2478)), _gen_0':mark':true':false':ok'3(_b3976), _gen_0':mark':true':false':ok'3(_c3977))) →IH
mark'(_*4)

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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
s', active', diff', p', proper', top'

They will be analysed ascendingly in the following order:
s' < active'
diff' < active'
p' < active'
active' < top'
s' < proper'
diff' < proper'
p' < proper'
proper' < top'


Proved the following rewrite lemma:
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)

Induction Base:
s'(_gen_0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
s'(_gen_0':mark':true':false':ok'3(+(1, +(_$n6258, 1)))) →RΩ(1)
mark'(s'(_gen_0':mark':true':false':ok'3(+(1, _$n6258)))) →IH
mark'(_*4)

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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
diff', active', p', proper', top'

They will be analysed ascendingly in the following order:
diff' < active'
p' < active'
active' < top'
diff' < proper'
p' < proper'
proper' < top'


Proved the following rewrite lemma:
diff'(_gen_0':mark':true':false':ok'3(+(1, _n8091)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n8091)

Induction Base:
diff'(_gen_0':mark':true':false':ok'3(+(1, 0)), _gen_0':mark':true':false':ok'3(b))

Induction Step:
diff'(_gen_0':mark':true':false':ok'3(+(1, +(_$n8092, 1))), _gen_0':mark':true':false':ok'3(_b9884)) →RΩ(1)
mark'(diff'(_gen_0':mark':true':false':ok'3(+(1, _$n8092)), _gen_0':mark':true':false':ok'3(_b9884))) →IH
mark'(_*4)

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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)
diff'(_gen_0':mark':true':false':ok'3(+(1, _n8091)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n8091)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
p', active', proper', top'

They will be analysed ascendingly in the following order:
p' < active'
active' < top'
p' < proper'
proper' < top'


Proved the following rewrite lemma:
p'(_gen_0':mark':true':false':ok'3(+(1, _n11667))) → _*4, rt ∈ Ω(n11667)

Induction Base:
p'(_gen_0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
p'(_gen_0':mark':true':false':ok'3(+(1, +(_$n11668, 1)))) →RΩ(1)
mark'(p'(_gen_0':mark':true':false':ok'3(+(1, _$n11668)))) →IH
mark'(_*4)

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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)
diff'(_gen_0':mark':true':false':ok'3(+(1, _n8091)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n8091)
p'(_gen_0':mark':true':false':ok'3(+(1, _n11667))) → _*4, rt ∈ Ω(n11667)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
active', proper', top'

They will be analysed ascendingly in the following order:
active' < top'
proper' < top'


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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)
diff'(_gen_0':mark':true':false':ok'3(+(1, _n8091)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n8091)
p'(_gen_0':mark':true':false':ok'3(+(1, _n11667))) → _*4, rt ∈ Ω(n11667)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
proper', top'

They will be analysed ascendingly in the following order:
proper' < top'


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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)
diff'(_gen_0':mark':true':false':ok'3(+(1, _n8091)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n8091)
p'(_gen_0':mark':true':false':ok'3(+(1, _n11667))) → _*4, rt ∈ Ω(n11667)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
top'


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


Rules:
active'(p'(0')) → mark'(0')
active'(p'(s'(X))) → mark'(X)
active'(leq'(0', Y)) → mark'(true')
active'(leq'(s'(X), 0')) → mark'(false')
active'(leq'(s'(X), s'(Y))) → mark'(leq'(X, Y))
active'(if'(true', X, Y)) → mark'(X)
active'(if'(false', X, Y)) → mark'(Y)
active'(diff'(X, Y)) → mark'(if'(leq'(X, Y), 0', s'(diff'(p'(X), Y))))
active'(p'(X)) → p'(active'(X))
active'(s'(X)) → s'(active'(X))
active'(leq'(X1, X2)) → leq'(active'(X1), X2)
active'(leq'(X1, X2)) → leq'(X1, active'(X2))
active'(if'(X1, X2, X3)) → if'(active'(X1), X2, X3)
active'(diff'(X1, X2)) → diff'(active'(X1), X2)
active'(diff'(X1, X2)) → diff'(X1, active'(X2))
p'(mark'(X)) → mark'(p'(X))
s'(mark'(X)) → mark'(s'(X))
leq'(mark'(X1), X2) → mark'(leq'(X1, X2))
leq'(X1, mark'(X2)) → mark'(leq'(X1, X2))
if'(mark'(X1), X2, X3) → mark'(if'(X1, X2, X3))
diff'(mark'(X1), X2) → mark'(diff'(X1, X2))
diff'(X1, mark'(X2)) → mark'(diff'(X1, X2))
proper'(p'(X)) → p'(proper'(X))
proper'(0') → ok'(0')
proper'(s'(X)) → s'(proper'(X))
proper'(leq'(X1, X2)) → leq'(proper'(X1), proper'(X2))
proper'(true') → ok'(true')
proper'(false') → ok'(false')
proper'(if'(X1, X2, X3)) → if'(proper'(X1), proper'(X2), proper'(X3))
proper'(diff'(X1, X2)) → diff'(proper'(X1), proper'(X2))
p'(ok'(X)) → ok'(p'(X))
s'(ok'(X)) → ok'(s'(X))
leq'(ok'(X1), ok'(X2)) → ok'(leq'(X1, X2))
if'(ok'(X1), ok'(X2), ok'(X3)) → ok'(if'(X1, X2, X3))
diff'(ok'(X1), ok'(X2)) → ok'(diff'(X1, X2))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
p' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
0' :: 0':mark':true':false':ok'
mark' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
s' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
leq' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
true' :: 0':mark':true':false':ok'
false' :: 0':mark':true':false':ok'
if' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
diff' :: 0':mark':true':false':ok' → 0':mark':true':false':ok' → 0':mark':true':false':ok'
proper' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
ok' :: 0':mark':true':false':ok' → 0':mark':true':false':ok'
top' :: 0':mark':true':false':ok' → top'
_hole_0':mark':true':false':ok'1 :: 0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_0':mark':true':false':ok'3 :: Nat → 0':mark':true':false':ok'

Lemmas:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)
if'(_gen_0':mark':true':false':ok'3(+(1, _n2477)), _gen_0':mark':true':false':ok'3(b), _gen_0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n2477)
s'(_gen_0':mark':true':false':ok'3(+(1, _n6257))) → _*4, rt ∈ Ω(n6257)
diff'(_gen_0':mark':true':false':ok'3(+(1, _n8091)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n8091)
p'(_gen_0':mark':true':false':ok'3(+(1, _n11667))) → _*4, rt ∈ Ω(n11667)

Generator Equations:
_gen_0':mark':true':false':ok'3(0) ⇔ 0'
_gen_0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_0':mark':true':false':ok'3(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
leq'(_gen_0':mark':true':false':ok'3(+(1, _n5)), _gen_0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5)