(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
plus(s(s(x)), y) → s(plus(x, s(y)))
plus(x, s(s(y))) → s(plus(s(x), y))
plus(s(0), y) → s(y)
plus(0, y) → y
ack(0, y) → s(y)
ack(s(x), 0) → ack(x, s(0))
ack(s(x), s(y)) → ack(x, plus(y, ack(s(x), y)))
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:
plus(s(s(x)), y) → s(plus(x, s(y)))
plus(x, s(s(y))) → s(plus(s(x), y))
plus(s(0'), y) → s(y)
plus(0', y) → y
ack(0', y) → s(y)
ack(s(x), 0') → ack(x, s(0'))
ack(s(x), s(y)) → ack(x, plus(y, ack(s(x), y)))
S is empty.
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
plus(s(s(x)), y) → s(plus(x, s(y)))
plus(x, s(s(y))) → s(plus(s(x), y))
plus(s(0'), y) → s(y)
plus(0', y) → y
ack(0', y) → s(y)
ack(s(x), 0') → ack(x, s(0'))
ack(s(x), s(y)) → ack(x, plus(y, ack(s(x), y)))
Types:
plus :: s:0' → s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
ack :: s:0' → s:0' → s:0'
hole_s:0'1_0 :: s:0'
gen_s:0'2_0 :: Nat → s:0'
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
plus,
ackThey will be analysed ascendingly in the following order:
plus < ack
(6) Obligation:
Innermost TRS:
Rules:
plus(
s(
s(
x)),
y) →
s(
plus(
x,
s(
y)))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
s(
0'),
y) →
s(
y)
plus(
0',
y) →
yack(
0',
y) →
s(
y)
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
plus(
y,
ack(
s(
x),
y)))
Types:
plus :: s:0' → s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
ack :: s:0' → s:0' → s:0'
hole_s:0'1_0 :: s:0'
gen_s:0'2_0 :: Nat → s:0'
Generator Equations:
gen_s:0'2_0(0) ⇔ 0'
gen_s:0'2_0(+(x, 1)) ⇔ s(gen_s:0'2_0(x))
The following defined symbols remain to be analysed:
plus, ack
They will be analysed ascendingly in the following order:
plus < ack
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
plus(
gen_s:0'2_0(
+(
1,
*(
2,
n4_0))),
gen_s:0'2_0(
b)) →
gen_s:0'2_0(
+(
+(
1,
*(
2,
n4_0)),
b)), rt ∈ Ω(1 + n4
0)
Induction Base:
plus(gen_s:0'2_0(+(1, *(2, 0))), gen_s:0'2_0(b)) →RΩ(1)
s(gen_s:0'2_0(b))
Induction Step:
plus(gen_s:0'2_0(+(1, *(2, +(n4_0, 1)))), gen_s:0'2_0(b)) →RΩ(1)
s(plus(gen_s:0'2_0(+(1, *(2, n4_0))), s(gen_s:0'2_0(b)))) →IH
s(gen_s:0'2_0(+(+(1, +(b, 1)), *(2, c5_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
plus(
s(
s(
x)),
y) →
s(
plus(
x,
s(
y)))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
s(
0'),
y) →
s(
y)
plus(
0',
y) →
yack(
0',
y) →
s(
y)
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
plus(
y,
ack(
s(
x),
y)))
Types:
plus :: s:0' → s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
ack :: s:0' → s:0' → s:0'
hole_s:0'1_0 :: s:0'
gen_s:0'2_0 :: Nat → s:0'
Lemmas:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
Generator Equations:
gen_s:0'2_0(0) ⇔ 0'
gen_s:0'2_0(+(x, 1)) ⇔ s(gen_s:0'2_0(x))
The following defined symbols remain to be analysed:
ack
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
ack(
gen_s:0'2_0(
1),
gen_s:0'2_0(
+(
1,
n861_0))) →
*3_0, rt ∈ Ω(n861
0)
Induction Base:
ack(gen_s:0'2_0(1), gen_s:0'2_0(+(1, 0)))
Induction Step:
ack(gen_s:0'2_0(1), gen_s:0'2_0(+(1, +(n861_0, 1)))) →RΩ(1)
ack(gen_s:0'2_0(0), plus(gen_s:0'2_0(+(1, n861_0)), ack(s(gen_s:0'2_0(0)), gen_s:0'2_0(+(1, n861_0))))) →IH
ack(gen_s:0'2_0(0), plus(gen_s:0'2_0(+(1, n861_0)), *3_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
plus(
s(
s(
x)),
y) →
s(
plus(
x,
s(
y)))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
s(
0'),
y) →
s(
y)
plus(
0',
y) →
yack(
0',
y) →
s(
y)
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
plus(
y,
ack(
s(
x),
y)))
Types:
plus :: s:0' → s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
ack :: s:0' → s:0' → s:0'
hole_s:0'1_0 :: s:0'
gen_s:0'2_0 :: Nat → s:0'
Lemmas:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
ack(gen_s:0'2_0(1), gen_s:0'2_0(+(1, n861_0))) → *3_0, rt ∈ Ω(n8610)
Generator Equations:
gen_s:0'2_0(0) ⇔ 0'
gen_s:0'2_0(+(x, 1)) ⇔ s(gen_s:0'2_0(x))
No more defined symbols left to analyse.
(13) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
(14) BOUNDS(n^1, INF)
(15) Obligation:
Innermost TRS:
Rules:
plus(
s(
s(
x)),
y) →
s(
plus(
x,
s(
y)))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
s(
0'),
y) →
s(
y)
plus(
0',
y) →
yack(
0',
y) →
s(
y)
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
plus(
y,
ack(
s(
x),
y)))
Types:
plus :: s:0' → s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
ack :: s:0' → s:0' → s:0'
hole_s:0'1_0 :: s:0'
gen_s:0'2_0 :: Nat → s:0'
Lemmas:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
ack(gen_s:0'2_0(1), gen_s:0'2_0(+(1, n861_0))) → *3_0, rt ∈ Ω(n8610)
Generator Equations:
gen_s:0'2_0(0) ⇔ 0'
gen_s:0'2_0(+(x, 1)) ⇔ s(gen_s:0'2_0(x))
No more defined symbols left to analyse.
(16) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
(17) BOUNDS(n^1, INF)
(18) Obligation:
Innermost TRS:
Rules:
plus(
s(
s(
x)),
y) →
s(
plus(
x,
s(
y)))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
s(
0'),
y) →
s(
y)
plus(
0',
y) →
yack(
0',
y) →
s(
y)
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
plus(
y,
ack(
s(
x),
y)))
Types:
plus :: s:0' → s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
ack :: s:0' → s:0' → s:0'
hole_s:0'1_0 :: s:0'
gen_s:0'2_0 :: Nat → s:0'
Lemmas:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
Generator Equations:
gen_s:0'2_0(0) ⇔ 0'
gen_s:0'2_0(+(x, 1)) ⇔ s(gen_s:0'2_0(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_s:0'2_0(+(1, *(2, n4_0))), gen_s:0'2_0(b)) → gen_s:0'2_0(+(+(1, *(2, n4_0)), b)), rt ∈ Ω(1 + n40)
(20) BOUNDS(n^1, INF)