YES

We show the termination of the TRS R:

  natsFrom(N) -> cons(N,n__natsFrom(n__s(N)))
  fst(pair(XS,YS)) -> XS
  snd(pair(XS,YS)) -> YS
  splitAt(|0|(),XS) -> pair(nil(),XS)
  splitAt(s(N),cons(X,XS)) -> u(splitAt(N,activate(XS)),N,X,activate(XS))
  u(pair(YS,ZS),N,X,XS) -> pair(cons(activate(X),YS),ZS)
  head(cons(N,XS)) -> N
  tail(cons(N,XS)) -> activate(XS)
  sel(N,XS) -> head(afterNth(N,XS))
  take(N,XS) -> fst(splitAt(N,XS))
  afterNth(N,XS) -> snd(splitAt(N,XS))
  natsFrom(X) -> n__natsFrom(X)
  s(X) -> n__s(X)
  activate(n__natsFrom(X)) -> natsFrom(activate(X))
  activate(n__s(X)) -> s(activate(X))
  activate(X) -> X

-- SCC decomposition.

Consider the dependency pair problem (P, R), where P consists of

p1: splitAt#(s(N),cons(X,XS)) -> u#(splitAt(N,activate(XS)),N,X,activate(XS))
p2: splitAt#(s(N),cons(X,XS)) -> splitAt#(N,activate(XS))
p3: splitAt#(s(N),cons(X,XS)) -> activate#(XS)
p4: u#(pair(YS,ZS),N,X,XS) -> activate#(X)
p5: tail#(cons(N,XS)) -> activate#(XS)
p6: sel#(N,XS) -> head#(afterNth(N,XS))
p7: sel#(N,XS) -> afterNth#(N,XS)
p8: take#(N,XS) -> fst#(splitAt(N,XS))
p9: take#(N,XS) -> splitAt#(N,XS)
p10: afterNth#(N,XS) -> snd#(splitAt(N,XS))
p11: afterNth#(N,XS) -> splitAt#(N,XS)
p12: activate#(n__natsFrom(X)) -> natsFrom#(activate(X))
p13: activate#(n__natsFrom(X)) -> activate#(X)
p14: activate#(n__s(X)) -> s#(activate(X))
p15: activate#(n__s(X)) -> activate#(X)

and R consists of:

r1: natsFrom(N) -> cons(N,n__natsFrom(n__s(N)))
r2: fst(pair(XS,YS)) -> XS
r3: snd(pair(XS,YS)) -> YS
r4: splitAt(|0|(),XS) -> pair(nil(),XS)
r5: splitAt(s(N),cons(X,XS)) -> u(splitAt(N,activate(XS)),N,X,activate(XS))
r6: u(pair(YS,ZS),N,X,XS) -> pair(cons(activate(X),YS),ZS)
r7: head(cons(N,XS)) -> N
r8: tail(cons(N,XS)) -> activate(XS)
r9: sel(N,XS) -> head(afterNth(N,XS))
r10: take(N,XS) -> fst(splitAt(N,XS))
r11: afterNth(N,XS) -> snd(splitAt(N,XS))
r12: natsFrom(X) -> n__natsFrom(X)
r13: s(X) -> n__s(X)
r14: activate(n__natsFrom(X)) -> natsFrom(activate(X))
r15: activate(n__s(X)) -> s(activate(X))
r16: activate(X) -> X

The estimated dependency graph contains the following SCCs:

  {p2}
  {p13, p15}


-- Reduction pair.

Consider the dependency pair problem (P, R), where P consists of

p1: splitAt#(s(N),cons(X,XS)) -> splitAt#(N,activate(XS))

and R consists of:

r1: natsFrom(N) -> cons(N,n__natsFrom(n__s(N)))
r2: fst(pair(XS,YS)) -> XS
r3: snd(pair(XS,YS)) -> YS
r4: splitAt(|0|(),XS) -> pair(nil(),XS)
r5: splitAt(s(N),cons(X,XS)) -> u(splitAt(N,activate(XS)),N,X,activate(XS))
r6: u(pair(YS,ZS),N,X,XS) -> pair(cons(activate(X),YS),ZS)
r7: head(cons(N,XS)) -> N
r8: tail(cons(N,XS)) -> activate(XS)
r9: sel(N,XS) -> head(afterNth(N,XS))
r10: take(N,XS) -> fst(splitAt(N,XS))
r11: afterNth(N,XS) -> snd(splitAt(N,XS))
r12: natsFrom(X) -> n__natsFrom(X)
r13: s(X) -> n__s(X)
r14: activate(n__natsFrom(X)) -> natsFrom(activate(X))
r15: activate(n__s(X)) -> s(activate(X))
r16: activate(X) -> X

The set of usable rules consists of

  r1, r12, r13, r14, r15, r16

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^4
    order: lexicographic order
    interpretations:
      splitAt#_A(x1,x2) = ((1,0,0,0),(1,0,0,0),(0,0,0,0),(0,1,0,0)) x1 + ((0,0,0,0),(0,0,0,0),(1,0,0,0),(0,1,0,0)) x2
      s_A(x1) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (1,2,1,4)
      cons_A(x1,x2) = (3,1,7,8)
      activate_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (2,1,0,0)
      natsFrom_A(x1) = (4,2,6,7)
      n__natsFrom_A(x1) = ((0,0,0,0),(1,0,0,0),(1,1,0,0),(1,1,1,0)) x1 + (3,1,1,1)
      n__s_A(x1) = ((1,0,0,0),(0,0,0,0),(1,1,0,0),(1,1,1,0)) x1 + (1,1,2,1)

The next rules are strictly ordered:

  p1

We remove them from the problem.  Then no dependency pair remains.

-- Reduction pair.

Consider the dependency pair problem (P, R), where P consists of

p1: activate#(n__s(X)) -> activate#(X)
p2: activate#(n__natsFrom(X)) -> activate#(X)

and R consists of:

r1: natsFrom(N) -> cons(N,n__natsFrom(n__s(N)))
r2: fst(pair(XS,YS)) -> XS
r3: snd(pair(XS,YS)) -> YS
r4: splitAt(|0|(),XS) -> pair(nil(),XS)
r5: splitAt(s(N),cons(X,XS)) -> u(splitAt(N,activate(XS)),N,X,activate(XS))
r6: u(pair(YS,ZS),N,X,XS) -> pair(cons(activate(X),YS),ZS)
r7: head(cons(N,XS)) -> N
r8: tail(cons(N,XS)) -> activate(XS)
r9: sel(N,XS) -> head(afterNth(N,XS))
r10: take(N,XS) -> fst(splitAt(N,XS))
r11: afterNth(N,XS) -> snd(splitAt(N,XS))
r12: natsFrom(X) -> n__natsFrom(X)
r13: s(X) -> n__s(X)
r14: activate(n__natsFrom(X)) -> natsFrom(activate(X))
r15: activate(n__s(X)) -> s(activate(X))
r16: activate(X) -> X

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^4
    order: lexicographic order
    interpretations:
      activate#_A(x1) = ((1,0,0,0),(0,1,0,0),(0,1,1,0),(0,1,1,1)) x1
      n__s_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1)
      n__natsFrom_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1)

The next rules are strictly ordered:

  p1, p2
  r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16

We remove them from the problem.  Then no dependency pair remains.