Runtime Complexity TRS:
The TRS R consists of the following rules:
p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
diff(X, Y) → if(leq(X, Y), n__0, n__s(n__diff(n__p(X), Y)))
0 → n__0
s(X) → n__s(X)
diff(X1, X2) → n__diff(X1, X2)
p(X) → n__p(X)
activate(n__0) → 0
activate(n__s(X)) → s(activate(X))
activate(n__diff(X1, X2)) → diff(activate(X1), activate(X2))
activate(n__p(X)) → p(activate(X))
activate(X) → X
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
p'(0') → 0'
p'(s'(X)) → X
leq'(0', Y) → true'
leq'(s'(X), 0') → false'
leq'(s'(X), s'(Y)) → leq'(X, Y)
if'(true', X, Y) → activate'(X)
if'(false', X, Y) → activate'(Y)
diff'(X, Y) → if'(leq'(X, Y), n__0', n__s'(n__diff'(n__p'(X), Y)))
0' → n__0'
s'(X) → n__s'(X)
diff'(X1, X2) → n__diff'(X1, X2)
p'(X) → n__p'(X)
activate'(n__0') → 0'
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__diff'(X1, X2)) → diff'(activate'(X1), activate'(X2))
activate'(n__p'(X)) → p'(activate'(X))
activate'(X) → X
Infered types.
Rules:
p'(0') → 0'
p'(s'(X)) → X
leq'(0', Y) → true'
leq'(s'(X), 0') → false'
leq'(s'(X), s'(Y)) → leq'(X, Y)
if'(true', X, Y) → activate'(X)
if'(false', X, Y) → activate'(Y)
diff'(X, Y) → if'(leq'(X, Y), n__0', n__s'(n__diff'(n__p'(X), Y)))
0' → n__0'
s'(X) → n__s'(X)
diff'(X1, X2) → n__diff'(X1, X2)
p'(X) → n__p'(X)
activate'(n__0') → 0'
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__diff'(X1, X2)) → diff'(activate'(X1), activate'(X2))
activate'(n__p'(X)) → p'(activate'(X))
activate'(X) → X
Types:
p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
0' :: n__0':n__p':n__diff':n__s'
s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
leq' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → true':false'
true' :: true':false'
false' :: true':false'
if' :: true':false' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
activate' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__0' :: n__0':n__p':n__diff':n__s'
n__s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
_hole_n__0':n__p':n__diff':n__s'1 :: n__0':n__p':n__diff':n__s'
_hole_true':false'2 :: true':false'
_gen_n__0':n__p':n__diff':n__s'3 :: Nat → n__0':n__p':n__diff':n__s'
Heuristically decided to analyse the following defined symbols:
leq', activate'
They will be analysed ascendingly in the following order:
leq' < activate'
Rules:
p'(0') → 0'
p'(s'(X)) → X
leq'(0', Y) → true'
leq'(s'(X), 0') → false'
leq'(s'(X), s'(Y)) → leq'(X, Y)
if'(true', X, Y) → activate'(X)
if'(false', X, Y) → activate'(Y)
diff'(X, Y) → if'(leq'(X, Y), n__0', n__s'(n__diff'(n__p'(X), Y)))
0' → n__0'
s'(X) → n__s'(X)
diff'(X1, X2) → n__diff'(X1, X2)
p'(X) → n__p'(X)
activate'(n__0') → 0'
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__diff'(X1, X2)) → diff'(activate'(X1), activate'(X2))
activate'(n__p'(X)) → p'(activate'(X))
activate'(X) → X
Types:
p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
0' :: n__0':n__p':n__diff':n__s'
s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
leq' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → true':false'
true' :: true':false'
false' :: true':false'
if' :: true':false' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
activate' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__0' :: n__0':n__p':n__diff':n__s'
n__s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
_hole_n__0':n__p':n__diff':n__s'1 :: n__0':n__p':n__diff':n__s'
_hole_true':false'2 :: true':false'
_gen_n__0':n__p':n__diff':n__s'3 :: Nat → n__0':n__p':n__diff':n__s'
Generator Equations:
_gen_n__0':n__p':n__diff':n__s'3(0) ⇔ n__0'
_gen_n__0':n__p':n__diff':n__s'3(+(x, 1)) ⇔ n__s'(_gen_n__0':n__p':n__diff':n__s'3(x))
The following defined symbols remain to be analysed:
leq', activate'
They will be analysed ascendingly in the following order:
leq' < activate'
Could not prove a rewrite lemma for the defined symbol leq'.
Rules:
p'(0') → 0'
p'(s'(X)) → X
leq'(0', Y) → true'
leq'(s'(X), 0') → false'
leq'(s'(X), s'(Y)) → leq'(X, Y)
if'(true', X, Y) → activate'(X)
if'(false', X, Y) → activate'(Y)
diff'(X, Y) → if'(leq'(X, Y), n__0', n__s'(n__diff'(n__p'(X), Y)))
0' → n__0'
s'(X) → n__s'(X)
diff'(X1, X2) → n__diff'(X1, X2)
p'(X) → n__p'(X)
activate'(n__0') → 0'
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__diff'(X1, X2)) → diff'(activate'(X1), activate'(X2))
activate'(n__p'(X)) → p'(activate'(X))
activate'(X) → X
Types:
p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
0' :: n__0':n__p':n__diff':n__s'
s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
leq' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → true':false'
true' :: true':false'
false' :: true':false'
if' :: true':false' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
activate' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__0' :: n__0':n__p':n__diff':n__s'
n__s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
_hole_n__0':n__p':n__diff':n__s'1 :: n__0':n__p':n__diff':n__s'
_hole_true':false'2 :: true':false'
_gen_n__0':n__p':n__diff':n__s'3 :: Nat → n__0':n__p':n__diff':n__s'
Generator Equations:
_gen_n__0':n__p':n__diff':n__s'3(0) ⇔ n__0'
_gen_n__0':n__p':n__diff':n__s'3(+(x, 1)) ⇔ n__s'(_gen_n__0':n__p':n__diff':n__s'3(x))
The following defined symbols remain to be analysed:
activate'
Proved the following rewrite lemma:
activate'(_gen_n__0':n__p':n__diff':n__s'3(_n47)) → _gen_n__0':n__p':n__diff':n__s'3(_n47), rt ∈ Ω(1 + n47)
Induction Base:
activate'(_gen_n__0':n__p':n__diff':n__s'3(0)) →RΩ(1)
_gen_n__0':n__p':n__diff':n__s'3(0)
Induction Step:
activate'(_gen_n__0':n__p':n__diff':n__s'3(+(_$n48, 1))) →RΩ(1)
s'(activate'(_gen_n__0':n__p':n__diff':n__s'3(_$n48))) →IH
s'(_gen_n__0':n__p':n__diff':n__s'3(_$n48)) →RΩ(1)
n__s'(_gen_n__0':n__p':n__diff':n__s'3(_$n48))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
p'(0') → 0'
p'(s'(X)) → X
leq'(0', Y) → true'
leq'(s'(X), 0') → false'
leq'(s'(X), s'(Y)) → leq'(X, Y)
if'(true', X, Y) → activate'(X)
if'(false', X, Y) → activate'(Y)
diff'(X, Y) → if'(leq'(X, Y), n__0', n__s'(n__diff'(n__p'(X), Y)))
0' → n__0'
s'(X) → n__s'(X)
diff'(X1, X2) → n__diff'(X1, X2)
p'(X) → n__p'(X)
activate'(n__0') → 0'
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__diff'(X1, X2)) → diff'(activate'(X1), activate'(X2))
activate'(n__p'(X)) → p'(activate'(X))
activate'(X) → X
Types:
p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
0' :: n__0':n__p':n__diff':n__s'
s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
leq' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → true':false'
true' :: true':false'
false' :: true':false'
if' :: true':false' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
activate' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__0' :: n__0':n__p':n__diff':n__s'
n__s' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__diff' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
n__p' :: n__0':n__p':n__diff':n__s' → n__0':n__p':n__diff':n__s'
_hole_n__0':n__p':n__diff':n__s'1 :: n__0':n__p':n__diff':n__s'
_hole_true':false'2 :: true':false'
_gen_n__0':n__p':n__diff':n__s'3 :: Nat → n__0':n__p':n__diff':n__s'
Lemmas:
activate'(_gen_n__0':n__p':n__diff':n__s'3(_n47)) → _gen_n__0':n__p':n__diff':n__s'3(_n47), rt ∈ Ω(1 + n47)
Generator Equations:
_gen_n__0':n__p':n__diff':n__s'3(0) ⇔ n__0'
_gen_n__0':n__p':n__diff':n__s'3(+(x, 1)) ⇔ n__s'(_gen_n__0':n__p':n__diff':n__s'3(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
activate'(_gen_n__0':n__p':n__diff':n__s'3(_n47)) → _gen_n__0':n__p':n__diff':n__s'3(_n47), rt ∈ Ω(1 + n47)