(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
+(0, y) → y
+(s(x), y) → s(+(x, y))
+(p(x), y) → p(+(x, y))
minus(0) → 0
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*(0, y) → 0
*(s(x), y) → +(*(x, y), y)
*(p(x), y) → +(*(x, y), minus(y))
Rewrite Strategy: FULL
(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:
+'(0', y) → y
+'(s(x), y) → s(+'(x, y))
+'(p(x), y) → p(+'(x, y))
minus(0') → 0'
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*'(0', y) → 0'
*'(s(x), y) → +'(*'(x, y), y)
*'(p(x), y) → +'(*'(x, y), minus(y))
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
+'(0', y) → y
+'(s(x), y) → s(+'(x, y))
+'(p(x), y) → p(+'(x, y))
minus(0') → 0'
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*'(0', y) → 0'
*'(s(x), y) → +'(*'(x, y), y)
*'(p(x), y) → +'(*'(x, y), minus(y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
+',
minus,
*'They will be analysed ascendingly in the following order:
+' < *'
minus < *'
(6) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
The following defined symbols remain to be analysed:
+', minus, *'
They will be analysed ascendingly in the following order:
+' < *'
minus < *'
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
+'(
gen_0':s:p2_0(
n4_0),
gen_0':s:p2_0(
b)) →
gen_0':s:p2_0(
+(
n4_0,
b)), rt ∈ Ω(1 + n4
0)
Induction Base:
+'(gen_0':s:p2_0(0), gen_0':s:p2_0(b)) →RΩ(1)
gen_0':s:p2_0(b)
Induction Step:
+'(gen_0':s:p2_0(+(n4_0, 1)), gen_0':s:p2_0(b)) →RΩ(1)
s(+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b))) →IH
s(gen_0':s:p2_0(+(b, c5_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
The following defined symbols remain to be analysed:
minus, *'
They will be analysed ascendingly in the following order:
minus < *'
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
minus(
gen_0':s:p2_0(
+(
1,
n595_0))) →
*3_0, rt ∈ Ω(n595
0)
Induction Base:
minus(gen_0':s:p2_0(+(1, 0)))
Induction Step:
minus(gen_0':s:p2_0(+(1, +(n595_0, 1)))) →RΩ(1)
p(minus(gen_0':s:p2_0(+(1, n595_0)))) →IH
p(*3_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
The following defined symbols remain to be analysed:
*'
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
*'(
gen_0':s:p2_0(
n1725_0),
gen_0':s:p2_0(
b)) →
gen_0':s:p2_0(
*(
n1725_0,
b)), rt ∈ Ω(1 + b·n1725
02 + n1725
0)
Induction Base:
*'(gen_0':s:p2_0(0), gen_0':s:p2_0(b)) →RΩ(1)
0'
Induction Step:
*'(gen_0':s:p2_0(+(n1725_0, 1)), gen_0':s:p2_0(b)) →RΩ(1)
+'(*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)), gen_0':s:p2_0(b)) →IH
+'(gen_0':s:p2_0(*(c1726_0, b)), gen_0':s:p2_0(b)) →LΩ(1 + b·n17250)
gen_0':s:p2_0(+(*(n1725_0, b), b))
We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).
(14) Complex Obligation (BEST)
(15) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(16) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
(17) BOUNDS(n^3, INF)
(18) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
(20) BOUNDS(n^3, INF)
(21) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
(23) BOUNDS(n^1, INF)
(24) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
(26) BOUNDS(n^1, INF)