YES Termination proof of ../tpdb/TRS/CSR/ExSec4_2_DLMMU04.trs
Termination of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

natsFrom(N) → cons(N, natsFrom(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, XS), N, X, XS)
u(pair(YS, ZS), N, X, XS) → pair(cons(X, YS), ZS)
head(cons(N, XS)) → N
tail(cons(N, XS)) → XS
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))

The replacement map contains the following entries:

natsFrom: {1}
cons: {1}
s: {1}
fst: {1}
pair: {1, 2}
snd: {1}
splitAt: {1, 2}
0: empty set
nil: empty set
u: {1}
head: {1}
tail: {1}
sel: {1, 2}
afterNth: {1, 2}
take: {1, 2}


CSR
  ↳ Zantema-Transformation

Q restricted rewrite system:
The TRS R consists of the following rules:

natsFrom(N) → cons(N, natsFrom(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, XS), N, X, XS)
u(pair(YS, ZS), N, X, XS) → pair(cons(X, YS), ZS)
head(cons(N, XS)) → N
tail(cons(N, XS)) → XS
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))

The replacement map contains the following entries:

natsFrom: {1}
cons: {1}
s: {1}
fst: {1}
pair: {1, 2}
snd: {1}
splitAt: {1, 2}
0: empty set
nil: empty set
u: {1}
head: {1}
tail: {1}
sel: {1, 2}
afterNth: {1, 2}
take: {1, 2}

We applied the Zantema [34] to transform the context-sensitive TRS to an usual TRS.

↳ CSR
  ↳ Zantema-Transformation
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

natsFrom(N) → cons(N, natsFromInact(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, a(XS)), N, X, a(XS))
u(pair(YS, ZS), N, X, XS) → pair(cons(a(X), YS), ZS)
head(cons(N, XS)) → N
tail(cons(N, XS)) → a(XS)
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))
a(x) → x
natsFrom(x1) → natsFromInact(x1)
a(natsFromInact(x1)) → natsFrom(x1)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

AFTERNTH(N, XS) → SPLITAT(N, XS)
TAKE(N, XS) → SPLITAT(N, XS)
SEL(N, XS) → HEAD(afterNth(N, XS))
SPLITAT(s(N), cons(X, XS)) → U(splitAt(N, a(XS)), N, X, a(XS))
U(pair(YS, ZS), N, X, XS) → A(X)
A(natsFromInact(x1)) → NATSFROM(x1)
TAIL(cons(N, XS)) → A(XS)
SPLITAT(s(N), cons(X, XS)) → A(XS)
TAKE(N, XS) → FST(splitAt(N, XS))
SEL(N, XS) → AFTERNTH(N, XS)
SPLITAT(s(N), cons(X, XS)) → SPLITAT(N, a(XS))
AFTERNTH(N, XS) → SND(splitAt(N, XS))

The TRS R consists of the following rules:

natsFrom(N) → cons(N, natsFromInact(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, a(XS)), N, X, a(XS))
u(pair(YS, ZS), N, X, XS) → pair(cons(a(X), YS), ZS)
head(cons(N, XS)) → N
tail(cons(N, XS)) → a(XS)
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))
a(x) → x
natsFrom(x1) → natsFromInact(x1)
a(natsFromInact(x1)) → natsFrom(x1)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

AFTERNTH(N, XS) → SPLITAT(N, XS)
TAKE(N, XS) → SPLITAT(N, XS)
SEL(N, XS) → HEAD(afterNth(N, XS))
SPLITAT(s(N), cons(X, XS)) → U(splitAt(N, a(XS)), N, X, a(XS))
U(pair(YS, ZS), N, X, XS) → A(X)
A(natsFromInact(x1)) → NATSFROM(x1)
TAIL(cons(N, XS)) → A(XS)
SPLITAT(s(N), cons(X, XS)) → A(XS)
TAKE(N, XS) → FST(splitAt(N, XS))
SEL(N, XS) → AFTERNTH(N, XS)
SPLITAT(s(N), cons(X, XS)) → SPLITAT(N, a(XS))
AFTERNTH(N, XS) → SND(splitAt(N, XS))

The TRS R consists of the following rules:

natsFrom(N) → cons(N, natsFromInact(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, a(XS)), N, X, a(XS))
u(pair(YS, ZS), N, X, XS) → pair(cons(a(X), YS), ZS)
head(cons(N, XS)) → N
tail(cons(N, XS)) → a(XS)
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))
a(x) → x
natsFrom(x1) → natsFromInact(x1)
a(natsFromInact(x1)) → natsFrom(x1)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 11 less nodes.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
QDP
              ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(s(N), cons(X, XS)) → SPLITAT(N, a(XS))

The TRS R consists of the following rules:

natsFrom(N) → cons(N, natsFromInact(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, a(XS)), N, X, a(XS))
u(pair(YS, ZS), N, X, XS) → pair(cons(a(X), YS), ZS)
head(cons(N, XS)) → N
tail(cons(N, XS)) → a(XS)
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))
a(x) → x
natsFrom(x1) → natsFromInact(x1)
a(natsFromInact(x1)) → natsFrom(x1)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: