(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
terms(N) → cons(recip(sqr(N)), terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0) → 0
dbl(s(X)) → s(s(dbl(X)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
half(0) → 0
half(s(0)) → 0
half(s(s(X))) → s(half(X))
half(dbl(X)) → X
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:
terms(N) → cons(recip(sqr(N)), terms(s(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
half(0') → 0'
half(s(0')) → 0'
half(s(s(X))) → s(half(X))
half(dbl(X)) → X
S is empty.
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)), terms(s(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
half(0') → 0'
half(s(0')) → 0'
half(s(s(X))) → s(half(X))
half(dbl(X)) → X
Types:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
terms,
sqr,
add,
dbl,
first,
halfThey will be analysed ascendingly in the following order:
sqr < terms
add < sqr
dbl < sqr
(6) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
add, terms, sqr, dbl, first, half
They will be analysed ascendingly in the following order:
sqr < terms
add < sqr
dbl < sqr
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
add(
gen_s:0'5_0(
n7_0),
gen_s:0'5_0(
b)) →
gen_s:0'5_0(
+(
n7_0,
b)), rt ∈ Ω(1 + n7
0)
Induction Base:
add(gen_s:0'5_0(0), gen_s:0'5_0(b)) →RΩ(1)
gen_s:0'5_0(b)
Induction Step:
add(gen_s:0'5_0(+(n7_0, 1)), gen_s:0'5_0(b)) →RΩ(1)
s(add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b))) →IH
s(gen_s:0'5_0(+(b, c8_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
dbl, terms, sqr, first, half
They will be analysed ascendingly in the following order:
sqr < terms
dbl < sqr
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
dbl(
gen_s:0'5_0(
n870_0)) →
gen_s:0'5_0(
*(
2,
n870_0)), rt ∈ Ω(1 + n870
0)
Induction Base:
dbl(gen_s:0'5_0(0)) →RΩ(1)
0'
Induction Step:
dbl(gen_s:0'5_0(+(n870_0, 1))) →RΩ(1)
s(s(dbl(gen_s:0'5_0(n870_0)))) →IH
s(s(gen_s:0'5_0(*(2, c871_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
sqr, terms, first, half
They will be analysed ascendingly in the following order:
sqr < terms
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
sqr(
gen_s:0'5_0(
n1212_0)) →
gen_s:0'5_0(
*(
n1212_0,
n1212_0)), rt ∈ Ω(1 + n1212
0 + n1212
02 + n1212
03)
Induction Base:
sqr(gen_s:0'5_0(0)) →RΩ(1)
0'
Induction Step:
sqr(gen_s:0'5_0(+(n1212_0, 1))) →RΩ(1)
s(add(sqr(gen_s:0'5_0(n1212_0)), dbl(gen_s:0'5_0(n1212_0)))) →IH
s(add(gen_s:0'5_0(*(c1213_0, c1213_0)), dbl(gen_s:0'5_0(n1212_0)))) →LΩ(1 + n12120)
s(add(gen_s:0'5_0(*(n1212_0, n1212_0)), gen_s:0'5_0(*(2, n1212_0)))) →LΩ(1 + n121202)
s(gen_s:0'5_0(+(*(n1212_0, n1212_0), *(2, n1212_0))))
We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).
(14) Complex Obligation (BEST)
(15) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
terms, first, half
(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol terms.
(17) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
first, half
(18) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
first(
gen_s:0'5_0(
n1982_0),
gen_cons:nil4_0(
n1982_0)) →
gen_cons:nil4_0(
n1982_0), rt ∈ Ω(1 + n1982
0)
Induction Base:
first(gen_s:0'5_0(0), gen_cons:nil4_0(0)) →RΩ(1)
nil
Induction Step:
first(gen_s:0'5_0(+(n1982_0, 1)), gen_cons:nil4_0(+(n1982_0, 1))) →RΩ(1)
cons(recip(0'), first(gen_s:0'5_0(n1982_0), gen_cons:nil4_0(n1982_0))) →IH
cons(recip(0'), gen_cons:nil4_0(c1983_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(19) Complex Obligation (BEST)
(20) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
first(gen_s:0'5_0(n1982_0), gen_cons:nil4_0(n1982_0)) → gen_cons:nil4_0(n1982_0), rt ∈ Ω(1 + n19820)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
half
(21) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
half(
gen_s:0'5_0(
*(
2,
n2365_0))) →
gen_s:0'5_0(
n2365_0), rt ∈ Ω(1 + n2365
0)
Induction Base:
half(gen_s:0'5_0(*(2, 0))) →RΩ(1)
0'
Induction Step:
half(gen_s:0'5_0(*(2, +(n2365_0, 1)))) →RΩ(1)
s(half(gen_s:0'5_0(*(2, n2365_0)))) →IH
s(gen_s:0'5_0(c2366_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(22) Complex Obligation (BEST)
(23) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
first(gen_s:0'5_0(n1982_0), gen_cons:nil4_0(n1982_0)) → gen_cons:nil4_0(n1982_0), rt ∈ Ω(1 + n19820)
half(gen_s:0'5_0(*(2, n2365_0))) → gen_s:0'5_0(n2365_0), rt ∈ Ω(1 + n23650)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
(25) BOUNDS(n^3, INF)
(26) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
first(gen_s:0'5_0(n1982_0), gen_cons:nil4_0(n1982_0)) → gen_cons:nil4_0(n1982_0), rt ∈ Ω(1 + n19820)
half(gen_s:0'5_0(*(2, n2365_0))) → gen_s:0'5_0(n2365_0), rt ∈ Ω(1 + n23650)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
(28) BOUNDS(n^3, INF)
(29) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
first(gen_s:0'5_0(n1982_0), gen_cons:nil4_0(n1982_0)) → gen_cons:nil4_0(n1982_0), rt ∈ Ω(1 + n19820)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(30) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
(31) BOUNDS(n^3, INF)
(32) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(33) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_s:0'5_0(n1212_0)) → gen_s:0'5_0(*(n1212_0, n1212_0)), rt ∈ Ω(1 + n12120 + n121202 + n121203)
(34) BOUNDS(n^3, INF)
(35) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n870_0)) → gen_s:0'5_0(*(2, n870_0)), rt ∈ Ω(1 + n8700)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(36) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
(37) BOUNDS(n^1, INF)
(38) Obligation:
Innermost TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
first(
X,
Z))
half(
0') →
0'half(
s(
0')) →
0'half(
s(
s(
X))) →
s(
half(
X))
half(
dbl(
X)) →
XTypes:
terms :: s:0' → cons:nil
cons :: recip → cons:nil → cons:nil
recip :: s:0' → recip
sqr :: s:0' → s:0'
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → cons:nil → cons:nil
nil :: cons:nil
half :: s:0' → s:0'
hole_cons:nil1_0 :: cons:nil
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_cons:nil4_0 :: Nat → cons:nil
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(recip(0'), gen_cons:nil4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(39) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
(40) BOUNDS(n^1, INF)