We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y)
, mod(0(), y) -> 0()
, mod(s(x), 0()) -> 0()
, mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y))
, if_mod(true(), s(x), s(y)) -> mod(minus(x, y), s(y))
, if_mod(false(), s(x), s(y)) -> s(x) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We add the following weak dependency pairs:
Strict DPs:
{ le^#(0(), y) -> c_1()
, le^#(s(x), 0()) -> c_2()
, le^#(s(x), s(y)) -> c_3(le^#(x, y))
, minus^#(x, 0()) -> c_4()
, minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, mod^#(0(), y) -> c_6()
, mod^#(s(x), 0()) -> c_7()
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y)))
, if_mod^#(false(), s(x), s(y)) -> c_10() }
and mark the set of starting terms.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ le^#(0(), y) -> c_1()
, le^#(s(x), 0()) -> c_2()
, le^#(s(x), s(y)) -> c_3(le^#(x, y))
, minus^#(x, 0()) -> c_4()
, minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, mod^#(0(), y) -> c_6()
, mod^#(s(x), 0()) -> c_7()
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y)))
, if_mod^#(false(), s(x), s(y)) -> c_10() }
Strict Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y)
, mod(0(), y) -> 0()
, mod(s(x), 0()) -> 0()
, mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y))
, if_mod(true(), s(x), s(y)) -> mod(minus(x, y), s(y))
, if_mod(false(), s(x), s(y)) -> s(x) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We replace rewrite rules by usable rules:
Strict Usable Rules:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ le^#(0(), y) -> c_1()
, le^#(s(x), 0()) -> c_2()
, le^#(s(x), s(y)) -> c_3(le^#(x, y))
, minus^#(x, 0()) -> c_4()
, minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, mod^#(0(), y) -> c_6()
, mod^#(s(x), 0()) -> c_7()
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y)))
, if_mod^#(false(), s(x), s(y)) -> c_10() }
Strict Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following constant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(c_3) = {1}, Uargs(c_5) = {1}, Uargs(mod^#) = {1},
Uargs(c_8) = {1}, Uargs(if_mod^#) = {1}, Uargs(c_9) = {1}
TcT has computed the following constructor-restricted matrix
interpretation.
[le](x1, x2) = [0 1] x2 + [1]
[0 0] [1]
[0] = [0]
[0]
[true] = [0]
[1]
[s](x1) = [1 2] x1 + [1]
[0 1] [2]
[false] = [0]
[0]
[minus](x1, x2) = [1 0] x1 + [2]
[0 1] [2]
[le^#](x1, x2) = [0]
[0]
[c_1] = [0]
[0]
[c_2] = [0]
[0]
[c_3](x1) = [1 0] x1 + [0]
[0 1] [0]
[minus^#](x1, x2) = [0]
[0]
[c_4] = [0]
[0]
[c_5](x1) = [1 0] x1 + [0]
[0 1] [0]
[mod^#](x1, x2) = [2 1] x1 + [1 0] x2 + [0]
[0 0] [0 0] [0]
[c_6] = [0]
[0]
[c_7] = [0]
[0]
[c_8](x1) = [1 0] x1 + [0]
[0 1] [0]
[if_mod^#](x1, x2, x3) = [1 1] x1 + [2 0] x2 + [1 0] x3 + [0]
[0 0] [0 0] [0 0] [0]
[c_9](x1) = [1 0] x1 + [0]
[0 1] [0]
[c_10] = [0]
[0]
The order satisfies the following ordering constraints:
[le(0(), y)] = [0 1] y + [1]
[0 0] [1]
> [0]
[1]
= [true()]
[le(s(x), 0())] = [1]
[1]
> [0]
[0]
= [false()]
[le(s(x), s(y))] = [0 1] y + [3]
[0 0] [1]
> [0 1] y + [1]
[0 0] [1]
= [le(x, y)]
[minus(x, 0())] = [1 0] x + [2]
[0 1] [2]
> [1 0] x + [0]
[0 1] [0]
= [x]
[minus(s(x), s(y))] = [1 2] x + [3]
[0 1] [4]
> [1 0] x + [2]
[0 1] [2]
= [minus(x, y)]
[le^#(0(), y)] = [0]
[0]
>= [0]
[0]
= [c_1()]
[le^#(s(x), 0())] = [0]
[0]
>= [0]
[0]
= [c_2()]
[le^#(s(x), s(y))] = [0]
[0]
>= [0]
[0]
= [c_3(le^#(x, y))]
[minus^#(x, 0())] = [0]
[0]
>= [0]
[0]
= [c_4()]
[minus^#(s(x), s(y))] = [0]
[0]
>= [0]
[0]
= [c_5(minus^#(x, y))]
[mod^#(0(), y)] = [1 0] y + [0]
[0 0] [0]
>= [0]
[0]
= [c_6()]
[mod^#(s(x), 0())] = [2 5] x + [4]
[0 0] [0]
> [0]
[0]
= [c_7()]
[mod^#(s(x), s(y))] = [1 2] y + [2 5] x + [5]
[0 0] [0 0] [0]
>= [1 2] y + [2 5] x + [5]
[0 0] [0 0] [0]
= [c_8(if_mod^#(le(y, x), s(x), s(y)))]
[if_mod^#(true(), s(x), s(y))] = [1 2] y + [2 4] x + [4]
[0 0] [0 0] [0]
? [1 2] y + [2 1] x + [7]
[0 0] [0 0] [0]
= [c_9(mod^#(minus(x, y), s(y)))]
[if_mod^#(false(), s(x), s(y))] = [1 2] y + [2 4] x + [3]
[0 0] [0 0] [0]
> [0]
[0]
= [c_10()]
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ le^#(0(), y) -> c_1()
, le^#(s(x), 0()) -> c_2()
, le^#(s(x), s(y)) -> c_3(le^#(x, y))
, minus^#(x, 0()) -> c_4()
, minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, mod^#(0(), y) -> c_6()
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
Weak DPs:
{ mod^#(s(x), 0()) -> c_7()
, if_mod^#(false(), s(x), s(y)) -> c_10() }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We estimate the number of application of {1,2,4,6} by applications
of Pre({1,2,4,6}) = {3,5,8}. Here rules are labeled as follows:
DPs:
{ 1: le^#(0(), y) -> c_1()
, 2: le^#(s(x), 0()) -> c_2()
, 3: le^#(s(x), s(y)) -> c_3(le^#(x, y))
, 4: minus^#(x, 0()) -> c_4()
, 5: minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, 6: mod^#(0(), y) -> c_6()
, 7: mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, 8: if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y)))
, 9: mod^#(s(x), 0()) -> c_7()
, 10: if_mod^#(false(), s(x), s(y)) -> c_10() }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ le^#(s(x), s(y)) -> c_3(le^#(x, y))
, minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
Weak DPs:
{ le^#(0(), y) -> c_1()
, le^#(s(x), 0()) -> c_2()
, minus^#(x, 0()) -> c_4()
, mod^#(0(), y) -> c_6()
, mod^#(s(x), 0()) -> c_7()
, if_mod^#(false(), s(x), s(y)) -> c_10() }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ le^#(0(), y) -> c_1()
, le^#(s(x), 0()) -> c_2()
, minus^#(x, 0()) -> c_4()
, mod^#(0(), y) -> c_6()
, mod^#(s(x), 0()) -> c_7()
, if_mod^#(false(), s(x), s(y)) -> c_10() }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ le^#(s(x), s(y)) -> c_3(le^#(x, y))
, minus^#(s(x), s(y)) -> c_5(minus^#(x, y))
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 2: minus^#(s(x), s(y)) -> c_5(minus^#(x, y)) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(c_3) = {1}, Uargs(c_5) = {1}, Uargs(c_8) = {1},
Uargs(c_9) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[le](x1, x2) = [0]
[0] = [0]
[true] = [0]
[s](x1) = [1] x1 + [2]
[false] = [0]
[minus](x1, x2) = [0]
[le^#](x1, x2) = [0]
[c_3](x1) = [2] x1 + [0]
[minus^#](x1, x2) = [4] x2 + [0]
[c_5](x1) = [1] x1 + [7]
[mod^#](x1, x2) = [0]
[c_8](x1) = [2] x1 + [0]
[if_mod^#](x1, x2, x3) = [0]
[c_9](x1) = [4] x1 + [0]
The order satisfies the following ordering constraints:
[le(0(), y)] = [0]
>= [0]
= [true()]
[le(s(x), 0())] = [0]
>= [0]
= [false()]
[le(s(x), s(y))] = [0]
>= [0]
= [le(x, y)]
[minus(x, 0())] = [0]
? [1] x + [0]
= [x]
[minus(s(x), s(y))] = [0]
>= [0]
= [minus(x, y)]
[le^#(s(x), s(y))] = [0]
>= [0]
= [c_3(le^#(x, y))]
[minus^#(s(x), s(y))] = [4] y + [8]
> [4] y + [7]
= [c_5(minus^#(x, y))]
[mod^#(s(x), s(y))] = [0]
>= [0]
= [c_8(if_mod^#(le(y, x), s(x), s(y)))]
[if_mod^#(true(), s(x), s(y))] = [0]
>= [0]
= [c_9(mod^#(minus(x, y), s(y)))]
The strictly oriented rules are moved into the weak component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ le^#(s(x), s(y)) -> c_3(le^#(x, y))
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
Weak DPs: { minus^#(s(x), s(y)) -> c_5(minus^#(x, y)) }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ minus^#(s(x), s(y)) -> c_5(minus^#(x, y)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ le^#(s(x), s(y)) -> c_3(le^#(x, y))
, mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 3: if_mod^#(true(), s(x), s(y)) ->
c_9(mod^#(minus(x, y), s(y))) }
Trs: { minus(s(x), s(y)) -> minus(x, y) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(c_3) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[le](x1, x2) = [0]
[0] = [0]
[true] = [0]
[s](x1) = [1] x1 + [2]
[false] = [0]
[minus](x1, x2) = [1] x1 + [0]
[le^#](x1, x2) = [0]
[c_3](x1) = [1] x1 + [0]
[minus^#](x1, x2) = [0]
[c_5](x1) = [0]
[mod^#](x1, x2) = [4] x1 + [0]
[c_8](x1) = [1] x1 + [0]
[if_mod^#](x1, x2, x3) = [4] x2 + [0]
[c_9](x1) = [1] x1 + [1]
The order satisfies the following ordering constraints:
[le(0(), y)] = [0]
>= [0]
= [true()]
[le(s(x), 0())] = [0]
>= [0]
= [false()]
[le(s(x), s(y))] = [0]
>= [0]
= [le(x, y)]
[minus(x, 0())] = [1] x + [0]
>= [1] x + [0]
= [x]
[minus(s(x), s(y))] = [1] x + [2]
> [1] x + [0]
= [minus(x, y)]
[le^#(s(x), s(y))] = [0]
>= [0]
= [c_3(le^#(x, y))]
[mod^#(s(x), s(y))] = [4] x + [8]
>= [4] x + [8]
= [c_8(if_mod^#(le(y, x), s(x), s(y)))]
[if_mod^#(true(), s(x), s(y))] = [4] x + [8]
> [4] x + [1]
= [c_9(mod^#(minus(x, y), s(y)))]
We return to the main proof. Consider the set of all dependency
pairs
:
{ 1: le^#(s(x), s(y)) -> c_3(le^#(x, y))
, 2: mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, 3: if_mod^#(true(), s(x), s(y)) ->
c_9(mod^#(minus(x, y), s(y))) }
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of dependency
pairs {3}. These cover all (indirect) predecessors of dependency
pairs {2,3}, their number of application is equally bounded. The
dependency pairs are shifted into the weak component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { le^#(s(x), s(y)) -> c_3(le^#(x, y)) }
Weak DPs:
{ mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ mod^#(s(x), s(y)) -> c_8(if_mod^#(le(y, x), s(x), s(y)))
, if_mod^#(true(), s(x), s(y)) -> c_9(mod^#(minus(x, y), s(y))) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { le^#(s(x), s(y)) -> c_3(le^#(x, y)) }
Weak Trs:
{ le(0(), y) -> true()
, le(s(x), 0()) -> false()
, le(s(x), s(y)) -> le(x, y)
, minus(x, 0()) -> x
, minus(s(x), s(y)) -> minus(x, y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
No rule is usable, rules are removed from the input problem.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { le^#(s(x), s(y)) -> c_3(le^#(x, y)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
to orient following rules strictly.
DPs:
{ 1: le^#(s(x), s(y)) -> c_3(le^#(x, y)) }
Sub-proof:
----------
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(le) = {}, safe(0) = {}, safe(true) = {}, safe(s) = {1},
safe(false) = {}, safe(minus) = {}, safe(le^#) = {1},
safe(c_3) = {}, safe(minus^#) = {}, safe(c_5) = {},
safe(mod^#) = {}, safe(c_8) = {}, safe(if_mod^#) = {},
safe(c_9) = {}
and precedence
empty .
Following symbols are considered recursive:
{le^#}
The recursion depth is 1.
Further, following argument filtering is employed:
pi(le) = [], pi(0) = [], pi(true) = [], pi(s) = [1],
pi(false) = [], pi(minus) = [], pi(le^#) = [2], pi(c_3) = [1],
pi(minus^#) = [], pi(c_5) = [], pi(mod^#) = [], pi(c_8) = [],
pi(if_mod^#) = [], pi(c_9) = []
Usable defined function symbols are a subset of:
{le^#, minus^#, mod^#, if_mod^#}
For your convenience, here are the satisfied ordering constraints:
pi(le^#(s(x), s(y))) = le^#(s(; y);)
> c_3(le^#(y;);)
= pi(c_3(le^#(x, y)))
The strictly oriented rules are moved into the weak component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Weak DPs: { le^#(s(x), s(y)) -> c_3(le^#(x, y)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ le^#(s(x), s(y)) -> c_3(le^#(x, y)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
Hurray, we answered YES(O(1),O(n^2))