Runtime Complexity TRS:
The TRS R consists of the following rules:
U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
U11'(tt', N, X, XS) → U12'(splitAt'(activate'(N), activate'(XS)), activate'(X))
U12'(pair'(YS, ZS), X) → pair'(cons'(activate'(X), YS), ZS)
afterNth'(N, XS) → snd'(splitAt'(N, XS))
and'(tt', X) → activate'(X)
fst'(pair'(X, Y)) → X
head'(cons'(N, XS)) → N
natsFrom'(N) → cons'(N, n__natsFrom'(s'(N)))
sel'(N, XS) → head'(afterNth'(N, XS))
snd'(pair'(X, Y)) → Y
splitAt'(0', XS) → pair'(nil', XS)
splitAt'(s'(N), cons'(X, XS)) → U11'(tt', N, X, activate'(XS))
tail'(cons'(N, XS)) → activate'(XS)
take'(N, XS) → fst'(splitAt'(N, XS))
natsFrom'(X) → n__natsFrom'(X)
activate'(n__natsFrom'(X)) → natsFrom'(X)
activate'(X) → X
Infered types.
Rules:
U11'(tt', N, X, XS) → U12'(splitAt'(activate'(N), activate'(XS)), activate'(X))
U12'(pair'(YS, ZS), X) → pair'(cons'(activate'(X), YS), ZS)
afterNth'(N, XS) → snd'(splitAt'(N, XS))
and'(tt', X) → activate'(X)
fst'(pair'(X, Y)) → X
head'(cons'(N, XS)) → N
natsFrom'(N) → cons'(N, n__natsFrom'(s'(N)))
sel'(N, XS) → head'(afterNth'(N, XS))
snd'(pair'(X, Y)) → Y
splitAt'(0', XS) → pair'(nil', XS)
splitAt'(s'(N), cons'(X, XS)) → U11'(tt', N, X, activate'(XS))
tail'(cons'(N, XS)) → activate'(XS)
take'(N, XS) → fst'(splitAt'(N, XS))
natsFrom'(X) → n__natsFrom'(X)
activate'(n__natsFrom'(X)) → natsFrom'(X)
activate'(X) → X
Types:
U11' :: tt' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
tt' :: tt'
U12' :: pair' → cons':s':n__natsFrom':0':nil' → pair'
splitAt' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
activate' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
pair' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
cons' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
afterNth' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
snd' :: pair' → cons':s':n__natsFrom':0':nil'
and' :: tt' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
fst' :: pair' → cons':s':n__natsFrom':0':nil'
head' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
natsFrom' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
n__natsFrom' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
s' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
sel' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
0' :: cons':s':n__natsFrom':0':nil'
nil' :: cons':s':n__natsFrom':0':nil'
tail' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
take' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
_hole_pair'1 :: pair'
_hole_tt'2 :: tt'
_hole_cons':s':n__natsFrom':0':nil'3 :: cons':s':n__natsFrom':0':nil'
_gen_cons':s':n__natsFrom':0':nil'4 :: Nat → cons':s':n__natsFrom':0':nil'
Heuristically decided to analyse the following defined symbols:
splitAt'
Rules:
U11'(tt', N, X, XS) → U12'(splitAt'(activate'(N), activate'(XS)), activate'(X))
U12'(pair'(YS, ZS), X) → pair'(cons'(activate'(X), YS), ZS)
afterNth'(N, XS) → snd'(splitAt'(N, XS))
and'(tt', X) → activate'(X)
fst'(pair'(X, Y)) → X
head'(cons'(N, XS)) → N
natsFrom'(N) → cons'(N, n__natsFrom'(s'(N)))
sel'(N, XS) → head'(afterNth'(N, XS))
snd'(pair'(X, Y)) → Y
splitAt'(0', XS) → pair'(nil', XS)
splitAt'(s'(N), cons'(X, XS)) → U11'(tt', N, X, activate'(XS))
tail'(cons'(N, XS)) → activate'(XS)
take'(N, XS) → fst'(splitAt'(N, XS))
natsFrom'(X) → n__natsFrom'(X)
activate'(n__natsFrom'(X)) → natsFrom'(X)
activate'(X) → X
Types:
U11' :: tt' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
tt' :: tt'
U12' :: pair' → cons':s':n__natsFrom':0':nil' → pair'
splitAt' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
activate' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
pair' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
cons' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
afterNth' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
snd' :: pair' → cons':s':n__natsFrom':0':nil'
and' :: tt' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
fst' :: pair' → cons':s':n__natsFrom':0':nil'
head' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
natsFrom' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
n__natsFrom' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
s' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
sel' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
0' :: cons':s':n__natsFrom':0':nil'
nil' :: cons':s':n__natsFrom':0':nil'
tail' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
take' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
_hole_pair'1 :: pair'
_hole_tt'2 :: tt'
_hole_cons':s':n__natsFrom':0':nil'3 :: cons':s':n__natsFrom':0':nil'
_gen_cons':s':n__natsFrom':0':nil'4 :: Nat → cons':s':n__natsFrom':0':nil'
Generator Equations:
_gen_cons':s':n__natsFrom':0':nil'4(0) ⇔ 0'
_gen_cons':s':n__natsFrom':0':nil'4(+(x, 1)) ⇔ cons'(0', _gen_cons':s':n__natsFrom':0':nil'4(x))
The following defined symbols remain to be analysed:
splitAt'
Could not prove a rewrite lemma for the defined symbol splitAt'.
Rules:
U11'(tt', N, X, XS) → U12'(splitAt'(activate'(N), activate'(XS)), activate'(X))
U12'(pair'(YS, ZS), X) → pair'(cons'(activate'(X), YS), ZS)
afterNth'(N, XS) → snd'(splitAt'(N, XS))
and'(tt', X) → activate'(X)
fst'(pair'(X, Y)) → X
head'(cons'(N, XS)) → N
natsFrom'(N) → cons'(N, n__natsFrom'(s'(N)))
sel'(N, XS) → head'(afterNth'(N, XS))
snd'(pair'(X, Y)) → Y
splitAt'(0', XS) → pair'(nil', XS)
splitAt'(s'(N), cons'(X, XS)) → U11'(tt', N, X, activate'(XS))
tail'(cons'(N, XS)) → activate'(XS)
take'(N, XS) → fst'(splitAt'(N, XS))
natsFrom'(X) → n__natsFrom'(X)
activate'(n__natsFrom'(X)) → natsFrom'(X)
activate'(X) → X
Types:
U11' :: tt' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
tt' :: tt'
U12' :: pair' → cons':s':n__natsFrom':0':nil' → pair'
splitAt' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
activate' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
pair' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → pair'
cons' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
afterNth' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
snd' :: pair' → cons':s':n__natsFrom':0':nil'
and' :: tt' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
fst' :: pair' → cons':s':n__natsFrom':0':nil'
head' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
natsFrom' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
n__natsFrom' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
s' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
sel' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
0' :: cons':s':n__natsFrom':0':nil'
nil' :: cons':s':n__natsFrom':0':nil'
tail' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
take' :: cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil' → cons':s':n__natsFrom':0':nil'
_hole_pair'1 :: pair'
_hole_tt'2 :: tt'
_hole_cons':s':n__natsFrom':0':nil'3 :: cons':s':n__natsFrom':0':nil'
_gen_cons':s':n__natsFrom':0':nil'4 :: Nat → cons':s':n__natsFrom':0':nil'
Generator Equations:
_gen_cons':s':n__natsFrom':0':nil'4(0) ⇔ 0'
_gen_cons':s':n__natsFrom':0':nil'4(+(x, 1)) ⇔ cons'(0', _gen_cons':s':n__natsFrom':0':nil'4(x))
No more defined symbols left to analyse.