YES(O(1),O(n^2)) 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) , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [le](x1, x2) = [0] [0] = [0] [true] = [0] [s](x1) = [1] x1 + [0] [false] = [0] [minus](x1, x2) = [1] x1 + [1] [gcd](x1, x2) = [1] x1 + [1] x2 + [0] [if_gcd](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] The following symbols are considered usable {le, minus, gcd, if_gcd} 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 + [1] > [1] x + [0] = [x] [minus(s(x), s(y))] = [1] x + [1] >= [1] x + [1] = [minus(x, y)] [gcd(0(), y)] = [1] y + [0] >= [1] y + [0] = [y] [gcd(s(x), 0())] = [1] x + [0] >= [1] x + [0] = [s(x)] [gcd(s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = [1] y + [1] x + [0] ? [1] y + [1] x + [1] = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = [1] y + [1] x + [0] ? [1] y + [1] x + [1] = [gcd(minus(y, x), s(x))] 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^2)). Strict Trs: { le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(s(x), s(y)) -> minus(x, y) , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Weak Trs: { minus(x, 0()) -> x } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [le](x1, x2) = [0] [0] = [1] [true] = [0] [s](x1) = [1] x1 + [0] [false] = [0] [minus](x1, x2) = [1] x1 + [0] [gcd](x1, x2) = [1] x1 + [1] x2 + [0] [if_gcd](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] The following symbols are considered usable {le, minus, gcd, if_gcd} 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 + [0] >= [1] x + [0] = [minus(x, y)] [gcd(0(), y)] = [1] y + [1] > [1] y + [0] = [y] [gcd(s(x), 0())] = [1] x + [1] > [1] x + [0] = [s(x)] [gcd(s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [gcd(minus(y, x), s(x))] 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^2)). Strict Trs: { le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(s(x), s(y)) -> minus(x, y) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Weak Trs: { minus(x, 0()) -> x , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [le](x1, x2) = [1] [0] = [7] [true] = [0] [s](x1) = [1] x1 + [0] [false] = [0] [minus](x1, x2) = [1] x1 + [0] [gcd](x1, x2) = [1] x1 + [1] x2 + [0] [if_gcd](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] The following symbols are considered usable {le, minus, gcd, if_gcd} The order satisfies the following ordering constraints: [le(0(), y)] = [1] > [0] = [true()] [le(s(x), 0())] = [1] > [0] = [false()] [le(s(x), s(y))] = [1] >= [1] = [le(x, y)] [minus(x, 0())] = [1] x + [0] >= [1] x + [0] = [x] [minus(s(x), s(y))] = [1] x + [0] >= [1] x + [0] = [minus(x, y)] [gcd(0(), y)] = [1] y + [7] > [1] y + [0] = [y] [gcd(s(x), 0())] = [1] x + [7] > [1] x + [0] = [s(x)] [gcd(s(x), s(y))] = [1] y + [1] x + [0] ? [1] y + [1] x + [1] = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [gcd(minus(y, x), s(x))] 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^2)). Strict Trs: { le(s(x), s(y)) -> le(x, y) , minus(s(x), s(y)) -> minus(x, y) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Weak Trs: { le(0(), y) -> true() , le(s(x), 0()) -> false() , minus(x, 0()) -> x , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [le](x1, x2) = [4] [0] = [7] [true] = [1] [s](x1) = [1] x1 + [0] [false] = [0] [minus](x1, x2) = [1] x1 + [0] [gcd](x1, x2) = [1] x1 + [1] x2 + [0] [if_gcd](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] The following symbols are considered usable {le, minus, gcd, if_gcd} The order satisfies the following ordering constraints: [le(0(), y)] = [4] > [1] = [true()] [le(s(x), 0())] = [4] > [0] = [false()] [le(s(x), s(y))] = [4] >= [4] = [le(x, y)] [minus(x, 0())] = [1] x + [0] >= [1] x + [0] = [x] [minus(s(x), s(y))] = [1] x + [0] >= [1] x + [0] = [minus(x, y)] [gcd(0(), y)] = [1] y + [7] > [1] y + [0] = [y] [gcd(s(x), 0())] = [1] x + [7] > [1] x + [0] = [s(x)] [gcd(s(x), s(y))] = [1] y + [1] x + [0] ? [1] y + [1] x + [4] = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = [1] y + [1] x + [1] > [1] y + [1] x + [0] = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = [1] y + [1] x + [0] >= [1] y + [1] x + [0] = [gcd(minus(y, x), s(x))] 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^2)). Strict Trs: { le(s(x), s(y)) -> le(x, y) , minus(s(x), s(y)) -> minus(x, y) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Weak Trs: { le(0(), y) -> true() , le(s(x), 0()) -> false() , minus(x, 0()) -> x , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [le](x1, x2) = [0] [0] = [7] [true] = [0] [s](x1) = [1] x1 + [4] [false] = [0] [minus](x1, x2) = [1] x1 + [0] [gcd](x1, x2) = [1] x1 + [1] x2 + [0] [if_gcd](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] The following symbols are considered usable {le, minus, gcd, if_gcd} 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 + [4] > [1] x + [0] = [minus(x, y)] [gcd(0(), y)] = [1] y + [7] > [1] y + [0] = [y] [gcd(s(x), 0())] = [1] x + [11] > [1] x + [4] = [s(x)] [gcd(s(x), s(y))] = [1] y + [1] x + [8] >= [1] y + [1] x + [8] = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = [1] y + [1] x + [8] > [1] y + [1] x + [4] = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = [1] y + [1] x + [8] > [1] y + [1] x + [4] = [gcd(minus(y, x), s(x))] 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^2)). Strict Trs: { le(s(x), s(y)) -> le(x, y) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) } Weak Trs: { le(0(), y) -> true() , le(s(x), 0()) -> false() , minus(x, 0()) -> x , minus(s(x), s(y)) -> minus(x, y) , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [le](x1, x2) = [0] [0] = [7] [true] = [0] [s](x1) = [1] x1 + [4] [false] = [0] [minus](x1, x2) = [1] x1 + [0] [gcd](x1, x2) = [1] x1 + [1] x2 + [4] [if_gcd](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] The following symbols are considered usable {le, minus, gcd, if_gcd} 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 + [4] > [1] x + [0] = [minus(x, y)] [gcd(0(), y)] = [1] y + [11] > [1] y + [0] = [y] [gcd(s(x), 0())] = [1] x + [15] > [1] x + [4] = [s(x)] [gcd(s(x), s(y))] = [1] y + [1] x + [12] > [1] y + [1] x + [8] = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = [1] y + [1] x + [8] >= [1] y + [1] x + [8] = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = [1] y + [1] x + [8] >= [1] y + [1] x + [8] = [gcd(minus(y, x), s(x))] 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^2)). Strict Trs: { le(s(x), s(y)) -> le(x, y) } Weak Trs: { le(0(), y) -> true() , le(s(x), 0()) -> false() , minus(x, 0()) -> x , minus(s(x), s(y)) -> minus(x, y) , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Obligation: runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'polynomial interpretation' to orient following rules strictly. Trs: { le(s(x), s(y)) -> le(x, y) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are considered usable: Uargs(gcd) = {1}, Uargs(if_gcd) = {1} TcT has computed the following constructor-restricted polynomial interpretation. [le](x1, x2) = x2 [0]() = 0 [true]() = 0 [s](x1) = 1 + x1 [false]() = 0 [minus](x1, x2) = x1 [gcd](x1, x2) = 3*x1 + x1^2 + 2*x2 + x2^2 [if_gcd](x1, x2, x3) = x1 + 2*x2 + x2^2 + 2*x3 + x3^2 The following symbols are considered usable {le, minus, gcd, if_gcd} This order satisfies the following ordering constraints. [le(0(), y)] = y >= = [true()] [le(s(x), 0())] = >= = [false()] [le(s(x), s(y))] = 1 + y > y = [le(x, y)] [minus(x, 0())] = x >= x = [x] [minus(s(x), s(y))] = 1 + x > x = [minus(x, y)] [gcd(0(), y)] = 2*y + y^2 >= y = [y] [gcd(s(x), 0())] = 4 + 5*x + x^2 > 1 + x = [s(x)] [gcd(s(x), s(y))] = 7 + 5*x + x^2 + 4*y + y^2 > 5*x + 6 + x^2 + 4*y + y^2 = [if_gcd(le(y, x), s(x), s(y))] [if_gcd(true(), s(x), s(y))] = 6 + 4*x + x^2 + 4*y + y^2 > 3*x + x^2 + 3 + 4*y + y^2 = [gcd(minus(x, y), s(y))] [if_gcd(false(), s(x), s(y))] = 6 + 4*x + x^2 + 4*y + y^2 > 3*y + y^2 + 3 + 4*x + x^2 = [gcd(minus(y, x), s(x))] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). 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) , gcd(0(), y) -> y , gcd(s(x), 0()) -> s(x) , gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) , if_gcd(true(), s(x), s(y)) -> gcd(minus(x, y), s(y)) , if_gcd(false(), s(x), s(y)) -> gcd(minus(y, x), s(x)) } Obligation: runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^2))