YES
0 QTRS
↳1 QTRSRRRProof (⇔, 74 ms)
↳2 QTRS
↳3 QTRSRRRProof (⇔, 0 ms)
↳4 QTRS
↳5 RisEmptyProof (⇔, 0 ms)
↳6 YES
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
[splitAt2, u4, sel2, afterNth2, take2] > [0, nil] > pair2
[splitAt2, u4, sel2, afterNth2, take2] > activate1 > natsFrom1 > cons2 > pair2
[splitAt2, u4, sel2, afterNth2, take2] > activate1 > natsFrom1 > nnatsFrom1 > pair2
[splitAt2, u4, sel2, afterNth2, take2] > activate1 > natsFrom1 > ns1 > pair2
[splitAt2, u4, sel2, afterNth2, take2] > activate1 > s1 > ns1 > pair2
tail1 > activate1 > natsFrom1 > cons2 > pair2
tail1 > activate1 > natsFrom1 > nnatsFrom1 > pair2
tail1 > activate1 > natsFrom1 > ns1 > pair2
tail1 > activate1 > s1 > ns1 > pair2
natsFrom1: [1]
cons2: [1,2]
nnatsFrom1: multiset
ns1: multiset
pair2: multiset
splitAt2: [1,2]
0: multiset
nil: multiset
s1: multiset
u4: [2,4,3,1]
activate1: [1]
tail1: multiset
sel2: [1,2]
afterNth2: [1,2]
take2: [1,2]
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)
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
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))
afterNth2 > snd1 > splitAt2 > take2 > fst1 > sel2 > head1
head_1=1
fst_1=1
snd_1=1
sel_2=2
afterNth_2=1
take_2=1
splitAt_2=0
sel(N, XS) → head(afterNth(N, XS))
take(N, XS) → fst(splitAt(N, XS))
afterNth(N, XS) → snd(splitAt(N, XS))