(VAR X Z Y)
(STRATEGY CONTEXTSENSITIVE 
  (from 1)
  (cons 1)
  (s 1)
  (first 1 2)
  (0)
  (nil)
  (sel 1 2)
)
(RULES 
from(X) -> cons(X,from(s(X)))
first(0,Z) -> nil
first(s(X),cons(Y,Z)) -> cons(Y,first(X,Z))
sel(0,cons(X,Z)) -> X
sel(s(X),cons(Y,Z)) -> sel(X,Z)
)

The TRS is orthogonal, thus termination of innermost context-sensitive rewriting is equivalent to termination of context-sensitive rewriting.

Proving termination of context-sensitive rewriting for Ex1_Luc02b:

-> Dependency pairs:
nF_sel(s(X),cons(Y,Z)) -> nF_sel(X,Z)
nF_sel(s(X),cons(Y,Z)) -> Z

-> Proof of termination for Ex1_Luc02b_1:
-> -> Dependency pairs in cycle:
nF_sel(s(X),cons(Y,Z)) -> nF_sel(X,Z)

Termination proved: Cycles verify subterm criterion.

SETTINGS:
Base ordering: Polynomial ordering
Proof mode: SCCs in CSDG + base ordering
Upper bound for coeffs: 1
Rationals below 1 for all non-replacing args: No
Polynomial interpretation: Linear
Coeffs in polynomials: No rationals
Delta: automatic



Termination was proved succesfully.