(0) Obligation:

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

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

(1) QTRSToCSRProof (EQUIVALENT transformation)

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

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
Special symbols used for the transformation (see [GM04]):
top: top, active: active, mark: mark, ok: ok, proper: proper
The replacement map contains the following entries:

U11: {1}
tt: empty set
U12: {1}
snd: {1}
splitAt: {1, 2}
U21: {1}
U22: {1}
U31: {1}
U32: {1}
U41: {1}
U42: {1}
head: {1}
afterNth: {1, 2}
U51: {1}
U52: {1}
U61: {1}
U62: {1}
U63: {1}
U64: {1}
pair: {1, 2}
cons: {1}
U71: {1}
U72: {1}
U81: {1}
U82: {1}
fst: {1}
natsFrom: {1}
s: {1}
sel: {1, 2}
0: empty set
nil: empty set
tail: {1}
take: {1, 2}
The QTRS contained all rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is complete (and sound).

(2) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U12: {1}
snd: {1}
splitAt: {1, 2}
U21: {1}
U22: {1}
U31: {1}
U32: {1}
U41: {1}
U42: {1}
head: {1}
afterNth: {1, 2}
U51: {1}
U52: {1}
U61: {1}
U62: {1}
U63: {1}
U64: {1}
pair: {1, 2}
cons: {1}
U71: {1}
U72: {1}
U81: {1}
U82: {1}
fst: {1}
natsFrom: {1}
s: {1}
sel: {1, 2}
0: empty set
nil: empty set
tail: {1}
take: {1, 2}

(3) CSRInnermostProof (EQUIVALENT transformation)

The CSR is orthogonal. By [CS_Inn] we can switch to innermost.

(4) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U12: {1}
snd: {1}
splitAt: {1, 2}
U21: {1}
U22: {1}
U31: {1}
U32: {1}
U41: {1}
U42: {1}
head: {1}
afterNth: {1, 2}
U51: {1}
U52: {1}
U61: {1}
U62: {1}
U63: {1}
U64: {1}
pair: {1, 2}
cons: {1}
U71: {1}
U72: {1}
U81: {1}
U82: {1}
fst: {1}
natsFrom: {1}
s: {1}
sel: {1, 2}
0: empty set
nil: empty set
tail: {1}
take: {1, 2}

Innermost Strategy.

(5) CSDependencyPairsProof (EQUIVALENT transformation)

Using Improved CS-DPs [LPAR08] we result in the following initial Q-CSDP problem.

(6) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {snd, splitAt, head, afterNth, pair, fst, natsFrom, s, sel, tail, take, SND, SPLITAT, HEAD, AFTERNTH, FST, SEL, TAIL, TAKE, NATSFROM} are replacing on all positions.
For all symbols f in {U11, U12, U21, U22, U31, U32, U41, U42, U51, U52, U61, U62, U63, U64, cons, U71, U72, U81, U82, U12', U11', U22', U21', U32', U31', U42', U41', U52', U51', U62', U61', U63', U64', U72', U71', U82', U81'} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

U11'(tt, N, XS) → U12'(tt, N, XS)
U12'(tt, N, XS) → SND(splitAt(N, XS))
U12'(tt, N, XS) → SPLITAT(N, XS)
U21'(tt, X) → U22'(tt, X)
U31'(tt, N) → U32'(tt, N)
U41'(tt, N, XS) → U42'(tt, N, XS)
U42'(tt, N, XS) → HEAD(afterNth(N, XS))
U42'(tt, N, XS) → AFTERNTH(N, XS)
U51'(tt, Y) → U52'(tt, Y)
U61'(tt, N, X, XS) → U62'(tt, N, X, XS)
U62'(tt, N, X, XS) → U63'(tt, N, X, XS)
U63'(tt, N, X, XS) → U64'(splitAt(N, XS), X)
U63'(tt, N, X, XS) → SPLITAT(N, XS)
U71'(tt, XS) → U72'(tt, XS)
U81'(tt, N, XS) → U82'(tt, N, XS)
U82'(tt, N, XS) → FST(splitAt(N, XS))
U82'(tt, N, XS) → SPLITAT(N, XS)
AFTERNTH(N, XS) → U11'(tt, N, XS)
FST(pair(X, Y)) → U21'(tt, X)
HEAD(cons(N, XS)) → U31'(tt, N)
SEL(N, XS) → U41'(tt, N, XS)
SND(pair(X, Y)) → U51'(tt, Y)
SPLITAT(s(N), cons(X, XS)) → U61'(tt, N, X, XS)
TAIL(cons(N, XS)) → U71'(tt, XS)
TAKE(N, XS) → U81'(tt, N, XS)

The collapsing dependency pairs are DPc:

U12'(tt, N, XS) → N
U12'(tt, N, XS) → XS
U22'(tt, X) → X
U32'(tt, N) → N
U42'(tt, N, XS) → N
U42'(tt, N, XS) → XS
U52'(tt, Y) → Y
U63'(tt, N, X, XS) → N
U63'(tt, N, X, XS) → XS
U64'(pair(YS, ZS), X) → X
U72'(tt, XS) → XS
U82'(tt, N, XS) → N
U82'(tt, N, XS) → XS


The hidden terms of R are:

natsFrom(s(x0))

Every hiding context is built from:

s on positions {1}
natsFrom on positions {1}

Hence, the new unhiding pairs DPu are :

U12'(tt, N, XS) → U(N)
U12'(tt, N, XS) → U(XS)
U22'(tt, X) → U(X)
U32'(tt, N) → U(N)
U42'(tt, N, XS) → U(N)
U42'(tt, N, XS) → U(XS)
U52'(tt, Y) → U(Y)
U63'(tt, N, X, XS) → U(N)
U63'(tt, N, X, XS) → U(XS)
U64'(pair(YS, ZS), X) → U(X)
U72'(tt, XS) → U(XS)
U82'(tt, N, XS) → U(N)
U82'(tt, N, XS) → U(XS)
U(s(x_0)) → U(x_0)
U(natsFrom(x_0)) → U(x_0)
U(natsFrom(s(x0))) → NATSFROM(s(x0))

The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The set Q consists of the following terms:

U11(tt, x0, x1)
U12(tt, x0, x1)
U21(tt, x0)
U22(tt, x0)
U31(tt, x0)
U32(tt, x0)
U41(tt, x0, x1)
U42(tt, x0, x1)
U51(tt, x0)
U52(tt, x0)
U61(tt, x0, x1, x2)
U62(tt, x0, x1, x2)
U63(tt, x0, x1, x2)
U64(pair(x0, x1), x2)
U71(tt, x0)
U72(tt, x0)
U81(tt, x0, x1)
U82(tt, x0, x1)
afterNth(x0, x1)
fst(pair(x0, x1))
head(cons(x0, x1))
natsFrom(x0)
sel(x0, x1)
snd(pair(x0, x1))
splitAt(0, x0)
splitAt(s(x0), cons(x1, x2))
tail(cons(x0, x1))
take(x0, x1)

(7) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 2 SCCs with 35 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {snd, splitAt, head, afterNth, pair, fst, natsFrom, s, sel, tail, take} are replacing on all positions.
For all symbols f in {U11, U12, U21, U22, U31, U32, U41, U42, U51, U52, U61, U62, U63, U64, cons, U71, U72, U81, U82} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(s(x_0)) → U(x_0)
U(natsFrom(x_0)) → U(x_0)

The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The set Q consists of the following terms:

U11(tt, x0, x1)
U12(tt, x0, x1)
U21(tt, x0)
U22(tt, x0)
U31(tt, x0)
U32(tt, x0)
U41(tt, x0, x1)
U42(tt, x0, x1)
U51(tt, x0)
U52(tt, x0)
U61(tt, x0, x1, x2)
U62(tt, x0, x1, x2)
U63(tt, x0, x1, x2)
U64(pair(x0, x1), x2)
U71(tt, x0)
U72(tt, x0)
U81(tt, x0, x1)
U82(tt, x0, x1)
afterNth(x0, x1)
fst(pair(x0, x1))
head(cons(x0, x1))
natsFrom(x0)
sel(x0, x1)
snd(pair(x0, x1))
splitAt(0, x0)
splitAt(s(x0), cons(x1, x2))
tail(cons(x0, x1))
take(x0, x1)

(10) QCSDPSubtermProof (EQUIVALENT transformation)

We use the subterm processor [DA_EMMES].


The following pairs can be oriented strictly and are deleted.


U(s(x_0)) → U(x_0)
U(natsFrom(x_0)) → U(x_0)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
U(x1)  =  x1

Subterm Order

(11) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {snd, splitAt, head, afterNth, pair, fst, natsFrom, s, sel, tail, take} are replacing on all positions.
For all symbols f in {U11, U12, U21, U22, U31, U32, U41, U42, U51, U52, U61, U62, U63, U64, cons, U71, U72, U81, U82} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The set Q consists of the following terms:

U11(tt, x0, x1)
U12(tt, x0, x1)
U21(tt, x0)
U22(tt, x0)
U31(tt, x0)
U32(tt, x0)
U41(tt, x0, x1)
U42(tt, x0, x1)
U51(tt, x0)
U52(tt, x0)
U61(tt, x0, x1, x2)
U62(tt, x0, x1, x2)
U63(tt, x0, x1, x2)
U64(pair(x0, x1), x2)
U71(tt, x0)
U72(tt, x0)
U81(tt, x0, x1)
U82(tt, x0, x1)
afterNth(x0, x1)
fst(pair(x0, x1))
head(cons(x0, x1))
natsFrom(x0)
sel(x0, x1)
snd(pair(x0, x1))
splitAt(0, x0)
splitAt(s(x0), cons(x1, x2))
tail(cons(x0, x1))
take(x0, x1)

(12) PIsEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R,µ)-chain.

(13) TRUE

(14) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {snd, splitAt, head, afterNth, pair, fst, natsFrom, s, sel, tail, take, SPLITAT} are replacing on all positions.
For all symbols f in {U11, U12, U21, U22, U31, U32, U41, U42, U51, U52, U61, U62, U63, U64, cons, U71, U72, U81, U82, U62', U61', U63'} we have µ(f) = {1}.

The TRS P consists of the following rules:

U61'(tt, N, X, XS) → U62'(tt, N, X, XS)
U62'(tt, N, X, XS) → U63'(tt, N, X, XS)
U63'(tt, N, X, XS) → SPLITAT(N, XS)
SPLITAT(s(N), cons(X, XS)) → U61'(tt, N, X, XS)

The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The set Q consists of the following terms:

U11(tt, x0, x1)
U12(tt, x0, x1)
U21(tt, x0)
U22(tt, x0)
U31(tt, x0)
U32(tt, x0)
U41(tt, x0, x1)
U42(tt, x0, x1)
U51(tt, x0)
U52(tt, x0)
U61(tt, x0, x1, x2)
U62(tt, x0, x1, x2)
U63(tt, x0, x1, x2)
U64(pair(x0, x1), x2)
U71(tt, x0)
U72(tt, x0)
U81(tt, x0, x1)
U82(tt, x0, x1)
afterNth(x0, x1)
fst(pair(x0, x1))
head(cons(x0, x1))
natsFrom(x0)
sel(x0, x1)
snd(pair(x0, x1))
splitAt(0, x0)
splitAt(s(x0), cons(x1, x2))
tail(cons(x0, x1))
take(x0, x1)

(15) QCSDPSubtermProof (EQUIVALENT transformation)

We use the subterm processor [DA_EMMES].


The following pairs can be oriented strictly and are deleted.


SPLITAT(s(N), cons(X, XS)) → U61'(tt, N, X, XS)
The remaining pairs can at least be oriented weakly.

U61'(tt, N, X, XS) → U62'(tt, N, X, XS)
U62'(tt, N, X, XS) → U63'(tt, N, X, XS)
U63'(tt, N, X, XS) → SPLITAT(N, XS)
Used ordering: Combined order from the following AFS and order.
U62'(x1, x2, x3, x4)  =  x2
U61'(x1, x2, x3, x4)  =  x2
U63'(x1, x2, x3, x4)  =  x2
SPLITAT(x1, x2)  =  x1

Subterm Order

(16) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {snd, splitAt, head, afterNth, pair, fst, natsFrom, s, sel, tail, take, SPLITAT} are replacing on all positions.
For all symbols f in {U11, U12, U21, U22, U31, U32, U41, U42, U51, U52, U61, U62, U63, U64, cons, U71, U72, U81, U82, U62', U61', U63'} we have µ(f) = {1}.

The TRS P consists of the following rules:

U61'(tt, N, X, XS) → U62'(tt, N, X, XS)
U62'(tt, N, X, XS) → U63'(tt, N, X, XS)
U63'(tt, N, X, XS) → SPLITAT(N, XS)

The TRS R consists of the following rules:

U11(tt, N, XS) → U12(tt, N, XS)
U12(tt, N, XS) → snd(splitAt(N, XS))
U21(tt, X) → U22(tt, X)
U22(tt, X) → X
U31(tt, N) → U32(tt, N)
U32(tt, N) → N
U41(tt, N, XS) → U42(tt, N, XS)
U42(tt, N, XS) → head(afterNth(N, XS))
U51(tt, Y) → U52(tt, Y)
U52(tt, Y) → Y
U61(tt, N, X, XS) → U62(tt, N, X, XS)
U62(tt, N, X, XS) → U63(tt, N, X, XS)
U63(tt, N, X, XS) → U64(splitAt(N, XS), X)
U64(pair(YS, ZS), X) → pair(cons(X, YS), ZS)
U71(tt, XS) → U72(tt, XS)
U72(tt, XS) → XS
U81(tt, N, XS) → U82(tt, N, XS)
U82(tt, N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → U11(tt, N, XS)
fst(pair(X, Y)) → U21(tt, X)
head(cons(N, XS)) → U31(tt, N)
natsFrom(N) → cons(N, natsFrom(s(N)))
sel(N, XS) → U41(tt, N, XS)
snd(pair(X, Y)) → U51(tt, Y)
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U61(tt, N, X, XS)
tail(cons(N, XS)) → U71(tt, XS)
take(N, XS) → U81(tt, N, XS)

The set Q consists of the following terms:

U11(tt, x0, x1)
U12(tt, x0, x1)
U21(tt, x0)
U22(tt, x0)
U31(tt, x0)
U32(tt, x0)
U41(tt, x0, x1)
U42(tt, x0, x1)
U51(tt, x0)
U52(tt, x0)
U61(tt, x0, x1, x2)
U62(tt, x0, x1, x2)
U63(tt, x0, x1, x2)
U64(pair(x0, x1), x2)
U71(tt, x0)
U72(tt, x0)
U81(tt, x0, x1)
U82(tt, x0, x1)
afterNth(x0, x1)
fst(pair(x0, x1))
head(cons(x0, x1))
natsFrom(x0)
sel(x0, x1)
snd(pair(x0, x1))
splitAt(0, x0)
splitAt(s(x0), cons(x1, x2))
tail(cons(x0, x1))
take(x0, x1)

(17) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 0 SCCs with 3 less nodes.

(18) TRUE