Runtime Complexity TRS:
The TRS R consists of the following rules:

a__f(X) → cons(mark(X), f(g(X)))
a__g(0) → s(0)
a__g(s(X)) → s(s(a__g(mark(X))))
a__sel(0, cons(X, Y)) → mark(X)
a__sel(s(X), cons(Y, Z)) → a__sel(mark(X), mark(Z))
mark(f(X)) → a__f(mark(X))
mark(g(X)) → a__g(mark(X))
mark(sel(X1, X2)) → a__sel(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__f(X) → f(X)
a__g(X) → g(X)
a__sel(X1, X2) → sel(X1, X2)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

Runtime Complexity TRS:
The TRS R consists of the following rules:

a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Types:
a__f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
cons' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
mark' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
0' :: g':f':cons':0':s':sel'
s' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
_hole_g':f':cons':0':s':sel'1 :: g':f':cons':0':s':sel'
_gen_g':f':cons':0':s':sel'2 :: Nat → g':f':cons':0':s':sel'

Heuristically decided to analyse the following defined symbols:
a__f', mark', a__g', a__sel'

They will be analysed ascendingly in the following order:
a__f' = mark'
a__f' = a__g'
a__f' = a__sel'
mark' = a__g'
mark' = a__sel'
a__g' = a__sel'

Rules:
a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Types:
a__f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
cons' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
mark' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
0' :: g':f':cons':0':s':sel'
s' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
_hole_g':f':cons':0':s':sel'1 :: g':f':cons':0':s':sel'
_gen_g':f':cons':0':s':sel'2 :: Nat → g':f':cons':0':s':sel'

Generator Equations:
_gen_g':f':cons':0':s':sel'2(0) ⇔ 0'
_gen_g':f':cons':0':s':sel'2(+(x, 1)) ⇔ cons'(0', _gen_g':f':cons':0':s':sel'2(x))

The following defined symbols remain to be analysed:
mark', a__f', a__g', a__sel'

They will be analysed ascendingly in the following order:
a__f' = mark'
a__f' = a__g'
a__f' = a__sel'
mark' = a__g'
mark' = a__sel'
a__g' = a__sel'

Could not prove a rewrite lemma for the defined symbol mark'.

Rules:
a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Types:
a__f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
cons' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
mark' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
0' :: g':f':cons':0':s':sel'
s' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
_hole_g':f':cons':0':s':sel'1 :: g':f':cons':0':s':sel'
_gen_g':f':cons':0':s':sel'2 :: Nat → g':f':cons':0':s':sel'

Generator Equations:
_gen_g':f':cons':0':s':sel'2(0) ⇔ 0'
_gen_g':f':cons':0':s':sel'2(+(x, 1)) ⇔ cons'(0', _gen_g':f':cons':0':s':sel'2(x))

The following defined symbols remain to be analysed:
a__f', a__g', a__sel'

They will be analysed ascendingly in the following order:
a__f' = mark'
a__f' = a__g'
a__f' = a__sel'
mark' = a__g'
mark' = a__sel'
a__g' = a__sel'

Could not prove a rewrite lemma for the defined symbol a__f'.

Rules:
a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Types:
a__f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
cons' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
mark' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
0' :: g':f':cons':0':s':sel'
s' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
_hole_g':f':cons':0':s':sel'1 :: g':f':cons':0':s':sel'
_gen_g':f':cons':0':s':sel'2 :: Nat → g':f':cons':0':s':sel'

Generator Equations:
_gen_g':f':cons':0':s':sel'2(0) ⇔ 0'
_gen_g':f':cons':0':s':sel'2(+(x, 1)) ⇔ cons'(0', _gen_g':f':cons':0':s':sel'2(x))

The following defined symbols remain to be analysed:
a__g', a__sel'

They will be analysed ascendingly in the following order:
a__f' = mark'
a__f' = a__g'
a__f' = a__sel'
mark' = a__g'
mark' = a__sel'
a__g' = a__sel'

Could not prove a rewrite lemma for the defined symbol a__g'.

Rules:
a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Types:
a__f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
cons' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
mark' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
0' :: g':f':cons':0':s':sel'
s' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
_hole_g':f':cons':0':s':sel'1 :: g':f':cons':0':s':sel'
_gen_g':f':cons':0':s':sel'2 :: Nat → g':f':cons':0':s':sel'

Generator Equations:
_gen_g':f':cons':0':s':sel'2(0) ⇔ 0'
_gen_g':f':cons':0':s':sel'2(+(x, 1)) ⇔ cons'(0', _gen_g':f':cons':0':s':sel'2(x))

The following defined symbols remain to be analysed:
a__sel'

They will be analysed ascendingly in the following order:
a__f' = mark'
a__f' = a__g'
a__f' = a__sel'
mark' = a__g'
mark' = a__sel'
a__g' = a__sel'

Could not prove a rewrite lemma for the defined symbol a__sel'.

Rules:
a__f'(X) → cons'(mark'(X), f'(g'(X)))
a__g'(0') → s'(0')
a__g'(s'(X)) → s'(s'(a__g'(mark'(X))))
a__sel'(0', cons'(X, Y)) → mark'(X)
a__sel'(s'(X), cons'(Y, Z)) → a__sel'(mark'(X), mark'(Z))
mark'(f'(X)) → a__f'(mark'(X))
mark'(g'(X)) → a__g'(mark'(X))
mark'(sel'(X1, X2)) → a__sel'(mark'(X1), mark'(X2))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__f'(X) → f'(X)
a__g'(X) → g'(X)
a__sel'(X1, X2) → sel'(X1, X2)

Types:
a__f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
cons' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
mark' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
f' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__g' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
0' :: g':f':cons':0':s':sel'
s' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
a__sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
sel' :: g':f':cons':0':s':sel' → g':f':cons':0':s':sel' → g':f':cons':0':s':sel'
_hole_g':f':cons':0':s':sel'1 :: g':f':cons':0':s':sel'
_gen_g':f':cons':0':s':sel'2 :: Nat → g':f':cons':0':s':sel'

Generator Equations:
_gen_g':f':cons':0':s':sel'2(0) ⇔ 0'
_gen_g':f':cons':0':s':sel'2(+(x, 1)) ⇔ cons'(0', _gen_g':f':cons':0':s':sel'2(x))

No more defined symbols left to analyse.