(VAR N X Y XS)
(STRATEGY CONTEXTSENSITIVE 
  (fib 1)
  (sel 1 2)
  (fib1 1 2)
  (s 1)
  (0)
  (cons 1)
  (add 1 2)
)
(RULES 
fib(N) -> sel(N,fib1(s(0),s(0)))
fib1(X,Y) -> cons(X,fib1(Y,add(X,Y)))
add(0,X) -> X
add(s(X),Y) -> s(add(X,Y))
sel(0,cons(X,XS)) -> X
sel(s(N),cons(X,XS)) -> sel(N,XS)
)

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 Ex8_BLR02:

-> Dependency pairs:
nF_fib(N) -> nF_sel(N,fib1(s(0),s(0)))
nF_fib(N) -> nF_fib1(s(0),s(0))
nF_add(s(X),Y) -> nF_add(X,Y)
nF_sel(s(N),cons(X,XS)) -> nF_sel(N,XS)
nF_sel(s(N),cons(X,XS)) -> XS

-> Proof of termination for Ex8_BLR02_1_1:
-> -> Dependency pairs in cycle:
nF_sel(s(N),cons(X,XS)) -> nF_sel(N,XS)

Termination proved: Cycles verify subterm criterion.

-> Proof of termination for Ex8_BLR02_1_2:
-> -> Dependency pairs in cycle:
nF_add(s(X),Y) -> nF_add(X,Y)

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.