(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(s(X)))
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(n__from(X)) → from(X)
activate(X) → X
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
activate(n__first(s(X6722_3), cons(Y6723_3, Z6724_3))) →+ cons(Y6723_3, n__first(X6722_3, activate(Z6724_3)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1,1].
The pumping substitution is [Z6724_3 / n__first(s(X6722_3), cons(Y6723_3, Z6724_3))].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(s(X)))
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(n__from(X)) → from(X)
activate(X) → X
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(s(X)))
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(n__from(X)) → from(X)
activate(X) → X
Types:
first :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
0' :: 0':s
nil :: nil:cons:n__first:n__from
s :: 0':s → 0':s
cons :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
n__first :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
activate :: nil:cons:n__first:n__from → nil:cons:n__first:n__from
from :: 0':s → nil:cons:n__first:n__from
n__from :: 0':s → nil:cons:n__first:n__from
hole_nil:cons:n__first:n__from1_0 :: nil:cons:n__first:n__from
hole_0':s2_0 :: 0':s
gen_nil:cons:n__first:n__from3_0 :: Nat → nil:cons:n__first:n__from
gen_0':s4_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
activate
(8) Obligation:
Innermost TRS:
Rules:
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
from(
X) →
cons(
X,
n__from(
s(
X)))
first(
X1,
X2) →
n__first(
X1,
X2)
from(
X) →
n__from(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
n__from(
X)) →
from(
X)
activate(
X) →
XTypes:
first :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
0' :: 0':s
nil :: nil:cons:n__first:n__from
s :: 0':s → 0':s
cons :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
n__first :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
activate :: nil:cons:n__first:n__from → nil:cons:n__first:n__from
from :: 0':s → nil:cons:n__first:n__from
n__from :: 0':s → nil:cons:n__first:n__from
hole_nil:cons:n__first:n__from1_0 :: nil:cons:n__first:n__from
hole_0':s2_0 :: 0':s
gen_nil:cons:n__first:n__from3_0 :: Nat → nil:cons:n__first:n__from
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons:n__first:n__from3_0(0) ⇔ n__from(0')
gen_nil:cons:n__first:n__from3_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:n__first:n__from3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
activate
(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol activate.
(10) Obligation:
Innermost TRS:
Rules:
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
from(
X) →
cons(
X,
n__from(
s(
X)))
first(
X1,
X2) →
n__first(
X1,
X2)
from(
X) →
n__from(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
n__from(
X)) →
from(
X)
activate(
X) →
XTypes:
first :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
0' :: 0':s
nil :: nil:cons:n__first:n__from
s :: 0':s → 0':s
cons :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
n__first :: 0':s → nil:cons:n__first:n__from → nil:cons:n__first:n__from
activate :: nil:cons:n__first:n__from → nil:cons:n__first:n__from
from :: 0':s → nil:cons:n__first:n__from
n__from :: 0':s → nil:cons:n__first:n__from
hole_nil:cons:n__first:n__from1_0 :: nil:cons:n__first:n__from
hole_0':s2_0 :: 0':s
gen_nil:cons:n__first:n__from3_0 :: Nat → nil:cons:n__first:n__from
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons:n__first:n__from3_0(0) ⇔ n__from(0')
gen_nil:cons:n__first:n__from3_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:n__first:n__from3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.