(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
addlist(Cons(x, xs'), Cons(S(0), xs)) → Cons(S(x), addlist(xs', xs))
addlist(Cons(S(0), xs'), Cons(x, xs)) → Cons(S(x), addlist(xs', xs))
addlist(Nil, ys) → Nil
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs, ys) → addlist(xs, ys)
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
addlist(Cons(x, xs'), Cons(S(0), xs)) →+ Cons(S(x), addlist(xs', xs))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [xs' / Cons(x, xs'), xs / Cons(S(0), xs)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
addlist(Cons(x, xs'), Cons(S(0'), xs)) → Cons(S(x), addlist(xs', xs))
addlist(Cons(S(0'), xs'), Cons(x, xs)) → Cons(S(x), addlist(xs', xs))
addlist(Nil, ys) → Nil
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs, ys) → addlist(xs, ys)
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
addlist(Cons(x, xs'), Cons(S(0'), xs)) → Cons(S(x), addlist(xs', xs))
addlist(Cons(S(0'), xs'), Cons(x, xs)) → Cons(S(x), addlist(xs', xs))
addlist(Nil, ys) → Nil
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs, ys) → addlist(xs, ys)
Types:
addlist :: Cons:Nil → Cons:Nil → Cons:Nil
Cons :: 0':S → Cons:Nil → Cons:Nil
S :: 0':S → 0':S
0' :: 0':S
Nil :: Cons:Nil
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil → Cons:Nil
hole_Cons:Nil1_0 :: Cons:Nil
hole_0':S2_0 :: 0':S
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_0':S5_0 :: Nat → 0':S
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
addlist
(8) Obligation:
Innermost TRS:
Rules:
addlist(
Cons(
x,
xs'),
Cons(
S(
0'),
xs)) →
Cons(
S(
x),
addlist(
xs',
xs))
addlist(
Cons(
S(
0'),
xs'),
Cons(
x,
xs)) →
Cons(
S(
x),
addlist(
xs',
xs))
addlist(
Nil,
ys) →
NilnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs,
ys) →
addlist(
xs,
ys)
Types:
addlist :: Cons:Nil → Cons:Nil → Cons:Nil
Cons :: 0':S → Cons:Nil → Cons:Nil
S :: 0':S → 0':S
0' :: 0':S
Nil :: Cons:Nil
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil → Cons:Nil
hole_Cons:Nil1_0 :: Cons:Nil
hole_0':S2_0 :: 0':S
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_0':S5_0 :: Nat → 0':S
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_0':S5_0(0) ⇔ 0'
gen_0':S5_0(+(x, 1)) ⇔ S(gen_0':S5_0(x))
The following defined symbols remain to be analysed:
addlist
(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol addlist.
(10) Obligation:
Innermost TRS:
Rules:
addlist(
Cons(
x,
xs'),
Cons(
S(
0'),
xs)) →
Cons(
S(
x),
addlist(
xs',
xs))
addlist(
Cons(
S(
0'),
xs'),
Cons(
x,
xs)) →
Cons(
S(
x),
addlist(
xs',
xs))
addlist(
Nil,
ys) →
NilnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs,
ys) →
addlist(
xs,
ys)
Types:
addlist :: Cons:Nil → Cons:Nil → Cons:Nil
Cons :: 0':S → Cons:Nil → Cons:Nil
S :: 0':S → 0':S
0' :: 0':S
Nil :: Cons:Nil
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil → Cons:Nil
hole_Cons:Nil1_0 :: Cons:Nil
hole_0':S2_0 :: 0':S
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_0':S5_0 :: Nat → 0':S
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_0':S5_0(0) ⇔ 0'
gen_0':S5_0(+(x, 1)) ⇔ S(gen_0':S5_0(x))
No more defined symbols left to analyse.