Runtime Complexity TRS:
The TRS R consists of the following rules:
numbers → d(0)
d(x) → if(le(x, nr), x)
if(true, x) → cons(x, d(s(x)))
if(false, x) → nil
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
nr → ack(s(s(s(s(s(s(0)))))), 0)
ack(0, x) → s(x)
ack(s(x), 0) → ack(x, s(0))
ack(s(x), s(y)) → ack(x, ack(s(x), y))
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(x, d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Sliced the following arguments:
cons'/0
Runtime Complexity TRS:
The TRS R consists of the following rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Infered types.
Rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Types:
numbers' :: cons':nil'
d' :: 0':s' → cons':nil'
0' :: 0':s'
if' :: true':false' → 0':s' → cons':nil'
le' :: 0':s' → 0':s' → true':false'
nr' :: 0':s'
true' :: true':false'
cons' :: cons':nil' → cons':nil'
s' :: 0':s' → 0':s'
false' :: true':false'
nil' :: cons':nil'
ack' :: 0':s' → 0':s' → 0':s'
_hole_cons':nil'1 :: cons':nil'
_hole_0':s'2 :: 0':s'
_hole_true':false'3 :: true':false'
_gen_cons':nil'4 :: Nat → cons':nil'
_gen_0':s'5 :: Nat → 0':s'
Heuristically decided to analyse the following defined symbols:
d', le', ack'
They will be analysed ascendingly in the following order:
le' < d'
Rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Types:
numbers' :: cons':nil'
d' :: 0':s' → cons':nil'
0' :: 0':s'
if' :: true':false' → 0':s' → cons':nil'
le' :: 0':s' → 0':s' → true':false'
nr' :: 0':s'
true' :: true':false'
cons' :: cons':nil' → cons':nil'
s' :: 0':s' → 0':s'
false' :: true':false'
nil' :: cons':nil'
ack' :: 0':s' → 0':s' → 0':s'
_hole_cons':nil'1 :: cons':nil'
_hole_0':s'2 :: 0':s'
_hole_true':false'3 :: true':false'
_gen_cons':nil'4 :: Nat → cons':nil'
_gen_0':s'5 :: Nat → 0':s'
Generator Equations:
_gen_cons':nil'4(0) ⇔ nil'
_gen_cons':nil'4(+(x, 1)) ⇔ cons'(_gen_cons':nil'4(x))
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
The following defined symbols remain to be analysed:
le', d', ack'
They will be analysed ascendingly in the following order:
le' < d'
Proved the following rewrite lemma:
le'(_gen_0':s'5(_n7), _gen_0':s'5(_n7)) → true', rt ∈ Ω(1 + n7)
Induction Base:
le'(_gen_0':s'5(0), _gen_0':s'5(0)) →RΩ(1)
true'
Induction Step:
le'(_gen_0':s'5(+(_$n8, 1)), _gen_0':s'5(+(_$n8, 1))) →RΩ(1)
le'(_gen_0':s'5(_$n8), _gen_0':s'5(_$n8)) →IH
true'
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Types:
numbers' :: cons':nil'
d' :: 0':s' → cons':nil'
0' :: 0':s'
if' :: true':false' → 0':s' → cons':nil'
le' :: 0':s' → 0':s' → true':false'
nr' :: 0':s'
true' :: true':false'
cons' :: cons':nil' → cons':nil'
s' :: 0':s' → 0':s'
false' :: true':false'
nil' :: cons':nil'
ack' :: 0':s' → 0':s' → 0':s'
_hole_cons':nil'1 :: cons':nil'
_hole_0':s'2 :: 0':s'
_hole_true':false'3 :: true':false'
_gen_cons':nil'4 :: Nat → cons':nil'
_gen_0':s'5 :: Nat → 0':s'
Lemmas:
le'(_gen_0':s'5(_n7), _gen_0':s'5(_n7)) → true', rt ∈ Ω(1 + n7)
Generator Equations:
_gen_cons':nil'4(0) ⇔ nil'
_gen_cons':nil'4(+(x, 1)) ⇔ cons'(_gen_cons':nil'4(x))
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
The following defined symbols remain to be analysed:
d', ack'
Could not prove a rewrite lemma for the defined symbol d'.
Rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Types:
numbers' :: cons':nil'
d' :: 0':s' → cons':nil'
0' :: 0':s'
if' :: true':false' → 0':s' → cons':nil'
le' :: 0':s' → 0':s' → true':false'
nr' :: 0':s'
true' :: true':false'
cons' :: cons':nil' → cons':nil'
s' :: 0':s' → 0':s'
false' :: true':false'
nil' :: cons':nil'
ack' :: 0':s' → 0':s' → 0':s'
_hole_cons':nil'1 :: cons':nil'
_hole_0':s'2 :: 0':s'
_hole_true':false'3 :: true':false'
_gen_cons':nil'4 :: Nat → cons':nil'
_gen_0':s'5 :: Nat → 0':s'
Lemmas:
le'(_gen_0':s'5(_n7), _gen_0':s'5(_n7)) → true', rt ∈ Ω(1 + n7)
Generator Equations:
_gen_cons':nil'4(0) ⇔ nil'
_gen_cons':nil'4(+(x, 1)) ⇔ cons'(_gen_cons':nil'4(x))
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
The following defined symbols remain to be analysed:
ack'
Proved the following rewrite lemma:
ack'(_gen_0':s'5(1), _gen_0':s'5(+(1, _n1727))) → _*6, rt ∈ Ω(n1727)
Induction Base:
ack'(_gen_0':s'5(1), _gen_0':s'5(+(1, 0)))
Induction Step:
ack'(_gen_0':s'5(1), _gen_0':s'5(+(1, +(_$n1728, 1)))) →RΩ(1)
ack'(_gen_0':s'5(0), ack'(s'(_gen_0':s'5(0)), _gen_0':s'5(+(1, _$n1728)))) →IH
ack'(_gen_0':s'5(0), _*6)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
numbers' → d'(0')
d'(x) → if'(le'(x, nr'), x)
if'(true', x) → cons'(d'(s'(x)))
if'(false', x) → nil'
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
nr' → ack'(s'(s'(s'(s'(s'(s'(0')))))), 0')
ack'(0', x) → s'(x)
ack'(s'(x), 0') → ack'(x, s'(0'))
ack'(s'(x), s'(y)) → ack'(x, ack'(s'(x), y))
Types:
numbers' :: cons':nil'
d' :: 0':s' → cons':nil'
0' :: 0':s'
if' :: true':false' → 0':s' → cons':nil'
le' :: 0':s' → 0':s' → true':false'
nr' :: 0':s'
true' :: true':false'
cons' :: cons':nil' → cons':nil'
s' :: 0':s' → 0':s'
false' :: true':false'
nil' :: cons':nil'
ack' :: 0':s' → 0':s' → 0':s'
_hole_cons':nil'1 :: cons':nil'
_hole_0':s'2 :: 0':s'
_hole_true':false'3 :: true':false'
_gen_cons':nil'4 :: Nat → cons':nil'
_gen_0':s'5 :: Nat → 0':s'
Lemmas:
le'(_gen_0':s'5(_n7), _gen_0':s'5(_n7)) → true', rt ∈ Ω(1 + n7)
ack'(_gen_0':s'5(1), _gen_0':s'5(+(1, _n1727))) → _*6, rt ∈ Ω(n1727)
Generator Equations:
_gen_cons':nil'4(0) ⇔ nil'
_gen_cons':nil'4(+(x, 1)) ⇔ cons'(_gen_cons':nil'4(x))
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
le'(_gen_0':s'5(_n7), _gen_0':s'5(_n7)) → true', rt ∈ Ω(1 + n7)