We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).
Strict Trs:
{ add0(x', Cons(x, xs)) -> add0(Cons(Cons(Nil(), Nil()), x'), xs)
, add0(x, Nil()) -> x
, notEmpty(Cons(x, xs)) -> True()
, notEmpty(Nil()) -> False()
, goal(x, y) -> add0(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^1))
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(add0) = {1}, safe(Cons) = {1, 2}, safe(Nil) = {},
safe(notEmpty) = {}, safe(True) = {}, safe(False) = {},
safe(goal) = {}
and precedence
goal > add0 .
Following symbols are considered recursive:
{add0}
The recursion depth is 1.
For your convenience, here are the satisfied ordering constraints:
add0(Cons(; x, xs); x') > add0(xs; Cons(; Cons(; Nil(), Nil()), x'))
add0(Nil(); x) > x
notEmpty(Cons(; x, xs);) > True()
notEmpty(Nil();) > False()
goal(x, y;) > add0(y; x)
Hurray, we answered YES(?,O(n^1))