YES(O(1),O(n^2)) 584.81/149.13 YES(O(1),O(n^2)) 584.81/149.13 584.81/149.13 We are left with following problem, upon which TcT provides the 584.81/149.13 certificate YES(O(1),O(n^2)). 584.81/149.13 584.81/149.13 Strict Trs: 584.81/149.13 { -(@x, @y) -> #sub(@x, @y) 584.81/149.13 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 584.81/149.13 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.13 , diff#1(#false()) -> #abs(#0()) 584.81/149.13 , mult#2(@zs, @b2, @x) -> 584.81/149.13 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 584.81/149.13 , div(@x, @y) -> #div(@x, @y) 584.81/149.13 , bitToInt'#1(nil(), @n) -> #abs(#0()) 584.81/149.13 , bitToInt'#1(::(@x, @xs), @n) -> 584.81/149.13 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 584.81/149.13 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 584.81/149.13 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 584.81/149.13 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 584.81/149.13 , sub#1(tuple#2(@b, @_@1)) -> @b 584.81/149.13 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 584.81/149.13 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 584.81/149.13 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 584.81/149.13 , mult(@b1, @b2) -> mult#1(@b1, @b2) 584.81/149.13 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 584.81/149.13 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 584.81/149.13 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 584.81/149.13 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 584.81/149.13 , +(@x, @y) -> #add(@x, @y) 584.81/149.13 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 584.81/149.13 , sum#4(#false()) -> 584.81/149.13 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 584.81/149.13 , *(@x, @y) -> #mult(@x, @y) 584.81/149.13 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 584.81/149.13 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 584.81/149.13 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 584.81/149.13 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.13 sub'#4(sub'(@xs, @ys, @r'), @z) 584.81/149.13 , #equal(@x, @y) -> #eq(@x, @y) 584.81/149.13 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 584.81/149.13 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.13 sub'#3(diff(@x, @y, @r), @xs, @ys) 584.81/149.13 , compare#2(nil(), @x, @xs) -> #abs(#0()) 584.81/149.13 , compare#2(::(@y, @ys), @x, @xs) -> 584.81/149.13 compare#3(compare(@xs, @ys), @x, @y) 584.81/149.13 , sub'#4(tuple#2(@zs, @s), @z) -> 584.81/149.13 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 584.81/149.13 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 584.81/149.13 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 584.81/149.13 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 584.81/149.13 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 584.81/149.13 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 584.81/149.13 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 584.81/149.13 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 584.81/149.13 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 584.81/149.13 , mult#3(#false(), @b2, @zs) -> @zs 584.81/149.13 , add'#1(nil(), @b2, @r) -> nil() 584.81/149.13 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 584.81/149.13 , add'#2(nil(), @r, @x, @xs) -> nil() 584.81/149.13 , add'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.13 add'#3(sum(@x, @y, @r), @xs, @ys) 584.81/149.13 , diff(@x, @y, @r) -> 584.81/149.13 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.13 diff#1(#less(-(-(@x, @y), @r), #0()))) 584.81/149.13 , mult#1(nil(), @b2) -> nil() 584.81/149.13 , mult#1(::(@x, @xs), @b2) -> 584.81/149.13 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 584.81/149.13 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 584.81/149.13 , compare(@b1, @b2) -> compare#1(@b1, @b2) 584.81/149.13 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.13 , compare#6(#false()) -> #abs(#0()) 584.81/149.13 , compare#4(#true(), @r, @x, @y) -> 584.81/149.13 compare#5(#less(@x, @y), @x, @y) 584.81/149.13 , compare#4(#false(), @r, @x, @y) -> @r 584.81/149.13 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 584.81/149.13 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 584.81/149.13 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 584.81/149.13 , compare#1(nil(), @b2) -> #abs(#0()) 584.81/149.13 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 584.81/149.13 , #abs(#neg(@x)) -> #pos(@x) 584.81/149.13 , #abs(#pos(@x)) -> #pos(@x) 584.81/149.13 , #abs(#0()) -> #0() 584.81/149.13 , #abs(#s(@x)) -> #pos(#s(@x)) } 584.81/149.13 Weak Trs: 584.81/149.13 { #natsub(@x, #0()) -> @x 584.81/149.13 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 584.81/149.13 , #natdiv(#0(), #0()) -> #divByZero() 584.81/149.13 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 584.81/149.13 , #ckgt(#EQ()) -> #false() 584.81/149.13 , #ckgt(#LT()) -> #false() 584.81/149.13 , #ckgt(#GT()) -> #true() 584.81/149.13 , #add(#neg(#s(#0())), @y) -> #pred(@y) 584.81/149.13 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 584.81/149.13 , #add(#pos(#s(#0())), @y) -> #succ(@y) 584.81/149.13 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 584.81/149.13 , #add(#0(), @y) -> @y 584.81/149.13 , #and(#true(), #true()) -> #true() 584.81/149.13 , #and(#true(), #false()) -> #false() 584.81/149.13 , #and(#false(), #true()) -> #false() 584.81/149.13 , #and(#false(), #false()) -> #false() 584.81/149.13 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 584.81/149.13 , #compare(#neg(@x), #pos(@y)) -> #LT() 584.81/149.13 , #compare(#neg(@x), #0()) -> #LT() 584.81/149.13 , #compare(#pos(@x), #neg(@y)) -> #GT() 584.81/149.13 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 584.81/149.13 , #compare(#pos(@x), #0()) -> #GT() 584.81/149.13 , #compare(#0(), #neg(@y)) -> #GT() 584.81/149.13 , #compare(#0(), #pos(@y)) -> #LT() 584.81/149.13 , #compare(#0(), #0()) -> #EQ() 584.81/149.13 , #compare(#0(), #s(@y)) -> #LT() 584.81/149.13 , #compare(#s(@x), #0()) -> #GT() 584.81/149.13 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 584.81/149.13 , #eq(nil(), nil()) -> #true() 584.81/149.13 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.13 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 584.81/149.13 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 584.81/149.13 , #eq(#neg(@x), #pos(@y)) -> #false() 584.81/149.13 , #eq(#neg(@x), #0()) -> #false() 584.81/149.13 , #eq(#pos(@x), #neg(@y)) -> #false() 584.81/149.13 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 584.81/149.13 , #eq(#pos(@x), #0()) -> #false() 584.81/149.13 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 584.81/149.13 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.13 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.13 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 584.81/149.13 , #eq(::(@x_1, @x_2), nil()) -> #false() 584.81/149.13 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.13 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.13 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.13 , #eq(#0(), #neg(@y)) -> #false() 584.81/149.13 , #eq(#0(), #pos(@y)) -> #false() 584.81/149.13 , #eq(#0(), #0()) -> #true() 584.81/149.13 , #eq(#0(), #s(@y)) -> #false() 584.81/149.13 , #eq(#s(@x), #0()) -> #false() 584.81/149.13 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 584.81/149.13 , #natmult(#0(), @y) -> #0() 584.81/149.13 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 584.81/149.13 , #cklt(#EQ()) -> #false() 584.81/149.13 , #cklt(#LT()) -> #true() 584.81/149.13 , #cklt(#GT()) -> #false() 584.81/149.13 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 584.81/149.13 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 584.81/149.13 , #sub(@x, #0()) -> @x 584.81/149.13 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.13 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.13 , #mult(#neg(@x), #0()) -> #0() 584.81/149.13 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.13 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.13 , #mult(#pos(@x), #0()) -> #0() 584.81/149.13 , #mult(#0(), #neg(@y)) -> #0() 584.81/149.13 , #mult(#0(), #pos(@y)) -> #0() 584.81/149.13 , #mult(#0(), #0()) -> #0() 584.81/149.13 , #succ(#neg(#s(#0()))) -> #0() 584.81/149.13 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 584.81/149.13 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 584.81/149.13 , #succ(#0()) -> #pos(#s(#0())) 584.81/149.13 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.13 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.13 , #div(#neg(@x), #0()) -> #divByZero() 584.81/149.13 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.13 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.13 , #div(#pos(@x), #0()) -> #divByZero() 584.81/149.13 , #div(#0(), #neg(@y)) -> #0() 584.81/149.13 , #div(#0(), #pos(@y)) -> #0() 584.81/149.13 , #div(#0(), #0()) -> #divByZero() 584.81/149.13 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 584.81/149.13 , #pred(#pos(#s(#0()))) -> #0() 584.81/149.13 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 584.81/149.13 , #pred(#0()) -> #neg(#s(#0())) } 584.81/149.13 Obligation: 584.81/149.13 innermost runtime complexity 584.81/149.13 Answer: 584.81/149.13 YES(O(1),O(n^2)) 584.81/149.13 584.81/149.13 We add the following dependency tuples: 584.81/149.13 584.81/149.13 Strict DPs: 584.81/149.13 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.13 , sub^#(@b1, @b2) -> 584.81/149.13 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.13 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.13 #abs^#(#0())) 584.81/149.13 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.13 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.13 , #abs^#(#neg(@x)) -> c_62() 584.81/149.13 , #abs^#(#pos(@x)) -> c_63() 584.81/149.13 , #abs^#(#0()) -> c_64() 584.81/149.13 , #abs^#(#s(@x)) -> c_65() 584.81/149.13 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.13 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.13 , mult#2^#(@zs, @b2, @x) -> 584.81/149.13 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.13 #equal^#(@x, #pos(#s(#0())))) 584.81/149.13 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.13 , mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.13 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.13 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.13 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.13 , bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.13 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.13 *^#(@x, @n), 584.81/149.13 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.13 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.13 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.13 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.13 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.13 , sum^#(@x, @y, @r) -> 584.81/149.13 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.13 , sum#1^#(@s) -> 584.81/149.13 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.13 , mod^#(@x, @y) -> 584.81/149.13 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.13 *^#(@x, div(@x, @y)), 584.81/149.13 div^#(@x, @y)) 584.81/149.13 , mult3^#(@b1, @b2, @b3) -> 584.81/149.13 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.13 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.13 , leq^#(@b1, @b2) -> 584.81/149.13 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.13 compare^#(@b1, @b2)) 584.81/149.13 , #less^#(@x, @y) -> 584.81/149.13 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.13 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.13 , #greater^#(@x, @y) -> 584.81/149.13 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.13 , mult#1^#(nil(), @b2) -> c_49() 584.81/149.13 , mult#1^#(::(@x, @xs), @b2) -> 584.81/149.13 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.13 #abs^#(#0()), 584.81/149.13 mult^#(@xs, @b2)) 584.81/149.13 , bitToInt^#(@b) -> 584.81/149.13 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.13 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.13 , sum#2^#(#false(), @s) -> 584.81/149.13 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.13 #equal^#(@s, #pos(#s(#0())))) 584.81/149.13 , sum#3^#(#true(), @s) -> 584.81/149.13 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.13 , sum#3^#(#false(), @s) -> 584.81/149.13 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.13 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.13 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.13 , sum#4^#(#false()) -> 584.81/149.13 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.13 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.13 , sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.13 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.13 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.13 , sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.13 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.13 #equal^#(@s, #pos(#s(#0())))) 584.81/149.13 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.13 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.13 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.13 , diff^#(@x, @y, @r) -> 584.81/149.13 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.13 +^#(+(@x, @y), @r), 584.81/149.13 +^#(@x, @y), 584.81/149.13 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.13 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.13 -^#(-(@x, @y), @r), 584.81/149.13 -^#(@x, @y)) 584.81/149.13 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.13 , compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.13 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.13 , compare#3^#(@r, @x, @y) -> 584.81/149.13 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.13 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.13 , compare#5^#(#false(), @x, @y) -> 584.81/149.13 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.13 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.13 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.13 , compare#4^#(#true(), @r, @x, @y) -> 584.81/149.13 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.13 , compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.13 , add^#(@b1, @b2) -> 584.81/149.13 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.13 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.13 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.13 c_39(add'^#(@xs, @ys, @r')) 584.81/149.13 , sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.13 , sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.13 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.13 , add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.13 , add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.13 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.13 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.13 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.13 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.13 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.13 , compare#1^#(::(@x, @xs), @b2) -> 584.81/149.13 c_61(compare#2^#(@b2, @x, @xs)) } 584.81/149.13 Weak DPs: 584.81/149.13 { #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.13 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.13 , #sub^#(@x, #0()) -> c_122() 584.81/149.13 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.13 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.13 , #div^#(#neg(@x), #0()) -> c_138() 584.81/149.13 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.13 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.13 , #div^#(#pos(@x), #0()) -> c_141() 584.81/149.13 , #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.13 , #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.13 , #div^#(#0(), #0()) -> c_144() 584.81/149.13 , #ckgt^#(#EQ()) -> c_70() 584.81/149.13 , #ckgt^#(#LT()) -> c_71() 584.81/149.13 , #ckgt^#(#GT()) -> c_72() 584.81/149.13 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.13 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.13 , #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.13 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.13 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.13 , #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.13 , #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.13 , #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.13 , #compare^#(#0(), #0()) -> c_90() 584.81/149.13 , #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.13 , #compare^#(#s(@x), #0()) -> c_92() 584.81/149.13 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.13 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.13 , #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.13 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.13 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.13 , #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.13 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.13 , #add^#(#0(), @y) -> c_77() 584.81/149.13 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.13 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.13 , #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.13 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.13 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.13 , #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.13 , #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.13 , #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.13 , #mult^#(#0(), #0()) -> c_131() 584.81/149.13 , #cklt^#(#EQ()) -> c_117() 584.81/149.13 , #cklt^#(#LT()) -> c_118() 584.81/149.13 , #cklt^#(#GT()) -> c_119() 584.81/149.13 , #eq^#(nil(), nil()) -> c_94() 584.81/149.13 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.13 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.13 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.13 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.13 , #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.13 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.13 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.13 , #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.13 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.13 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.13 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.13 #eq^#(@x_1, @y_1), 584.81/149.13 #eq^#(@x_2, @y_2)) 584.81/149.13 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.13 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.13 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.13 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.13 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.13 #eq^#(@x_1, @y_1), 584.81/149.13 #eq^#(@x_2, @y_2)) 584.81/149.13 , #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.13 , #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.13 , #eq^#(#0(), #0()) -> c_111() 584.81/149.13 , #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.13 , #eq^#(#s(@x), #0()) -> c_113() 584.81/149.13 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.13 , #natsub^#(@x, #0()) -> c_66() 584.81/149.13 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.13 , #natdiv^#(#0(), #0()) -> c_68() 584.81/149.13 , #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.13 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.13 , #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.13 , #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.13 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.13 , #pred^#(#0()) -> c_148() 584.81/149.13 , #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.13 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.13 , #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.13 , #succ^#(#0()) -> c_135() 584.81/149.13 , #and^#(#true(), #true()) -> c_78() 584.81/149.13 , #and^#(#true(), #false()) -> c_79() 584.81/149.13 , #and^#(#false(), #true()) -> c_80() 584.81/149.13 , #and^#(#false(), #false()) -> c_81() 584.81/149.13 , #natmult^#(#0(), @y) -> c_115() 584.81/149.13 , #natmult^#(#s(@x), @y) -> 584.81/149.13 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.13 584.81/149.13 and mark the set of starting terms. 584.81/149.14 584.81/149.14 We are left with following problem, upon which TcT provides the 584.81/149.14 certificate YES(O(1),O(n^2)). 584.81/149.14 584.81/149.14 Strict DPs: 584.81/149.14 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.14 , sub^#(@b1, @b2) -> 584.81/149.14 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.14 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.14 #abs^#(#0())) 584.81/149.14 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.14 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.14 , #abs^#(#neg(@x)) -> c_62() 584.81/149.14 , #abs^#(#pos(@x)) -> c_63() 584.81/149.14 , #abs^#(#0()) -> c_64() 584.81/149.14 , #abs^#(#s(@x)) -> c_65() 584.81/149.14 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.14 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.14 , mult#2^#(@zs, @b2, @x) -> 584.81/149.14 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.14 #equal^#(@x, #pos(#s(#0())))) 584.81/149.14 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.14 , mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.14 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.14 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.14 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.14 , bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.14 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.14 *^#(@x, @n), 584.81/149.14 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.14 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.14 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.14 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.14 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.14 , sum^#(@x, @y, @r) -> 584.81/149.14 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.14 , sum#1^#(@s) -> 584.81/149.14 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.14 , mod^#(@x, @y) -> 584.81/149.14 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.14 *^#(@x, div(@x, @y)), 584.81/149.14 div^#(@x, @y)) 584.81/149.14 , mult3^#(@b1, @b2, @b3) -> 584.81/149.14 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.14 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.14 , leq^#(@b1, @b2) -> 584.81/149.14 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.14 compare^#(@b1, @b2)) 584.81/149.14 , #less^#(@x, @y) -> 584.81/149.14 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.14 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.14 , #greater^#(@x, @y) -> 584.81/149.14 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.14 , mult#1^#(nil(), @b2) -> c_49() 584.81/149.14 , mult#1^#(::(@x, @xs), @b2) -> 584.81/149.14 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.14 #abs^#(#0()), 584.81/149.14 mult^#(@xs, @b2)) 584.81/149.14 , bitToInt^#(@b) -> 584.81/149.14 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.14 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.14 , sum#2^#(#false(), @s) -> 584.81/149.14 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.14 #equal^#(@s, #pos(#s(#0())))) 584.81/149.14 , sum#3^#(#true(), @s) -> 584.81/149.14 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.14 , sum#3^#(#false(), @s) -> 584.81/149.14 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.14 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.14 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.14 , sum#4^#(#false()) -> 584.81/149.14 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.14 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.14 , sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.14 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.14 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.14 , sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.14 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.14 #equal^#(@s, #pos(#s(#0())))) 584.81/149.14 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.14 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.14 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.14 , diff^#(@x, @y, @r) -> 584.81/149.14 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.14 +^#(+(@x, @y), @r), 584.81/149.14 +^#(@x, @y), 584.81/149.14 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.14 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.14 -^#(-(@x, @y), @r), 584.81/149.14 -^#(@x, @y)) 584.81/149.14 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.14 , compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.14 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.14 , compare#3^#(@r, @x, @y) -> 584.81/149.14 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.14 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.14 , compare#5^#(#false(), @x, @y) -> 584.81/149.14 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.14 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.14 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.14 , compare#4^#(#true(), @r, @x, @y) -> 584.81/149.14 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.14 , compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.14 , add^#(@b1, @b2) -> 584.81/149.14 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.14 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.14 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.14 c_39(add'^#(@xs, @ys, @r')) 584.81/149.14 , sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.14 , sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.14 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.14 , add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.14 , add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.14 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.14 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.14 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.14 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.14 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.14 , compare#1^#(::(@x, @xs), @b2) -> 584.81/149.14 c_61(compare#2^#(@b2, @x, @xs)) } 584.81/149.14 Weak DPs: 584.81/149.14 { #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.14 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.14 , #sub^#(@x, #0()) -> c_122() 584.81/149.14 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.14 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.14 , #div^#(#neg(@x), #0()) -> c_138() 584.81/149.14 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.14 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.14 , #div^#(#pos(@x), #0()) -> c_141() 584.81/149.14 , #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.14 , #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.14 , #div^#(#0(), #0()) -> c_144() 584.81/149.14 , #ckgt^#(#EQ()) -> c_70() 584.81/149.14 , #ckgt^#(#LT()) -> c_71() 584.81/149.14 , #ckgt^#(#GT()) -> c_72() 584.81/149.14 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.14 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.14 , #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.14 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.14 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.14 , #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.14 , #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.14 , #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.14 , #compare^#(#0(), #0()) -> c_90() 584.81/149.14 , #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.14 , #compare^#(#s(@x), #0()) -> c_92() 584.81/149.14 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.14 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.14 , #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.14 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.14 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.14 , #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.14 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.14 , #add^#(#0(), @y) -> c_77() 584.81/149.14 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.14 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.14 , #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.14 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.14 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.14 , #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.14 , #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.14 , #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.14 , #mult^#(#0(), #0()) -> c_131() 584.81/149.14 , #cklt^#(#EQ()) -> c_117() 584.81/149.14 , #cklt^#(#LT()) -> c_118() 584.81/149.14 , #cklt^#(#GT()) -> c_119() 584.81/149.14 , #eq^#(nil(), nil()) -> c_94() 584.81/149.14 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.14 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.14 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.14 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.14 , #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.14 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.14 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.14 , #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.14 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.14 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.14 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.14 #eq^#(@x_1, @y_1), 584.81/149.14 #eq^#(@x_2, @y_2)) 584.81/149.14 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.14 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.14 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.14 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.14 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.14 #eq^#(@x_1, @y_1), 584.81/149.14 #eq^#(@x_2, @y_2)) 584.81/149.14 , #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.14 , #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.14 , #eq^#(#0(), #0()) -> c_111() 584.81/149.14 , #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.14 , #eq^#(#s(@x), #0()) -> c_113() 584.81/149.14 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.14 , #natsub^#(@x, #0()) -> c_66() 584.81/149.14 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.14 , #natdiv^#(#0(), #0()) -> c_68() 584.81/149.14 , #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.14 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.14 , #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.14 , #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.14 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.14 , #pred^#(#0()) -> c_148() 584.81/149.14 , #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.14 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.14 , #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.14 , #succ^#(#0()) -> c_135() 584.81/149.14 , #and^#(#true(), #true()) -> c_78() 584.81/149.14 , #and^#(#true(), #false()) -> c_79() 584.81/149.14 , #and^#(#false(), #true()) -> c_80() 584.81/149.14 , #and^#(#false(), #false()) -> c_81() 584.81/149.14 , #natmult^#(#0(), @y) -> c_115() 584.81/149.14 , #natmult^#(#s(@x), @y) -> 584.81/149.14 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.14 Weak Trs: 584.81/149.14 { #natsub(@x, #0()) -> @x 584.81/149.14 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 584.81/149.14 , -(@x, @y) -> #sub(@x, @y) 584.81/149.14 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 584.81/149.14 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.14 , diff#1(#false()) -> #abs(#0()) 584.81/149.14 , #natdiv(#0(), #0()) -> #divByZero() 584.81/149.14 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 584.81/149.14 , #ckgt(#EQ()) -> #false() 584.81/149.14 , #ckgt(#LT()) -> #false() 584.81/149.14 , #ckgt(#GT()) -> #true() 584.81/149.14 , #add(#neg(#s(#0())), @y) -> #pred(@y) 584.81/149.14 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 584.81/149.14 , #add(#pos(#s(#0())), @y) -> #succ(@y) 584.81/149.14 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 584.81/149.14 , #add(#0(), @y) -> @y 584.81/149.14 , mult#2(@zs, @b2, @x) -> 584.81/149.14 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 584.81/149.14 , div(@x, @y) -> #div(@x, @y) 584.81/149.14 , bitToInt'#1(nil(), @n) -> #abs(#0()) 584.81/149.14 , bitToInt'#1(::(@x, @xs), @n) -> 584.81/149.14 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 584.81/149.14 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 584.81/149.14 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 584.81/149.14 , #and(#true(), #true()) -> #true() 584.81/149.14 , #and(#true(), #false()) -> #false() 584.81/149.14 , #and(#false(), #true()) -> #false() 584.81/149.14 , #and(#false(), #false()) -> #false() 584.81/149.14 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 584.81/149.14 , sub#1(tuple#2(@b, @_@1)) -> @b 584.81/149.14 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 584.81/149.14 , #compare(#neg(@x), #pos(@y)) -> #LT() 584.81/149.14 , #compare(#neg(@x), #0()) -> #LT() 584.81/149.14 , #compare(#pos(@x), #neg(@y)) -> #GT() 584.81/149.14 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 584.81/149.14 , #compare(#pos(@x), #0()) -> #GT() 584.81/149.14 , #compare(#0(), #neg(@y)) -> #GT() 584.81/149.14 , #compare(#0(), #pos(@y)) -> #LT() 584.81/149.14 , #compare(#0(), #0()) -> #EQ() 584.81/149.14 , #compare(#0(), #s(@y)) -> #LT() 584.81/149.14 , #compare(#s(@x), #0()) -> #GT() 584.81/149.14 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 584.81/149.14 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 584.81/149.14 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 584.81/149.14 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 584.81/149.14 , mult(@b1, @b2) -> mult#1(@b1, @b2) 584.81/149.14 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 584.81/149.14 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 584.81/149.14 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 584.81/149.14 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 584.81/149.14 , +(@x, @y) -> #add(@x, @y) 584.81/149.14 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 584.81/149.14 , sum#4(#false()) -> 584.81/149.14 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 584.81/149.14 , *(@x, @y) -> #mult(@x, @y) 584.81/149.14 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 584.81/149.14 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 584.81/149.14 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 584.81/149.14 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.14 sub'#4(sub'(@xs, @ys, @r'), @z) 584.81/149.14 , #equal(@x, @y) -> #eq(@x, @y) 584.81/149.14 , #eq(nil(), nil()) -> #true() 584.81/149.14 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.14 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 584.81/149.14 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 584.81/149.14 , #eq(#neg(@x), #pos(@y)) -> #false() 584.81/149.14 , #eq(#neg(@x), #0()) -> #false() 584.81/149.14 , #eq(#pos(@x), #neg(@y)) -> #false() 584.81/149.14 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 584.81/149.14 , #eq(#pos(@x), #0()) -> #false() 584.81/149.14 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 584.81/149.14 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.14 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.14 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 584.81/149.14 , #eq(::(@x_1, @x_2), nil()) -> #false() 584.81/149.14 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.14 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.14 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.14 , #eq(#0(), #neg(@y)) -> #false() 584.81/149.14 , #eq(#0(), #pos(@y)) -> #false() 584.81/149.14 , #eq(#0(), #0()) -> #true() 584.81/149.14 , #eq(#0(), #s(@y)) -> #false() 584.81/149.14 , #eq(#s(@x), #0()) -> #false() 584.81/149.14 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 584.81/149.14 , #natmult(#0(), @y) -> #0() 584.81/149.14 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 584.81/149.14 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 584.81/149.14 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.14 sub'#3(diff(@x, @y, @r), @xs, @ys) 584.81/149.14 , compare#2(nil(), @x, @xs) -> #abs(#0()) 584.81/149.14 , compare#2(::(@y, @ys), @x, @xs) -> 584.81/149.14 compare#3(compare(@xs, @ys), @x, @y) 584.81/149.14 , sub'#4(tuple#2(@zs, @s), @z) -> 584.81/149.14 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 584.81/149.14 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 584.81/149.14 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 584.81/149.14 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 584.81/149.14 , #cklt(#EQ()) -> #false() 584.81/149.14 , #cklt(#LT()) -> #true() 584.81/149.14 , #cklt(#GT()) -> #false() 584.81/149.14 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 584.81/149.14 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 584.81/149.14 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 584.81/149.14 , #sub(@x, #0()) -> @x 584.81/149.14 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 584.81/149.14 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 584.81/149.14 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 584.81/149.14 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 584.81/149.14 , mult#3(#false(), @b2, @zs) -> @zs 584.81/149.14 , add'#1(nil(), @b2, @r) -> nil() 584.81/149.14 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 584.81/149.14 , add'#2(nil(), @r, @x, @xs) -> nil() 584.81/149.14 , add'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.14 add'#3(sum(@x, @y, @r), @xs, @ys) 584.81/149.14 , diff(@x, @y, @r) -> 584.81/149.14 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.14 diff#1(#less(-(-(@x, @y), @r), #0()))) 584.81/149.14 , mult#1(nil(), @b2) -> nil() 584.81/149.14 , mult#1(::(@x, @xs), @b2) -> 584.81/149.14 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 584.81/149.14 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.14 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.14 , #mult(#neg(@x), #0()) -> #0() 584.81/149.14 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.14 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.14 , #mult(#pos(@x), #0()) -> #0() 584.81/149.14 , #mult(#0(), #neg(@y)) -> #0() 584.81/149.14 , #mult(#0(), #pos(@y)) -> #0() 584.81/149.14 , #mult(#0(), #0()) -> #0() 584.81/149.14 , #succ(#neg(#s(#0()))) -> #0() 584.81/149.14 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 584.81/149.14 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 584.81/149.14 , #succ(#0()) -> #pos(#s(#0())) 584.81/149.14 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 584.81/149.14 , compare(@b1, @b2) -> compare#1(@b1, @b2) 584.81/149.14 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.14 , compare#6(#false()) -> #abs(#0()) 584.81/149.14 , compare#4(#true(), @r, @x, @y) -> 584.81/149.14 compare#5(#less(@x, @y), @x, @y) 584.81/149.14 , compare#4(#false(), @r, @x, @y) -> @r 584.81/149.14 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 584.81/149.14 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 584.81/149.14 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.14 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.14 , #div(#neg(@x), #0()) -> #divByZero() 584.81/149.14 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.14 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.14 , #div(#pos(@x), #0()) -> #divByZero() 584.81/149.14 , #div(#0(), #neg(@y)) -> #0() 584.81/149.14 , #div(#0(), #pos(@y)) -> #0() 584.81/149.14 , #div(#0(), #0()) -> #divByZero() 584.81/149.14 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 584.81/149.14 , compare#1(nil(), @b2) -> #abs(#0()) 584.81/149.14 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 584.81/149.14 , #abs(#neg(@x)) -> #pos(@x) 584.81/149.14 , #abs(#pos(@x)) -> #pos(@x) 584.81/149.14 , #abs(#0()) -> #0() 584.81/149.14 , #abs(#s(@x)) -> #pos(#s(@x)) 584.81/149.14 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 584.81/149.14 , #pred(#pos(#s(#0()))) -> #0() 584.81/149.14 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 584.81/149.14 , #pred(#0()) -> #neg(#s(#0())) } 584.81/149.14 Obligation: 584.81/149.14 innermost runtime complexity 584.81/149.14 Answer: 584.81/149.14 YES(O(1),O(n^2)) 584.81/149.14 584.81/149.14 We estimate the number of application of 584.81/149.15 {1,3,5,6,7,8,13,14,15,18,19,27,29,30,40,43,54,58,60,62} by 584.81/149.15 applications of 584.81/149.15 Pre({1,3,5,6,7,8,13,14,15,18,19,27,29,30,40,43,54,58,60,62}) = 584.81/149.15 {2,4,9,10,11,16,17,21,22,23,25,26,31,32,33,34,35,36,37,38,39,42,45,46,48,49,50,51,52,53,55,56,59,61,64}. 584.81/149.15 Here rules are labeled as follows: 584.81/149.15 584.81/149.15 DPs: 584.81/149.15 { 1: -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.15 , 2: sub^#(@b1, @b2) -> 584.81/149.15 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.15 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.15 #abs^#(#0())) 584.81/149.15 , 3: sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.15 , 4: sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.15 , 5: #abs^#(#neg(@x)) -> c_62() 584.81/149.15 , 6: #abs^#(#pos(@x)) -> c_63() 584.81/149.15 , 7: #abs^#(#0()) -> c_64() 584.81/149.15 , 8: #abs^#(#s(@x)) -> c_65() 584.81/149.15 , 9: diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.15 , 10: diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.15 , 11: mult#2^#(@zs, @b2, @x) -> 584.81/149.15 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.15 #equal^#(@x, #pos(#s(#0())))) 584.81/149.15 , 12: mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.15 , 13: mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.15 , 14: #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.15 , 15: div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.15 , 16: bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.15 , 17: bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.15 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.15 *^#(@x, @n), 584.81/149.15 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.15 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.15 , 18: +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.15 , 19: *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.15 , 20: bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.15 , 21: sum^#(@x, @y, @r) -> 584.81/149.15 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.15 , 22: sum#1^#(@s) -> 584.81/149.15 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.15 , 23: mod^#(@x, @y) -> 584.81/149.15 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.15 *^#(@x, div(@x, @y)), 584.81/149.15 div^#(@x, @y)) 584.81/149.15 , 24: mult3^#(@b1, @b2, @b3) -> 584.81/149.15 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.15 , 25: mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.15 , 26: leq^#(@b1, @b2) -> 584.81/149.15 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.15 compare^#(@b1, @b2)) 584.81/149.15 , 27: #less^#(@x, @y) -> 584.81/149.15 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.15 , 28: compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.15 , 29: #greater^#(@x, @y) -> 584.81/149.15 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.15 , 30: mult#1^#(nil(), @b2) -> c_49() 584.81/149.15 , 31: mult#1^#(::(@x, @xs), @b2) -> 584.81/149.15 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.15 #abs^#(#0()), 584.81/149.15 mult^#(@xs, @b2)) 584.81/149.15 , 32: bitToInt^#(@b) -> 584.81/149.15 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.15 , 33: sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.15 , 34: sum#2^#(#false(), @s) -> 584.81/149.15 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.15 #equal^#(@s, #pos(#s(#0())))) 584.81/149.15 , 35: sum#3^#(#true(), @s) -> 584.81/149.15 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.15 , 36: sum#3^#(#false(), @s) -> 584.81/149.15 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.15 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.15 , 37: sum#4^#(#true()) -> 584.81/149.15 c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.15 , 38: sum#4^#(#false()) -> 584.81/149.15 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.15 , 39: sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.15 , 40: sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.15 , 41: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.15 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.15 , 42: sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.15 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.15 #equal^#(@s, #pos(#s(#0())))) 584.81/149.15 , 43: sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.15 , 44: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.15 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.15 , 45: diff^#(@x, @y, @r) -> 584.81/149.15 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.15 +^#(+(@x, @y), @r), 584.81/149.15 +^#(@x, @y), 584.81/149.15 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.15 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.15 -^#(-(@x, @y), @r), 584.81/149.15 -^#(@x, @y)) 584.81/149.15 , 46: compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.15 , 47: compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.15 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.15 , 48: compare#3^#(@r, @x, @y) -> 584.81/149.15 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.15 , 49: compare#5^#(#true(), @x, @y) -> 584.81/149.15 c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.15 , 50: compare#5^#(#false(), @x, @y) -> 584.81/149.15 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.15 , 51: compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.15 , 52: compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.15 , 53: compare#4^#(#true(), @r, @x, @y) -> 584.81/149.15 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.15 , 54: compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.15 , 55: add^#(@b1, @b2) -> 584.81/149.15 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.15 , 56: add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.15 , 57: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.15 c_39(add'^#(@xs, @ys, @r')) 584.81/149.15 , 58: sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.15 , 59: sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.15 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.15 , 60: add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.15 , 61: add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.15 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.15 , 62: add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.15 , 63: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.15 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.15 , 64: compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.15 , 65: compare#1^#(::(@x, @xs), @b2) -> 584.81/149.15 c_61(compare#2^#(@b2, @x, @xs)) 584.81/149.15 , 66: #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.15 , 67: #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.15 , 68: #sub^#(@x, #0()) -> c_122() 584.81/149.15 , 69: #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.15 , 70: #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.15 , 71: #div^#(#neg(@x), #0()) -> c_138() 584.81/149.15 , 72: #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.15 , 73: #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.15 , 74: #div^#(#pos(@x), #0()) -> c_141() 584.81/149.15 , 75: #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.15 , 76: #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.15 , 77: #div^#(#0(), #0()) -> c_144() 584.81/149.15 , 78: #ckgt^#(#EQ()) -> c_70() 584.81/149.15 , 79: #ckgt^#(#LT()) -> c_71() 584.81/149.15 , 80: #ckgt^#(#GT()) -> c_72() 584.81/149.15 , 81: #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.15 , 82: #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.15 , 83: #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.15 , 84: #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.15 , 85: #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.15 , 86: #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.15 , 87: #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.15 , 88: #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.15 , 89: #compare^#(#0(), #0()) -> c_90() 584.81/149.15 , 90: #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.15 , 91: #compare^#(#s(@x), #0()) -> c_92() 584.81/149.15 , 92: #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.15 , 93: #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.15 , 94: #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.15 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.15 , 95: #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.15 , 96: #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.15 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.15 , 97: #add^#(#0(), @y) -> c_77() 584.81/149.15 , 98: #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.15 , 99: #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.15 , 100: #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.15 , 101: #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.15 , 102: #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.15 , 103: #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.15 , 104: #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.15 , 105: #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.15 , 106: #mult^#(#0(), #0()) -> c_131() 584.81/149.15 , 107: #cklt^#(#EQ()) -> c_117() 584.81/149.15 , 108: #cklt^#(#LT()) -> c_118() 584.81/149.15 , 109: #cklt^#(#GT()) -> c_119() 584.81/149.15 , 110: #eq^#(nil(), nil()) -> c_94() 584.81/149.15 , 111: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.15 , 112: #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.15 , 113: #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.15 , 114: #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.15 , 115: #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.15 , 116: #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.15 , 117: #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.15 , 118: #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.15 , 119: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.15 , 120: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.15 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.15 #eq^#(@x_1, @y_1), 584.81/149.15 #eq^#(@x_2, @y_2)) 584.81/149.15 , 121: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.15 , 122: #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.15 , 123: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.15 , 124: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.15 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.15 #eq^#(@x_1, @y_1), 584.81/149.15 #eq^#(@x_2, @y_2)) 584.81/149.15 , 125: #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.15 , 126: #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.15 , 127: #eq^#(#0(), #0()) -> c_111() 584.81/149.15 , 128: #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.15 , 129: #eq^#(#s(@x), #0()) -> c_113() 584.81/149.15 , 130: #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.15 , 131: #natsub^#(@x, #0()) -> c_66() 584.81/149.15 , 132: #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.15 , 133: #natdiv^#(#0(), #0()) -> c_68() 584.81/149.15 , 134: #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.15 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.15 , 135: #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.15 , 136: #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.15 , 137: #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.15 , 138: #pred^#(#0()) -> c_148() 584.81/149.15 , 139: #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.15 , 140: #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.15 , 141: #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.15 , 142: #succ^#(#0()) -> c_135() 584.81/149.15 , 143: #and^#(#true(), #true()) -> c_78() 584.81/149.15 , 144: #and^#(#true(), #false()) -> c_79() 584.81/149.15 , 145: #and^#(#false(), #true()) -> c_80() 584.81/149.15 , 146: #and^#(#false(), #false()) -> c_81() 584.81/149.15 , 147: #natmult^#(#0(), @y) -> c_115() 584.81/149.15 , 148: #natmult^#(#s(@x), @y) -> 584.81/149.15 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.15 584.81/149.15 We are left with following problem, upon which TcT provides the 584.81/149.15 certificate YES(O(1),O(n^2)). 584.81/149.15 584.81/149.15 Strict DPs: 584.81/149.15 { sub^#(@b1, @b2) -> 584.81/149.15 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.15 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.15 #abs^#(#0())) 584.81/149.15 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.15 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.15 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.15 , mult#2^#(@zs, @b2, @x) -> 584.81/149.15 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.15 #equal^#(@x, #pos(#s(#0())))) 584.81/149.15 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.15 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.15 , bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.15 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.15 *^#(@x, @n), 584.81/149.15 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.15 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.15 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.15 , sum^#(@x, @y, @r) -> 584.81/149.15 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.15 , sum#1^#(@s) -> 584.81/149.15 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.15 , mod^#(@x, @y) -> 584.81/149.15 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.15 *^#(@x, div(@x, @y)), 584.81/149.15 div^#(@x, @y)) 584.81/149.15 , mult3^#(@b1, @b2, @b3) -> 584.81/149.15 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.15 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.15 , leq^#(@b1, @b2) -> 584.81/149.15 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.15 compare^#(@b1, @b2)) 584.81/149.15 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.15 , mult#1^#(::(@x, @xs), @b2) -> 584.81/149.15 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.15 #abs^#(#0()), 584.81/149.15 mult^#(@xs, @b2)) 584.81/149.15 , bitToInt^#(@b) -> 584.81/149.15 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.15 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.15 , sum#2^#(#false(), @s) -> 584.81/149.15 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.15 #equal^#(@s, #pos(#s(#0())))) 584.81/149.15 , sum#3^#(#true(), @s) -> 584.81/149.15 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.15 , sum#3^#(#false(), @s) -> 584.81/149.15 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.15 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.15 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.15 , sum#4^#(#false()) -> 584.81/149.15 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.15 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.15 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.15 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.15 , sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.15 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.15 #equal^#(@s, #pos(#s(#0())))) 584.81/149.15 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.15 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.15 , diff^#(@x, @y, @r) -> 584.81/149.15 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.15 +^#(+(@x, @y), @r), 584.81/149.15 +^#(@x, @y), 584.81/149.15 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.15 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.15 -^#(-(@x, @y), @r), 584.81/149.15 -^#(@x, @y)) 584.81/149.15 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.15 , compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.15 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.15 , compare#3^#(@r, @x, @y) -> 584.81/149.15 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.15 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.15 , compare#5^#(#false(), @x, @y) -> 584.81/149.15 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.15 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.15 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.15 , compare#4^#(#true(), @r, @x, @y) -> 584.81/149.15 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.15 , add^#(@b1, @b2) -> 584.81/149.15 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.15 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.15 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.15 c_39(add'^#(@xs, @ys, @r')) 584.81/149.15 , sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.15 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.15 , add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.15 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.15 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.15 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.15 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.15 , compare#1^#(::(@x, @xs), @b2) -> 584.81/149.15 c_61(compare#2^#(@b2, @x, @xs)) } 584.81/149.15 Weak DPs: 584.81/149.15 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.15 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.15 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.15 , #sub^#(@x, #0()) -> c_122() 584.81/149.15 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.15 , #abs^#(#neg(@x)) -> c_62() 584.81/149.15 , #abs^#(#pos(@x)) -> c_63() 584.81/149.15 , #abs^#(#0()) -> c_64() 584.81/149.15 , #abs^#(#s(@x)) -> c_65() 584.81/149.15 , mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.15 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.15 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.15 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.15 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.15 , #div^#(#neg(@x), #0()) -> c_138() 584.81/149.15 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.15 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.15 , #div^#(#pos(@x), #0()) -> c_141() 584.81/149.15 , #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.15 , #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.15 , #div^#(#0(), #0()) -> c_144() 584.81/149.15 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.15 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.15 , #less^#(@x, @y) -> 584.81/149.15 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.15 , #greater^#(@x, @y) -> 584.81/149.15 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.15 , #ckgt^#(#EQ()) -> c_70() 584.81/149.15 , #ckgt^#(#LT()) -> c_71() 584.81/149.15 , #ckgt^#(#GT()) -> c_72() 584.81/149.15 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.15 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.15 , #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.15 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.15 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.15 , #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.16 , #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.16 , #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.16 , #compare^#(#0(), #0()) -> c_90() 584.81/149.16 , #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.16 , #compare^#(#s(@x), #0()) -> c_92() 584.81/149.16 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.16 , mult#1^#(nil(), @b2) -> c_49() 584.81/149.16 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.16 , #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.16 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.16 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.16 , #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.16 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.16 , #add^#(#0(), @y) -> c_77() 584.81/149.16 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.16 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.16 , #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.16 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.16 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.16 , #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.16 , #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.16 , #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.16 , #mult^#(#0(), #0()) -> c_131() 584.81/149.16 , sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.16 , #cklt^#(#EQ()) -> c_117() 584.81/149.16 , #cklt^#(#LT()) -> c_118() 584.81/149.16 , #cklt^#(#GT()) -> c_119() 584.81/149.16 , #eq^#(nil(), nil()) -> c_94() 584.81/149.16 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.16 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.16 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.16 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.16 , #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.16 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.16 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.16 , #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.16 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.16 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.16 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.16 #eq^#(@x_1, @y_1), 584.81/149.16 #eq^#(@x_2, @y_2)) 584.81/149.16 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.16 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.16 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.16 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.16 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.16 #eq^#(@x_1, @y_1), 584.81/149.16 #eq^#(@x_2, @y_2)) 584.81/149.16 , #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.16 , #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.16 , #eq^#(#0(), #0()) -> c_111() 584.81/149.16 , #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.16 , #eq^#(#s(@x), #0()) -> c_113() 584.81/149.16 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.16 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.16 , compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.16 , sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.16 , add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.16 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.16 , #natsub^#(@x, #0()) -> c_66() 584.81/149.16 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.16 , #natdiv^#(#0(), #0()) -> c_68() 584.81/149.16 , #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.16 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.16 , #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.16 , #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.16 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.16 , #pred^#(#0()) -> c_148() 584.81/149.16 , #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.16 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.16 , #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.16 , #succ^#(#0()) -> c_135() 584.81/149.16 , #and^#(#true(), #true()) -> c_78() 584.81/149.16 , #and^#(#true(), #false()) -> c_79() 584.81/149.16 , #and^#(#false(), #true()) -> c_80() 584.81/149.16 , #and^#(#false(), #false()) -> c_81() 584.81/149.16 , #natmult^#(#0(), @y) -> c_115() 584.81/149.16 , #natmult^#(#s(@x), @y) -> 584.81/149.16 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.16 Weak Trs: 584.81/149.16 { #natsub(@x, #0()) -> @x 584.81/149.16 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 584.81/149.16 , -(@x, @y) -> #sub(@x, @y) 584.81/149.16 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 584.81/149.16 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.16 , diff#1(#false()) -> #abs(#0()) 584.81/149.16 , #natdiv(#0(), #0()) -> #divByZero() 584.81/149.16 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 584.81/149.16 , #ckgt(#EQ()) -> #false() 584.81/149.16 , #ckgt(#LT()) -> #false() 584.81/149.16 , #ckgt(#GT()) -> #true() 584.81/149.16 , #add(#neg(#s(#0())), @y) -> #pred(@y) 584.81/149.16 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 584.81/149.16 , #add(#pos(#s(#0())), @y) -> #succ(@y) 584.81/149.16 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 584.81/149.16 , #add(#0(), @y) -> @y 584.81/149.16 , mult#2(@zs, @b2, @x) -> 584.81/149.16 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 584.81/149.16 , div(@x, @y) -> #div(@x, @y) 584.81/149.16 , bitToInt'#1(nil(), @n) -> #abs(#0()) 584.81/149.16 , bitToInt'#1(::(@x, @xs), @n) -> 584.81/149.16 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 584.81/149.16 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 584.81/149.16 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 584.81/149.16 , #and(#true(), #true()) -> #true() 584.81/149.16 , #and(#true(), #false()) -> #false() 584.81/149.16 , #and(#false(), #true()) -> #false() 584.81/149.16 , #and(#false(), #false()) -> #false() 584.81/149.16 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 584.81/149.16 , sub#1(tuple#2(@b, @_@1)) -> @b 584.81/149.16 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 584.81/149.16 , #compare(#neg(@x), #pos(@y)) -> #LT() 584.81/149.16 , #compare(#neg(@x), #0()) -> #LT() 584.81/149.16 , #compare(#pos(@x), #neg(@y)) -> #GT() 584.81/149.16 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 584.81/149.16 , #compare(#pos(@x), #0()) -> #GT() 584.81/149.16 , #compare(#0(), #neg(@y)) -> #GT() 584.81/149.16 , #compare(#0(), #pos(@y)) -> #LT() 584.81/149.16 , #compare(#0(), #0()) -> #EQ() 584.81/149.16 , #compare(#0(), #s(@y)) -> #LT() 584.81/149.16 , #compare(#s(@x), #0()) -> #GT() 584.81/149.16 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 584.81/149.16 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 584.81/149.16 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 584.81/149.16 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 584.81/149.16 , mult(@b1, @b2) -> mult#1(@b1, @b2) 584.81/149.16 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 584.81/149.16 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 584.81/149.16 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 584.81/149.16 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 584.81/149.16 , +(@x, @y) -> #add(@x, @y) 584.81/149.16 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 584.81/149.16 , sum#4(#false()) -> 584.81/149.16 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 584.81/149.16 , *(@x, @y) -> #mult(@x, @y) 584.81/149.16 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 584.81/149.16 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 584.81/149.16 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 584.81/149.16 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.16 sub'#4(sub'(@xs, @ys, @r'), @z) 584.81/149.16 , #equal(@x, @y) -> #eq(@x, @y) 584.81/149.16 , #eq(nil(), nil()) -> #true() 584.81/149.16 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.16 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 584.81/149.16 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 584.81/149.16 , #eq(#neg(@x), #pos(@y)) -> #false() 584.81/149.16 , #eq(#neg(@x), #0()) -> #false() 584.81/149.16 , #eq(#pos(@x), #neg(@y)) -> #false() 584.81/149.16 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 584.81/149.16 , #eq(#pos(@x), #0()) -> #false() 584.81/149.16 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 584.81/149.16 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.16 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.16 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 584.81/149.16 , #eq(::(@x_1, @x_2), nil()) -> #false() 584.81/149.16 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.16 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.16 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.16 , #eq(#0(), #neg(@y)) -> #false() 584.81/149.16 , #eq(#0(), #pos(@y)) -> #false() 584.81/149.16 , #eq(#0(), #0()) -> #true() 584.81/149.16 , #eq(#0(), #s(@y)) -> #false() 584.81/149.16 , #eq(#s(@x), #0()) -> #false() 584.81/149.16 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 584.81/149.16 , #natmult(#0(), @y) -> #0() 584.81/149.16 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 584.81/149.16 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 584.81/149.16 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.16 sub'#3(diff(@x, @y, @r), @xs, @ys) 584.81/149.16 , compare#2(nil(), @x, @xs) -> #abs(#0()) 584.81/149.16 , compare#2(::(@y, @ys), @x, @xs) -> 584.81/149.16 compare#3(compare(@xs, @ys), @x, @y) 584.81/149.16 , sub'#4(tuple#2(@zs, @s), @z) -> 584.81/149.16 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 584.81/149.16 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 584.81/149.16 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 584.81/149.16 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 584.81/149.16 , #cklt(#EQ()) -> #false() 584.81/149.16 , #cklt(#LT()) -> #true() 584.81/149.16 , #cklt(#GT()) -> #false() 584.81/149.16 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 584.81/149.16 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 584.81/149.16 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 584.81/149.16 , #sub(@x, #0()) -> @x 584.81/149.16 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 584.81/149.16 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 584.81/149.16 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 584.81/149.16 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 584.81/149.16 , mult#3(#false(), @b2, @zs) -> @zs 584.81/149.16 , add'#1(nil(), @b2, @r) -> nil() 584.81/149.16 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 584.81/149.16 , add'#2(nil(), @r, @x, @xs) -> nil() 584.81/149.16 , add'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.16 add'#3(sum(@x, @y, @r), @xs, @ys) 584.81/149.16 , diff(@x, @y, @r) -> 584.81/149.16 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.16 diff#1(#less(-(-(@x, @y), @r), #0()))) 584.81/149.16 , mult#1(nil(), @b2) -> nil() 584.81/149.16 , mult#1(::(@x, @xs), @b2) -> 584.81/149.16 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 584.81/149.16 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.16 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.16 , #mult(#neg(@x), #0()) -> #0() 584.81/149.16 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.16 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.16 , #mult(#pos(@x), #0()) -> #0() 584.81/149.16 , #mult(#0(), #neg(@y)) -> #0() 584.81/149.16 , #mult(#0(), #pos(@y)) -> #0() 584.81/149.16 , #mult(#0(), #0()) -> #0() 584.81/149.16 , #succ(#neg(#s(#0()))) -> #0() 584.81/149.16 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 584.81/149.16 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 584.81/149.16 , #succ(#0()) -> #pos(#s(#0())) 584.81/149.16 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 584.81/149.16 , compare(@b1, @b2) -> compare#1(@b1, @b2) 584.81/149.16 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.16 , compare#6(#false()) -> #abs(#0()) 584.81/149.16 , compare#4(#true(), @r, @x, @y) -> 584.81/149.16 compare#5(#less(@x, @y), @x, @y) 584.81/149.16 , compare#4(#false(), @r, @x, @y) -> @r 584.81/149.16 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 584.81/149.16 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 584.81/149.16 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.16 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.16 , #div(#neg(@x), #0()) -> #divByZero() 584.81/149.16 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.16 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.16 , #div(#pos(@x), #0()) -> #divByZero() 584.81/149.16 , #div(#0(), #neg(@y)) -> #0() 584.81/149.16 , #div(#0(), #pos(@y)) -> #0() 584.81/149.16 , #div(#0(), #0()) -> #divByZero() 584.81/149.16 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 584.81/149.16 , compare#1(nil(), @b2) -> #abs(#0()) 584.81/149.16 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 584.81/149.16 , #abs(#neg(@x)) -> #pos(@x) 584.81/149.16 , #abs(#pos(@x)) -> #pos(@x) 584.81/149.16 , #abs(#0()) -> #0() 584.81/149.16 , #abs(#s(@x)) -> #pos(#s(@x)) 584.81/149.16 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 584.81/149.16 , #pred(#pos(#s(#0()))) -> #0() 584.81/149.16 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 584.81/149.16 , #pred(#0()) -> #neg(#s(#0())) } 584.81/149.16 Obligation: 584.81/149.16 innermost runtime complexity 584.81/149.16 Answer: 584.81/149.16 YES(O(1),O(n^2)) 584.81/149.16 584.81/149.16 We estimate the number of application of 584.81/149.16 {3,4,7,12,19,21,23,24,25,30,33,35,36,44} by applications of 584.81/149.16 Pre({3,4,7,12,19,21,23,24,25,30,33,35,36,44}) = 584.81/149.16 {9,11,16,20,22,27,29,34,37,45}. Here rules are labeled as follows: 584.81/149.16 584.81/149.16 DPs: 584.81/149.16 { 1: sub^#(@b1, @b2) -> 584.81/149.16 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.16 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.16 #abs^#(#0())) 584.81/149.16 , 2: sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.16 , 3: diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.16 , 4: diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.16 , 5: mult#2^#(@zs, @b2, @x) -> 584.81/149.16 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.16 #equal^#(@x, #pos(#s(#0())))) 584.81/149.16 , 6: mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.16 , 7: bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.16 , 8: bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.16 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.16 *^#(@x, @n), 584.81/149.16 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.16 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.16 , 9: bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.16 , 10: sum^#(@x, @y, @r) -> 584.81/149.16 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.16 , 11: sum#1^#(@s) -> 584.81/149.16 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.16 , 12: mod^#(@x, @y) -> 584.81/149.16 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.16 *^#(@x, div(@x, @y)), 584.81/149.16 div^#(@x, @y)) 584.81/149.16 , 13: mult3^#(@b1, @b2, @b3) -> 584.81/149.16 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.16 , 14: mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.16 , 15: leq^#(@b1, @b2) -> 584.81/149.16 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.16 compare^#(@b1, @b2)) 584.81/149.16 , 16: compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.16 , 17: mult#1^#(::(@x, @xs), @b2) -> 584.81/149.16 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.16 #abs^#(#0()), 584.81/149.16 mult^#(@xs, @b2)) 584.81/149.16 , 18: bitToInt^#(@b) -> 584.81/149.16 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.16 , 19: sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.16 , 20: sum#2^#(#false(), @s) -> 584.81/149.16 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.16 #equal^#(@s, #pos(#s(#0())))) 584.81/149.16 , 21: sum#3^#(#true(), @s) -> 584.81/149.16 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.16 , 22: sum#3^#(#false(), @s) -> 584.81/149.16 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.16 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.16 , 23: sum#4^#(#true()) -> 584.81/149.16 c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.16 , 24: sum#4^#(#false()) -> 584.81/149.16 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.16 , 25: sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.16 , 26: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.16 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.16 , 27: sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.16 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.16 #equal^#(@s, #pos(#s(#0())))) 584.81/149.16 , 28: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.16 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.16 , 29: diff^#(@x, @y, @r) -> 584.81/149.16 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.16 +^#(+(@x, @y), @r), 584.81/149.16 +^#(@x, @y), 584.81/149.16 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.16 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.16 -^#(-(@x, @y), @r), 584.81/149.16 -^#(@x, @y)) 584.81/149.16 , 30: compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.16 , 31: compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.16 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.16 , 32: compare#3^#(@r, @x, @y) -> 584.81/149.16 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.16 , 33: compare#5^#(#true(), @x, @y) -> 584.81/149.16 c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.16 , 34: compare#5^#(#false(), @x, @y) -> 584.81/149.16 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.16 , 35: compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.16 , 36: compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.16 , 37: compare#4^#(#true(), @r, @x, @y) -> 584.81/149.16 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.16 , 38: add^#(@b1, @b2) -> 584.81/149.16 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.16 , 39: add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.16 , 40: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.16 c_39(add'^#(@xs, @ys, @r')) 584.81/149.16 , 41: sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.16 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.16 , 42: add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.16 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.16 , 43: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.16 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.16 , 44: compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.16 , 45: compare#1^#(::(@x, @xs), @b2) -> 584.81/149.16 c_61(compare#2^#(@b2, @x, @xs)) 584.81/149.16 , 46: -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.16 , 47: #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.16 , 48: #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.16 , 49: #sub^#(@x, #0()) -> c_122() 584.81/149.16 , 50: sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.16 , 51: #abs^#(#neg(@x)) -> c_62() 584.81/149.16 , 52: #abs^#(#pos(@x)) -> c_63() 584.81/149.16 , 53: #abs^#(#0()) -> c_64() 584.81/149.16 , 54: #abs^#(#s(@x)) -> c_65() 584.81/149.16 , 55: mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.16 , 56: #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.16 , 57: div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.16 , 58: #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.16 , 59: #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.16 , 60: #div^#(#neg(@x), #0()) -> c_138() 584.81/149.16 , 61: #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.16 , 62: #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.16 , 63: #div^#(#pos(@x), #0()) -> c_141() 584.81/149.16 , 64: #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.17 , 65: #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.17 , 66: #div^#(#0(), #0()) -> c_144() 584.81/149.17 , 67: +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.17 , 68: *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.17 , 69: #less^#(@x, @y) -> 584.81/149.17 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.17 , 70: #greater^#(@x, @y) -> 584.81/149.17 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.17 , 71: #ckgt^#(#EQ()) -> c_70() 584.81/149.17 , 72: #ckgt^#(#LT()) -> c_71() 584.81/149.17 , 73: #ckgt^#(#GT()) -> c_72() 584.81/149.17 , 74: #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.17 , 75: #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.17 , 76: #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.17 , 77: #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.17 , 78: #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.17 , 79: #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.17 , 80: #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.17 , 81: #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.17 , 82: #compare^#(#0(), #0()) -> c_90() 584.81/149.17 , 83: #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.17 , 84: #compare^#(#s(@x), #0()) -> c_92() 584.81/149.17 , 85: #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.17 , 86: mult#1^#(nil(), @b2) -> c_49() 584.81/149.17 , 87: #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.17 , 88: #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.17 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.17 , 89: #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.17 , 90: #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.17 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.17 , 91: #add^#(#0(), @y) -> c_77() 584.81/149.17 , 92: #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.17 , 93: #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.17 , 94: #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.17 , 95: #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.17 , 96: #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.17 , 97: #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.17 , 98: #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.17 , 99: #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.17 , 100: #mult^#(#0(), #0()) -> c_131() 584.81/149.17 , 101: sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.17 , 102: #cklt^#(#EQ()) -> c_117() 584.81/149.17 , 103: #cklt^#(#LT()) -> c_118() 584.81/149.17 , 104: #cklt^#(#GT()) -> c_119() 584.81/149.17 , 105: #eq^#(nil(), nil()) -> c_94() 584.81/149.17 , 106: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.17 , 107: #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.17 , 108: #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.17 , 109: #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.17 , 110: #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.17 , 111: #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.17 , 112: #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.17 , 113: #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.17 , 114: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.17 , 115: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.17 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.17 #eq^#(@x_1, @y_1), 584.81/149.17 #eq^#(@x_2, @y_2)) 584.81/149.17 , 116: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.17 , 117: #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.17 , 118: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.17 , 119: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.17 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.17 #eq^#(@x_1, @y_1), 584.81/149.17 #eq^#(@x_2, @y_2)) 584.81/149.17 , 120: #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.17 , 121: #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.17 , 122: #eq^#(#0(), #0()) -> c_111() 584.81/149.17 , 123: #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.17 , 124: #eq^#(#s(@x), #0()) -> c_113() 584.81/149.17 , 125: #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.17 , 126: sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.17 , 127: compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.17 , 128: sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.17 , 129: add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.17 , 130: add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.17 , 131: #natsub^#(@x, #0()) -> c_66() 584.81/149.17 , 132: #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.17 , 133: #natdiv^#(#0(), #0()) -> c_68() 584.81/149.17 , 134: #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.17 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.17 , 135: #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.17 , 136: #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.17 , 137: #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.17 , 138: #pred^#(#0()) -> c_148() 584.81/149.17 , 139: #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.17 , 140: #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.17 , 141: #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.17 , 142: #succ^#(#0()) -> c_135() 584.81/149.17 , 143: #and^#(#true(), #true()) -> c_78() 584.81/149.17 , 144: #and^#(#true(), #false()) -> c_79() 584.81/149.17 , 145: #and^#(#false(), #true()) -> c_80() 584.81/149.17 , 146: #and^#(#false(), #false()) -> c_81() 584.81/149.17 , 147: #natmult^#(#0(), @y) -> c_115() 584.81/149.17 , 148: #natmult^#(#s(@x), @y) -> 584.81/149.17 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.17 584.81/149.17 We are left with following problem, upon which TcT provides the 584.81/149.17 certificate YES(O(1),O(n^2)). 584.81/149.17 584.81/149.17 Strict DPs: 584.81/149.17 { sub^#(@b1, @b2) -> 584.81/149.17 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.17 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.17 #abs^#(#0())) 584.81/149.17 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.17 , mult#2^#(@zs, @b2, @x) -> 584.81/149.17 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.17 #equal^#(@x, #pos(#s(#0())))) 584.81/149.17 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.17 , bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.17 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.17 *^#(@x, @n), 584.81/149.17 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.17 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.17 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.17 , sum^#(@x, @y, @r) -> 584.81/149.17 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.17 , sum#1^#(@s) -> 584.81/149.17 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.17 , mult3^#(@b1, @b2, @b3) -> 584.81/149.17 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.17 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.17 , leq^#(@b1, @b2) -> 584.81/149.17 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.17 compare^#(@b1, @b2)) 584.81/149.17 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.17 , mult#1^#(::(@x, @xs), @b2) -> 584.81/149.17 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.17 #abs^#(#0()), 584.81/149.17 mult^#(@xs, @b2)) 584.81/149.17 , bitToInt^#(@b) -> 584.81/149.17 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.17 , sum#2^#(#false(), @s) -> 584.81/149.17 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.17 #equal^#(@s, #pos(#s(#0())))) 584.81/149.17 , sum#3^#(#false(), @s) -> 584.81/149.17 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.17 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.17 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.17 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.17 , sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.17 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.17 #equal^#(@s, #pos(#s(#0())))) 584.81/149.17 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.17 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.17 , diff^#(@x, @y, @r) -> 584.81/149.17 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.17 +^#(+(@x, @y), @r), 584.81/149.17 +^#(@x, @y), 584.81/149.17 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.17 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.17 -^#(-(@x, @y), @r), 584.81/149.17 -^#(@x, @y)) 584.81/149.17 , compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.17 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.17 , compare#3^#(@r, @x, @y) -> 584.81/149.17 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.17 , compare#5^#(#false(), @x, @y) -> 584.81/149.17 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.17 , compare#4^#(#true(), @r, @x, @y) -> 584.81/149.17 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.17 , add^#(@b1, @b2) -> 584.81/149.17 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.17 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.17 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.17 c_39(add'^#(@xs, @ys, @r')) 584.81/149.17 , sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.17 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.17 , add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.17 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.17 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.17 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.17 , compare#1^#(::(@x, @xs), @b2) -> 584.81/149.17 c_61(compare#2^#(@b2, @x, @xs)) } 584.81/149.17 Weak DPs: 584.81/149.17 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.17 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.17 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.17 , #sub^#(@x, #0()) -> c_122() 584.81/149.17 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.17 , #abs^#(#neg(@x)) -> c_62() 584.81/149.17 , #abs^#(#pos(@x)) -> c_63() 584.81/149.17 , #abs^#(#0()) -> c_64() 584.81/149.17 , #abs^#(#s(@x)) -> c_65() 584.81/149.17 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.17 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.17 , mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.17 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.17 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.17 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.17 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.17 , #div^#(#neg(@x), #0()) -> c_138() 584.81/149.17 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.17 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.17 , #div^#(#pos(@x), #0()) -> c_141() 584.81/149.17 , #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.17 , #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.17 , #div^#(#0(), #0()) -> c_144() 584.81/149.17 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.17 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.17 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.17 , mod^#(@x, @y) -> 584.81/149.17 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.17 *^#(@x, div(@x, @y)), 584.81/149.17 div^#(@x, @y)) 584.81/149.17 , #less^#(@x, @y) -> 584.81/149.17 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.17 , #greater^#(@x, @y) -> 584.81/149.17 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.17 , #ckgt^#(#EQ()) -> c_70() 584.81/149.17 , #ckgt^#(#LT()) -> c_71() 584.81/149.17 , #ckgt^#(#GT()) -> c_72() 584.81/149.17 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.17 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.17 , #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.17 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.17 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.17 , #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.17 , #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.17 , #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.17 , #compare^#(#0(), #0()) -> c_90() 584.81/149.17 , #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.17 , #compare^#(#s(@x), #0()) -> c_92() 584.81/149.17 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.17 , mult#1^#(nil(), @b2) -> c_49() 584.81/149.17 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.17 , sum#3^#(#true(), @s) -> 584.81/149.17 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.17 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.17 , #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.17 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.17 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.17 , #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.17 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.17 , #add^#(#0(), @y) -> c_77() 584.81/149.17 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.17 , sum#4^#(#false()) -> 584.81/149.17 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.17 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.17 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.17 , #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.17 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.17 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.17 , #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.17 , #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.17 , #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.17 , #mult^#(#0(), #0()) -> c_131() 584.81/149.17 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.17 , sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.17 , #cklt^#(#EQ()) -> c_117() 584.81/149.17 , #cklt^#(#LT()) -> c_118() 584.81/149.17 , #cklt^#(#GT()) -> c_119() 584.81/149.17 , #eq^#(nil(), nil()) -> c_94() 584.81/149.17 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.17 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.17 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.17 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.17 , #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.17 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.17 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.17 , #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.17 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.17 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.17 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.17 #eq^#(@x_1, @y_1), 584.81/149.17 #eq^#(@x_2, @y_2)) 584.81/149.17 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.17 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.17 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.17 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.17 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.17 #eq^#(@x_1, @y_1), 584.81/149.17 #eq^#(@x_2, @y_2)) 584.81/149.17 , #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.17 , #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.17 , #eq^#(#0(), #0()) -> c_111() 584.81/149.17 , #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.17 , #eq^#(#s(@x), #0()) -> c_113() 584.81/149.17 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.17 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.17 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.17 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.17 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.17 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.17 , compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.17 , sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.17 , add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.17 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.17 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.17 , #natsub^#(@x, #0()) -> c_66() 584.81/149.17 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.17 , #natdiv^#(#0(), #0()) -> c_68() 584.81/149.17 , #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.17 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.17 , #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.17 , #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.17 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.17 , #pred^#(#0()) -> c_148() 584.81/149.17 , #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.17 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.17 , #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.17 , #succ^#(#0()) -> c_135() 584.81/149.17 , #and^#(#true(), #true()) -> c_78() 584.81/149.17 , #and^#(#true(), #false()) -> c_79() 584.81/149.17 , #and^#(#false(), #true()) -> c_80() 584.81/149.17 , #and^#(#false(), #false()) -> c_81() 584.81/149.17 , #natmult^#(#0(), @y) -> c_115() 584.81/149.17 , #natmult^#(#s(@x), @y) -> 584.81/149.17 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.17 Weak Trs: 584.81/149.17 { #natsub(@x, #0()) -> @x 584.81/149.17 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 584.81/149.17 , -(@x, @y) -> #sub(@x, @y) 584.81/149.17 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 584.81/149.17 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.17 , diff#1(#false()) -> #abs(#0()) 584.81/149.17 , #natdiv(#0(), #0()) -> #divByZero() 584.81/149.17 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 584.81/149.17 , #ckgt(#EQ()) -> #false() 584.81/149.17 , #ckgt(#LT()) -> #false() 584.81/149.17 , #ckgt(#GT()) -> #true() 584.81/149.17 , #add(#neg(#s(#0())), @y) -> #pred(@y) 584.81/149.17 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 584.81/149.17 , #add(#pos(#s(#0())), @y) -> #succ(@y) 584.81/149.17 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 584.81/149.17 , #add(#0(), @y) -> @y 584.81/149.17 , mult#2(@zs, @b2, @x) -> 584.81/149.17 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 584.81/149.17 , div(@x, @y) -> #div(@x, @y) 584.81/149.17 , bitToInt'#1(nil(), @n) -> #abs(#0()) 584.81/149.17 , bitToInt'#1(::(@x, @xs), @n) -> 584.81/149.17 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 584.81/149.17 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 584.81/149.17 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 584.81/149.17 , #and(#true(), #true()) -> #true() 584.81/149.17 , #and(#true(), #false()) -> #false() 584.81/149.17 , #and(#false(), #true()) -> #false() 584.81/149.17 , #and(#false(), #false()) -> #false() 584.81/149.17 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 584.81/149.17 , sub#1(tuple#2(@b, @_@1)) -> @b 584.81/149.17 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 584.81/149.17 , #compare(#neg(@x), #pos(@y)) -> #LT() 584.81/149.17 , #compare(#neg(@x), #0()) -> #LT() 584.81/149.17 , #compare(#pos(@x), #neg(@y)) -> #GT() 584.81/149.17 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 584.81/149.17 , #compare(#pos(@x), #0()) -> #GT() 584.81/149.17 , #compare(#0(), #neg(@y)) -> #GT() 584.81/149.17 , #compare(#0(), #pos(@y)) -> #LT() 584.81/149.17 , #compare(#0(), #0()) -> #EQ() 584.81/149.17 , #compare(#0(), #s(@y)) -> #LT() 584.81/149.17 , #compare(#s(@x), #0()) -> #GT() 584.81/149.17 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 584.81/149.17 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 584.81/149.17 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 584.81/149.17 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 584.81/149.17 , mult(@b1, @b2) -> mult#1(@b1, @b2) 584.81/149.17 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 584.81/149.17 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 584.81/149.17 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 584.81/149.17 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 584.81/149.17 , +(@x, @y) -> #add(@x, @y) 584.81/149.17 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 584.81/149.17 , sum#4(#false()) -> 584.81/149.17 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 584.81/149.17 , *(@x, @y) -> #mult(@x, @y) 584.81/149.17 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 584.81/149.17 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 584.81/149.18 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 584.81/149.18 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.18 sub'#4(sub'(@xs, @ys, @r'), @z) 584.81/149.18 , #equal(@x, @y) -> #eq(@x, @y) 584.81/149.18 , #eq(nil(), nil()) -> #true() 584.81/149.18 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.18 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 584.81/149.18 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 584.81/149.18 , #eq(#neg(@x), #pos(@y)) -> #false() 584.81/149.18 , #eq(#neg(@x), #0()) -> #false() 584.81/149.18 , #eq(#pos(@x), #neg(@y)) -> #false() 584.81/149.18 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 584.81/149.18 , #eq(#pos(@x), #0()) -> #false() 584.81/149.18 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 584.81/149.18 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.18 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.18 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 584.81/149.18 , #eq(::(@x_1, @x_2), nil()) -> #false() 584.81/149.18 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.18 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.18 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.18 , #eq(#0(), #neg(@y)) -> #false() 584.81/149.18 , #eq(#0(), #pos(@y)) -> #false() 584.81/149.18 , #eq(#0(), #0()) -> #true() 584.81/149.18 , #eq(#0(), #s(@y)) -> #false() 584.81/149.18 , #eq(#s(@x), #0()) -> #false() 584.81/149.18 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 584.81/149.18 , #natmult(#0(), @y) -> #0() 584.81/149.18 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 584.81/149.18 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 584.81/149.18 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.18 sub'#3(diff(@x, @y, @r), @xs, @ys) 584.81/149.18 , compare#2(nil(), @x, @xs) -> #abs(#0()) 584.81/149.18 , compare#2(::(@y, @ys), @x, @xs) -> 584.81/149.18 compare#3(compare(@xs, @ys), @x, @y) 584.81/149.18 , sub'#4(tuple#2(@zs, @s), @z) -> 584.81/149.18 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 584.81/149.18 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 584.81/149.18 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 584.81/149.18 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 584.81/149.18 , #cklt(#EQ()) -> #false() 584.81/149.18 , #cklt(#LT()) -> #true() 584.81/149.18 , #cklt(#GT()) -> #false() 584.81/149.18 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 584.81/149.18 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 584.81/149.18 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 584.81/149.18 , #sub(@x, #0()) -> @x 584.81/149.18 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 584.81/149.18 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 584.81/149.18 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 584.81/149.18 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 584.81/149.18 , mult#3(#false(), @b2, @zs) -> @zs 584.81/149.18 , add'#1(nil(), @b2, @r) -> nil() 584.81/149.18 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 584.81/149.18 , add'#2(nil(), @r, @x, @xs) -> nil() 584.81/149.18 , add'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.18 add'#3(sum(@x, @y, @r), @xs, @ys) 584.81/149.18 , diff(@x, @y, @r) -> 584.81/149.18 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.18 diff#1(#less(-(-(@x, @y), @r), #0()))) 584.81/149.18 , mult#1(nil(), @b2) -> nil() 584.81/149.18 , mult#1(::(@x, @xs), @b2) -> 584.81/149.18 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 584.81/149.18 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.18 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.18 , #mult(#neg(@x), #0()) -> #0() 584.81/149.18 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.18 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.18 , #mult(#pos(@x), #0()) -> #0() 584.81/149.18 , #mult(#0(), #neg(@y)) -> #0() 584.81/149.18 , #mult(#0(), #pos(@y)) -> #0() 584.81/149.18 , #mult(#0(), #0()) -> #0() 584.81/149.18 , #succ(#neg(#s(#0()))) -> #0() 584.81/149.18 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 584.81/149.18 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 584.81/149.18 , #succ(#0()) -> #pos(#s(#0())) 584.81/149.18 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 584.81/149.18 , compare(@b1, @b2) -> compare#1(@b1, @b2) 584.81/149.18 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.18 , compare#6(#false()) -> #abs(#0()) 584.81/149.18 , compare#4(#true(), @r, @x, @y) -> 584.81/149.18 compare#5(#less(@x, @y), @x, @y) 584.81/149.18 , compare#4(#false(), @r, @x, @y) -> @r 584.81/149.18 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 584.81/149.18 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 584.81/149.18 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.18 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.18 , #div(#neg(@x), #0()) -> #divByZero() 584.81/149.18 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.18 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.18 , #div(#pos(@x), #0()) -> #divByZero() 584.81/149.18 , #div(#0(), #neg(@y)) -> #0() 584.81/149.18 , #div(#0(), #pos(@y)) -> #0() 584.81/149.18 , #div(#0(), #0()) -> #divByZero() 584.81/149.18 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 584.81/149.18 , compare#1(nil(), @b2) -> #abs(#0()) 584.81/149.18 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 584.81/149.18 , #abs(#neg(@x)) -> #pos(@x) 584.81/149.18 , #abs(#pos(@x)) -> #pos(@x) 584.81/149.18 , #abs(#0()) -> #0() 584.81/149.18 , #abs(#s(@x)) -> #pos(#s(@x)) 584.81/149.18 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 584.81/149.18 , #pred(#pos(#s(#0()))) -> #0() 584.81/149.18 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 584.81/149.18 , #pred(#0()) -> #neg(#s(#0())) } 584.81/149.18 Obligation: 584.81/149.18 innermost runtime complexity 584.81/149.18 Answer: 584.81/149.18 YES(O(1),O(n^2)) 584.81/149.18 584.81/149.18 We estimate the number of application of {16,18,20,23} by 584.81/149.18 applications of Pre({16,18,20,23}) = {15,17,19,24}. Here rules are 584.81/149.18 labeled as follows: 584.81/149.18 584.81/149.18 DPs: 584.81/149.18 { 1: sub^#(@b1, @b2) -> 584.81/149.18 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.18 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.18 #abs^#(#0())) 584.81/149.18 , 2: sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.18 , 3: mult#2^#(@zs, @b2, @x) -> 584.81/149.18 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.18 #equal^#(@x, #pos(#s(#0())))) 584.81/149.18 , 4: mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.18 , 5: bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.18 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.18 *^#(@x, @n), 584.81/149.18 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.18 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.18 , 6: bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.18 , 7: sum^#(@x, @y, @r) -> 584.81/149.18 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.18 , 8: sum#1^#(@s) -> 584.81/149.18 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.18 , 9: mult3^#(@b1, @b2, @b3) -> 584.81/149.18 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.18 , 10: mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.18 , 11: leq^#(@b1, @b2) -> 584.81/149.18 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.18 compare^#(@b1, @b2)) 584.81/149.18 , 12: compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.18 , 13: mult#1^#(::(@x, @xs), @b2) -> 584.81/149.18 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.18 #abs^#(#0()), 584.81/149.18 mult^#(@xs, @b2)) 584.81/149.18 , 14: bitToInt^#(@b) -> 584.81/149.18 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.18 , 15: sum#2^#(#false(), @s) -> 584.81/149.18 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.18 #equal^#(@s, #pos(#s(#0())))) 584.81/149.18 , 16: sum#3^#(#false(), @s) -> 584.81/149.18 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.18 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.18 , 17: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.18 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.18 , 18: sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.18 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.18 #equal^#(@s, #pos(#s(#0())))) 584.81/149.18 , 19: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.18 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.18 , 20: diff^#(@x, @y, @r) -> 584.81/149.18 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.18 +^#(+(@x, @y), @r), 584.81/149.18 +^#(@x, @y), 584.81/149.18 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.18 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.18 -^#(-(@x, @y), @r), 584.81/149.18 -^#(@x, @y)) 584.81/149.18 , 21: compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.18 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.18 , 22: compare#3^#(@r, @x, @y) -> 584.81/149.18 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.18 , 23: compare#5^#(#false(), @x, @y) -> 584.81/149.18 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.18 , 24: compare#4^#(#true(), @r, @x, @y) -> 584.81/149.18 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.18 , 25: add^#(@b1, @b2) -> 584.81/149.18 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.18 , 26: add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.18 , 27: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.18 c_39(add'^#(@xs, @ys, @r')) 584.81/149.18 , 28: sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.18 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.18 , 29: add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.18 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.18 , 30: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.18 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.18 , 31: compare#1^#(::(@x, @xs), @b2) -> 584.81/149.18 c_61(compare#2^#(@b2, @x, @xs)) 584.81/149.18 , 32: -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.18 , 33: #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.18 , 34: #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.18 , 35: #sub^#(@x, #0()) -> c_122() 584.81/149.18 , 36: sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.18 , 37: #abs^#(#neg(@x)) -> c_62() 584.81/149.18 , 38: #abs^#(#pos(@x)) -> c_63() 584.81/149.18 , 39: #abs^#(#0()) -> c_64() 584.81/149.18 , 40: #abs^#(#s(@x)) -> c_65() 584.81/149.18 , 41: diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.18 , 42: diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.18 , 43: mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.18 , 44: #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.18 , 45: div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.18 , 46: #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.18 , 47: #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.18 , 48: #div^#(#neg(@x), #0()) -> c_138() 584.81/149.18 , 49: #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.18 , 50: #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.18 , 51: #div^#(#pos(@x), #0()) -> c_141() 584.81/149.18 , 52: #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.18 , 53: #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.18 , 54: #div^#(#0(), #0()) -> c_144() 584.81/149.18 , 55: bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.18 , 56: +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.18 , 57: *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.18 , 58: mod^#(@x, @y) -> 584.81/149.18 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.18 *^#(@x, div(@x, @y)), 584.81/149.18 div^#(@x, @y)) 584.81/149.18 , 59: #less^#(@x, @y) -> 584.81/149.18 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.18 , 60: #greater^#(@x, @y) -> 584.81/149.18 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.18 , 61: #ckgt^#(#EQ()) -> c_70() 584.81/149.18 , 62: #ckgt^#(#LT()) -> c_71() 584.81/149.18 , 63: #ckgt^#(#GT()) -> c_72() 584.81/149.18 , 64: #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.18 , 65: #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.18 , 66: #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.18 , 67: #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.18 , 68: #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.18 , 69: #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.18 , 70: #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.18 , 71: #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.18 , 72: #compare^#(#0(), #0()) -> c_90() 584.81/149.18 , 73: #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.18 , 74: #compare^#(#s(@x), #0()) -> c_92() 584.81/149.18 , 75: #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.18 , 76: mult#1^#(nil(), @b2) -> c_49() 584.81/149.18 , 77: sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.18 , 78: sum#3^#(#true(), @s) -> 584.81/149.18 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.18 , 79: #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.18 , 80: #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.18 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.18 , 81: #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.18 , 82: #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.18 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.18 , 83: #add^#(#0(), @y) -> c_77() 584.81/149.18 , 84: sum#4^#(#true()) -> 584.81/149.18 c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.18 , 85: sum#4^#(#false()) -> 584.81/149.18 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.18 , 86: #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.18 , 87: #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.18 , 88: #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.18 , 89: #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.18 , 90: #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.18 , 91: #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.18 , 92: #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.18 , 93: #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.18 , 94: #mult^#(#0(), #0()) -> c_131() 584.81/149.18 , 95: sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.18 , 96: sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.18 , 97: #cklt^#(#EQ()) -> c_117() 584.81/149.18 , 98: #cklt^#(#LT()) -> c_118() 584.81/149.18 , 99: #cklt^#(#GT()) -> c_119() 584.81/149.18 , 100: #eq^#(nil(), nil()) -> c_94() 584.81/149.18 , 101: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.18 , 102: #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.18 , 103: #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.18 , 104: #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.18 , 105: #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.18 , 106: #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.18 , 107: #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.18 , 108: #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.18 , 109: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.18 , 110: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.18 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.18 #eq^#(@x_1, @y_1), 584.81/149.18 #eq^#(@x_2, @y_2)) 584.81/149.18 , 111: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.18 , 112: #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.18 , 113: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.18 , 114: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.18 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.18 #eq^#(@x_1, @y_1), 584.81/149.18 #eq^#(@x_2, @y_2)) 584.81/149.18 , 115: #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.18 , 116: #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.18 , 117: #eq^#(#0(), #0()) -> c_111() 584.81/149.18 , 118: #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.18 , 119: #eq^#(#s(@x), #0()) -> c_113() 584.81/149.18 , 120: #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.18 , 121: sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.18 , 122: compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.18 , 123: compare#5^#(#true(), @x, @y) -> 584.81/149.18 c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.18 , 124: compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.18 , 125: compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.18 , 126: compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.18 , 127: sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.18 , 128: add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.18 , 129: add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.18 , 130: compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.18 , 131: #natsub^#(@x, #0()) -> c_66() 584.81/149.18 , 132: #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.18 , 133: #natdiv^#(#0(), #0()) -> c_68() 584.81/149.18 , 134: #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.18 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.18 , 135: #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.18 , 136: #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.18 , 137: #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.18 , 138: #pred^#(#0()) -> c_148() 584.81/149.18 , 139: #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.18 , 140: #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.18 , 141: #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.18 , 142: #succ^#(#0()) -> c_135() 584.81/149.18 , 143: #and^#(#true(), #true()) -> c_78() 584.81/149.18 , 144: #and^#(#true(), #false()) -> c_79() 584.81/149.18 , 145: #and^#(#false(), #true()) -> c_80() 584.81/149.18 , 146: #and^#(#false(), #false()) -> c_81() 584.81/149.18 , 147: #natmult^#(#0(), @y) -> c_115() 584.81/149.18 , 148: #natmult^#(#s(@x), @y) -> 584.81/149.18 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.18 584.81/149.18 We are left with following problem, upon which TcT provides the 584.81/149.18 certificate YES(O(1),O(n^2)). 584.81/149.18 584.81/149.18 Strict DPs: 584.81/149.18 { sub^#(@b1, @b2) -> 584.81/149.18 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.18 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.18 #abs^#(#0())) 584.81/149.18 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.18 , mult#2^#(@zs, @b2, @x) -> 584.81/149.18 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.18 #equal^#(@x, #pos(#s(#0())))) 584.81/149.18 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.18 , bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.18 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.18 *^#(@x, @n), 584.81/149.18 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.18 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.18 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.18 , sum^#(@x, @y, @r) -> 584.81/149.18 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.18 , sum#1^#(@s) -> 584.81/149.18 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.18 , mult3^#(@b1, @b2, @b3) -> 584.81/149.18 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.18 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.18 , leq^#(@b1, @b2) -> 584.81/149.18 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.18 compare^#(@b1, @b2)) 584.81/149.18 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.18 , mult#1^#(::(@x, @xs), @b2) -> 584.81/149.18 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.18 #abs^#(#0()), 584.81/149.18 mult^#(@xs, @b2)) 584.81/149.18 , bitToInt^#(@b) -> 584.81/149.18 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.18 , sum#2^#(#false(), @s) -> 584.81/149.18 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.18 #equal^#(@s, #pos(#s(#0())))) 584.81/149.18 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.18 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.18 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.18 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.18 , compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.18 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.18 , compare#3^#(@r, @x, @y) -> 584.81/149.18 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.18 , compare#4^#(#true(), @r, @x, @y) -> 584.81/149.18 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.18 , add^#(@b1, @b2) -> 584.81/149.18 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.18 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.19 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.19 c_39(add'^#(@xs, @ys, @r')) 584.81/149.19 , sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.19 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.19 , add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.19 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.19 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.19 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.19 , compare#1^#(::(@x, @xs), @b2) -> 584.81/149.19 c_61(compare#2^#(@b2, @x, @xs)) } 584.81/149.19 Weak DPs: 584.81/149.19 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.19 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.19 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.19 , #sub^#(@x, #0()) -> c_122() 584.81/149.19 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.19 , #abs^#(#neg(@x)) -> c_62() 584.81/149.19 , #abs^#(#pos(@x)) -> c_63() 584.81/149.19 , #abs^#(#0()) -> c_64() 584.81/149.19 , #abs^#(#s(@x)) -> c_65() 584.81/149.19 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.19 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.19 , mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.19 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.19 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.19 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.19 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.19 , #div^#(#neg(@x), #0()) -> c_138() 584.81/149.19 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.19 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.19 , #div^#(#pos(@x), #0()) -> c_141() 584.81/149.19 , #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.19 , #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.19 , #div^#(#0(), #0()) -> c_144() 584.81/149.19 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.19 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.19 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.19 , mod^#(@x, @y) -> 584.81/149.19 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.19 *^#(@x, div(@x, @y)), 584.81/149.19 div^#(@x, @y)) 584.81/149.19 , #less^#(@x, @y) -> 584.81/149.19 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.19 , #greater^#(@x, @y) -> 584.81/149.19 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.19 , #ckgt^#(#EQ()) -> c_70() 584.81/149.19 , #ckgt^#(#LT()) -> c_71() 584.81/149.19 , #ckgt^#(#GT()) -> c_72() 584.81/149.19 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.19 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.19 , #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.19 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.19 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.19 , #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.19 , #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.19 , #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.19 , #compare^#(#0(), #0()) -> c_90() 584.81/149.19 , #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.19 , #compare^#(#s(@x), #0()) -> c_92() 584.81/149.19 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.19 , mult#1^#(nil(), @b2) -> c_49() 584.81/149.19 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.19 , sum#3^#(#true(), @s) -> 584.81/149.19 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.19 , sum#3^#(#false(), @s) -> 584.81/149.19 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.19 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.19 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.19 , #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.19 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.19 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.19 , #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.19 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.19 , #add^#(#0(), @y) -> c_77() 584.81/149.19 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.19 , sum#4^#(#false()) -> 584.81/149.19 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.19 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.19 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.19 , #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.19 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.19 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.19 , #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.19 , #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.19 , #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.19 , #mult^#(#0(), #0()) -> c_131() 584.81/149.19 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.19 , sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.19 , #cklt^#(#EQ()) -> c_117() 584.81/149.19 , #cklt^#(#LT()) -> c_118() 584.81/149.19 , #cklt^#(#GT()) -> c_119() 584.81/149.19 , sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.19 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.19 #equal^#(@s, #pos(#s(#0())))) 584.81/149.19 , #eq^#(nil(), nil()) -> c_94() 584.81/149.19 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.19 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.19 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.19 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.19 , #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.19 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.19 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.19 , #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.19 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.19 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.19 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.19 #eq^#(@x_1, @y_1), 584.81/149.19 #eq^#(@x_2, @y_2)) 584.81/149.19 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.19 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.19 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.19 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.19 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.19 #eq^#(@x_1, @y_1), 584.81/149.19 #eq^#(@x_2, @y_2)) 584.81/149.19 , #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.19 , #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.19 , #eq^#(#0(), #0()) -> c_111() 584.81/149.19 , #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.19 , #eq^#(#s(@x), #0()) -> c_113() 584.81/149.19 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.19 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.19 , diff^#(@x, @y, @r) -> 584.81/149.19 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.19 +^#(+(@x, @y), @r), 584.81/149.19 +^#(@x, @y), 584.81/149.19 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.19 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.19 -^#(-(@x, @y), @r), 584.81/149.19 -^#(@x, @y)) 584.81/149.19 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.19 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.19 , compare#5^#(#false(), @x, @y) -> 584.81/149.19 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.19 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.19 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.19 , compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.19 , sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.19 , add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.19 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 584.81/149.19 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 584.81/149.19 , #natsub^#(@x, #0()) -> c_66() 584.81/149.19 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 584.81/149.19 , #natdiv^#(#0(), #0()) -> c_68() 584.81/149.19 , #natdiv^#(#s(@x), #s(@y)) -> 584.81/149.19 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 584.81/149.19 , #pred^#(#neg(#s(@x))) -> c_145() 584.81/149.19 , #pred^#(#pos(#s(#0()))) -> c_146() 584.81/149.19 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 584.81/149.19 , #pred^#(#0()) -> c_148() 584.81/149.19 , #succ^#(#neg(#s(#0()))) -> c_132() 584.81/149.19 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 584.81/149.19 , #succ^#(#pos(#s(@x))) -> c_134() 584.81/149.19 , #succ^#(#0()) -> c_135() 584.81/149.19 , #and^#(#true(), #true()) -> c_78() 584.81/149.19 , #and^#(#true(), #false()) -> c_79() 584.81/149.19 , #and^#(#false(), #true()) -> c_80() 584.81/149.19 , #and^#(#false(), #false()) -> c_81() 584.81/149.19 , #natmult^#(#0(), @y) -> c_115() 584.81/149.19 , #natmult^#(#s(@x), @y) -> 584.81/149.19 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 584.81/149.19 Weak Trs: 584.81/149.19 { #natsub(@x, #0()) -> @x 584.81/149.19 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 584.81/149.19 , -(@x, @y) -> #sub(@x, @y) 584.81/149.19 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 584.81/149.19 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.19 , diff#1(#false()) -> #abs(#0()) 584.81/149.19 , #natdiv(#0(), #0()) -> #divByZero() 584.81/149.19 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 584.81/149.19 , #ckgt(#EQ()) -> #false() 584.81/149.19 , #ckgt(#LT()) -> #false() 584.81/149.19 , #ckgt(#GT()) -> #true() 584.81/149.19 , #add(#neg(#s(#0())), @y) -> #pred(@y) 584.81/149.19 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 584.81/149.19 , #add(#pos(#s(#0())), @y) -> #succ(@y) 584.81/149.19 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 584.81/149.19 , #add(#0(), @y) -> @y 584.81/149.19 , mult#2(@zs, @b2, @x) -> 584.81/149.19 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 584.81/149.19 , div(@x, @y) -> #div(@x, @y) 584.81/149.19 , bitToInt'#1(nil(), @n) -> #abs(#0()) 584.81/149.19 , bitToInt'#1(::(@x, @xs), @n) -> 584.81/149.19 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 584.81/149.19 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 584.81/149.19 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 584.81/149.19 , #and(#true(), #true()) -> #true() 584.81/149.19 , #and(#true(), #false()) -> #false() 584.81/149.19 , #and(#false(), #true()) -> #false() 584.81/149.19 , #and(#false(), #false()) -> #false() 584.81/149.19 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 584.81/149.19 , sub#1(tuple#2(@b, @_@1)) -> @b 584.81/149.19 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 584.81/149.19 , #compare(#neg(@x), #pos(@y)) -> #LT() 584.81/149.19 , #compare(#neg(@x), #0()) -> #LT() 584.81/149.19 , #compare(#pos(@x), #neg(@y)) -> #GT() 584.81/149.19 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 584.81/149.19 , #compare(#pos(@x), #0()) -> #GT() 584.81/149.19 , #compare(#0(), #neg(@y)) -> #GT() 584.81/149.19 , #compare(#0(), #pos(@y)) -> #LT() 584.81/149.19 , #compare(#0(), #0()) -> #EQ() 584.81/149.19 , #compare(#0(), #s(@y)) -> #LT() 584.81/149.19 , #compare(#s(@x), #0()) -> #GT() 584.81/149.19 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 584.81/149.19 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 584.81/149.19 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 584.81/149.19 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 584.81/149.19 , mult(@b1, @b2) -> mult#1(@b1, @b2) 584.81/149.19 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 584.81/149.19 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 584.81/149.19 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 584.81/149.19 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 584.81/149.19 , +(@x, @y) -> #add(@x, @y) 584.81/149.19 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 584.81/149.19 , sum#4(#false()) -> 584.81/149.19 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 584.81/149.19 , *(@x, @y) -> #mult(@x, @y) 584.81/149.19 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 584.81/149.19 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 584.81/149.19 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 584.81/149.19 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.19 sub'#4(sub'(@xs, @ys, @r'), @z) 584.81/149.19 , #equal(@x, @y) -> #eq(@x, @y) 584.81/149.19 , #eq(nil(), nil()) -> #true() 584.81/149.19 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.19 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 584.81/149.19 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 584.81/149.19 , #eq(#neg(@x), #pos(@y)) -> #false() 584.81/149.19 , #eq(#neg(@x), #0()) -> #false() 584.81/149.19 , #eq(#pos(@x), #neg(@y)) -> #false() 584.81/149.19 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 584.81/149.19 , #eq(#pos(@x), #0()) -> #false() 584.81/149.19 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 584.81/149.19 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.19 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.19 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 584.81/149.19 , #eq(::(@x_1, @x_2), nil()) -> #false() 584.81/149.19 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 584.81/149.19 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.19 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 584.81/149.19 , #eq(#0(), #neg(@y)) -> #false() 584.81/149.19 , #eq(#0(), #pos(@y)) -> #false() 584.81/149.19 , #eq(#0(), #0()) -> #true() 584.81/149.19 , #eq(#0(), #s(@y)) -> #false() 584.81/149.19 , #eq(#s(@x), #0()) -> #false() 584.81/149.19 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 584.81/149.19 , #natmult(#0(), @y) -> #0() 584.81/149.19 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 584.81/149.19 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 584.81/149.19 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.19 sub'#3(diff(@x, @y, @r), @xs, @ys) 584.81/149.19 , compare#2(nil(), @x, @xs) -> #abs(#0()) 584.81/149.19 , compare#2(::(@y, @ys), @x, @xs) -> 584.81/149.19 compare#3(compare(@xs, @ys), @x, @y) 584.81/149.19 , sub'#4(tuple#2(@zs, @s), @z) -> 584.81/149.19 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 584.81/149.19 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 584.81/149.19 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 584.81/149.19 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 584.81/149.19 , #cklt(#EQ()) -> #false() 584.81/149.19 , #cklt(#LT()) -> #true() 584.81/149.19 , #cklt(#GT()) -> #false() 584.81/149.19 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 584.81/149.19 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 584.81/149.19 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 584.81/149.19 , #sub(@x, #0()) -> @x 584.81/149.19 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 584.81/149.19 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 584.81/149.19 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 584.81/149.19 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 584.81/149.19 , mult#3(#false(), @b2, @zs) -> @zs 584.81/149.19 , add'#1(nil(), @b2, @r) -> nil() 584.81/149.19 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 584.81/149.19 , add'#2(nil(), @r, @x, @xs) -> nil() 584.81/149.19 , add'#2(::(@y, @ys), @r, @x, @xs) -> 584.81/149.19 add'#3(sum(@x, @y, @r), @xs, @ys) 584.81/149.19 , diff(@x, @y, @r) -> 584.81/149.19 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.19 diff#1(#less(-(-(@x, @y), @r), #0()))) 584.81/149.19 , mult#1(nil(), @b2) -> nil() 584.81/149.19 , mult#1(::(@x, @xs), @b2) -> 584.81/149.19 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 584.81/149.19 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.19 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.19 , #mult(#neg(@x), #0()) -> #0() 584.81/149.19 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 584.81/149.19 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 584.81/149.19 , #mult(#pos(@x), #0()) -> #0() 584.81/149.19 , #mult(#0(), #neg(@y)) -> #0() 584.81/149.19 , #mult(#0(), #pos(@y)) -> #0() 584.81/149.19 , #mult(#0(), #0()) -> #0() 584.81/149.19 , #succ(#neg(#s(#0()))) -> #0() 584.81/149.19 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 584.81/149.19 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 584.81/149.19 , #succ(#0()) -> #pos(#s(#0())) 584.81/149.19 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 584.81/149.19 , compare(@b1, @b2) -> compare#1(@b1, @b2) 584.81/149.19 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 584.81/149.19 , compare#6(#false()) -> #abs(#0()) 584.81/149.19 , compare#4(#true(), @r, @x, @y) -> 584.81/149.19 compare#5(#less(@x, @y), @x, @y) 584.81/149.19 , compare#4(#false(), @r, @x, @y) -> @r 584.81/149.19 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 584.81/149.19 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 584.81/149.19 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.19 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.19 , #div(#neg(@x), #0()) -> #divByZero() 584.81/149.19 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 584.81/149.19 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 584.81/149.19 , #div(#pos(@x), #0()) -> #divByZero() 584.81/149.19 , #div(#0(), #neg(@y)) -> #0() 584.81/149.19 , #div(#0(), #pos(@y)) -> #0() 584.81/149.19 , #div(#0(), #0()) -> #divByZero() 584.81/149.19 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 584.81/149.19 , compare#1(nil(), @b2) -> #abs(#0()) 584.81/149.19 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 584.81/149.19 , #abs(#neg(@x)) -> #pos(@x) 584.81/149.19 , #abs(#pos(@x)) -> #pos(@x) 584.81/149.19 , #abs(#0()) -> #0() 584.81/149.19 , #abs(#s(@x)) -> #pos(#s(@x)) 584.81/149.19 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 584.81/149.19 , #pred(#pos(#s(#0()))) -> #0() 584.81/149.19 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 584.81/149.19 , #pred(#0()) -> #neg(#s(#0())) } 584.81/149.19 Obligation: 584.81/149.19 innermost runtime complexity 584.81/149.19 Answer: 584.81/149.19 YES(O(1),O(n^2)) 584.81/149.19 584.81/149.19 We estimate the number of application of {15,20} by applications of 584.81/149.19 Pre({15,20}) = {8,19}. Here rules are labeled as follows: 584.81/149.19 584.81/149.19 DPs: 584.81/149.19 { 1: sub^#(@b1, @b2) -> 584.81/149.19 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 584.81/149.19 sub'^#(@b1, @b2, #abs(#0())), 584.81/149.19 #abs^#(#0())) 584.81/149.19 , 2: sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 584.81/149.19 , 3: mult#2^#(@zs, @b2, @x) -> 584.81/149.19 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 584.81/149.19 #equal^#(@x, #pos(#s(#0())))) 584.81/149.19 , 4: mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 584.81/149.19 , 5: bitToInt'#1^#(::(@x, @xs), @n) -> 584.81/149.19 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 584.81/149.19 *^#(@x, @n), 584.81/149.19 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 584.81/149.19 *^#(@n, #pos(#s(#s(#0()))))) 584.81/149.19 , 6: bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 584.81/149.19 , 7: sum^#(@x, @y, @r) -> 584.81/149.19 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 584.81/149.19 , 8: sum#1^#(@s) -> 584.81/149.19 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 584.81/149.19 , 9: mult3^#(@b1, @b2, @b3) -> 584.81/149.19 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 584.81/149.19 , 10: mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 584.81/149.19 , 11: leq^#(@b1, @b2) -> 584.81/149.19 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 584.81/149.19 compare^#(@b1, @b2)) 584.81/149.19 , 12: compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 584.81/149.19 , 13: mult#1^#(::(@x, @xs), @b2) -> 584.81/149.19 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 584.81/149.19 #abs^#(#0()), 584.81/149.19 mult^#(@xs, @b2)) 584.81/149.19 , 14: bitToInt^#(@b) -> 584.81/149.19 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 584.81/149.19 , 15: sum#2^#(#false(), @s) -> 584.81/149.19 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 584.81/149.19 #equal^#(@s, #pos(#s(#0())))) 584.81/149.19 , 16: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.19 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 584.81/149.19 , 17: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.19 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 584.81/149.19 , 18: compare#2^#(::(@y, @ys), @x, @xs) -> 584.81/149.19 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 584.81/149.19 , 19: compare#3^#(@r, @x, @y) -> 584.81/149.19 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 584.81/149.19 , 20: compare#4^#(#true(), @r, @x, @y) -> 584.81/149.19 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 584.81/149.19 , 21: add^#(@b1, @b2) -> 584.81/149.19 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 584.81/149.19 , 22: add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 584.81/149.19 , 23: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 584.81/149.19 c_39(add'^#(@xs, @ys, @r')) 584.81/149.19 , 24: sub'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.19 c_41(sub'#2^#(@b2, @r, @x, @xs)) 584.81/149.19 , 25: add'#1^#(::(@x, @xs), @b2, @r) -> 584.81/149.19 c_45(add'#2^#(@b2, @r, @x, @xs)) 584.81/149.19 , 26: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 584.81/149.19 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 584.81/149.19 , 27: compare#1^#(::(@x, @xs), @b2) -> 584.81/149.19 c_61(compare#2^#(@b2, @x, @xs)) 584.81/149.19 , 28: -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 584.81/149.19 , 29: #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 584.81/149.19 , 30: #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 584.81/149.19 , 31: #sub^#(@x, #0()) -> c_122() 584.81/149.19 , 32: sub#1^#(tuple#2(@b, @_@1)) -> c_12() 584.81/149.19 , 33: #abs^#(#neg(@x)) -> c_62() 584.81/149.19 , 34: #abs^#(#pos(@x)) -> c_63() 584.81/149.19 , 35: #abs^#(#0()) -> c_64() 584.81/149.19 , 36: #abs^#(#s(@x)) -> c_65() 584.81/149.19 , 37: diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 584.81/149.19 , 38: diff#1^#(#false()) -> c_4(#abs^#(#0())) 584.81/149.19 , 39: mult#3^#(#false(), @b2, @zs) -> c_43() 584.81/149.19 , 40: #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 584.81/149.19 , 41: div^#(@x, @y) -> c_6(#div^#(@x, @y)) 584.81/149.19 , 42: #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 584.81/149.19 , 43: #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 584.81/149.19 , 44: #div^#(#neg(@x), #0()) -> c_138() 584.81/149.19 , 45: #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 584.81/149.19 , 46: #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 584.81/149.19 , 47: #div^#(#pos(@x), #0()) -> c_141() 584.81/149.19 , 48: #div^#(#0(), #neg(@y)) -> c_142() 584.81/149.19 , 49: #div^#(#0(), #pos(@y)) -> c_143() 584.81/149.19 , 50: #div^#(#0(), #0()) -> c_144() 584.81/149.19 , 51: bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 584.81/149.19 , 52: +^#(@x, @y) -> c_21(#add^#(@x, @y)) 584.81/149.19 , 53: *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 584.81/149.19 , 54: mod^#(@x, @y) -> 584.81/149.19 c_10(-^#(@x, *(@x, div(@x, @y))), 584.81/149.19 *^#(@x, div(@x, @y)), 584.81/149.19 div^#(@x, @y)) 584.81/149.19 , 55: #less^#(@x, @y) -> 584.81/149.19 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.19 , 56: #greater^#(@x, @y) -> 584.81/149.19 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 584.81/149.19 , 57: #ckgt^#(#EQ()) -> c_70() 584.81/149.19 , 58: #ckgt^#(#LT()) -> c_71() 584.81/149.19 , 59: #ckgt^#(#GT()) -> c_72() 584.81/149.19 , 60: #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 584.81/149.19 , 61: #compare^#(#neg(@x), #pos(@y)) -> c_83() 584.81/149.19 , 62: #compare^#(#neg(@x), #0()) -> c_84() 584.81/149.19 , 63: #compare^#(#pos(@x), #neg(@y)) -> c_85() 584.81/149.19 , 64: #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 584.81/149.19 , 65: #compare^#(#pos(@x), #0()) -> c_87() 584.81/149.19 , 66: #compare^#(#0(), #neg(@y)) -> c_88() 584.81/149.19 , 67: #compare^#(#0(), #pos(@y)) -> c_89() 584.81/149.19 , 68: #compare^#(#0(), #0()) -> c_90() 584.81/149.19 , 69: #compare^#(#0(), #s(@y)) -> c_91() 584.81/149.19 , 70: #compare^#(#s(@x), #0()) -> c_92() 584.81/149.19 , 71: #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 584.81/149.19 , 72: mult#1^#(nil(), @b2) -> c_49() 584.81/149.19 , 73: sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 584.81/149.19 , 74: sum#3^#(#true(), @s) -> 584.81/149.19 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 584.81/149.19 , 75: sum#3^#(#false(), @s) -> 584.81/149.19 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 584.81/149.19 #equal^#(@s, #pos(#s(#s(#0()))))) 584.81/149.19 , 76: #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 584.81/149.19 , 77: #add^#(#neg(#s(#s(@x))), @y) -> 584.81/149.19 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.19 , 78: #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 584.81/149.19 , 79: #add^#(#pos(#s(#s(@x))), @y) -> 584.81/149.19 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 584.81/149.19 , 80: #add^#(#0(), @y) -> c_77() 584.81/149.19 , 81: sum#4^#(#true()) -> 584.81/149.19 c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 584.81/149.19 , 82: sum#4^#(#false()) -> 584.81/149.19 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 584.81/149.19 , 83: #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 584.81/149.19 , 84: #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 584.81/149.19 , 85: #mult^#(#neg(@x), #0()) -> c_125() 584.81/149.19 , 86: #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 584.81/149.19 , 87: #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 584.81/149.19 , 88: #mult^#(#pos(@x), #0()) -> c_128() 584.81/149.19 , 89: #mult^#(#0(), #neg(@y)) -> c_129() 584.81/149.19 , 90: #mult^#(#0(), #pos(@y)) -> c_130() 584.81/149.19 , 91: #mult^#(#0(), #0()) -> c_131() 584.81/149.19 , 92: sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 584.81/149.19 , 93: sub'#5^#(#false(), @z, @zs) -> c_26() 584.81/149.19 , 94: #cklt^#(#EQ()) -> c_117() 584.81/149.19 , 95: #cklt^#(#LT()) -> c_118() 584.81/149.19 , 96: #cklt^#(#GT()) -> c_119() 584.81/149.19 , 97: sub'#4^#(tuple#2(@zs, @s), @z) -> 584.81/149.19 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 584.81/149.19 #equal^#(@s, #pos(#s(#0())))) 584.81/149.19 , 98: #eq^#(nil(), nil()) -> c_94() 584.81/149.19 , 99: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 584.81/149.19 , 100: #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 584.81/149.19 , 101: #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 584.81/149.19 , 102: #eq^#(#neg(@x), #pos(@y)) -> c_98() 584.81/149.19 , 103: #eq^#(#neg(@x), #0()) -> c_99() 584.81/149.19 , 104: #eq^#(#pos(@x), #neg(@y)) -> c_100() 584.81/149.19 , 105: #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 584.81/149.19 , 106: #eq^#(#pos(@x), #0()) -> c_102() 584.81/149.19 , 107: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 584.81/149.19 , 108: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 584.81/149.19 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.19 #eq^#(@x_1, @y_1), 584.81/149.19 #eq^#(@x_2, @y_2)) 584.81/149.19 , 109: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 584.81/149.19 , 110: #eq^#(::(@x_1, @x_2), nil()) -> c_106() 584.81/149.19 , 111: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 584.81/149.19 , 112: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 584.81/149.19 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 584.81/149.19 #eq^#(@x_1, @y_1), 584.81/149.19 #eq^#(@x_2, @y_2)) 584.81/149.19 , 113: #eq^#(#0(), #neg(@y)) -> c_109() 584.81/149.19 , 114: #eq^#(#0(), #pos(@y)) -> c_110() 584.81/149.19 , 115: #eq^#(#0(), #0()) -> c_111() 584.81/149.19 , 116: #eq^#(#0(), #s(@y)) -> c_112() 584.81/149.19 , 117: #eq^#(#s(@x), #0()) -> c_113() 584.81/149.19 , 118: #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 584.81/149.19 , 119: sub'#2^#(nil(), @r, @x, @xs) -> c_30() 584.81/149.19 , 120: diff^#(@x, @y, @r) -> 584.81/149.19 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 584.81/149.19 +^#(+(@x, @y), @r), 584.81/149.19 +^#(@x, @y), 584.81/149.19 diff#1^#(#less(-(-(@x, @y), @r), #0())), 584.81/149.19 #less^#(-(-(@x, @y), @r), #0()), 584.81/149.19 -^#(-(@x, @y), @r), 584.81/149.19 -^#(@x, @y)) 584.81/149.19 , 121: compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 584.81/149.19 , 122: compare#5^#(#true(), @x, @y) -> 584.81/149.19 c_35(-^#(#0(), #pos(#s(#0())))) 584.81/149.19 , 123: compare#5^#(#false(), @x, @y) -> 584.81/149.19 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 584.81/149.19 , 124: compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 584.81/149.19 , 125: compare#6^#(#false()) -> c_54(#abs^#(#0())) 584.81/149.19 , 126: compare#4^#(#false(), @r, @x, @y) -> c_56() 584.81/149.19 , 127: sub'#1^#(nil(), @b2, @r) -> c_40() 584.81/149.19 , 128: add'#1^#(nil(), @b2, @r) -> c_44() 584.81/149.19 , 129: add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.20 , 130: compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.20 , 131: #natsub^#(@x, #0()) -> c_66() 585.04/149.20 , 132: #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.20 , 133: #natdiv^#(#0(), #0()) -> c_68() 585.04/149.20 , 134: #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.20 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.20 , 135: #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.20 , 136: #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.20 , 137: #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.20 , 138: #pred^#(#0()) -> c_148() 585.04/149.20 , 139: #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.20 , 140: #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.20 , 141: #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.20 , 142: #succ^#(#0()) -> c_135() 585.04/149.20 , 143: #and^#(#true(), #true()) -> c_78() 585.04/149.20 , 144: #and^#(#true(), #false()) -> c_79() 585.04/149.20 , 145: #and^#(#false(), #true()) -> c_80() 585.04/149.20 , 146: #and^#(#false(), #false()) -> c_81() 585.04/149.20 , 147: #natmult^#(#0(), @y) -> c_115() 585.04/149.20 , 148: #natmult^#(#s(@x), @y) -> 585.04/149.20 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.20 585.04/149.20 We are left with following problem, upon which TcT provides the 585.04/149.20 certificate YES(O(1),O(n^2)). 585.04/149.20 585.04/149.20 Strict DPs: 585.04/149.20 { sub^#(@b1, @b2) -> 585.04/149.20 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.20 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.20 #abs^#(#0())) 585.04/149.20 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 585.04/149.20 , mult#2^#(@zs, @b2, @x) -> 585.04/149.20 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.20 #equal^#(@x, #pos(#s(#0())))) 585.04/149.20 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 585.04/149.20 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.20 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.20 *^#(@x, @n), 585.04/149.20 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.20 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.20 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 585.04/149.20 , sum^#(@x, @y, @r) -> 585.04/149.20 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 585.04/149.20 , sum#1^#(@s) -> 585.04/149.20 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 585.04/149.20 , mult3^#(@b1, @b2, @b3) -> 585.04/149.20 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.20 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 585.04/149.20 , leq^#(@b1, @b2) -> 585.04/149.20 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.20 compare^#(@b1, @b2)) 585.04/149.20 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 585.04/149.20 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.20 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.20 #abs^#(#0()), 585.04/149.20 mult^#(@xs, @b2)) 585.04/149.20 , bitToInt^#(@b) -> 585.04/149.20 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.20 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.20 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.20 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.20 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.20 , compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.20 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.20 , compare#3^#(@r, @x, @y) -> 585.04/149.20 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 585.04/149.20 , add^#(@b1, @b2) -> 585.04/149.20 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.20 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 585.04/149.20 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.20 c_39(add'^#(@xs, @ys, @r')) 585.04/149.20 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.20 c_41(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.20 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.20 c_45(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.20 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.20 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 585.04/149.20 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.20 c_61(compare#2^#(@b2, @x, @xs)) } 585.04/149.20 Weak DPs: 585.04/149.20 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 585.04/149.20 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 585.04/149.20 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 585.04/149.20 , #sub^#(@x, #0()) -> c_122() 585.04/149.20 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 585.04/149.20 , #abs^#(#neg(@x)) -> c_62() 585.04/149.20 , #abs^#(#pos(@x)) -> c_63() 585.04/149.20 , #abs^#(#0()) -> c_64() 585.04/149.20 , #abs^#(#s(@x)) -> c_65() 585.04/149.20 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 585.04/149.20 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 585.04/149.20 , mult#3^#(#false(), @b2, @zs) -> c_43() 585.04/149.20 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 585.04/149.20 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 585.04/149.20 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 585.04/149.20 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 585.04/149.20 , #div^#(#neg(@x), #0()) -> c_138() 585.04/149.20 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 585.04/149.20 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 585.04/149.20 , #div^#(#pos(@x), #0()) -> c_141() 585.04/149.20 , #div^#(#0(), #neg(@y)) -> c_142() 585.04/149.20 , #div^#(#0(), #pos(@y)) -> c_143() 585.04/149.20 , #div^#(#0(), #0()) -> c_144() 585.04/149.20 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 585.04/149.20 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 585.04/149.20 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 585.04/149.20 , mod^#(@x, @y) -> 585.04/149.20 c_10(-^#(@x, *(@x, div(@x, @y))), 585.04/149.20 *^#(@x, div(@x, @y)), 585.04/149.20 div^#(@x, @y)) 585.04/149.20 , #less^#(@x, @y) -> 585.04/149.20 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.20 , #greater^#(@x, @y) -> 585.04/149.20 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.20 , #ckgt^#(#EQ()) -> c_70() 585.04/149.20 , #ckgt^#(#LT()) -> c_71() 585.04/149.20 , #ckgt^#(#GT()) -> c_72() 585.04/149.20 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 585.04/149.20 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 585.04/149.20 , #compare^#(#neg(@x), #0()) -> c_84() 585.04/149.20 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 585.04/149.20 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 585.04/149.20 , #compare^#(#pos(@x), #0()) -> c_87() 585.04/149.20 , #compare^#(#0(), #neg(@y)) -> c_88() 585.04/149.20 , #compare^#(#0(), #pos(@y)) -> c_89() 585.04/149.20 , #compare^#(#0(), #0()) -> c_90() 585.04/149.20 , #compare^#(#0(), #s(@y)) -> c_91() 585.04/149.20 , #compare^#(#s(@x), #0()) -> c_92() 585.04/149.20 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 585.04/149.20 , mult#1^#(nil(), @b2) -> c_49() 585.04/149.20 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 585.04/149.20 , sum#2^#(#false(), @s) -> 585.04/149.20 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 585.04/149.20 #equal^#(@s, #pos(#s(#0())))) 585.04/149.20 , sum#3^#(#true(), @s) -> 585.04/149.20 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 585.04/149.20 , sum#3^#(#false(), @s) -> 585.04/149.20 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 585.04/149.20 #equal^#(@s, #pos(#s(#s(#0()))))) 585.04/149.20 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 585.04/149.20 , #add^#(#neg(#s(#s(@x))), @y) -> 585.04/149.20 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.20 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 585.04/149.20 , #add^#(#pos(#s(#s(@x))), @y) -> 585.04/149.20 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.20 , #add^#(#0(), @y) -> c_77() 585.04/149.20 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 585.04/149.20 , sum#4^#(#false()) -> 585.04/149.20 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 585.04/149.20 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 585.04/149.20 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 585.04/149.20 , #mult^#(#neg(@x), #0()) -> c_125() 585.04/149.20 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 585.04/149.20 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 585.04/149.20 , #mult^#(#pos(@x), #0()) -> c_128() 585.04/149.20 , #mult^#(#0(), #neg(@y)) -> c_129() 585.04/149.20 , #mult^#(#0(), #pos(@y)) -> c_130() 585.04/149.20 , #mult^#(#0(), #0()) -> c_131() 585.04/149.20 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 585.04/149.20 , sub'#5^#(#false(), @z, @zs) -> c_26() 585.04/149.20 , #cklt^#(#EQ()) -> c_117() 585.04/149.20 , #cklt^#(#LT()) -> c_118() 585.04/149.20 , #cklt^#(#GT()) -> c_119() 585.04/149.20 , sub'#4^#(tuple#2(@zs, @s), @z) -> 585.04/149.20 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 585.04/149.20 #equal^#(@s, #pos(#s(#0())))) 585.04/149.20 , #eq^#(nil(), nil()) -> c_94() 585.04/149.20 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 585.04/149.20 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 585.04/149.20 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 585.04/149.20 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 585.04/149.20 , #eq^#(#neg(@x), #0()) -> c_99() 585.04/149.20 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 585.04/149.20 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 585.04/149.20 , #eq^#(#pos(@x), #0()) -> c_102() 585.04/149.20 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 585.04/149.20 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.20 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.20 #eq^#(@x_1, @y_1), 585.04/149.20 #eq^#(@x_2, @y_2)) 585.04/149.20 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 585.04/149.20 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 585.04/149.20 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 585.04/149.20 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.20 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.20 #eq^#(@x_1, @y_1), 585.04/149.20 #eq^#(@x_2, @y_2)) 585.04/149.20 , #eq^#(#0(), #neg(@y)) -> c_109() 585.04/149.20 , #eq^#(#0(), #pos(@y)) -> c_110() 585.04/149.20 , #eq^#(#0(), #0()) -> c_111() 585.04/149.20 , #eq^#(#0(), #s(@y)) -> c_112() 585.04/149.20 , #eq^#(#s(@x), #0()) -> c_113() 585.04/149.20 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 585.04/149.20 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 585.04/149.20 , diff^#(@x, @y, @r) -> 585.04/149.20 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.20 +^#(+(@x, @y), @r), 585.04/149.20 +^#(@x, @y), 585.04/149.20 diff#1^#(#less(-(-(@x, @y), @r), #0())), 585.04/149.20 #less^#(-(-(@x, @y), @r), #0()), 585.04/149.20 -^#(-(@x, @y), @r), 585.04/149.20 -^#(@x, @y)) 585.04/149.20 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 585.04/149.20 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 585.04/149.20 , compare#5^#(#false(), @x, @y) -> 585.04/149.20 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 585.04/149.20 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 585.04/149.20 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 585.04/149.20 , compare#4^#(#true(), @r, @x, @y) -> 585.04/149.20 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 585.04/149.20 , compare#4^#(#false(), @r, @x, @y) -> c_56() 585.04/149.20 , sub'#1^#(nil(), @b2, @r) -> c_40() 585.04/149.20 , add'#1^#(nil(), @b2, @r) -> c_44() 585.04/149.20 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.20 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.20 , #natsub^#(@x, #0()) -> c_66() 585.04/149.20 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.20 , #natdiv^#(#0(), #0()) -> c_68() 585.04/149.20 , #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.20 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.20 , #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.20 , #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.20 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.20 , #pred^#(#0()) -> c_148() 585.04/149.20 , #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.20 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.20 , #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.20 , #succ^#(#0()) -> c_135() 585.04/149.20 , #and^#(#true(), #true()) -> c_78() 585.04/149.20 , #and^#(#true(), #false()) -> c_79() 585.04/149.20 , #and^#(#false(), #true()) -> c_80() 585.04/149.20 , #and^#(#false(), #false()) -> c_81() 585.04/149.20 , #natmult^#(#0(), @y) -> c_115() 585.04/149.20 , #natmult^#(#s(@x), @y) -> 585.04/149.20 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.20 Weak Trs: 585.04/149.20 { #natsub(@x, #0()) -> @x 585.04/149.20 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.20 , -(@x, @y) -> #sub(@x, @y) 585.04/149.20 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 585.04/149.20 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.20 , diff#1(#false()) -> #abs(#0()) 585.04/149.20 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.20 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.20 , #ckgt(#EQ()) -> #false() 585.04/149.20 , #ckgt(#LT()) -> #false() 585.04/149.20 , #ckgt(#GT()) -> #true() 585.04/149.20 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.20 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.20 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.20 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.20 , #add(#0(), @y) -> @y 585.04/149.20 , mult#2(@zs, @b2, @x) -> 585.04/149.20 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.20 , div(@x, @y) -> #div(@x, @y) 585.04/149.20 , bitToInt'#1(nil(), @n) -> #abs(#0()) 585.04/149.20 , bitToInt'#1(::(@x, @xs), @n) -> 585.04/149.20 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.20 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.20 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.20 , #and(#true(), #true()) -> #true() 585.04/149.20 , #and(#true(), #false()) -> #false() 585.04/149.20 , #and(#false(), #true()) -> #false() 585.04/149.20 , #and(#false(), #false()) -> #false() 585.04/149.20 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 585.04/149.20 , sub#1(tuple#2(@b, @_@1)) -> @b 585.04/149.20 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.20 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.20 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.20 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.20 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.20 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.20 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.20 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.20 , #compare(#0(), #0()) -> #EQ() 585.04/149.20 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.20 , #compare(#s(@x), #0()) -> #GT() 585.04/149.20 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.20 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 585.04/149.20 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 585.04/149.20 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 585.04/149.20 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.20 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 585.04/149.20 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.20 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.20 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.20 , +(@x, @y) -> #add(@x, @y) 585.04/149.20 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.20 , sum#4(#false()) -> 585.04/149.20 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.20 , *(@x, @y) -> #mult(@x, @y) 585.04/149.20 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 585.04/149.20 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 585.04/149.20 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.20 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.20 sub'#4(sub'(@xs, @ys, @r'), @z) 585.04/149.20 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.20 , #eq(nil(), nil()) -> #true() 585.04/149.20 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.20 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.20 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.20 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.20 , #eq(#neg(@x), #0()) -> #false() 585.04/149.20 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.20 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.20 , #eq(#pos(@x), #0()) -> #false() 585.04/149.20 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.20 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.20 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.20 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.20 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.20 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.20 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.20 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.20 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.20 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.20 , #eq(#0(), #0()) -> #true() 585.04/149.20 , #eq(#0(), #s(@y)) -> #false() 585.04/149.20 , #eq(#s(@x), #0()) -> #false() 585.04/149.20 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.20 , #natmult(#0(), @y) -> #0() 585.04/149.20 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.20 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 585.04/149.20 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.20 sub'#3(diff(@x, @y, @r), @xs, @ys) 585.04/149.20 , compare#2(nil(), @x, @xs) -> #abs(#0()) 585.04/149.20 , compare#2(::(@y, @ys), @x, @xs) -> 585.04/149.20 compare#3(compare(@xs, @ys), @x, @y) 585.04/149.20 , sub'#4(tuple#2(@zs, @s), @z) -> 585.04/149.20 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 585.04/149.20 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 585.04/149.20 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 585.04/149.20 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 585.04/149.21 , #cklt(#EQ()) -> #false() 585.04/149.21 , #cklt(#LT()) -> #true() 585.04/149.21 , #cklt(#GT()) -> #false() 585.04/149.21 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.21 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.21 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.21 , #sub(@x, #0()) -> @x 585.04/149.21 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.21 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 585.04/149.21 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 585.04/149.21 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.21 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.21 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.21 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.21 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.21 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.21 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.21 , diff(@x, @y, @r) -> 585.04/149.21 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.21 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.21 , mult#1(nil(), @b2) -> nil() 585.04/149.21 , mult#1(::(@x, @xs), @b2) -> 585.04/149.21 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.21 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.21 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.21 , #mult(#neg(@x), #0()) -> #0() 585.04/149.21 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.21 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.21 , #mult(#pos(@x), #0()) -> #0() 585.04/149.21 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.21 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.21 , #mult(#0(), #0()) -> #0() 585.04/149.21 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.21 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.21 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.21 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.21 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 585.04/149.21 , compare(@b1, @b2) -> compare#1(@b1, @b2) 585.04/149.21 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.21 , compare#6(#false()) -> #abs(#0()) 585.04/149.21 , compare#4(#true(), @r, @x, @y) -> 585.04/149.21 compare#5(#less(@x, @y), @x, @y) 585.04/149.21 , compare#4(#false(), @r, @x, @y) -> @r 585.04/149.21 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.21 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.21 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.21 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.21 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.21 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.21 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.21 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.21 , #div(#0(), #neg(@y)) -> #0() 585.04/149.21 , #div(#0(), #pos(@y)) -> #0() 585.04/149.21 , #div(#0(), #0()) -> #divByZero() 585.04/149.21 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.21 , compare#1(nil(), @b2) -> #abs(#0()) 585.04/149.21 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 585.04/149.21 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.21 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.21 , #abs(#0()) -> #0() 585.04/149.21 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.21 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.21 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.21 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.21 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.21 Obligation: 585.04/149.21 innermost runtime complexity 585.04/149.21 Answer: 585.04/149.21 YES(O(1),O(n^2)) 585.04/149.21 585.04/149.21 We estimate the number of application of {8,18} by applications of 585.04/149.21 Pre({8,18}) = {7,17}. Here rules are labeled as follows: 585.04/149.21 585.04/149.21 DPs: 585.04/149.21 { 1: sub^#(@b1, @b2) -> 585.04/149.21 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.21 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.21 #abs^#(#0())) 585.04/149.21 , 2: sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 585.04/149.21 , 3: mult#2^#(@zs, @b2, @x) -> 585.04/149.21 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.21 #equal^#(@x, #pos(#s(#0())))) 585.04/149.21 , 4: mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 585.04/149.21 , 5: bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.21 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.21 *^#(@x, @n), 585.04/149.21 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.21 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.21 , 6: bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 585.04/149.21 , 7: sum^#(@x, @y, @r) -> 585.04/149.21 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 585.04/149.21 , 8: sum#1^#(@s) -> 585.04/149.21 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 585.04/149.21 , 9: mult3^#(@b1, @b2, @b3) -> 585.04/149.21 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.21 , 10: mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 585.04/149.21 , 11: leq^#(@b1, @b2) -> 585.04/149.21 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.21 compare^#(@b1, @b2)) 585.04/149.21 , 12: compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 585.04/149.21 , 13: mult#1^#(::(@x, @xs), @b2) -> 585.04/149.21 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.21 #abs^#(#0()), 585.04/149.21 mult^#(@xs, @b2)) 585.04/149.21 , 14: bitToInt^#(@b) -> 585.04/149.21 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.21 , 15: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.21 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.21 , 16: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.21 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.21 , 17: compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.21 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.21 , 18: compare#3^#(@r, @x, @y) -> 585.04/149.21 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 585.04/149.21 , 19: add^#(@b1, @b2) -> 585.04/149.21 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.21 , 20: add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 585.04/149.21 , 21: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.21 c_39(add'^#(@xs, @ys, @r')) 585.04/149.21 , 22: sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.21 c_41(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.21 , 23: add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.21 c_45(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.21 , 24: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.21 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 585.04/149.21 , 25: compare#1^#(::(@x, @xs), @b2) -> 585.04/149.21 c_61(compare#2^#(@b2, @x, @xs)) 585.04/149.21 , 26: -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 585.04/149.21 , 27: #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 585.04/149.21 , 28: #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 585.04/149.21 , 29: #sub^#(@x, #0()) -> c_122() 585.04/149.21 , 30: sub#1^#(tuple#2(@b, @_@1)) -> c_12() 585.04/149.21 , 31: #abs^#(#neg(@x)) -> c_62() 585.04/149.21 , 32: #abs^#(#pos(@x)) -> c_63() 585.04/149.21 , 33: #abs^#(#0()) -> c_64() 585.04/149.21 , 34: #abs^#(#s(@x)) -> c_65() 585.04/149.21 , 35: diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 585.04/149.21 , 36: diff#1^#(#false()) -> c_4(#abs^#(#0())) 585.04/149.21 , 37: mult#3^#(#false(), @b2, @zs) -> c_43() 585.04/149.21 , 38: #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 585.04/149.21 , 39: div^#(@x, @y) -> c_6(#div^#(@x, @y)) 585.04/149.21 , 40: #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 585.04/149.21 , 41: #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 585.04/149.21 , 42: #div^#(#neg(@x), #0()) -> c_138() 585.04/149.21 , 43: #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 585.04/149.21 , 44: #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 585.04/149.21 , 45: #div^#(#pos(@x), #0()) -> c_141() 585.04/149.21 , 46: #div^#(#0(), #neg(@y)) -> c_142() 585.04/149.21 , 47: #div^#(#0(), #pos(@y)) -> c_143() 585.04/149.21 , 48: #div^#(#0(), #0()) -> c_144() 585.04/149.21 , 49: bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 585.04/149.21 , 50: +^#(@x, @y) -> c_21(#add^#(@x, @y)) 585.04/149.21 , 51: *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 585.04/149.21 , 52: mod^#(@x, @y) -> 585.04/149.21 c_10(-^#(@x, *(@x, div(@x, @y))), 585.04/149.21 *^#(@x, div(@x, @y)), 585.04/149.21 div^#(@x, @y)) 585.04/149.21 , 53: #less^#(@x, @y) -> 585.04/149.21 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.21 , 54: #greater^#(@x, @y) -> 585.04/149.21 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.21 , 55: #ckgt^#(#EQ()) -> c_70() 585.04/149.21 , 56: #ckgt^#(#LT()) -> c_71() 585.04/149.21 , 57: #ckgt^#(#GT()) -> c_72() 585.04/149.21 , 58: #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 585.04/149.21 , 59: #compare^#(#neg(@x), #pos(@y)) -> c_83() 585.04/149.21 , 60: #compare^#(#neg(@x), #0()) -> c_84() 585.04/149.21 , 61: #compare^#(#pos(@x), #neg(@y)) -> c_85() 585.04/149.21 , 62: #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 585.04/149.21 , 63: #compare^#(#pos(@x), #0()) -> c_87() 585.04/149.21 , 64: #compare^#(#0(), #neg(@y)) -> c_88() 585.04/149.21 , 65: #compare^#(#0(), #pos(@y)) -> c_89() 585.04/149.21 , 66: #compare^#(#0(), #0()) -> c_90() 585.04/149.21 , 67: #compare^#(#0(), #s(@y)) -> c_91() 585.04/149.21 , 68: #compare^#(#s(@x), #0()) -> c_92() 585.04/149.21 , 69: #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 585.04/149.21 , 70: mult#1^#(nil(), @b2) -> c_49() 585.04/149.21 , 71: sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 585.04/149.21 , 72: sum#2^#(#false(), @s) -> 585.04/149.21 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 585.04/149.21 #equal^#(@s, #pos(#s(#0())))) 585.04/149.21 , 73: sum#3^#(#true(), @s) -> 585.04/149.21 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 585.04/149.21 , 74: sum#3^#(#false(), @s) -> 585.04/149.21 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 585.04/149.21 #equal^#(@s, #pos(#s(#s(#0()))))) 585.04/149.21 , 75: #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 585.04/149.21 , 76: #add^#(#neg(#s(#s(@x))), @y) -> 585.04/149.21 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.21 , 77: #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 585.04/149.21 , 78: #add^#(#pos(#s(#s(@x))), @y) -> 585.04/149.21 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.21 , 79: #add^#(#0(), @y) -> c_77() 585.04/149.21 , 80: sum#4^#(#true()) -> 585.04/149.21 c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 585.04/149.21 , 81: sum#4^#(#false()) -> 585.04/149.21 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 585.04/149.21 , 82: #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 585.04/149.21 , 83: #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 585.04/149.21 , 84: #mult^#(#neg(@x), #0()) -> c_125() 585.04/149.21 , 85: #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 585.04/149.21 , 86: #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 585.04/149.21 , 87: #mult^#(#pos(@x), #0()) -> c_128() 585.04/149.21 , 88: #mult^#(#0(), #neg(@y)) -> c_129() 585.04/149.21 , 89: #mult^#(#0(), #pos(@y)) -> c_130() 585.04/149.21 , 90: #mult^#(#0(), #0()) -> c_131() 585.04/149.21 , 91: sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 585.04/149.21 , 92: sub'#5^#(#false(), @z, @zs) -> c_26() 585.04/149.21 , 93: #cklt^#(#EQ()) -> c_117() 585.04/149.21 , 94: #cklt^#(#LT()) -> c_118() 585.04/149.21 , 95: #cklt^#(#GT()) -> c_119() 585.04/149.21 , 96: sub'#4^#(tuple#2(@zs, @s), @z) -> 585.04/149.21 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 585.04/149.21 #equal^#(@s, #pos(#s(#0())))) 585.04/149.21 , 97: #eq^#(nil(), nil()) -> c_94() 585.04/149.21 , 98: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 585.04/149.21 , 99: #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 585.04/149.21 , 100: #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 585.04/149.21 , 101: #eq^#(#neg(@x), #pos(@y)) -> c_98() 585.04/149.21 , 102: #eq^#(#neg(@x), #0()) -> c_99() 585.04/149.21 , 103: #eq^#(#pos(@x), #neg(@y)) -> c_100() 585.04/149.21 , 104: #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 585.04/149.21 , 105: #eq^#(#pos(@x), #0()) -> c_102() 585.04/149.21 , 106: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 585.04/149.21 , 107: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.21 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.21 #eq^#(@x_1, @y_1), 585.04/149.21 #eq^#(@x_2, @y_2)) 585.04/149.21 , 108: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 585.04/149.21 , 109: #eq^#(::(@x_1, @x_2), nil()) -> c_106() 585.04/149.21 , 110: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 585.04/149.21 , 111: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.21 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.21 #eq^#(@x_1, @y_1), 585.04/149.21 #eq^#(@x_2, @y_2)) 585.04/149.21 , 112: #eq^#(#0(), #neg(@y)) -> c_109() 585.04/149.21 , 113: #eq^#(#0(), #pos(@y)) -> c_110() 585.04/149.21 , 114: #eq^#(#0(), #0()) -> c_111() 585.04/149.21 , 115: #eq^#(#0(), #s(@y)) -> c_112() 585.04/149.21 , 116: #eq^#(#s(@x), #0()) -> c_113() 585.04/149.21 , 117: #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 585.04/149.21 , 118: sub'#2^#(nil(), @r, @x, @xs) -> c_30() 585.04/149.21 , 119: diff^#(@x, @y, @r) -> 585.04/149.21 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.21 +^#(+(@x, @y), @r), 585.04/149.21 +^#(@x, @y), 585.04/149.21 diff#1^#(#less(-(-(@x, @y), @r), #0())), 585.04/149.21 #less^#(-(-(@x, @y), @r), #0()), 585.04/149.21 -^#(-(@x, @y), @r), 585.04/149.21 -^#(@x, @y)) 585.04/149.21 , 120: compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 585.04/149.21 , 121: compare#5^#(#true(), @x, @y) -> 585.04/149.21 c_35(-^#(#0(), #pos(#s(#0())))) 585.04/149.21 , 122: compare#5^#(#false(), @x, @y) -> 585.04/149.21 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 585.04/149.21 , 123: compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 585.04/149.21 , 124: compare#6^#(#false()) -> c_54(#abs^#(#0())) 585.04/149.21 , 125: compare#4^#(#true(), @r, @x, @y) -> 585.04/149.21 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 585.04/149.21 , 126: compare#4^#(#false(), @r, @x, @y) -> c_56() 585.04/149.21 , 127: sub'#1^#(nil(), @b2, @r) -> c_40() 585.04/149.21 , 128: add'#1^#(nil(), @b2, @r) -> c_44() 585.04/149.21 , 129: add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.21 , 130: compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.21 , 131: #natsub^#(@x, #0()) -> c_66() 585.04/149.21 , 132: #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.21 , 133: #natdiv^#(#0(), #0()) -> c_68() 585.04/149.21 , 134: #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.21 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.21 , 135: #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.21 , 136: #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.21 , 137: #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.21 , 138: #pred^#(#0()) -> c_148() 585.04/149.21 , 139: #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.21 , 140: #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.21 , 141: #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.21 , 142: #succ^#(#0()) -> c_135() 585.04/149.21 , 143: #and^#(#true(), #true()) -> c_78() 585.04/149.21 , 144: #and^#(#true(), #false()) -> c_79() 585.04/149.21 , 145: #and^#(#false(), #true()) -> c_80() 585.04/149.21 , 146: #and^#(#false(), #false()) -> c_81() 585.04/149.21 , 147: #natmult^#(#0(), @y) -> c_115() 585.04/149.21 , 148: #natmult^#(#s(@x), @y) -> 585.04/149.21 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.21 585.04/149.21 We are left with following problem, upon which TcT provides the 585.04/149.21 certificate YES(O(1),O(n^2)). 585.04/149.21 585.04/149.21 Strict DPs: 585.04/149.21 { sub^#(@b1, @b2) -> 585.04/149.21 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.21 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.21 #abs^#(#0())) 585.04/149.21 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 585.04/149.21 , mult#2^#(@zs, @b2, @x) -> 585.04/149.21 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.21 #equal^#(@x, #pos(#s(#0())))) 585.04/149.21 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 585.04/149.21 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.21 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.21 *^#(@x, @n), 585.04/149.21 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.21 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.21 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 585.04/149.21 , sum^#(@x, @y, @r) -> 585.04/149.21 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 585.04/149.21 , mult3^#(@b1, @b2, @b3) -> 585.04/149.21 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.21 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 585.04/149.21 , leq^#(@b1, @b2) -> 585.04/149.21 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.21 compare^#(@b1, @b2)) 585.04/149.21 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 585.04/149.21 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.21 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.21 #abs^#(#0()), 585.04/149.21 mult^#(@xs, @b2)) 585.04/149.21 , bitToInt^#(@b) -> 585.04/149.21 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.21 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.21 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.21 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.21 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.21 , compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.21 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.21 , add^#(@b1, @b2) -> 585.04/149.21 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.21 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 585.04/149.21 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.21 c_39(add'^#(@xs, @ys, @r')) 585.04/149.21 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.21 c_41(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.21 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.21 c_45(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.21 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.21 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 585.04/149.21 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.21 c_61(compare#2^#(@b2, @x, @xs)) } 585.04/149.21 Weak DPs: 585.04/149.21 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 585.04/149.21 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 585.04/149.21 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 585.04/149.21 , #sub^#(@x, #0()) -> c_122() 585.04/149.21 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 585.04/149.21 , #abs^#(#neg(@x)) -> c_62() 585.04/149.21 , #abs^#(#pos(@x)) -> c_63() 585.04/149.21 , #abs^#(#0()) -> c_64() 585.04/149.21 , #abs^#(#s(@x)) -> c_65() 585.04/149.21 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 585.04/149.21 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 585.04/149.21 , mult#3^#(#false(), @b2, @zs) -> c_43() 585.04/149.21 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 585.04/149.21 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 585.04/149.21 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 585.04/149.21 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 585.04/149.21 , #div^#(#neg(@x), #0()) -> c_138() 585.04/149.21 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 585.04/149.21 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 585.04/149.21 , #div^#(#pos(@x), #0()) -> c_141() 585.04/149.21 , #div^#(#0(), #neg(@y)) -> c_142() 585.04/149.21 , #div^#(#0(), #pos(@y)) -> c_143() 585.04/149.21 , #div^#(#0(), #0()) -> c_144() 585.04/149.21 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 585.04/149.21 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 585.04/149.21 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 585.04/149.21 , sum#1^#(@s) -> 585.04/149.21 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 585.04/149.21 , mod^#(@x, @y) -> 585.04/149.21 c_10(-^#(@x, *(@x, div(@x, @y))), 585.04/149.21 *^#(@x, div(@x, @y)), 585.04/149.21 div^#(@x, @y)) 585.04/149.21 , #less^#(@x, @y) -> 585.04/149.21 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.21 , #greater^#(@x, @y) -> 585.04/149.21 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.21 , #ckgt^#(#EQ()) -> c_70() 585.04/149.21 , #ckgt^#(#LT()) -> c_71() 585.04/149.21 , #ckgt^#(#GT()) -> c_72() 585.04/149.21 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 585.04/149.21 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 585.04/149.21 , #compare^#(#neg(@x), #0()) -> c_84() 585.04/149.21 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 585.04/149.21 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 585.04/149.21 , #compare^#(#pos(@x), #0()) -> c_87() 585.04/149.21 , #compare^#(#0(), #neg(@y)) -> c_88() 585.04/149.21 , #compare^#(#0(), #pos(@y)) -> c_89() 585.04/149.21 , #compare^#(#0(), #0()) -> c_90() 585.04/149.21 , #compare^#(#0(), #s(@y)) -> c_91() 585.04/149.21 , #compare^#(#s(@x), #0()) -> c_92() 585.04/149.21 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 585.04/149.21 , mult#1^#(nil(), @b2) -> c_49() 585.04/149.21 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 585.04/149.21 , sum#2^#(#false(), @s) -> 585.04/149.21 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 585.04/149.21 #equal^#(@s, #pos(#s(#0())))) 585.04/149.21 , sum#3^#(#true(), @s) -> 585.04/149.21 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 585.04/149.21 , sum#3^#(#false(), @s) -> 585.04/149.21 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 585.04/149.21 #equal^#(@s, #pos(#s(#s(#0()))))) 585.04/149.21 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 585.04/149.21 , #add^#(#neg(#s(#s(@x))), @y) -> 585.04/149.21 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.22 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 585.04/149.22 , #add^#(#pos(#s(#s(@x))), @y) -> 585.04/149.22 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.22 , #add^#(#0(), @y) -> c_77() 585.04/149.22 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 585.04/149.22 , sum#4^#(#false()) -> 585.04/149.22 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 585.04/149.22 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 585.04/149.22 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 585.04/149.22 , #mult^#(#neg(@x), #0()) -> c_125() 585.04/149.22 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 585.04/149.22 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 585.04/149.22 , #mult^#(#pos(@x), #0()) -> c_128() 585.04/149.22 , #mult^#(#0(), #neg(@y)) -> c_129() 585.04/149.22 , #mult^#(#0(), #pos(@y)) -> c_130() 585.04/149.22 , #mult^#(#0(), #0()) -> c_131() 585.04/149.22 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 585.04/149.22 , sub'#5^#(#false(), @z, @zs) -> c_26() 585.04/149.22 , #cklt^#(#EQ()) -> c_117() 585.04/149.22 , #cklt^#(#LT()) -> c_118() 585.04/149.22 , #cklt^#(#GT()) -> c_119() 585.04/149.22 , sub'#4^#(tuple#2(@zs, @s), @z) -> 585.04/149.22 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 585.04/149.22 #equal^#(@s, #pos(#s(#0())))) 585.04/149.22 , #eq^#(nil(), nil()) -> c_94() 585.04/149.22 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 585.04/149.22 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 585.04/149.22 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 585.04/149.22 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 585.04/149.22 , #eq^#(#neg(@x), #0()) -> c_99() 585.04/149.22 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 585.04/149.22 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 585.04/149.22 , #eq^#(#pos(@x), #0()) -> c_102() 585.04/149.22 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 585.04/149.22 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.22 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.22 #eq^#(@x_1, @y_1), 585.04/149.22 #eq^#(@x_2, @y_2)) 585.04/149.22 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 585.04/149.22 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 585.04/149.22 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 585.04/149.22 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.22 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.22 #eq^#(@x_1, @y_1), 585.04/149.22 #eq^#(@x_2, @y_2)) 585.04/149.22 , #eq^#(#0(), #neg(@y)) -> c_109() 585.04/149.22 , #eq^#(#0(), #pos(@y)) -> c_110() 585.04/149.22 , #eq^#(#0(), #0()) -> c_111() 585.04/149.22 , #eq^#(#0(), #s(@y)) -> c_112() 585.04/149.22 , #eq^#(#s(@x), #0()) -> c_113() 585.04/149.22 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 585.04/149.22 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 585.04/149.22 , diff^#(@x, @y, @r) -> 585.04/149.22 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.22 +^#(+(@x, @y), @r), 585.04/149.22 +^#(@x, @y), 585.04/149.22 diff#1^#(#less(-(-(@x, @y), @r), #0())), 585.04/149.22 #less^#(-(-(@x, @y), @r), #0()), 585.04/149.22 -^#(-(@x, @y), @r), 585.04/149.22 -^#(@x, @y)) 585.04/149.22 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 585.04/149.22 , compare#3^#(@r, @x, @y) -> 585.04/149.22 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 585.04/149.22 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 585.04/149.22 , compare#5^#(#false(), @x, @y) -> 585.04/149.22 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 585.04/149.22 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 585.04/149.22 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 585.04/149.22 , compare#4^#(#true(), @r, @x, @y) -> 585.04/149.22 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 585.04/149.22 , compare#4^#(#false(), @r, @x, @y) -> c_56() 585.04/149.22 , sub'#1^#(nil(), @b2, @r) -> c_40() 585.04/149.22 , add'#1^#(nil(), @b2, @r) -> c_44() 585.04/149.22 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.22 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.22 , #natsub^#(@x, #0()) -> c_66() 585.04/149.22 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.22 , #natdiv^#(#0(), #0()) -> c_68() 585.04/149.22 , #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.22 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.22 , #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.22 , #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.22 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.22 , #pred^#(#0()) -> c_148() 585.04/149.22 , #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.22 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.22 , #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.22 , #succ^#(#0()) -> c_135() 585.04/149.22 , #and^#(#true(), #true()) -> c_78() 585.04/149.22 , #and^#(#true(), #false()) -> c_79() 585.04/149.22 , #and^#(#false(), #true()) -> c_80() 585.04/149.22 , #and^#(#false(), #false()) -> c_81() 585.04/149.22 , #natmult^#(#0(), @y) -> c_115() 585.04/149.22 , #natmult^#(#s(@x), @y) -> 585.04/149.22 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.22 Weak Trs: 585.04/149.22 { #natsub(@x, #0()) -> @x 585.04/149.22 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.22 , -(@x, @y) -> #sub(@x, @y) 585.04/149.22 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 585.04/149.22 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.22 , diff#1(#false()) -> #abs(#0()) 585.04/149.22 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.22 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.22 , #ckgt(#EQ()) -> #false() 585.04/149.22 , #ckgt(#LT()) -> #false() 585.04/149.22 , #ckgt(#GT()) -> #true() 585.04/149.22 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.22 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.22 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.22 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.22 , #add(#0(), @y) -> @y 585.04/149.22 , mult#2(@zs, @b2, @x) -> 585.04/149.22 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.22 , div(@x, @y) -> #div(@x, @y) 585.04/149.22 , bitToInt'#1(nil(), @n) -> #abs(#0()) 585.04/149.22 , bitToInt'#1(::(@x, @xs), @n) -> 585.04/149.22 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.22 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.22 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.22 , #and(#true(), #true()) -> #true() 585.04/149.22 , #and(#true(), #false()) -> #false() 585.04/149.22 , #and(#false(), #true()) -> #false() 585.04/149.22 , #and(#false(), #false()) -> #false() 585.04/149.22 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 585.04/149.22 , sub#1(tuple#2(@b, @_@1)) -> @b 585.04/149.22 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.22 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.22 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.22 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.22 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.22 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.22 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.22 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.22 , #compare(#0(), #0()) -> #EQ() 585.04/149.22 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.22 , #compare(#s(@x), #0()) -> #GT() 585.04/149.22 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.22 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 585.04/149.22 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 585.04/149.22 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 585.04/149.22 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.22 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 585.04/149.22 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.22 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.22 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.22 , +(@x, @y) -> #add(@x, @y) 585.04/149.22 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.22 , sum#4(#false()) -> 585.04/149.22 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.22 , *(@x, @y) -> #mult(@x, @y) 585.04/149.22 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 585.04/149.22 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 585.04/149.22 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.22 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.22 sub'#4(sub'(@xs, @ys, @r'), @z) 585.04/149.22 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.22 , #eq(nil(), nil()) -> #true() 585.04/149.22 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.22 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.22 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.22 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.22 , #eq(#neg(@x), #0()) -> #false() 585.04/149.22 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.22 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.22 , #eq(#pos(@x), #0()) -> #false() 585.04/149.22 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.22 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.22 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.22 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.22 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.22 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.22 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.22 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.22 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.22 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.22 , #eq(#0(), #0()) -> #true() 585.04/149.22 , #eq(#0(), #s(@y)) -> #false() 585.04/149.22 , #eq(#s(@x), #0()) -> #false() 585.04/149.22 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.22 , #natmult(#0(), @y) -> #0() 585.04/149.22 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.22 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 585.04/149.22 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.22 sub'#3(diff(@x, @y, @r), @xs, @ys) 585.04/149.22 , compare#2(nil(), @x, @xs) -> #abs(#0()) 585.04/149.22 , compare#2(::(@y, @ys), @x, @xs) -> 585.04/149.22 compare#3(compare(@xs, @ys), @x, @y) 585.04/149.22 , sub'#4(tuple#2(@zs, @s), @z) -> 585.04/149.22 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 585.04/149.22 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 585.04/149.22 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 585.04/149.22 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 585.04/149.22 , #cklt(#EQ()) -> #false() 585.04/149.22 , #cklt(#LT()) -> #true() 585.04/149.22 , #cklt(#GT()) -> #false() 585.04/149.22 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.22 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.22 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.22 , #sub(@x, #0()) -> @x 585.04/149.22 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.22 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 585.04/149.22 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 585.04/149.22 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.22 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.22 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.22 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.22 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.22 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.22 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.22 , diff(@x, @y, @r) -> 585.04/149.22 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.22 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.22 , mult#1(nil(), @b2) -> nil() 585.04/149.22 , mult#1(::(@x, @xs), @b2) -> 585.04/149.22 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.22 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.22 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.22 , #mult(#neg(@x), #0()) -> #0() 585.04/149.22 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.22 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.22 , #mult(#pos(@x), #0()) -> #0() 585.04/149.22 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.22 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.22 , #mult(#0(), #0()) -> #0() 585.04/149.22 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.22 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.22 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.22 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.22 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 585.04/149.22 , compare(@b1, @b2) -> compare#1(@b1, @b2) 585.04/149.22 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.22 , compare#6(#false()) -> #abs(#0()) 585.04/149.22 , compare#4(#true(), @r, @x, @y) -> 585.04/149.22 compare#5(#less(@x, @y), @x, @y) 585.04/149.22 , compare#4(#false(), @r, @x, @y) -> @r 585.04/149.22 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.22 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.22 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.22 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.22 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.22 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.22 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.22 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.22 , #div(#0(), #neg(@y)) -> #0() 585.04/149.22 , #div(#0(), #pos(@y)) -> #0() 585.04/149.22 , #div(#0(), #0()) -> #divByZero() 585.04/149.22 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.22 , compare#1(nil(), @b2) -> #abs(#0()) 585.04/149.22 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 585.04/149.22 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.22 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.22 , #abs(#0()) -> #0() 585.04/149.22 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.22 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.22 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.22 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.22 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.22 Obligation: 585.04/149.22 innermost runtime complexity 585.04/149.22 Answer: 585.04/149.22 YES(O(1),O(n^2)) 585.04/149.22 585.04/149.22 We estimate the number of application of {7} by applications of 585.04/149.22 Pre({7}) = {22}. Here rules are labeled as follows: 585.04/149.22 585.04/149.22 DPs: 585.04/149.22 { 1: sub^#(@b1, @b2) -> 585.04/149.22 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.22 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.22 #abs^#(#0())) 585.04/149.22 , 2: sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 585.04/149.22 , 3: mult#2^#(@zs, @b2, @x) -> 585.04/149.22 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.22 #equal^#(@x, #pos(#s(#0())))) 585.04/149.22 , 4: mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 585.04/149.22 , 5: bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.22 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.22 *^#(@x, @n), 585.04/149.22 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.22 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.22 , 6: bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 585.04/149.22 , 7: sum^#(@x, @y, @r) -> 585.04/149.22 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 585.04/149.22 , 8: mult3^#(@b1, @b2, @b3) -> 585.04/149.22 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.22 , 9: mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 585.04/149.22 , 10: leq^#(@b1, @b2) -> 585.04/149.22 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.22 compare^#(@b1, @b2)) 585.04/149.22 , 11: compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 585.04/149.22 , 12: mult#1^#(::(@x, @xs), @b2) -> 585.04/149.22 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.22 #abs^#(#0()), 585.04/149.22 mult^#(@xs, @b2)) 585.04/149.22 , 13: bitToInt^#(@b) -> 585.04/149.22 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.22 , 14: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.22 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.22 , 15: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.22 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.22 , 16: compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.22 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.22 , 17: add^#(@b1, @b2) -> 585.04/149.22 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.22 , 18: add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 585.04/149.22 , 19: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.22 c_39(add'^#(@xs, @ys, @r')) 585.04/149.22 , 20: sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.22 c_41(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.22 , 21: add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.22 c_45(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.22 , 22: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.22 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 585.04/149.22 , 23: compare#1^#(::(@x, @xs), @b2) -> 585.04/149.22 c_61(compare#2^#(@b2, @x, @xs)) 585.04/149.22 , 24: -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 585.04/149.22 , 25: #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 585.04/149.22 , 26: #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 585.04/149.22 , 27: #sub^#(@x, #0()) -> c_122() 585.04/149.22 , 28: sub#1^#(tuple#2(@b, @_@1)) -> c_12() 585.04/149.22 , 29: #abs^#(#neg(@x)) -> c_62() 585.04/149.22 , 30: #abs^#(#pos(@x)) -> c_63() 585.04/149.22 , 31: #abs^#(#0()) -> c_64() 585.04/149.22 , 32: #abs^#(#s(@x)) -> c_65() 585.04/149.22 , 33: diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 585.04/149.22 , 34: diff#1^#(#false()) -> c_4(#abs^#(#0())) 585.04/149.22 , 35: mult#3^#(#false(), @b2, @zs) -> c_43() 585.04/149.22 , 36: #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 585.04/149.22 , 37: div^#(@x, @y) -> c_6(#div^#(@x, @y)) 585.04/149.22 , 38: #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 585.04/149.22 , 39: #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 585.04/149.22 , 40: #div^#(#neg(@x), #0()) -> c_138() 585.04/149.22 , 41: #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 585.04/149.22 , 42: #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 585.04/149.22 , 43: #div^#(#pos(@x), #0()) -> c_141() 585.04/149.22 , 44: #div^#(#0(), #neg(@y)) -> c_142() 585.04/149.22 , 45: #div^#(#0(), #pos(@y)) -> c_143() 585.04/149.22 , 46: #div^#(#0(), #0()) -> c_144() 585.04/149.22 , 47: bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 585.04/149.22 , 48: +^#(@x, @y) -> c_21(#add^#(@x, @y)) 585.04/149.22 , 49: *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 585.04/149.22 , 50: sum#1^#(@s) -> 585.04/149.22 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 585.04/149.22 , 51: mod^#(@x, @y) -> 585.04/149.22 c_10(-^#(@x, *(@x, div(@x, @y))), 585.04/149.22 *^#(@x, div(@x, @y)), 585.04/149.22 div^#(@x, @y)) 585.04/149.22 , 52: #less^#(@x, @y) -> 585.04/149.22 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.22 , 53: #greater^#(@x, @y) -> 585.04/149.22 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.22 , 54: #ckgt^#(#EQ()) -> c_70() 585.04/149.22 , 55: #ckgt^#(#LT()) -> c_71() 585.04/149.22 , 56: #ckgt^#(#GT()) -> c_72() 585.04/149.22 , 57: #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 585.04/149.22 , 58: #compare^#(#neg(@x), #pos(@y)) -> c_83() 585.04/149.22 , 59: #compare^#(#neg(@x), #0()) -> c_84() 585.04/149.22 , 60: #compare^#(#pos(@x), #neg(@y)) -> c_85() 585.04/149.22 , 61: #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 585.04/149.22 , 62: #compare^#(#pos(@x), #0()) -> c_87() 585.04/149.22 , 63: #compare^#(#0(), #neg(@y)) -> c_88() 585.04/149.22 , 64: #compare^#(#0(), #pos(@y)) -> c_89() 585.04/149.22 , 65: #compare^#(#0(), #0()) -> c_90() 585.04/149.22 , 66: #compare^#(#0(), #s(@y)) -> c_91() 585.04/149.22 , 67: #compare^#(#s(@x), #0()) -> c_92() 585.04/149.22 , 68: #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 585.04/149.22 , 69: mult#1^#(nil(), @b2) -> c_49() 585.04/149.23 , 70: sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 585.04/149.23 , 71: sum#2^#(#false(), @s) -> 585.04/149.23 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 585.04/149.23 #equal^#(@s, #pos(#s(#0())))) 585.04/149.23 , 72: sum#3^#(#true(), @s) -> 585.04/149.23 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 585.04/149.23 , 73: sum#3^#(#false(), @s) -> 585.04/149.23 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 585.04/149.23 #equal^#(@s, #pos(#s(#s(#0()))))) 585.04/149.23 , 74: #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 585.04/149.23 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 585.04/149.23 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.23 , 76: #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 585.04/149.23 , 77: #add^#(#pos(#s(#s(@x))), @y) -> 585.04/149.23 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.23 , 78: #add^#(#0(), @y) -> c_77() 585.04/149.23 , 79: sum#4^#(#true()) -> 585.04/149.23 c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 585.04/149.23 , 80: sum#4^#(#false()) -> 585.04/149.23 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 585.04/149.23 , 81: #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 585.04/149.23 , 82: #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 585.04/149.23 , 83: #mult^#(#neg(@x), #0()) -> c_125() 585.04/149.23 , 84: #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 585.04/149.23 , 85: #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 585.04/149.23 , 86: #mult^#(#pos(@x), #0()) -> c_128() 585.04/149.23 , 87: #mult^#(#0(), #neg(@y)) -> c_129() 585.04/149.23 , 88: #mult^#(#0(), #pos(@y)) -> c_130() 585.04/149.23 , 89: #mult^#(#0(), #0()) -> c_131() 585.04/149.23 , 90: sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 585.04/149.23 , 91: sub'#5^#(#false(), @z, @zs) -> c_26() 585.04/149.23 , 92: #cklt^#(#EQ()) -> c_117() 585.04/149.23 , 93: #cklt^#(#LT()) -> c_118() 585.04/149.23 , 94: #cklt^#(#GT()) -> c_119() 585.04/149.23 , 95: sub'#4^#(tuple#2(@zs, @s), @z) -> 585.04/149.23 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 585.04/149.23 #equal^#(@s, #pos(#s(#0())))) 585.04/149.23 , 96: #eq^#(nil(), nil()) -> c_94() 585.04/149.23 , 97: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 585.04/149.23 , 98: #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 585.04/149.23 , 99: #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 585.04/149.23 , 100: #eq^#(#neg(@x), #pos(@y)) -> c_98() 585.04/149.23 , 101: #eq^#(#neg(@x), #0()) -> c_99() 585.04/149.23 , 102: #eq^#(#pos(@x), #neg(@y)) -> c_100() 585.04/149.23 , 103: #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 585.04/149.23 , 104: #eq^#(#pos(@x), #0()) -> c_102() 585.04/149.23 , 105: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 585.04/149.23 , 106: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.23 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.23 #eq^#(@x_1, @y_1), 585.04/149.23 #eq^#(@x_2, @y_2)) 585.04/149.23 , 107: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 585.04/149.23 , 108: #eq^#(::(@x_1, @x_2), nil()) -> c_106() 585.04/149.23 , 109: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 585.04/149.23 , 110: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.23 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.23 #eq^#(@x_1, @y_1), 585.04/149.23 #eq^#(@x_2, @y_2)) 585.04/149.23 , 111: #eq^#(#0(), #neg(@y)) -> c_109() 585.04/149.23 , 112: #eq^#(#0(), #pos(@y)) -> c_110() 585.04/149.23 , 113: #eq^#(#0(), #0()) -> c_111() 585.04/149.23 , 114: #eq^#(#0(), #s(@y)) -> c_112() 585.04/149.23 , 115: #eq^#(#s(@x), #0()) -> c_113() 585.04/149.23 , 116: #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 585.04/149.23 , 117: sub'#2^#(nil(), @r, @x, @xs) -> c_30() 585.04/149.23 , 118: diff^#(@x, @y, @r) -> 585.04/149.23 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.23 +^#(+(@x, @y), @r), 585.04/149.23 +^#(@x, @y), 585.04/149.23 diff#1^#(#less(-(-(@x, @y), @r), #0())), 585.04/149.23 #less^#(-(-(@x, @y), @r), #0()), 585.04/149.23 -^#(-(@x, @y), @r), 585.04/149.23 -^#(@x, @y)) 585.04/149.23 , 119: compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 585.04/149.23 , 120: compare#3^#(@r, @x, @y) -> 585.04/149.23 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 585.04/149.23 , 121: compare#5^#(#true(), @x, @y) -> 585.04/149.23 c_35(-^#(#0(), #pos(#s(#0())))) 585.04/149.23 , 122: compare#5^#(#false(), @x, @y) -> 585.04/149.23 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 585.04/149.23 , 123: compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 585.04/149.23 , 124: compare#6^#(#false()) -> c_54(#abs^#(#0())) 585.04/149.23 , 125: compare#4^#(#true(), @r, @x, @y) -> 585.04/149.23 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 585.04/149.23 , 126: compare#4^#(#false(), @r, @x, @y) -> c_56() 585.04/149.23 , 127: sub'#1^#(nil(), @b2, @r) -> c_40() 585.04/149.23 , 128: add'#1^#(nil(), @b2, @r) -> c_44() 585.04/149.23 , 129: add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.23 , 130: compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.23 , 131: #natsub^#(@x, #0()) -> c_66() 585.04/149.23 , 132: #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.23 , 133: #natdiv^#(#0(), #0()) -> c_68() 585.04/149.23 , 134: #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.23 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.23 , 135: #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.23 , 136: #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.23 , 137: #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.23 , 138: #pred^#(#0()) -> c_148() 585.04/149.23 , 139: #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.23 , 140: #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.23 , 141: #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.23 , 142: #succ^#(#0()) -> c_135() 585.04/149.23 , 143: #and^#(#true(), #true()) -> c_78() 585.04/149.23 , 144: #and^#(#true(), #false()) -> c_79() 585.04/149.23 , 145: #and^#(#false(), #true()) -> c_80() 585.04/149.23 , 146: #and^#(#false(), #false()) -> c_81() 585.04/149.23 , 147: #natmult^#(#0(), @y) -> c_115() 585.04/149.23 , 148: #natmult^#(#s(@x), @y) -> 585.04/149.23 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.23 585.04/149.23 We are left with following problem, upon which TcT provides the 585.04/149.23 certificate YES(O(1),O(n^2)). 585.04/149.23 585.04/149.23 Strict DPs: 585.04/149.23 { sub^#(@b1, @b2) -> 585.04/149.23 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.23 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.23 #abs^#(#0())) 585.04/149.23 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 585.04/149.23 , mult#2^#(@zs, @b2, @x) -> 585.04/149.23 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.23 #equal^#(@x, #pos(#s(#0())))) 585.04/149.23 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 585.04/149.23 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.23 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.23 *^#(@x, @n), 585.04/149.23 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.23 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.23 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 585.04/149.23 , mult3^#(@b1, @b2, @b3) -> 585.04/149.23 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.23 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 585.04/149.23 , leq^#(@b1, @b2) -> 585.04/149.23 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.23 compare^#(@b1, @b2)) 585.04/149.23 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 585.04/149.23 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.23 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.23 #abs^#(#0()), 585.04/149.23 mult^#(@xs, @b2)) 585.04/149.23 , bitToInt^#(@b) -> 585.04/149.23 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.23 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.23 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.23 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.23 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.23 , compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.23 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.23 , add^#(@b1, @b2) -> 585.04/149.23 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.23 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 585.04/149.23 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.23 c_39(add'^#(@xs, @ys, @r')) 585.04/149.23 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.23 c_41(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.23 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.23 c_45(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.23 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.23 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 585.04/149.23 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.23 c_61(compare#2^#(@b2, @x, @xs)) } 585.04/149.23 Weak DPs: 585.04/149.23 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 585.04/149.23 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 585.04/149.23 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 585.04/149.23 , #sub^#(@x, #0()) -> c_122() 585.04/149.23 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 585.04/149.23 , #abs^#(#neg(@x)) -> c_62() 585.04/149.23 , #abs^#(#pos(@x)) -> c_63() 585.04/149.23 , #abs^#(#0()) -> c_64() 585.04/149.23 , #abs^#(#s(@x)) -> c_65() 585.04/149.23 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 585.04/149.23 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 585.04/149.23 , mult#3^#(#false(), @b2, @zs) -> c_43() 585.04/149.23 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 585.04/149.23 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 585.04/149.23 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 585.04/149.23 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 585.04/149.23 , #div^#(#neg(@x), #0()) -> c_138() 585.04/149.23 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 585.04/149.23 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 585.04/149.23 , #div^#(#pos(@x), #0()) -> c_141() 585.04/149.23 , #div^#(#0(), #neg(@y)) -> c_142() 585.04/149.23 , #div^#(#0(), #pos(@y)) -> c_143() 585.04/149.23 , #div^#(#0(), #0()) -> c_144() 585.04/149.23 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 585.04/149.23 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 585.04/149.23 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 585.04/149.23 , sum^#(@x, @y, @r) -> 585.04/149.23 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 585.04/149.23 , sum#1^#(@s) -> 585.04/149.23 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 585.04/149.23 , mod^#(@x, @y) -> 585.04/149.23 c_10(-^#(@x, *(@x, div(@x, @y))), 585.04/149.23 *^#(@x, div(@x, @y)), 585.04/149.23 div^#(@x, @y)) 585.04/149.23 , #less^#(@x, @y) -> 585.04/149.23 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.23 , #greater^#(@x, @y) -> 585.04/149.23 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.23 , #ckgt^#(#EQ()) -> c_70() 585.04/149.23 , #ckgt^#(#LT()) -> c_71() 585.04/149.23 , #ckgt^#(#GT()) -> c_72() 585.04/149.23 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 585.04/149.23 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 585.04/149.23 , #compare^#(#neg(@x), #0()) -> c_84() 585.04/149.23 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 585.04/149.23 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 585.04/149.23 , #compare^#(#pos(@x), #0()) -> c_87() 585.04/149.23 , #compare^#(#0(), #neg(@y)) -> c_88() 585.04/149.23 , #compare^#(#0(), #pos(@y)) -> c_89() 585.04/149.23 , #compare^#(#0(), #0()) -> c_90() 585.04/149.23 , #compare^#(#0(), #s(@y)) -> c_91() 585.04/149.23 , #compare^#(#s(@x), #0()) -> c_92() 585.04/149.23 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 585.04/149.23 , mult#1^#(nil(), @b2) -> c_49() 585.04/149.23 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 585.04/149.23 , sum#2^#(#false(), @s) -> 585.04/149.23 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 585.04/149.23 #equal^#(@s, #pos(#s(#0())))) 585.04/149.23 , sum#3^#(#true(), @s) -> 585.04/149.23 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 585.04/149.23 , sum#3^#(#false(), @s) -> 585.04/149.23 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 585.04/149.23 #equal^#(@s, #pos(#s(#s(#0()))))) 585.04/149.23 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 585.04/149.23 , #add^#(#neg(#s(#s(@x))), @y) -> 585.04/149.23 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.23 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 585.04/149.23 , #add^#(#pos(#s(#s(@x))), @y) -> 585.04/149.23 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.23 , #add^#(#0(), @y) -> c_77() 585.04/149.23 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 585.04/149.23 , sum#4^#(#false()) -> 585.04/149.23 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 585.04/149.23 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 585.04/149.23 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 585.04/149.23 , #mult^#(#neg(@x), #0()) -> c_125() 585.04/149.23 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 585.04/149.23 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 585.04/149.23 , #mult^#(#pos(@x), #0()) -> c_128() 585.04/149.23 , #mult^#(#0(), #neg(@y)) -> c_129() 585.04/149.23 , #mult^#(#0(), #pos(@y)) -> c_130() 585.04/149.23 , #mult^#(#0(), #0()) -> c_131() 585.04/149.23 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 585.04/149.23 , sub'#5^#(#false(), @z, @zs) -> c_26() 585.04/149.23 , #cklt^#(#EQ()) -> c_117() 585.04/149.23 , #cklt^#(#LT()) -> c_118() 585.04/149.23 , #cklt^#(#GT()) -> c_119() 585.04/149.23 , sub'#4^#(tuple#2(@zs, @s), @z) -> 585.04/149.23 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 585.04/149.23 #equal^#(@s, #pos(#s(#0())))) 585.04/149.23 , #eq^#(nil(), nil()) -> c_94() 585.04/149.23 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 585.04/149.23 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 585.04/149.23 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 585.04/149.23 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 585.04/149.23 , #eq^#(#neg(@x), #0()) -> c_99() 585.04/149.23 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 585.04/149.23 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 585.04/149.23 , #eq^#(#pos(@x), #0()) -> c_102() 585.04/149.23 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 585.04/149.23 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.23 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.23 #eq^#(@x_1, @y_1), 585.04/149.23 #eq^#(@x_2, @y_2)) 585.04/149.23 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 585.04/149.23 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 585.04/149.23 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 585.04/149.23 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.23 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.23 #eq^#(@x_1, @y_1), 585.04/149.23 #eq^#(@x_2, @y_2)) 585.04/149.23 , #eq^#(#0(), #neg(@y)) -> c_109() 585.04/149.23 , #eq^#(#0(), #pos(@y)) -> c_110() 585.04/149.23 , #eq^#(#0(), #0()) -> c_111() 585.04/149.23 , #eq^#(#0(), #s(@y)) -> c_112() 585.04/149.23 , #eq^#(#s(@x), #0()) -> c_113() 585.04/149.23 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 585.04/149.23 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 585.04/149.23 , diff^#(@x, @y, @r) -> 585.04/149.23 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.23 +^#(+(@x, @y), @r), 585.04/149.23 +^#(@x, @y), 585.04/149.23 diff#1^#(#less(-(-(@x, @y), @r), #0())), 585.04/149.23 #less^#(-(-(@x, @y), @r), #0()), 585.04/149.23 -^#(-(@x, @y), @r), 585.04/149.23 -^#(@x, @y)) 585.04/149.23 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 585.04/149.23 , compare#3^#(@r, @x, @y) -> 585.04/149.23 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 585.04/149.23 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 585.04/149.23 , compare#5^#(#false(), @x, @y) -> 585.04/149.23 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 585.04/149.23 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 585.04/149.23 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 585.04/149.23 , compare#4^#(#true(), @r, @x, @y) -> 585.04/149.23 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 585.04/149.23 , compare#4^#(#false(), @r, @x, @y) -> c_56() 585.04/149.23 , sub'#1^#(nil(), @b2, @r) -> c_40() 585.04/149.23 , add'#1^#(nil(), @b2, @r) -> c_44() 585.04/149.23 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.23 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.23 , #natsub^#(@x, #0()) -> c_66() 585.04/149.23 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.23 , #natdiv^#(#0(), #0()) -> c_68() 585.04/149.23 , #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.23 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.23 , #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.23 , #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.23 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.23 , #pred^#(#0()) -> c_148() 585.04/149.23 , #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.23 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.23 , #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.23 , #succ^#(#0()) -> c_135() 585.04/149.23 , #and^#(#true(), #true()) -> c_78() 585.04/149.23 , #and^#(#true(), #false()) -> c_79() 585.04/149.23 , #and^#(#false(), #true()) -> c_80() 585.04/149.23 , #and^#(#false(), #false()) -> c_81() 585.04/149.23 , #natmult^#(#0(), @y) -> c_115() 585.04/149.23 , #natmult^#(#s(@x), @y) -> 585.04/149.23 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.23 Weak Trs: 585.04/149.23 { #natsub(@x, #0()) -> @x 585.04/149.23 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.23 , -(@x, @y) -> #sub(@x, @y) 585.04/149.23 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 585.04/149.23 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.23 , diff#1(#false()) -> #abs(#0()) 585.04/149.23 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.23 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.23 , #ckgt(#EQ()) -> #false() 585.04/149.23 , #ckgt(#LT()) -> #false() 585.04/149.23 , #ckgt(#GT()) -> #true() 585.04/149.23 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.23 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.23 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.23 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.23 , #add(#0(), @y) -> @y 585.04/149.23 , mult#2(@zs, @b2, @x) -> 585.04/149.23 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.23 , div(@x, @y) -> #div(@x, @y) 585.04/149.23 , bitToInt'#1(nil(), @n) -> #abs(#0()) 585.04/149.23 , bitToInt'#1(::(@x, @xs), @n) -> 585.04/149.23 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.23 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.23 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.23 , #and(#true(), #true()) -> #true() 585.04/149.23 , #and(#true(), #false()) -> #false() 585.04/149.23 , #and(#false(), #true()) -> #false() 585.04/149.23 , #and(#false(), #false()) -> #false() 585.04/149.23 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 585.04/149.23 , sub#1(tuple#2(@b, @_@1)) -> @b 585.04/149.23 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.23 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.23 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.23 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.23 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.23 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.23 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.23 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.23 , #compare(#0(), #0()) -> #EQ() 585.04/149.23 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.23 , #compare(#s(@x), #0()) -> #GT() 585.04/149.23 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.24 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 585.04/149.24 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 585.04/149.24 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 585.04/149.24 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.24 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 585.04/149.24 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.24 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.24 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.24 , +(@x, @y) -> #add(@x, @y) 585.04/149.24 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.24 , sum#4(#false()) -> 585.04/149.24 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.24 , *(@x, @y) -> #mult(@x, @y) 585.04/149.24 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 585.04/149.24 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 585.04/149.24 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.24 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.24 sub'#4(sub'(@xs, @ys, @r'), @z) 585.04/149.24 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.24 , #eq(nil(), nil()) -> #true() 585.04/149.24 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.24 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.24 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.24 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.24 , #eq(#neg(@x), #0()) -> #false() 585.04/149.24 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.24 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.24 , #eq(#pos(@x), #0()) -> #false() 585.04/149.24 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.24 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.24 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.24 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.24 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.24 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.24 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.24 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.24 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.24 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.24 , #eq(#0(), #0()) -> #true() 585.04/149.24 , #eq(#0(), #s(@y)) -> #false() 585.04/149.24 , #eq(#s(@x), #0()) -> #false() 585.04/149.24 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.24 , #natmult(#0(), @y) -> #0() 585.04/149.24 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.24 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 585.04/149.24 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.24 sub'#3(diff(@x, @y, @r), @xs, @ys) 585.04/149.24 , compare#2(nil(), @x, @xs) -> #abs(#0()) 585.04/149.24 , compare#2(::(@y, @ys), @x, @xs) -> 585.04/149.24 compare#3(compare(@xs, @ys), @x, @y) 585.04/149.24 , sub'#4(tuple#2(@zs, @s), @z) -> 585.04/149.24 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 585.04/149.24 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 585.04/149.24 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 585.04/149.24 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 585.04/149.24 , #cklt(#EQ()) -> #false() 585.04/149.24 , #cklt(#LT()) -> #true() 585.04/149.24 , #cklt(#GT()) -> #false() 585.04/149.24 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.24 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.24 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.24 , #sub(@x, #0()) -> @x 585.04/149.24 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.24 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 585.04/149.24 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 585.04/149.24 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.24 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.24 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.24 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.24 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.24 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.24 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.24 , diff(@x, @y, @r) -> 585.04/149.24 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.24 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.24 , mult#1(nil(), @b2) -> nil() 585.04/149.24 , mult#1(::(@x, @xs), @b2) -> 585.04/149.24 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.24 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.24 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.24 , #mult(#neg(@x), #0()) -> #0() 585.04/149.24 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.24 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.24 , #mult(#pos(@x), #0()) -> #0() 585.04/149.24 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.24 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.24 , #mult(#0(), #0()) -> #0() 585.04/149.24 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.24 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.24 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.24 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.24 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 585.04/149.24 , compare(@b1, @b2) -> compare#1(@b1, @b2) 585.04/149.24 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.24 , compare#6(#false()) -> #abs(#0()) 585.04/149.24 , compare#4(#true(), @r, @x, @y) -> 585.04/149.24 compare#5(#less(@x, @y), @x, @y) 585.04/149.24 , compare#4(#false(), @r, @x, @y) -> @r 585.04/149.24 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.24 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.24 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.24 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.24 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.24 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.24 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.24 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.24 , #div(#0(), #neg(@y)) -> #0() 585.04/149.24 , #div(#0(), #pos(@y)) -> #0() 585.04/149.24 , #div(#0(), #0()) -> #divByZero() 585.04/149.24 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.24 , compare#1(nil(), @b2) -> #abs(#0()) 585.04/149.24 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 585.04/149.24 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.24 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.24 , #abs(#0()) -> #0() 585.04/149.24 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.24 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.24 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.24 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.24 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.24 Obligation: 585.04/149.24 innermost runtime complexity 585.04/149.24 Answer: 585.04/149.24 YES(O(1),O(n^2)) 585.04/149.24 585.04/149.24 The following weak DPs constitute a sub-graph of the DG that is 585.04/149.24 closed under successors. The DPs are removed. 585.04/149.24 585.04/149.24 { -^#(@x, @y) -> c_1(#sub^#(@x, @y)) 585.04/149.24 , #sub^#(@x, #neg(@y)) -> c_120(#add^#(@x, #pos(@y))) 585.04/149.24 , #sub^#(@x, #pos(@y)) -> c_121(#add^#(@x, #neg(@y))) 585.04/149.24 , #sub^#(@x, #0()) -> c_122() 585.04/149.24 , sub#1^#(tuple#2(@b, @_@1)) -> c_12() 585.04/149.24 , #abs^#(#neg(@x)) -> c_62() 585.04/149.24 , #abs^#(#pos(@x)) -> c_63() 585.04/149.24 , #abs^#(#0()) -> c_64() 585.04/149.24 , #abs^#(#s(@x)) -> c_65() 585.04/149.24 , diff#1^#(#true()) -> c_3(#abs^#(#pos(#s(#0())))) 585.04/149.24 , diff#1^#(#false()) -> c_4(#abs^#(#0())) 585.04/149.24 , mult#3^#(#false(), @b2, @zs) -> c_43() 585.04/149.24 , #equal^#(@x, @y) -> c_29(#eq^#(@x, @y)) 585.04/149.24 , div^#(@x, @y) -> c_6(#div^#(@x, @y)) 585.04/149.24 , #div^#(#neg(@x), #neg(@y)) -> c_136(#natdiv^#(@x, @y)) 585.04/149.24 , #div^#(#neg(@x), #pos(@y)) -> c_137(#natdiv^#(@x, @y)) 585.04/149.24 , #div^#(#neg(@x), #0()) -> c_138() 585.04/149.24 , #div^#(#pos(@x), #neg(@y)) -> c_139(#natdiv^#(@x, @y)) 585.04/149.24 , #div^#(#pos(@x), #pos(@y)) -> c_140(#natdiv^#(@x, @y)) 585.04/149.24 , #div^#(#pos(@x), #0()) -> c_141() 585.04/149.24 , #div^#(#0(), #neg(@y)) -> c_142() 585.04/149.24 , #div^#(#0(), #pos(@y)) -> c_143() 585.04/149.24 , #div^#(#0(), #0()) -> c_144() 585.04/149.24 , bitToInt'#1^#(nil(), @n) -> c_7(#abs^#(#0())) 585.04/149.24 , +^#(@x, @y) -> c_21(#add^#(@x, @y)) 585.04/149.24 , *^#(@x, @y) -> c_24(#mult^#(@x, @y)) 585.04/149.24 , sum^#(@x, @y, @r) -> 585.04/149.24 c_9(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) 585.04/149.24 , sum#1^#(@s) -> 585.04/149.24 c_20(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) 585.04/149.24 , mod^#(@x, @y) -> 585.04/149.24 c_10(-^#(@x, *(@x, div(@x, @y))), 585.04/149.24 *^#(@x, div(@x, @y)), 585.04/149.24 div^#(@x, @y)) 585.04/149.24 , #less^#(@x, @y) -> 585.04/149.24 c_27(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.24 , #greater^#(@x, @y) -> 585.04/149.24 c_14(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 585.04/149.24 , #ckgt^#(#EQ()) -> c_70() 585.04/149.24 , #ckgt^#(#LT()) -> c_71() 585.04/149.24 , #ckgt^#(#GT()) -> c_72() 585.04/149.24 , #compare^#(#neg(@x), #neg(@y)) -> c_82(#compare^#(@y, @x)) 585.04/149.24 , #compare^#(#neg(@x), #pos(@y)) -> c_83() 585.04/149.24 , #compare^#(#neg(@x), #0()) -> c_84() 585.04/149.24 , #compare^#(#pos(@x), #neg(@y)) -> c_85() 585.04/149.24 , #compare^#(#pos(@x), #pos(@y)) -> c_86(#compare^#(@x, @y)) 585.04/149.24 , #compare^#(#pos(@x), #0()) -> c_87() 585.04/149.24 , #compare^#(#0(), #neg(@y)) -> c_88() 585.04/149.24 , #compare^#(#0(), #pos(@y)) -> c_89() 585.04/149.24 , #compare^#(#0(), #0()) -> c_90() 585.04/149.24 , #compare^#(#0(), #s(@y)) -> c_91() 585.04/149.24 , #compare^#(#s(@x), #0()) -> c_92() 585.04/149.24 , #compare^#(#s(@x), #s(@y)) -> c_93(#compare^#(@x, @y)) 585.04/149.24 , mult#1^#(nil(), @b2) -> c_49() 585.04/149.24 , sum#2^#(#true(), @s) -> c_18(#abs^#(#0()), #abs^#(#0())) 585.04/149.24 , sum#2^#(#false(), @s) -> 585.04/149.24 c_19(sum#3^#(#equal(@s, #pos(#s(#0()))), @s), 585.04/149.24 #equal^#(@s, #pos(#s(#0())))) 585.04/149.24 , sum#3^#(#true(), @s) -> 585.04/149.24 c_57(#abs^#(#pos(#s(#0()))), #abs^#(#0())) 585.04/149.24 , sum#3^#(#false(), @s) -> 585.04/149.24 c_58(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))), 585.04/149.24 #equal^#(@s, #pos(#s(#s(#0()))))) 585.04/149.24 , #add^#(#neg(#s(#0())), @y) -> c_73(#pred^#(@y)) 585.04/149.24 , #add^#(#neg(#s(#s(@x))), @y) -> 585.04/149.24 c_74(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.24 , #add^#(#pos(#s(#0())), @y) -> c_75(#succ^#(@y)) 585.04/149.24 , #add^#(#pos(#s(#s(@x))), @y) -> 585.04/149.24 c_76(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 585.04/149.24 , #add^#(#0(), @y) -> c_77() 585.04/149.24 , sum#4^#(#true()) -> c_22(#abs^#(#0()), #abs^#(#pos(#s(#0())))) 585.04/149.24 , sum#4^#(#false()) -> 585.04/149.24 c_23(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) 585.04/149.24 , #mult^#(#neg(@x), #neg(@y)) -> c_123(#natmult^#(@x, @y)) 585.04/149.24 , #mult^#(#neg(@x), #pos(@y)) -> c_124(#natmult^#(@x, @y)) 585.04/149.24 , #mult^#(#neg(@x), #0()) -> c_125() 585.04/149.24 , #mult^#(#pos(@x), #neg(@y)) -> c_126(#natmult^#(@x, @y)) 585.04/149.24 , #mult^#(#pos(@x), #pos(@y)) -> c_127(#natmult^#(@x, @y)) 585.04/149.24 , #mult^#(#pos(@x), #0()) -> c_128() 585.04/149.24 , #mult^#(#0(), #neg(@y)) -> c_129() 585.04/149.24 , #mult^#(#0(), #pos(@y)) -> c_130() 585.04/149.24 , #mult^#(#0(), #0()) -> c_131() 585.04/149.24 , sub'#5^#(#true(), @z, @zs) -> c_25(#abs^#(#0())) 585.04/149.24 , sub'#5^#(#false(), @z, @zs) -> c_26() 585.04/149.24 , #cklt^#(#EQ()) -> c_117() 585.04/149.24 , #cklt^#(#LT()) -> c_118() 585.04/149.24 , #cklt^#(#GT()) -> c_119() 585.04/149.24 , sub'#4^#(tuple#2(@zs, @s), @z) -> 585.04/149.24 c_34(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs), 585.04/149.24 #equal^#(@s, #pos(#s(#0())))) 585.04/149.24 , #eq^#(nil(), nil()) -> c_94() 585.04/149.24 , #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_95() 585.04/149.24 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_96() 585.04/149.24 , #eq^#(#neg(@x), #neg(@y)) -> c_97(#eq^#(@x, @y)) 585.04/149.24 , #eq^#(#neg(@x), #pos(@y)) -> c_98() 585.04/149.24 , #eq^#(#neg(@x), #0()) -> c_99() 585.04/149.24 , #eq^#(#pos(@x), #neg(@y)) -> c_100() 585.04/149.24 , #eq^#(#pos(@x), #pos(@y)) -> c_101(#eq^#(@x, @y)) 585.04/149.24 , #eq^#(#pos(@x), #0()) -> c_102() 585.04/149.24 , #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_103() 585.04/149.24 , #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.24 c_104(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.24 #eq^#(@x_1, @y_1), 585.04/149.24 #eq^#(@x_2, @y_2)) 585.04/149.24 , #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_105() 585.04/149.24 , #eq^#(::(@x_1, @x_2), nil()) -> c_106() 585.04/149.24 , #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_107() 585.04/149.24 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.24 c_108(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 585.04/149.24 #eq^#(@x_1, @y_1), 585.04/149.24 #eq^#(@x_2, @y_2)) 585.04/149.24 , #eq^#(#0(), #neg(@y)) -> c_109() 585.04/149.24 , #eq^#(#0(), #pos(@y)) -> c_110() 585.04/149.24 , #eq^#(#0(), #0()) -> c_111() 585.04/149.24 , #eq^#(#0(), #s(@y)) -> c_112() 585.04/149.24 , #eq^#(#s(@x), #0()) -> c_113() 585.04/149.24 , #eq^#(#s(@x), #s(@y)) -> c_114(#eq^#(@x, @y)) 585.04/149.24 , sub'#2^#(nil(), @r, @x, @xs) -> c_30() 585.04/149.24 , diff^#(@x, @y, @r) -> 585.04/149.24 c_48(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.24 +^#(+(@x, @y), @r), 585.04/149.24 +^#(@x, @y), 585.04/149.24 diff#1^#(#less(-(-(@x, @y), @r), #0())), 585.04/149.24 #less^#(-(-(@x, @y), @r), #0()), 585.04/149.24 -^#(-(@x, @y), @r), 585.04/149.24 -^#(@x, @y)) 585.04/149.24 , compare#2^#(nil(), @x, @xs) -> c_32(#abs^#(#0())) 585.04/149.24 , compare#3^#(@r, @x, @y) -> 585.04/149.24 c_37(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0())) 585.04/149.24 , compare#5^#(#true(), @x, @y) -> c_35(-^#(#0(), #pos(#s(#0())))) 585.04/149.24 , compare#5^#(#false(), @x, @y) -> 585.04/149.24 c_36(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) 585.04/149.24 , compare#6^#(#true()) -> c_53(#abs^#(#pos(#s(#0())))) 585.04/149.24 , compare#6^#(#false()) -> c_54(#abs^#(#0())) 585.04/149.24 , compare#4^#(#true(), @r, @x, @y) -> 585.04/149.24 c_55(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) 585.04/149.24 , compare#4^#(#false(), @r, @x, @y) -> c_56() 585.04/149.24 , sub'#1^#(nil(), @b2, @r) -> c_40() 585.04/149.24 , add'#1^#(nil(), @b2, @r) -> c_44() 585.04/149.24 , add'#2^#(nil(), @r, @x, @xs) -> c_46() 585.04/149.24 , compare#1^#(nil(), @b2) -> c_60(#abs^#(#0())) 585.04/149.24 , #natsub^#(@x, #0()) -> c_66() 585.04/149.24 , #natsub^#(#s(@x), #s(@y)) -> c_67(#natsub^#(@x, @y)) 585.04/149.24 , #natdiv^#(#0(), #0()) -> c_68() 585.04/149.24 , #natdiv^#(#s(@x), #s(@y)) -> 585.04/149.24 c_69(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) 585.04/149.24 , #pred^#(#neg(#s(@x))) -> c_145() 585.04/149.24 , #pred^#(#pos(#s(#0()))) -> c_146() 585.04/149.24 , #pred^#(#pos(#s(#s(@x)))) -> c_147() 585.04/149.24 , #pred^#(#0()) -> c_148() 585.04/149.24 , #succ^#(#neg(#s(#0()))) -> c_132() 585.04/149.24 , #succ^#(#neg(#s(#s(@x)))) -> c_133() 585.04/149.24 , #succ^#(#pos(#s(@x))) -> c_134() 585.04/149.24 , #succ^#(#0()) -> c_135() 585.04/149.24 , #and^#(#true(), #true()) -> c_78() 585.04/149.24 , #and^#(#true(), #false()) -> c_79() 585.04/149.24 , #and^#(#false(), #true()) -> c_80() 585.04/149.24 , #and^#(#false(), #false()) -> c_81() 585.04/149.24 , #natmult^#(#0(), @y) -> c_115() 585.04/149.24 , #natmult^#(#s(@x), @y) -> 585.04/149.24 c_116(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) } 585.04/149.24 585.04/149.24 We are left with following problem, upon which TcT provides the 585.04/149.24 certificate YES(O(1),O(n^2)). 585.04/149.24 585.04/149.24 Strict DPs: 585.04/149.24 { sub^#(@b1, @b2) -> 585.04/149.24 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.24 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.24 #abs^#(#0())) 585.04/149.24 , sub'^#(@b1, @b2, @r) -> c_51(sub'#1^#(@b1, @b2, @r)) 585.04/149.24 , mult#2^#(@zs, @b2, @x) -> 585.04/149.24 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.24 #equal^#(@x, #pos(#s(#0())))) 585.04/149.24 , mult#3^#(#true(), @b2, @zs) -> c_42(add^#(@b2, @zs)) 585.04/149.24 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.24 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.24 *^#(@x, @n), 585.04/149.24 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.24 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.24 , bitToInt'^#(@b, @n) -> c_15(bitToInt'#1^#(@b, @n)) 585.04/149.24 , mult3^#(@b1, @b2, @b3) -> 585.04/149.24 c_11(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.24 , mult^#(@b1, @b2) -> c_16(mult#1^#(@b1, @b2)) 585.04/149.24 , leq^#(@b1, @b2) -> 585.04/149.24 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.24 compare^#(@b1, @b2)) 585.04/149.24 , compare^#(@b1, @b2) -> c_52(compare#1^#(@b1, @b2)) 585.04/149.24 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.24 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.24 #abs^#(#0()), 585.04/149.24 mult^#(@xs, @b2)) 585.04/149.24 , bitToInt^#(@b) -> 585.04/149.24 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.24 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.24 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.24 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.24 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.24 , compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.24 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.24 , add^#(@b1, @b2) -> 585.04/149.24 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.24 , add'^#(@b1, @b2, @r) -> c_59(add'#1^#(@b1, @b2, @r)) 585.04/149.24 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.24 c_39(add'^#(@xs, @ys, @r')) 585.04/149.24 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.24 c_41(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.24 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.24 c_45(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.24 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.24 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) 585.04/149.24 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.24 c_61(compare#2^#(@b2, @x, @xs)) } 585.04/149.24 Weak Trs: 585.04/149.24 { #natsub(@x, #0()) -> @x 585.04/149.24 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.24 , -(@x, @y) -> #sub(@x, @y) 585.04/149.24 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 585.04/149.24 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.24 , diff#1(#false()) -> #abs(#0()) 585.04/149.24 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.24 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.24 , #ckgt(#EQ()) -> #false() 585.04/149.24 , #ckgt(#LT()) -> #false() 585.04/149.24 , #ckgt(#GT()) -> #true() 585.04/149.24 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.24 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.24 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.24 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.24 , #add(#0(), @y) -> @y 585.04/149.24 , mult#2(@zs, @b2, @x) -> 585.04/149.24 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.24 , div(@x, @y) -> #div(@x, @y) 585.04/149.24 , bitToInt'#1(nil(), @n) -> #abs(#0()) 585.04/149.24 , bitToInt'#1(::(@x, @xs), @n) -> 585.04/149.24 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.24 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.24 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.24 , #and(#true(), #true()) -> #true() 585.04/149.24 , #and(#true(), #false()) -> #false() 585.04/149.24 , #and(#false(), #true()) -> #false() 585.04/149.24 , #and(#false(), #false()) -> #false() 585.04/149.24 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 585.04/149.24 , sub#1(tuple#2(@b, @_@1)) -> @b 585.04/149.24 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.24 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.24 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.24 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.24 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.24 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.24 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.24 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.24 , #compare(#0(), #0()) -> #EQ() 585.04/149.24 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.24 , #compare(#s(@x), #0()) -> #GT() 585.04/149.24 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.24 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 585.04/149.24 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 585.04/149.24 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 585.04/149.24 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.24 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 585.04/149.24 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.25 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.25 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.25 , +(@x, @y) -> #add(@x, @y) 585.04/149.25 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.25 , sum#4(#false()) -> 585.04/149.25 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.25 , *(@x, @y) -> #mult(@x, @y) 585.04/149.25 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 585.04/149.25 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 585.04/149.25 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.25 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 sub'#4(sub'(@xs, @ys, @r'), @z) 585.04/149.25 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.25 , #eq(nil(), nil()) -> #true() 585.04/149.25 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.25 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.25 , #eq(#neg(@x), #0()) -> #false() 585.04/149.25 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.25 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.25 , #eq(#pos(@x), #0()) -> #false() 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.25 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.25 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.25 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.25 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.25 , #eq(#0(), #0()) -> #true() 585.04/149.25 , #eq(#0(), #s(@y)) -> #false() 585.04/149.25 , #eq(#s(@x), #0()) -> #false() 585.04/149.25 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.25 , #natmult(#0(), @y) -> #0() 585.04/149.25 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.25 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 585.04/149.25 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 sub'#3(diff(@x, @y, @r), @xs, @ys) 585.04/149.25 , compare#2(nil(), @x, @xs) -> #abs(#0()) 585.04/149.25 , compare#2(::(@y, @ys), @x, @xs) -> 585.04/149.25 compare#3(compare(@xs, @ys), @x, @y) 585.04/149.25 , sub'#4(tuple#2(@zs, @s), @z) -> 585.04/149.25 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 585.04/149.25 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 585.04/149.25 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 585.04/149.25 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 585.04/149.25 , #cklt(#EQ()) -> #false() 585.04/149.25 , #cklt(#LT()) -> #true() 585.04/149.25 , #cklt(#GT()) -> #false() 585.04/149.25 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.25 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.25 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.25 , #sub(@x, #0()) -> @x 585.04/149.25 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.25 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 585.04/149.25 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 585.04/149.25 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.25 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.25 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.25 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.25 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.25 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.25 , diff(@x, @y, @r) -> 585.04/149.25 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.25 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.25 , mult#1(nil(), @b2) -> nil() 585.04/149.25 , mult#1(::(@x, @xs), @b2) -> 585.04/149.25 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.25 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.25 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.25 , #mult(#neg(@x), #0()) -> #0() 585.04/149.25 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.25 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.25 , #mult(#pos(@x), #0()) -> #0() 585.04/149.25 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.25 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.25 , #mult(#0(), #0()) -> #0() 585.04/149.25 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.25 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.25 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.25 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.25 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 585.04/149.25 , compare(@b1, @b2) -> compare#1(@b1, @b2) 585.04/149.25 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.25 , compare#6(#false()) -> #abs(#0()) 585.04/149.25 , compare#4(#true(), @r, @x, @y) -> 585.04/149.25 compare#5(#less(@x, @y), @x, @y) 585.04/149.25 , compare#4(#false(), @r, @x, @y) -> @r 585.04/149.25 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.25 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.25 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.25 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.25 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.25 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.25 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.25 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.25 , #div(#0(), #neg(@y)) -> #0() 585.04/149.25 , #div(#0(), #pos(@y)) -> #0() 585.04/149.25 , #div(#0(), #0()) -> #divByZero() 585.04/149.25 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.25 , compare#1(nil(), @b2) -> #abs(#0()) 585.04/149.25 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 585.04/149.25 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.25 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.25 , #abs(#0()) -> #0() 585.04/149.25 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.25 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.25 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.25 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.25 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.25 Obligation: 585.04/149.25 innermost runtime complexity 585.04/149.25 Answer: 585.04/149.25 YES(O(1),O(n^2)) 585.04/149.25 585.04/149.25 Due to missing edges in the dependency-graph, the right-hand sides 585.04/149.25 of following rules could be simplified: 585.04/149.25 585.04/149.25 { sub^#(@b1, @b2) -> 585.04/149.25 c_2(sub#1^#(sub'(@b1, @b2, #abs(#0()))), 585.04/149.25 sub'^#(@b1, @b2, #abs(#0())), 585.04/149.25 #abs^#(#0())) 585.04/149.25 , mult#2^#(@zs, @b2, @x) -> 585.04/149.25 c_5(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs), 585.04/149.25 #equal^#(@x, #pos(#s(#0())))) 585.04/149.25 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.25 c_8(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))), 585.04/149.25 *^#(@x, @n), 585.04/149.25 bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))), 585.04/149.25 *^#(@n, #pos(#s(#s(#0()))))) 585.04/149.25 , leq^#(@b1, @b2) -> 585.04/149.25 c_13(#less^#(compare(@b1, @b2), #pos(#s(#0()))), 585.04/149.25 compare^#(@b1, @b2)) 585.04/149.25 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.25 c_50(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.25 #abs^#(#0()), 585.04/149.25 mult^#(@xs, @b2)) 585.04/149.25 , bitToInt^#(@b) -> 585.04/149.25 c_17(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0())))) 585.04/149.25 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 c_28(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) 585.04/149.25 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 c_31(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) 585.04/149.25 , compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.25 c_33(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys)) 585.04/149.25 , add^#(@b1, @b2) -> 585.04/149.25 c_38(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) 585.04/149.25 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 c_47(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) } 585.04/149.25 585.04/149.25 We are left with following problem, upon which TcT provides the 585.04/149.25 certificate YES(O(1),O(n^2)). 585.04/149.25 585.04/149.25 Strict DPs: 585.04/149.25 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.25 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.25 , mult#2^#(@zs, @b2, @x) -> 585.04/149.25 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.25 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.25 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.25 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.25 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.25 , mult3^#(@b1, @b2, @b3) -> 585.04/149.25 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.25 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.25 , leq^#(@b1, @b2) -> c_9(compare^#(@b1, @b2)) 585.04/149.25 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.25 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.25 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.25 mult^#(@xs, @b2)) 585.04/149.25 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.25 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.25 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.25 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.25 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.25 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.25 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 c_18(add'^#(@xs, @ys, @r')) 585.04/149.25 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.25 c_19(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.25 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.25 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.25 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.25 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.25 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.25 Weak Trs: 585.04/149.25 { #natsub(@x, #0()) -> @x 585.04/149.25 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.25 , -(@x, @y) -> #sub(@x, @y) 585.04/149.25 , sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0()))) 585.04/149.25 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.25 , diff#1(#false()) -> #abs(#0()) 585.04/149.25 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.25 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.25 , #ckgt(#EQ()) -> #false() 585.04/149.25 , #ckgt(#LT()) -> #false() 585.04/149.25 , #ckgt(#GT()) -> #true() 585.04/149.25 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.25 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.25 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.25 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.25 , #add(#0(), @y) -> @y 585.04/149.25 , mult#2(@zs, @b2, @x) -> 585.04/149.25 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.25 , div(@x, @y) -> #div(@x, @y) 585.04/149.25 , bitToInt'#1(nil(), @n) -> #abs(#0()) 585.04/149.25 , bitToInt'#1(::(@x, @xs), @n) -> 585.04/149.25 +(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.25 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.25 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.25 , #and(#true(), #true()) -> #true() 585.04/149.25 , #and(#true(), #false()) -> #false() 585.04/149.25 , #and(#false(), #true()) -> #false() 585.04/149.25 , #and(#false(), #false()) -> #false() 585.04/149.25 , mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2) 585.04/149.25 , sub#1(tuple#2(@b, @_@1)) -> @b 585.04/149.25 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.25 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.25 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.25 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.25 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.25 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.25 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.25 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.25 , #compare(#0(), #0()) -> #EQ() 585.04/149.25 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.25 , #compare(#s(@x), #0()) -> #GT() 585.04/149.25 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.25 , leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0()))) 585.04/149.25 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 585.04/149.25 , bitToInt'(@b, @n) -> bitToInt'#1(@b, @n) 585.04/149.25 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.25 , bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0())))) 585.04/149.25 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.25 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.25 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.25 , +(@x, @y) -> #add(@x, @y) 585.04/149.25 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.25 , sum#4(#false()) -> 585.04/149.25 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.25 , *(@x, @y) -> #mult(@x, @y) 585.04/149.25 , sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs) 585.04/149.25 , sub'#5(#false(), @z, @zs) -> ::(@z, @zs) 585.04/149.25 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.25 , sub'#3(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 sub'#4(sub'(@xs, @ys, @r'), @z) 585.04/149.25 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.25 , #eq(nil(), nil()) -> #true() 585.04/149.25 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.25 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.25 , #eq(#neg(@x), #0()) -> #false() 585.04/149.25 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.25 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.25 , #eq(#pos(@x), #0()) -> #false() 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.25 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.25 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.25 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.25 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.25 , #eq(#0(), #0()) -> #true() 585.04/149.25 , #eq(#0(), #s(@y)) -> #false() 585.04/149.25 , #eq(#s(@x), #0()) -> #false() 585.04/149.25 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.25 , #natmult(#0(), @y) -> #0() 585.04/149.25 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.25 , sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r) 585.04/149.25 , sub'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 sub'#3(diff(@x, @y, @r), @xs, @ys) 585.04/149.25 , compare#2(nil(), @x, @xs) -> #abs(#0()) 585.04/149.25 , compare#2(::(@y, @ys), @x, @xs) -> 585.04/149.25 compare#3(compare(@xs, @ys), @x, @y) 585.04/149.25 , sub'#4(tuple#2(@zs, @s), @z) -> 585.04/149.25 tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s) 585.04/149.25 , compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0()))) 585.04/149.25 , compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y)) 585.04/149.25 , compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y) 585.04/149.25 , #cklt(#EQ()) -> #false() 585.04/149.25 , #cklt(#LT()) -> #true() 585.04/149.25 , #cklt(#GT()) -> #false() 585.04/149.25 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.25 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.25 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.25 , #sub(@x, #0()) -> @x 585.04/149.25 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.25 , sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r) 585.04/149.25 , sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs) 585.04/149.25 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.25 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.25 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.25 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.25 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.25 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.25 , diff(@x, @y, @r) -> 585.04/149.25 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.25 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.25 , mult#1(nil(), @b2) -> nil() 585.04/149.25 , mult#1(::(@x, @xs), @b2) -> 585.04/149.25 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.25 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.25 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.25 , #mult(#neg(@x), #0()) -> #0() 585.04/149.25 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.25 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.25 , #mult(#pos(@x), #0()) -> #0() 585.04/149.25 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.25 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.25 , #mult(#0(), #0()) -> #0() 585.04/149.25 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.25 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.25 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.25 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.25 , sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r) 585.04/149.25 , compare(@b1, @b2) -> compare#1(@b1, @b2) 585.04/149.25 , compare#6(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.25 , compare#6(#false()) -> #abs(#0()) 585.04/149.25 , compare#4(#true(), @r, @x, @y) -> 585.04/149.25 compare#5(#less(@x, @y), @x, @y) 585.04/149.25 , compare#4(#false(), @r, @x, @y) -> @r 585.04/149.25 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.25 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.25 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.25 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.25 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.25 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.25 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.25 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.25 , #div(#0(), #neg(@y)) -> #0() 585.04/149.25 , #div(#0(), #pos(@y)) -> #0() 585.04/149.25 , #div(#0(), #0()) -> #divByZero() 585.04/149.25 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.25 , compare#1(nil(), @b2) -> #abs(#0()) 585.04/149.25 , compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs) 585.04/149.25 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.25 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.25 , #abs(#0()) -> #0() 585.04/149.25 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.25 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.25 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.25 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.25 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.25 Obligation: 585.04/149.25 innermost runtime complexity 585.04/149.25 Answer: 585.04/149.25 YES(O(1),O(n^2)) 585.04/149.25 585.04/149.25 We replace rewrite rules by usable rules: 585.04/149.25 585.04/149.25 Weak Usable Rules: 585.04/149.25 { #natsub(@x, #0()) -> @x 585.04/149.25 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.25 , -(@x, @y) -> #sub(@x, @y) 585.04/149.25 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.25 , diff#1(#false()) -> #abs(#0()) 585.04/149.25 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.25 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.25 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.25 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.25 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.25 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.25 , #add(#0(), @y) -> @y 585.04/149.25 , mult#2(@zs, @b2, @x) -> 585.04/149.25 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.25 , div(@x, @y) -> #div(@x, @y) 585.04/149.25 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.25 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.25 , #and(#true(), #true()) -> #true() 585.04/149.25 , #and(#true(), #false()) -> #false() 585.04/149.25 , #and(#false(), #true()) -> #false() 585.04/149.25 , #and(#false(), #false()) -> #false() 585.04/149.25 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.25 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.25 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.25 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.25 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.25 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.25 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.25 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.25 , #compare(#0(), #0()) -> #EQ() 585.04/149.25 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.25 , #compare(#s(@x), #0()) -> #GT() 585.04/149.25 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.25 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.25 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.25 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.25 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.25 , +(@x, @y) -> #add(@x, @y) 585.04/149.25 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.25 , sum#4(#false()) -> 585.04/149.25 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.25 , *(@x, @y) -> #mult(@x, @y) 585.04/149.25 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.25 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.25 , #eq(nil(), nil()) -> #true() 585.04/149.25 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.25 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.25 , #eq(#neg(@x), #0()) -> #false() 585.04/149.25 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.25 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.25 , #eq(#pos(@x), #0()) -> #false() 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.25 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.25 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.25 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.25 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.25 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.25 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.25 , #eq(#0(), #0()) -> #true() 585.04/149.25 , #eq(#0(), #s(@y)) -> #false() 585.04/149.25 , #eq(#s(@x), #0()) -> #false() 585.04/149.25 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.25 , #natmult(#0(), @y) -> #0() 585.04/149.25 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.25 , #cklt(#EQ()) -> #false() 585.04/149.25 , #cklt(#LT()) -> #true() 585.04/149.25 , #cklt(#GT()) -> #false() 585.04/149.25 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.25 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.25 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.25 , #sub(@x, #0()) -> @x 585.04/149.25 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.25 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.25 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.25 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.25 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.25 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.25 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.25 , diff(@x, @y, @r) -> 585.04/149.25 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.25 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.25 , mult#1(nil(), @b2) -> nil() 585.04/149.25 , mult#1(::(@x, @xs), @b2) -> 585.04/149.25 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.25 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.25 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.25 , #mult(#neg(@x), #0()) -> #0() 585.04/149.25 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.25 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.25 , #mult(#pos(@x), #0()) -> #0() 585.04/149.25 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.25 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.25 , #mult(#0(), #0()) -> #0() 585.04/149.25 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.25 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.25 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.25 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.25 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.25 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.25 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.25 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.25 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.25 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.25 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.25 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.25 , #div(#0(), #neg(@y)) -> #0() 585.04/149.25 , #div(#0(), #pos(@y)) -> #0() 585.04/149.25 , #div(#0(), #0()) -> #divByZero() 585.04/149.25 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.25 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.25 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.25 , #abs(#0()) -> #0() 585.04/149.25 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.25 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.25 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.25 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.25 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.25 585.04/149.25 We are left with following problem, upon which TcT provides the 585.04/149.25 certificate YES(O(1),O(n^2)). 585.04/149.25 585.04/149.25 Strict DPs: 585.04/149.25 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.25 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.25 , mult#2^#(@zs, @b2, @x) -> 585.04/149.25 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.25 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.25 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.25 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.25 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.25 , mult3^#(@b1, @b2, @b3) -> 585.04/149.25 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.25 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.25 , leq^#(@b1, @b2) -> c_9(compare^#(@b1, @b2)) 585.04/149.25 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.25 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.25 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.25 mult^#(@xs, @b2)) 585.04/149.25 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.25 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.25 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.25 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.25 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.25 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.25 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.25 c_18(add'^#(@xs, @ys, @r')) 585.04/149.25 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.25 c_19(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.25 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.25 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.25 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.25 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.25 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.25 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.25 Weak Trs: 585.04/149.25 { #natsub(@x, #0()) -> @x 585.04/149.25 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.25 , -(@x, @y) -> #sub(@x, @y) 585.04/149.25 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.25 , diff#1(#false()) -> #abs(#0()) 585.04/149.25 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.25 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.25 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.25 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.25 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.25 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.25 , #add(#0(), @y) -> @y 585.04/149.25 , mult#2(@zs, @b2, @x) -> 585.04/149.25 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.25 , div(@x, @y) -> #div(@x, @y) 585.04/149.25 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.25 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.25 , #and(#true(), #true()) -> #true() 585.04/149.25 , #and(#true(), #false()) -> #false() 585.04/149.25 , #and(#false(), #true()) -> #false() 585.04/149.25 , #and(#false(), #false()) -> #false() 585.04/149.25 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.25 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.25 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.25 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.25 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.25 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.25 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.25 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.25 , #compare(#0(), #0()) -> #EQ() 585.04/149.25 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.25 , #compare(#s(@x), #0()) -> #GT() 585.04/149.25 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.25 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.25 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.25 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.25 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.25 , +(@x, @y) -> #add(@x, @y) 585.04/149.25 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.25 , sum#4(#false()) -> 585.04/149.25 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.25 , *(@x, @y) -> #mult(@x, @y) 585.04/149.25 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.25 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.25 , #eq(nil(), nil()) -> #true() 585.04/149.26 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.26 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.26 , #eq(#neg(@x), #0()) -> #false() 585.04/149.26 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.26 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.26 , #eq(#pos(@x), #0()) -> #false() 585.04/149.26 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.26 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.26 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.26 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.26 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.26 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.26 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.26 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.26 , #eq(#0(), #0()) -> #true() 585.04/149.26 , #eq(#0(), #s(@y)) -> #false() 585.04/149.26 , #eq(#s(@x), #0()) -> #false() 585.04/149.26 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.26 , #natmult(#0(), @y) -> #0() 585.04/149.26 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.26 , #cklt(#EQ()) -> #false() 585.04/149.26 , #cklt(#LT()) -> #true() 585.04/149.26 , #cklt(#GT()) -> #false() 585.04/149.26 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.26 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.26 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.26 , #sub(@x, #0()) -> @x 585.04/149.26 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.26 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.26 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.26 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.26 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.26 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.26 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.26 , diff(@x, @y, @r) -> 585.04/149.26 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.26 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.26 , mult#1(nil(), @b2) -> nil() 585.04/149.26 , mult#1(::(@x, @xs), @b2) -> 585.04/149.26 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.26 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.26 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.26 , #mult(#neg(@x), #0()) -> #0() 585.04/149.26 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.26 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.26 , #mult(#pos(@x), #0()) -> #0() 585.04/149.26 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.26 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.26 , #mult(#0(), #0()) -> #0() 585.04/149.26 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.26 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.26 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.26 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.26 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.26 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.26 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.26 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.26 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.26 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.26 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.26 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.26 , #div(#0(), #neg(@y)) -> #0() 585.04/149.26 , #div(#0(), #pos(@y)) -> #0() 585.04/149.26 , #div(#0(), #0()) -> #divByZero() 585.04/149.26 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.26 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.26 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.26 , #abs(#0()) -> #0() 585.04/149.26 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.26 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.26 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.26 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.26 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.26 Obligation: 585.04/149.26 innermost runtime complexity 585.04/149.26 Answer: 585.04/149.26 YES(O(1),O(n^2)) 585.04/149.26 585.04/149.26 Consider the dependency graph 585.04/149.26 585.04/149.26 1: sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.26 -->_1 sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) :2 585.04/149.26 585.04/149.26 2: sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.26 -->_1 sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_19(sub'#2^#(@b2, @r, @x, @xs)) :19 585.04/149.26 585.04/149.26 3: mult#2^#(@zs, @b2, @x) -> 585.04/149.26 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.26 -->_1 mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) :4 585.04/149.26 585.04/149.26 4: mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.26 -->_1 add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) :16 585.04/149.26 585.04/149.26 5: bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.26 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.26 -->_1 bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) :6 585.04/149.26 585.04/149.26 6: bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.26 -->_1 bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.26 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) :5 585.04/149.26 585.04/149.26 7: mult3^#(@b1, @b2, @b3) -> 585.04/149.26 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.26 -->_2 mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) :8 585.04/149.26 -->_1 mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) :8 585.04/149.26 585.04/149.26 8: mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.26 -->_1 mult#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.26 mult^#(@xs, @b2)) :11 585.04/149.26 585.04/149.26 9: leq^#(@b1, @b2) -> c_9(compare^#(@b1, @b2)) 585.04/149.26 -->_1 compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) :10 585.04/149.26 585.04/149.26 10: compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.26 -->_1 compare#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_22(compare#2^#(@b2, @x, @xs)) :22 585.04/149.26 585.04/149.26 11: mult#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.26 mult^#(@xs, @b2)) 585.04/149.26 -->_2 mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) :8 585.04/149.26 -->_1 mult#2^#(@zs, @b2, @x) -> 585.04/149.26 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) :3 585.04/149.26 585.04/149.26 12: bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.26 -->_1 bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) :6 585.04/149.26 585.04/149.26 13: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.26 -->_1 sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) :2 585.04/149.26 585.04/149.26 14: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.26 -->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_13(sub'^#(@xs, @ys, @r')) :13 585.04/149.26 585.04/149.26 15: compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.26 -->_1 compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) :10 585.04/149.26 585.04/149.26 16: add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.26 -->_1 add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) :17 585.04/149.26 585.04/149.26 17: add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.26 -->_1 add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_20(add'#2^#(@b2, @r, @x, @xs)) :20 585.04/149.26 585.04/149.26 18: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_18(add'^#(@xs, @ys, @r')) 585.04/149.26 -->_1 add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) :17 585.04/149.26 585.04/149.26 19: sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_19(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.26 -->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) :14 585.04/149.26 585.04/149.26 20: add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.26 -->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) :21 585.04/149.26 585.04/149.26 21: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.26 -->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_18(add'^#(@xs, @ys, @r')) :18 585.04/149.26 585.04/149.26 22: compare#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_22(compare#2^#(@b2, @x, @xs)) 585.04/149.26 -->_1 compare#2^#(::(@y, @ys), @x, @xs) -> 585.04/149.26 c_15(compare^#(@xs, @ys)) :15 585.04/149.26 585.04/149.26 585.04/149.26 Following roots of the dependency graph are removed, as the 585.04/149.26 considered set of starting terms is closed under reduction with 585.04/149.26 respect to these rules (modulo compound contexts). 585.04/149.26 585.04/149.26 { leq^#(@b1, @b2) -> c_9(compare^#(@b1, @b2)) } 585.04/149.26 585.04/149.26 585.04/149.26 We are left with following problem, upon which TcT provides the 585.04/149.26 certificate YES(O(1),O(n^2)). 585.04/149.26 585.04/149.26 Strict DPs: 585.04/149.26 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.26 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.26 , mult#2^#(@zs, @b2, @x) -> 585.04/149.26 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.26 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.26 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.26 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.26 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.26 , mult3^#(@b1, @b2, @b3) -> 585.04/149.26 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.26 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.26 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.26 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.26 mult^#(@xs, @b2)) 585.04/149.26 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.26 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.26 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.26 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.26 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.26 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.26 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_18(add'^#(@xs, @ys, @r')) 585.04/149.26 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_19(sub'#2^#(@b2, @r, @x, @xs)) 585.04/149.26 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.26 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.26 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.26 Weak Trs: 585.04/149.26 { #natsub(@x, #0()) -> @x 585.04/149.26 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.26 , -(@x, @y) -> #sub(@x, @y) 585.04/149.26 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.26 , diff#1(#false()) -> #abs(#0()) 585.04/149.26 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.26 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.26 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.26 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.26 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.26 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.26 , #add(#0(), @y) -> @y 585.04/149.26 , mult#2(@zs, @b2, @x) -> 585.04/149.26 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.26 , div(@x, @y) -> #div(@x, @y) 585.04/149.26 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.26 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.26 , #and(#true(), #true()) -> #true() 585.04/149.26 , #and(#true(), #false()) -> #false() 585.04/149.26 , #and(#false(), #true()) -> #false() 585.04/149.26 , #and(#false(), #false()) -> #false() 585.04/149.26 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.26 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.26 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.26 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.26 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.26 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.26 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.26 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.26 , #compare(#0(), #0()) -> #EQ() 585.04/149.26 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.26 , #compare(#s(@x), #0()) -> #GT() 585.04/149.26 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.26 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.26 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.26 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.26 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.26 , +(@x, @y) -> #add(@x, @y) 585.04/149.26 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.26 , sum#4(#false()) -> 585.04/149.26 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.26 , *(@x, @y) -> #mult(@x, @y) 585.04/149.26 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.26 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.26 , #eq(nil(), nil()) -> #true() 585.04/149.26 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.26 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.26 , #eq(#neg(@x), #0()) -> #false() 585.04/149.26 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.26 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.26 , #eq(#pos(@x), #0()) -> #false() 585.04/149.26 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.26 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.26 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.26 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.26 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.26 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.26 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.26 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.26 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.26 , #eq(#0(), #0()) -> #true() 585.04/149.26 , #eq(#0(), #s(@y)) -> #false() 585.04/149.26 , #eq(#s(@x), #0()) -> #false() 585.04/149.26 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.26 , #natmult(#0(), @y) -> #0() 585.04/149.26 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.26 , #cklt(#EQ()) -> #false() 585.04/149.26 , #cklt(#LT()) -> #true() 585.04/149.26 , #cklt(#GT()) -> #false() 585.04/149.26 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.26 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.26 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.26 , #sub(@x, #0()) -> @x 585.04/149.26 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.26 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.26 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.26 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.26 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.26 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.26 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.26 , diff(@x, @y, @r) -> 585.04/149.26 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.26 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.26 , mult#1(nil(), @b2) -> nil() 585.04/149.26 , mult#1(::(@x, @xs), @b2) -> 585.04/149.26 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.26 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.26 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.26 , #mult(#neg(@x), #0()) -> #0() 585.04/149.26 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.26 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.26 , #mult(#pos(@x), #0()) -> #0() 585.04/149.26 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.26 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.26 , #mult(#0(), #0()) -> #0() 585.04/149.26 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.26 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.26 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.26 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.26 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.26 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.26 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.26 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.26 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.26 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.26 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.26 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.26 , #div(#0(), #neg(@y)) -> #0() 585.04/149.26 , #div(#0(), #pos(@y)) -> #0() 585.04/149.26 , #div(#0(), #0()) -> #divByZero() 585.04/149.26 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.26 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.26 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.26 , #abs(#0()) -> #0() 585.04/149.26 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.26 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.26 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.26 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.26 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.26 Obligation: 585.04/149.26 innermost runtime complexity 585.04/149.26 Answer: 585.04/149.26 YES(O(1),O(n^2)) 585.04/149.26 585.04/149.26 We analyse the complexity of following sub-problems (R) and (S). 585.04/149.26 Problem (S) is obtained from the input problem by shifting strict 585.04/149.26 rules from (R) into the weak component: 585.04/149.26 585.04/149.26 Problem (R): 585.04/149.26 ------------ 585.04/149.26 Strict DPs: 585.04/149.26 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.26 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.26 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.26 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.26 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.26 Weak DPs: 585.04/149.26 { mult#2^#(@zs, @b2, @x) -> 585.04/149.26 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.26 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.26 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.26 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.26 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.26 , mult3^#(@b1, @b2, @b3) -> 585.04/149.26 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.26 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.26 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.26 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.26 mult^#(@xs, @b2)) 585.04/149.26 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.26 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.26 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.26 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.26 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.26 c_18(add'^#(@xs, @ys, @r')) 585.04/149.26 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.26 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.26 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.26 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.26 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.26 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.26 Weak Trs: 585.04/149.26 { #natsub(@x, #0()) -> @x 585.04/149.26 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.26 , -(@x, @y) -> #sub(@x, @y) 585.04/149.26 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.26 , diff#1(#false()) -> #abs(#0()) 585.04/149.26 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.27 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.27 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.27 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.27 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.27 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.27 , #add(#0(), @y) -> @y 585.04/149.27 , mult#2(@zs, @b2, @x) -> 585.04/149.27 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.27 , div(@x, @y) -> #div(@x, @y) 585.04/149.27 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.27 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.27 , #and(#true(), #true()) -> #true() 585.04/149.27 , #and(#true(), #false()) -> #false() 585.04/149.27 , #and(#false(), #true()) -> #false() 585.04/149.27 , #and(#false(), #false()) -> #false() 585.04/149.27 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.27 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.27 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.27 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.27 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.27 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.27 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.27 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.27 , #compare(#0(), #0()) -> #EQ() 585.04/149.27 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.27 , #compare(#s(@x), #0()) -> #GT() 585.04/149.27 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.27 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.27 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.27 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.27 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.27 , +(@x, @y) -> #add(@x, @y) 585.04/149.27 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.27 , sum#4(#false()) -> 585.04/149.27 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.27 , *(@x, @y) -> #mult(@x, @y) 585.04/149.27 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.27 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.27 , #eq(nil(), nil()) -> #true() 585.04/149.27 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.27 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.27 , #eq(#neg(@x), #0()) -> #false() 585.04/149.27 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.27 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.27 , #eq(#pos(@x), #0()) -> #false() 585.04/149.27 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.27 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.27 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.27 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.27 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.27 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.27 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.27 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.27 , #eq(#0(), #0()) -> #true() 585.04/149.27 , #eq(#0(), #s(@y)) -> #false() 585.04/149.27 , #eq(#s(@x), #0()) -> #false() 585.04/149.27 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.27 , #natmult(#0(), @y) -> #0() 585.04/149.27 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.27 , #cklt(#EQ()) -> #false() 585.04/149.27 , #cklt(#LT()) -> #true() 585.04/149.27 , #cklt(#GT()) -> #false() 585.04/149.27 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.27 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.27 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.27 , #sub(@x, #0()) -> @x 585.04/149.27 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.27 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.27 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.27 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.27 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.27 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.27 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.27 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.27 , diff(@x, @y, @r) -> 585.04/149.27 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.27 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.27 , mult#1(nil(), @b2) -> nil() 585.04/149.27 , mult#1(::(@x, @xs), @b2) -> 585.04/149.27 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.27 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.27 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.27 , #mult(#neg(@x), #0()) -> #0() 585.04/149.27 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.27 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.27 , #mult(#pos(@x), #0()) -> #0() 585.04/149.27 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.27 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.27 , #mult(#0(), #0()) -> #0() 585.04/149.27 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.27 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.27 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.27 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.27 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.27 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.27 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.27 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.27 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.27 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.27 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.27 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.27 , #div(#0(), #neg(@y)) -> #0() 585.04/149.27 , #div(#0(), #pos(@y)) -> #0() 585.04/149.27 , #div(#0(), #0()) -> #divByZero() 585.04/149.27 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.27 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.27 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.27 , #abs(#0()) -> #0() 585.04/149.27 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.27 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.27 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.27 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.27 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.27 StartTerms: basic terms 585.04/149.27 Strategy: innermost 585.04/149.27 585.04/149.27 Problem (S): 585.04/149.27 ------------ 585.04/149.27 Strict DPs: 585.04/149.27 { mult#2^#(@zs, @b2, @x) -> 585.04/149.27 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.27 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.27 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.27 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.27 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.27 , mult3^#(@b1, @b2, @b3) -> 585.04/149.27 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.27 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.27 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.27 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.27 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.27 mult^#(@xs, @b2)) 585.04/149.27 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.27 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.27 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.27 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.27 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.27 c_18(add'^#(@xs, @ys, @r')) 585.04/149.27 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.27 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.27 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.27 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.27 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.27 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.27 Weak DPs: 585.04/149.27 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.27 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.27 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.27 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.27 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.27 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.27 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.27 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.27 Weak Trs: 585.04/149.27 { #natsub(@x, #0()) -> @x 585.04/149.27 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.27 , -(@x, @y) -> #sub(@x, @y) 585.04/149.27 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.27 , diff#1(#false()) -> #abs(#0()) 585.04/149.27 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.27 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.27 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.27 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.27 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.27 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.27 , #add(#0(), @y) -> @y 585.04/149.27 , mult#2(@zs, @b2, @x) -> 585.04/149.27 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.27 , div(@x, @y) -> #div(@x, @y) 585.04/149.27 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.27 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.27 , #and(#true(), #true()) -> #true() 585.04/149.27 , #and(#true(), #false()) -> #false() 585.04/149.27 , #and(#false(), #true()) -> #false() 585.04/149.27 , #and(#false(), #false()) -> #false() 585.04/149.27 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.27 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.27 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.27 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.27 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.27 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.27 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.27 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.27 , #compare(#0(), #0()) -> #EQ() 585.04/149.27 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.27 , #compare(#s(@x), #0()) -> #GT() 585.04/149.27 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.27 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.27 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.27 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.27 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.27 , +(@x, @y) -> #add(@x, @y) 585.04/149.27 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.27 , sum#4(#false()) -> 585.04/149.27 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.27 , *(@x, @y) -> #mult(@x, @y) 585.04/149.27 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.27 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.27 , #eq(nil(), nil()) -> #true() 585.04/149.27 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.27 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.27 , #eq(#neg(@x), #0()) -> #false() 585.04/149.27 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.27 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.27 , #eq(#pos(@x), #0()) -> #false() 585.04/149.27 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.27 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.27 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.27 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.27 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.27 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.27 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.27 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.27 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.27 , #eq(#0(), #0()) -> #true() 585.04/149.27 , #eq(#0(), #s(@y)) -> #false() 585.04/149.27 , #eq(#s(@x), #0()) -> #false() 585.04/149.27 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.27 , #natmult(#0(), @y) -> #0() 585.04/149.27 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.27 , #cklt(#EQ()) -> #false() 585.04/149.27 , #cklt(#LT()) -> #true() 585.04/149.27 , #cklt(#GT()) -> #false() 585.04/149.27 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.27 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.27 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.27 , #sub(@x, #0()) -> @x 585.04/149.27 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.27 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.27 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.27 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.27 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.27 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.27 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.27 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.27 , diff(@x, @y, @r) -> 585.04/149.27 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.27 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.27 , mult#1(nil(), @b2) -> nil() 585.04/149.27 , mult#1(::(@x, @xs), @b2) -> 585.04/149.27 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.27 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.27 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.27 , #mult(#neg(@x), #0()) -> #0() 585.04/149.27 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.27 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.27 , #mult(#pos(@x), #0()) -> #0() 585.04/149.27 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.27 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.27 , #mult(#0(), #0()) -> #0() 585.04/149.27 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.27 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.27 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.27 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.27 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.27 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.27 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.27 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.27 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.27 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.27 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.27 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.27 , #div(#0(), #neg(@y)) -> #0() 585.04/149.27 , #div(#0(), #pos(@y)) -> #0() 585.04/149.27 , #div(#0(), #0()) -> #divByZero() 585.04/149.27 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.27 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.27 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.27 , #abs(#0()) -> #0() 585.04/149.27 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.27 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.27 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.27 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.27 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.27 StartTerms: basic terms 585.04/149.27 Strategy: innermost 585.04/149.27 585.04/149.27 Overall, the transformation results in the following sub-problem(s): 585.04/149.27 585.04/149.27 Generated new problems: 585.04/149.27 ----------------------- 585.04/149.27 R) Strict DPs: 585.04/149.27 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.27 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.27 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.27 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.27 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.27 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.27 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.27 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.27 Weak DPs: 585.04/149.27 { mult#2^#(@zs, @b2, @x) -> 585.04/149.27 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.27 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.27 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.27 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.27 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.27 , mult3^#(@b1, @b2, @b3) -> 585.04/149.27 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.27 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.27 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.27 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.27 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.27 mult^#(@xs, @b2)) 585.04/149.27 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.27 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.27 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.27 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.27 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.27 c_18(add'^#(@xs, @ys, @r')) 585.04/149.27 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.27 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.27 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.27 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.27 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.27 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.27 Weak Trs: 585.04/149.27 { #natsub(@x, #0()) -> @x 585.04/149.27 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.27 , -(@x, @y) -> #sub(@x, @y) 585.04/149.27 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.27 , diff#1(#false()) -> #abs(#0()) 585.04/149.27 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.27 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.27 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.27 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.27 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.27 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.27 , #add(#0(), @y) -> @y 585.04/149.27 , mult#2(@zs, @b2, @x) -> 585.04/149.27 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.27 , div(@x, @y) -> #div(@x, @y) 585.04/149.27 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.27 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.27 , #and(#true(), #true()) -> #true() 585.04/149.27 , #and(#true(), #false()) -> #false() 585.04/149.27 , #and(#false(), #true()) -> #false() 585.04/149.27 , #and(#false(), #false()) -> #false() 585.04/149.27 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.27 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.27 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.27 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.27 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.27 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.27 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.27 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.27 , #compare(#0(), #0()) -> #EQ() 585.04/149.27 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.27 , #compare(#s(@x), #0()) -> #GT() 585.04/149.27 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.27 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.27 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.27 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.27 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.27 , +(@x, @y) -> #add(@x, @y) 585.04/149.27 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.27 , sum#4(#false()) -> 585.04/149.27 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.27 , *(@x, @y) -> #mult(@x, @y) 585.04/149.27 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.27 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.28 , #eq(nil(), nil()) -> #true() 585.04/149.28 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.28 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.28 , #eq(#neg(@x), #0()) -> #false() 585.04/149.28 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.28 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.28 , #eq(#pos(@x), #0()) -> #false() 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.28 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.28 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.28 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.28 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.28 , #eq(#0(), #0()) -> #true() 585.04/149.28 , #eq(#0(), #s(@y)) -> #false() 585.04/149.28 , #eq(#s(@x), #0()) -> #false() 585.04/149.28 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.28 , #natmult(#0(), @y) -> #0() 585.04/149.28 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.28 , #cklt(#EQ()) -> #false() 585.04/149.28 , #cklt(#LT()) -> #true() 585.04/149.28 , #cklt(#GT()) -> #false() 585.04/149.28 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.28 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.28 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.28 , #sub(@x, #0()) -> @x 585.04/149.28 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.28 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.28 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.28 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.28 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.28 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.28 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.28 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.28 , diff(@x, @y, @r) -> 585.04/149.28 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.28 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.28 , mult#1(nil(), @b2) -> nil() 585.04/149.28 , mult#1(::(@x, @xs), @b2) -> 585.04/149.28 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.28 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.28 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.28 , #mult(#neg(@x), #0()) -> #0() 585.04/149.28 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.28 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.28 , #mult(#pos(@x), #0()) -> #0() 585.04/149.28 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.28 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.28 , #mult(#0(), #0()) -> #0() 585.04/149.28 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.28 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.28 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.28 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.28 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.28 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.28 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.28 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.28 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.28 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.28 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.28 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.28 , #div(#0(), #neg(@y)) -> #0() 585.04/149.28 , #div(#0(), #pos(@y)) -> #0() 585.04/149.28 , #div(#0(), #0()) -> #divByZero() 585.04/149.28 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.28 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.28 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.28 , #abs(#0()) -> #0() 585.04/149.28 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.28 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.28 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.28 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.28 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.28 StartTerms: basic terms 585.04/149.28 Strategy: innermost 585.04/149.28 585.04/149.28 This problem was proven YES(O(1),O(n^1)). 585.04/149.28 585.04/149.28 S) Strict DPs: 585.04/149.28 { mult#2^#(@zs, @b2, @x) -> 585.04/149.28 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.28 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.28 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.28 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.28 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.28 , mult3^#(@b1, @b2, @b3) -> 585.04/149.28 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.28 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.28 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.28 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.28 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.28 mult^#(@xs, @b2)) 585.04/149.28 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.28 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.28 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.28 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.28 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.28 c_18(add'^#(@xs, @ys, @r')) 585.04/149.28 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.28 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.28 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.28 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.28 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.28 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.28 Weak DPs: 585.04/149.28 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.28 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.28 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.28 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.28 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.28 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.28 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.28 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.28 Weak Trs: 585.04/149.28 { #natsub(@x, #0()) -> @x 585.04/149.28 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.28 , -(@x, @y) -> #sub(@x, @y) 585.04/149.28 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.28 , diff#1(#false()) -> #abs(#0()) 585.04/149.28 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.28 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.28 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.28 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.28 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.28 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.28 , #add(#0(), @y) -> @y 585.04/149.28 , mult#2(@zs, @b2, @x) -> 585.04/149.28 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.28 , div(@x, @y) -> #div(@x, @y) 585.04/149.28 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.28 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.28 , #and(#true(), #true()) -> #true() 585.04/149.28 , #and(#true(), #false()) -> #false() 585.04/149.28 , #and(#false(), #true()) -> #false() 585.04/149.28 , #and(#false(), #false()) -> #false() 585.04/149.28 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.28 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.28 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.28 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.28 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.28 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.28 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.28 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.28 , #compare(#0(), #0()) -> #EQ() 585.04/149.28 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.28 , #compare(#s(@x), #0()) -> #GT() 585.04/149.28 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.28 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.28 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.28 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.28 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.28 , +(@x, @y) -> #add(@x, @y) 585.04/149.28 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.28 , sum#4(#false()) -> 585.04/149.28 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.28 , *(@x, @y) -> #mult(@x, @y) 585.04/149.28 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.28 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.28 , #eq(nil(), nil()) -> #true() 585.04/149.28 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.28 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.28 , #eq(#neg(@x), #0()) -> #false() 585.04/149.28 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.28 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.28 , #eq(#pos(@x), #0()) -> #false() 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.28 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.28 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.28 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.28 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.28 , #eq(#0(), #0()) -> #true() 585.04/149.28 , #eq(#0(), #s(@y)) -> #false() 585.04/149.28 , #eq(#s(@x), #0()) -> #false() 585.04/149.28 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.28 , #natmult(#0(), @y) -> #0() 585.04/149.28 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.28 , #cklt(#EQ()) -> #false() 585.04/149.28 , #cklt(#LT()) -> #true() 585.04/149.28 , #cklt(#GT()) -> #false() 585.04/149.28 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.28 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.28 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.28 , #sub(@x, #0()) -> @x 585.04/149.28 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.28 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.28 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.28 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.28 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.28 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.28 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.28 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.28 , diff(@x, @y, @r) -> 585.04/149.28 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.28 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.28 , mult#1(nil(), @b2) -> nil() 585.04/149.28 , mult#1(::(@x, @xs), @b2) -> 585.04/149.28 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.28 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.28 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.28 , #mult(#neg(@x), #0()) -> #0() 585.04/149.28 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.28 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.28 , #mult(#pos(@x), #0()) -> #0() 585.04/149.28 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.28 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.28 , #mult(#0(), #0()) -> #0() 585.04/149.28 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.28 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.28 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.28 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.28 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.28 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.28 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.28 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.28 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.28 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.28 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.28 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.28 , #div(#0(), #neg(@y)) -> #0() 585.04/149.28 , #div(#0(), #pos(@y)) -> #0() 585.04/149.28 , #div(#0(), #0()) -> #divByZero() 585.04/149.28 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.28 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.28 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.28 , #abs(#0()) -> #0() 585.04/149.28 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.28 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.28 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.28 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.28 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.28 StartTerms: basic terms 585.04/149.28 Strategy: innermost 585.04/149.28 585.04/149.28 This problem was proven YES(O(1),O(n^2)). 585.04/149.28 585.04/149.28 585.04/149.28 Proofs for generated problems: 585.04/149.28 ------------------------------ 585.04/149.28 R) We are left with following problem, upon which TcT provides the 585.04/149.28 certificate YES(O(1),O(n^1)). 585.04/149.28 585.04/149.28 Strict DPs: 585.04/149.28 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.28 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.28 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.28 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.28 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.28 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.28 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.28 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.28 Weak DPs: 585.04/149.28 { mult#2^#(@zs, @b2, @x) -> 585.04/149.28 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.28 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.28 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.28 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.28 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.28 , mult3^#(@b1, @b2, @b3) -> 585.04/149.28 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.28 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.28 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.28 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.28 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.28 mult^#(@xs, @b2)) 585.04/149.28 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.28 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.28 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.28 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.28 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.28 c_18(add'^#(@xs, @ys, @r')) 585.04/149.28 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.28 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.28 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.28 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.28 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.28 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.28 Weak Trs: 585.04/149.28 { #natsub(@x, #0()) -> @x 585.04/149.28 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.28 , -(@x, @y) -> #sub(@x, @y) 585.04/149.28 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.28 , diff#1(#false()) -> #abs(#0()) 585.04/149.28 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.28 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.28 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.28 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.28 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.28 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.28 , #add(#0(), @y) -> @y 585.04/149.28 , mult#2(@zs, @b2, @x) -> 585.04/149.28 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.28 , div(@x, @y) -> #div(@x, @y) 585.04/149.28 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.28 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.28 , #and(#true(), #true()) -> #true() 585.04/149.28 , #and(#true(), #false()) -> #false() 585.04/149.28 , #and(#false(), #true()) -> #false() 585.04/149.28 , #and(#false(), #false()) -> #false() 585.04/149.28 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.28 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.28 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.28 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.28 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.28 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.28 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.28 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.28 , #compare(#0(), #0()) -> #EQ() 585.04/149.28 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.28 , #compare(#s(@x), #0()) -> #GT() 585.04/149.28 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.28 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.28 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.28 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.28 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.28 , +(@x, @y) -> #add(@x, @y) 585.04/149.28 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.28 , sum#4(#false()) -> 585.04/149.28 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.28 , *(@x, @y) -> #mult(@x, @y) 585.04/149.28 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.28 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.28 , #eq(nil(), nil()) -> #true() 585.04/149.28 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.28 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.28 , #eq(#neg(@x), #0()) -> #false() 585.04/149.28 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.28 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.28 , #eq(#pos(@x), #0()) -> #false() 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.28 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.28 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.28 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.28 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.28 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.28 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.28 , #eq(#0(), #0()) -> #true() 585.04/149.28 , #eq(#0(), #s(@y)) -> #false() 585.04/149.28 , #eq(#s(@x), #0()) -> #false() 585.04/149.28 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.28 , #natmult(#0(), @y) -> #0() 585.04/149.28 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.28 , #cklt(#EQ()) -> #false() 585.04/149.28 , #cklt(#LT()) -> #true() 585.04/149.28 , #cklt(#GT()) -> #false() 585.04/149.28 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.28 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.28 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.28 , #sub(@x, #0()) -> @x 585.04/149.29 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.29 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.29 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.29 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.29 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.29 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.29 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.29 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.29 , diff(@x, @y, @r) -> 585.04/149.29 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.29 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.29 , mult#1(nil(), @b2) -> nil() 585.04/149.29 , mult#1(::(@x, @xs), @b2) -> 585.04/149.29 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.29 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #0()) -> #0() 585.04/149.29 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #0()) -> #0() 585.04/149.29 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.29 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.29 , #mult(#0(), #0()) -> #0() 585.04/149.29 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.29 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.29 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.29 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.29 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.29 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.29 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#0(), #neg(@y)) -> #0() 585.04/149.29 , #div(#0(), #pos(@y)) -> #0() 585.04/149.29 , #div(#0(), #0()) -> #divByZero() 585.04/149.29 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.29 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.29 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.29 , #abs(#0()) -> #0() 585.04/149.29 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.29 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.29 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.29 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.29 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.29 Obligation: 585.04/149.29 innermost runtime complexity 585.04/149.29 Answer: 585.04/149.29 YES(O(1),O(n^1)) 585.04/149.29 585.04/149.29 The following weak DPs constitute a sub-graph of the DG that is 585.04/149.29 closed under successors. The DPs are removed. 585.04/149.29 585.04/149.29 { mult#2^#(@zs, @b2, @x) -> 585.04/149.29 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.04/149.29 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.04/149.29 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.04/149.29 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.04/149.29 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.04/149.29 , mult3^#(@b1, @b2, @b3) -> 585.04/149.29 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.04/149.29 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.04/149.29 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.04/149.29 , mult#1^#(::(@x, @xs), @b2) -> 585.04/149.29 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.04/149.29 mult^#(@xs, @b2)) 585.04/149.29 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.04/149.29 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.04/149.29 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.04/149.29 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.04/149.29 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.29 c_18(add'^#(@xs, @ys, @r')) 585.04/149.29 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.29 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.04/149.29 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.29 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.04/149.29 , compare#1^#(::(@x, @xs), @b2) -> 585.04/149.29 c_22(compare#2^#(@b2, @x, @xs)) } 585.04/149.29 585.04/149.29 We are left with following problem, upon which TcT provides the 585.04/149.29 certificate YES(O(1),O(n^1)). 585.04/149.29 585.04/149.29 Strict DPs: 585.04/149.29 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.29 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.29 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.29 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.29 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.29 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.29 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.29 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.29 Weak Trs: 585.04/149.29 { #natsub(@x, #0()) -> @x 585.04/149.29 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.29 , -(@x, @y) -> #sub(@x, @y) 585.04/149.29 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.29 , diff#1(#false()) -> #abs(#0()) 585.04/149.29 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.29 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.29 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.29 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.29 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.29 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.29 , #add(#0(), @y) -> @y 585.04/149.29 , mult#2(@zs, @b2, @x) -> 585.04/149.29 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.04/149.29 , div(@x, @y) -> #div(@x, @y) 585.04/149.29 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.04/149.29 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.29 , #and(#true(), #true()) -> #true() 585.04/149.29 , #and(#true(), #false()) -> #false() 585.04/149.29 , #and(#false(), #true()) -> #false() 585.04/149.29 , #and(#false(), #false()) -> #false() 585.04/149.29 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.29 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.29 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.29 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.29 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.29 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.29 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.29 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.29 , #compare(#0(), #0()) -> #EQ() 585.04/149.29 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.29 , #compare(#s(@x), #0()) -> #GT() 585.04/149.29 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.29 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.04/149.29 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.04/149.29 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.04/149.29 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.04/149.29 , +(@x, @y) -> #add(@x, @y) 585.04/149.29 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.04/149.29 , sum#4(#false()) -> 585.04/149.29 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.04/149.29 , *(@x, @y) -> #mult(@x, @y) 585.04/149.29 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.29 , #equal(@x, @y) -> #eq(@x, @y) 585.04/149.29 , #eq(nil(), nil()) -> #true() 585.04/149.29 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.29 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.04/149.29 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.04/149.29 , #eq(#neg(@x), #pos(@y)) -> #false() 585.04/149.29 , #eq(#neg(@x), #0()) -> #false() 585.04/149.29 , #eq(#pos(@x), #neg(@y)) -> #false() 585.04/149.29 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.04/149.29 , #eq(#pos(@x), #0()) -> #false() 585.04/149.29 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.04/149.29 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.04/149.29 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.29 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.04/149.29 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.04/149.29 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.04/149.29 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.04/149.29 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.04/149.29 , #eq(#0(), #neg(@y)) -> #false() 585.04/149.29 , #eq(#0(), #pos(@y)) -> #false() 585.04/149.29 , #eq(#0(), #0()) -> #true() 585.04/149.29 , #eq(#0(), #s(@y)) -> #false() 585.04/149.29 , #eq(#s(@x), #0()) -> #false() 585.04/149.29 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.04/149.29 , #natmult(#0(), @y) -> #0() 585.04/149.29 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.29 , #cklt(#EQ()) -> #false() 585.04/149.29 , #cklt(#LT()) -> #true() 585.04/149.29 , #cklt(#GT()) -> #false() 585.04/149.29 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.04/149.29 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.29 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.29 , #sub(@x, #0()) -> @x 585.04/149.29 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.04/149.29 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.04/149.29 , mult#3(#false(), @b2, @zs) -> @zs 585.04/149.29 , add'#1(nil(), @b2, @r) -> nil() 585.04/149.29 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.04/149.29 , add'#2(nil(), @r, @x, @xs) -> nil() 585.04/149.29 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.04/149.29 add'#3(sum(@x, @y, @r), @xs, @ys) 585.04/149.29 , diff(@x, @y, @r) -> 585.04/149.29 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.29 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.29 , mult#1(nil(), @b2) -> nil() 585.04/149.29 , mult#1(::(@x, @xs), @b2) -> 585.04/149.29 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.04/149.29 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #0()) -> #0() 585.04/149.29 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #0()) -> #0() 585.04/149.29 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.29 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.29 , #mult(#0(), #0()) -> #0() 585.04/149.29 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.29 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.29 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.29 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.29 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.04/149.29 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.04/149.29 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#0(), #neg(@y)) -> #0() 585.04/149.29 , #div(#0(), #pos(@y)) -> #0() 585.04/149.29 , #div(#0(), #0()) -> #divByZero() 585.04/149.29 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.04/149.29 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.29 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.29 , #abs(#0()) -> #0() 585.04/149.29 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.29 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.29 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.29 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.29 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.29 Obligation: 585.04/149.29 innermost runtime complexity 585.04/149.29 Answer: 585.04/149.29 YES(O(1),O(n^1)) 585.04/149.29 585.04/149.29 We replace rewrite rules by usable rules: 585.04/149.29 585.04/149.29 Weak Usable Rules: 585.04/149.29 { #natsub(@x, #0()) -> @x 585.04/149.29 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.29 , -(@x, @y) -> #sub(@x, @y) 585.04/149.29 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.29 , diff#1(#false()) -> #abs(#0()) 585.04/149.29 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.29 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.29 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.29 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.29 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.29 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.29 , #add(#0(), @y) -> @y 585.04/149.29 , div(@x, @y) -> #div(@x, @y) 585.04/149.29 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.29 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.29 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.29 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.29 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.29 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.29 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.29 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.29 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.29 , #compare(#0(), #0()) -> #EQ() 585.04/149.29 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.29 , #compare(#s(@x), #0()) -> #GT() 585.04/149.29 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.29 , +(@x, @y) -> #add(@x, @y) 585.04/149.29 , *(@x, @y) -> #mult(@x, @y) 585.04/149.29 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.29 , #natmult(#0(), @y) -> #0() 585.04/149.29 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.29 , #cklt(#EQ()) -> #false() 585.04/149.29 , #cklt(#LT()) -> #true() 585.04/149.29 , #cklt(#GT()) -> #false() 585.04/149.29 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.29 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.29 , #sub(@x, #0()) -> @x 585.04/149.29 , diff(@x, @y, @r) -> 585.04/149.29 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.29 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.29 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #0()) -> #0() 585.04/149.29 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #0()) -> #0() 585.04/149.29 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.29 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.29 , #mult(#0(), #0()) -> #0() 585.04/149.29 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.29 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.29 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.29 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.29 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#0(), #neg(@y)) -> #0() 585.04/149.29 , #div(#0(), #pos(@y)) -> #0() 585.04/149.29 , #div(#0(), #0()) -> #divByZero() 585.04/149.29 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.29 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.29 , #abs(#0()) -> #0() 585.04/149.29 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.29 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.29 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.29 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.29 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.29 585.04/149.29 We are left with following problem, upon which TcT provides the 585.04/149.29 certificate YES(O(1),O(n^1)). 585.04/149.29 585.04/149.29 Strict DPs: 585.04/149.29 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.04/149.29 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.04/149.29 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.29 c_13(sub'^#(@xs, @ys, @r')) 585.04/149.29 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.04/149.29 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.04/149.29 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.04/149.29 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.04/149.29 Weak Trs: 585.04/149.29 { #natsub(@x, #0()) -> @x 585.04/149.29 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.04/149.29 , -(@x, @y) -> #sub(@x, @y) 585.04/149.29 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.04/149.29 , diff#1(#false()) -> #abs(#0()) 585.04/149.29 , #natdiv(#0(), #0()) -> #divByZero() 585.04/149.29 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.04/149.29 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.04/149.29 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.04/149.29 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.04/149.29 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.04/149.29 , #add(#0(), @y) -> @y 585.04/149.29 , div(@x, @y) -> #div(@x, @y) 585.04/149.29 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.04/149.29 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.04/149.29 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.04/149.29 , #compare(#neg(@x), #0()) -> #LT() 585.04/149.29 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.04/149.29 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.04/149.29 , #compare(#pos(@x), #0()) -> #GT() 585.04/149.29 , #compare(#0(), #neg(@y)) -> #GT() 585.04/149.29 , #compare(#0(), #pos(@y)) -> #LT() 585.04/149.29 , #compare(#0(), #0()) -> #EQ() 585.04/149.29 , #compare(#0(), #s(@y)) -> #LT() 585.04/149.29 , #compare(#s(@x), #0()) -> #GT() 585.04/149.29 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.04/149.29 , +(@x, @y) -> #add(@x, @y) 585.04/149.29 , *(@x, @y) -> #mult(@x, @y) 585.04/149.29 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.04/149.29 , #natmult(#0(), @y) -> #0() 585.04/149.29 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.04/149.29 , #cklt(#EQ()) -> #false() 585.04/149.29 , #cklt(#LT()) -> #true() 585.04/149.29 , #cklt(#GT()) -> #false() 585.04/149.29 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.04/149.29 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.04/149.29 , #sub(@x, #0()) -> @x 585.04/149.29 , diff(@x, @y, @r) -> 585.04/149.29 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.04/149.29 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.04/149.29 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#neg(@x), #0()) -> #0() 585.04/149.29 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.04/149.29 , #mult(#pos(@x), #0()) -> #0() 585.04/149.29 , #mult(#0(), #neg(@y)) -> #0() 585.04/149.29 , #mult(#0(), #pos(@y)) -> #0() 585.04/149.29 , #mult(#0(), #0()) -> #0() 585.04/149.29 , #succ(#neg(#s(#0()))) -> #0() 585.04/149.29 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.04/149.29 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.04/149.29 , #succ(#0()) -> #pos(#s(#0())) 585.04/149.29 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#neg(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.04/149.29 , #div(#pos(@x), #0()) -> #divByZero() 585.04/149.29 , #div(#0(), #neg(@y)) -> #0() 585.04/149.29 , #div(#0(), #pos(@y)) -> #0() 585.04/149.29 , #div(#0(), #0()) -> #divByZero() 585.04/149.29 , #abs(#neg(@x)) -> #pos(@x) 585.04/149.29 , #abs(#pos(@x)) -> #pos(@x) 585.04/149.29 , #abs(#0()) -> #0() 585.04/149.29 , #abs(#s(@x)) -> #pos(#s(@x)) 585.04/149.29 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.04/149.29 , #pred(#pos(#s(#0()))) -> #0() 585.04/149.29 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.04/149.29 , #pred(#0()) -> #neg(#s(#0())) } 585.04/149.29 Obligation: 585.04/149.29 innermost runtime complexity 585.04/149.29 Answer: 585.04/149.29 YES(O(1),O(n^1)) 585.04/149.29 585.04/149.29 We use the processor 'matrix interpretation of dimension 1' to 585.04/149.29 orient following rules strictly. 585.04/149.29 585.04/149.29 DPs: 585.04/149.29 { 3: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.04/149.29 c_13(sub'^#(@xs, @ys, @r')) } 585.04/149.29 Trs: { mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) } 585.04/149.29 585.04/149.29 Sub-proof: 585.04/149.29 ---------- 585.04/149.29 The following argument positions are usable: 585.04/149.29 Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_13) = {1}, 585.04/149.29 Uargs(c_14) = {1}, Uargs(c_19) = {1} 585.04/149.29 585.04/149.29 TcT has computed the following constructor-based matrix 585.04/149.29 interpretation satisfying not(EDA). 585.04/149.29 585.04/149.29 [#natsub](x1, x2) = [0] 585.04/149.29 585.04/149.29 [-](x1, x2) = [0] 585.04/149.29 585.04/149.29 [diff#1](x1) = [0] 585.04/149.29 585.04/149.29 [#natdiv](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#add](x1, x2) = [0] 585.04/149.29 585.04/149.29 [div](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#EQ] = [0] 585.04/149.29 585.04/149.29 [mod](x1, x2) = [7] 585.04/149.29 585.04/149.29 [#compare](x1, x2) = [0] 585.04/149.29 585.04/149.29 [+](x1, x2) = [0] 585.04/149.29 585.04/149.29 [*](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#neg](x1) = [0] 585.04/149.29 585.04/149.29 [#less](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#natmult](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#divByZero] = [7] 585.04/149.29 585.04/149.29 [#true] = [0] 585.04/149.29 585.04/149.29 [#cklt](x1) = [0] 585.04/149.29 585.04/149.29 [#sub](x1, x2) = [7] x1 + [0] 585.04/149.29 585.04/149.29 [#pos](x1) = [0] 585.04/149.29 585.04/149.29 [tuple#2](x1, x2) = [0] 585.04/149.29 585.04/149.29 [diff](x1, x2, x3) = [0] 585.04/149.29 585.04/149.29 [#false] = [0] 585.04/149.29 585.04/149.29 [::](x1, x2) = [1] x1 + [1] x2 + [4] 585.04/149.29 585.04/149.29 [#LT] = [0] 585.04/149.29 585.04/149.29 [#mult](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#succ](x1) = [0] 585.04/149.29 585.04/149.29 [#0] = [0] 585.04/149.29 585.04/149.29 [#div](x1, x2) = [0] 585.04/149.29 585.04/149.29 [#abs](x1) = [0] 585.04/149.29 585.04/149.29 [#pred](x1) = [0] 585.04/149.29 585.04/149.29 [#s](x1) = [0] 585.04/149.29 585.04/149.29 [#GT] = [0] 585.04/149.29 585.04/149.29 [sub^#](x1, x2) = [7] x1 + [7] x2 + [7] 585.04/149.29 585.04/149.29 [sub'^#](x1, x2, x3) = [1] x2 + [0] 585.04/149.29 585.04/149.29 [sub'#3^#](x1, x2, x3) = [1] x3 + [4] 585.04/149.29 585.04/149.29 [sub'#2^#](x1, x2, x3, x4) = [1] x1 + [0] 585.04/149.29 585.04/149.29 [sub'#1^#](x1, x2, x3) = [1] x2 + [0] 585.04/149.29 585.04/149.29 [c_1](x1) = [4] x1 + [7] 585.04/149.29 585.04/149.29 [c_2](x1) = [1] x1 + [0] 585.04/149.29 585.04/149.29 [c_13](x1) = [1] x1 + [1] 585.04/149.29 585.04/149.29 [c_14](x1) = [1] x1 + [0] 585.04/149.29 585.04/149.29 [c_19](x1) = [1] x1 + [0] 585.04/149.29 585.04/149.29 The order satisfies the following ordering constraints: 585.04/149.29 585.04/149.29 [#natsub(@x, #0())] = [0] 585.04/149.29 ? [1] @x + [0] 585.04/149.29 = [@x] 585.04/149.29 585.04/149.29 [#natsub(#s(@x), #s(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#natsub(@x, @y)] 585.04/149.29 585.04/149.29 [-(@x, @y)] = [0] 585.04/149.29 ? [7] @x + [0] 585.04/149.29 = [#sub(@x, @y)] 585.04/149.29 585.04/149.29 [diff#1(#true())] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#abs(#pos(#s(#0())))] 585.04/149.29 585.04/149.29 [diff#1(#false())] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#abs(#0())] 585.04/149.29 585.04/149.29 [#natdiv(#0(), #0())] = [0] 585.04/149.29 ? [7] 585.04/149.29 = [#divByZero()] 585.04/149.29 585.04/149.29 [#natdiv(#s(@x), #s(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#s(#natdiv(#natsub(@x, @y), #s(@y)))] 585.04/149.29 585.04/149.29 [#add(#neg(#s(#0())), @y)] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#pred(@y)] 585.04/149.29 585.04/149.29 [#add(#neg(#s(#s(@x))), @y)] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#pred(#add(#pos(#s(@x)), @y))] 585.04/149.29 585.04/149.29 [#add(#pos(#s(#0())), @y)] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#succ(@y)] 585.04/149.29 585.04/149.29 [#add(#pos(#s(#s(@x))), @y)] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#succ(#add(#pos(#s(@x)), @y))] 585.04/149.29 585.04/149.29 [#add(#0(), @y)] = [0] 585.04/149.29 ? [1] @y + [0] 585.04/149.29 = [@y] 585.04/149.29 585.04/149.29 [div(@x, @y)] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#div(@x, @y)] 585.04/149.29 585.04/149.29 [mod(@x, @y)] = [7] 585.04/149.29 > [0] 585.04/149.29 = [-(@x, *(@x, div(@x, @y)))] 585.04/149.29 585.04/149.29 [#compare(#neg(@x), #neg(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#compare(@y, @x)] 585.04/149.29 585.04/149.29 [#compare(#neg(@x), #pos(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#LT()] 585.04/149.29 585.04/149.29 [#compare(#neg(@x), #0())] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#LT()] 585.04/149.29 585.04/149.29 [#compare(#pos(@x), #neg(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#GT()] 585.04/149.29 585.04/149.29 [#compare(#pos(@x), #pos(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#compare(@x, @y)] 585.04/149.29 585.04/149.29 [#compare(#pos(@x), #0())] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#GT()] 585.04/149.29 585.04/149.29 [#compare(#0(), #neg(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#GT()] 585.04/149.29 585.04/149.29 [#compare(#0(), #pos(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#LT()] 585.04/149.29 585.04/149.29 [#compare(#0(), #0())] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#EQ()] 585.04/149.29 585.04/149.29 [#compare(#0(), #s(@y))] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#LT()] 585.04/149.29 585.04/149.29 [#compare(#s(@x), #0())] = [0] 585.04/149.29 >= [0] 585.04/149.29 = [#GT()] 585.04/149.29 585.04/149.29 [#compare(#s(@x), #s(@y))] = [0] 585.04/149.29 >= [0] 585.29/149.30 = [#compare(@x, @y)] 585.29/149.30 585.29/149.30 [+(@x, @y)] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#add(@x, @y)] 585.29/149.30 585.29/149.30 [*(@x, @y)] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#mult(@x, @y)] 585.29/149.30 585.29/149.30 [#less(@x, @y)] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#cklt(#compare(@x, @y))] 585.29/149.30 585.29/149.30 [#natmult(#0(), @y)] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#natmult(#s(@x), @y)] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#add(#pos(@y), #natmult(@x, @y))] 585.29/149.30 585.29/149.30 [#cklt(#EQ())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#false()] 585.29/149.30 585.29/149.30 [#cklt(#LT())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#true()] 585.29/149.30 585.29/149.30 [#cklt(#GT())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#false()] 585.29/149.30 585.29/149.30 [#sub(@x, #neg(@y))] = [7] @x + [0] 585.29/149.30 >= [0] 585.29/149.30 = [#add(@x, #pos(@y))] 585.29/149.30 585.29/149.30 [#sub(@x, #pos(@y))] = [7] @x + [0] 585.29/149.30 >= [0] 585.29/149.30 = [#add(@x, #neg(@y))] 585.29/149.30 585.29/149.30 [#sub(@x, #0())] = [7] @x + [0] 585.29/149.30 >= [1] @x + [0] 585.29/149.30 = [@x] 585.29/149.30 585.29/149.30 [diff(@x, @y, @r)] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.30 diff#1(#less(-(-(@x, @y), @r), #0())))] 585.29/149.30 585.29/149.30 [#mult(#neg(@x), #neg(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#natmult(@x, @y))] 585.29/149.30 585.29/149.30 [#mult(#neg(@x), #pos(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#natmult(@x, @y))] 585.29/149.30 585.29/149.30 [#mult(#neg(@x), #0())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#mult(#pos(@x), #neg(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#natmult(@x, @y))] 585.29/149.30 585.29/149.30 [#mult(#pos(@x), #pos(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#natmult(@x, @y))] 585.29/149.30 585.29/149.30 [#mult(#pos(@x), #0())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#mult(#0(), #neg(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#mult(#0(), #pos(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#mult(#0(), #0())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#succ(#neg(#s(#0())))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#succ(#neg(#s(#s(@x))))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#s(@x))] 585.29/149.30 585.29/149.30 [#succ(#pos(#s(@x)))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#s(#s(@x)))] 585.29/149.30 585.29/149.30 [#succ(#0())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#s(#0()))] 585.29/149.30 585.29/149.30 [#div(#neg(@x), #neg(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#natdiv(@x, @y))] 585.29/149.30 585.29/149.30 [#div(#neg(@x), #pos(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#natdiv(@x, @y))] 585.29/149.30 585.29/149.30 [#div(#neg(@x), #0())] = [0] 585.29/149.30 ? [7] 585.29/149.30 = [#divByZero()] 585.29/149.30 585.29/149.30 [#div(#pos(@x), #neg(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#natdiv(@x, @y))] 585.29/149.30 585.29/149.30 [#div(#pos(@x), #pos(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#natdiv(@x, @y))] 585.29/149.30 585.29/149.30 [#div(#pos(@x), #0())] = [0] 585.29/149.30 ? [7] 585.29/149.30 = [#divByZero()] 585.29/149.30 585.29/149.30 [#div(#0(), #neg(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#div(#0(), #pos(@y))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#div(#0(), #0())] = [0] 585.29/149.30 ? [7] 585.29/149.30 = [#divByZero()] 585.29/149.30 585.29/149.30 [#abs(#neg(@x))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(@x)] 585.29/149.30 585.29/149.30 [#abs(#pos(@x))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(@x)] 585.29/149.30 585.29/149.30 [#abs(#0())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#abs(#s(@x))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#s(@x))] 585.29/149.30 585.29/149.30 [#pred(#neg(#s(@x)))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#s(#s(@x)))] 585.29/149.30 585.29/149.30 [#pred(#pos(#s(#0())))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#0()] 585.29/149.30 585.29/149.30 [#pred(#pos(#s(#s(@x))))] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#pos(#s(@x))] 585.29/149.30 585.29/149.30 [#pred(#0())] = [0] 585.29/149.30 >= [0] 585.29/149.30 = [#neg(#s(#0()))] 585.29/149.30 585.29/149.30 [sub^#(@b1, @b2)] = [7] @b1 + [7] @b2 + [7] 585.29/149.30 >= [4] @b2 + [7] 585.29/149.30 = [c_1(sub'^#(@b1, @b2, #abs(#0())))] 585.29/149.30 585.29/149.30 [sub'^#(@b1, @b2, @r)] = [1] @b2 + [0] 585.29/149.30 >= [1] @b2 + [0] 585.29/149.30 = [c_2(sub'#1^#(@b1, @b2, @r))] 585.29/149.30 585.29/149.30 [sub'#3^#(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [4] 585.29/149.30 > [1] @ys + [1] 585.29/149.30 = [c_13(sub'^#(@xs, @ys, @r'))] 585.29/149.30 585.29/149.30 [sub'#2^#(::(@y, @ys), @r, @x, @xs)] = [1] @y + [1] @ys + [4] 585.29/149.30 >= [1] @ys + [4] 585.29/149.30 = [c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys))] 585.29/149.30 585.29/149.30 [sub'#1^#(::(@x, @xs), @b2, @r)] = [1] @b2 + [0] 585.29/149.30 >= [1] @b2 + [0] 585.29/149.30 = [c_19(sub'#2^#(@b2, @r, @x, @xs))] 585.29/149.30 585.29/149.30 585.29/149.30 We return to the main proof. Consider the set of all dependency 585.29/149.30 pairs 585.29/149.30 585.29/149.30 : 585.29/149.30 { 1: sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.29/149.30 , 2: sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.29/149.30 , 3: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.30 c_13(sub'^#(@xs, @ys, @r')) 585.29/149.30 , 4: sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.30 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.29/149.30 , 5: sub'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.30 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.29/149.30 585.29/149.30 Processor 'matrix interpretation of dimension 1' induces the 585.29/149.30 complexity certificate YES(?,O(n^1)) on application of dependency 585.29/149.30 pairs {3}. These cover all (indirect) predecessors of dependency 585.29/149.30 pairs {1,2,3,4,5}, their number of application is equally bounded. 585.29/149.30 The dependency pairs are shifted into the weak component. 585.29/149.30 585.29/149.30 We are left with following problem, upon which TcT provides the 585.29/149.30 certificate YES(O(1),O(1)). 585.29/149.30 585.29/149.30 Weak DPs: 585.29/149.30 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.29/149.30 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.29/149.30 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.30 c_13(sub'^#(@xs, @ys, @r')) 585.29/149.30 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.30 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.29/149.30 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.30 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.29/149.30 Weak Trs: 585.29/149.30 { #natsub(@x, #0()) -> @x 585.29/149.30 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.30 , -(@x, @y) -> #sub(@x, @y) 585.29/149.30 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.30 , diff#1(#false()) -> #abs(#0()) 585.29/149.30 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.30 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.30 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.30 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.30 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.30 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.30 , #add(#0(), @y) -> @y 585.29/149.30 , div(@x, @y) -> #div(@x, @y) 585.29/149.30 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.30 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.30 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.30 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.30 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.30 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.30 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.30 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.30 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.30 , #compare(#0(), #0()) -> #EQ() 585.29/149.30 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.30 , #compare(#s(@x), #0()) -> #GT() 585.29/149.30 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.30 , +(@x, @y) -> #add(@x, @y) 585.29/149.30 , *(@x, @y) -> #mult(@x, @y) 585.29/149.30 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.30 , #natmult(#0(), @y) -> #0() 585.29/149.30 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.30 , #cklt(#EQ()) -> #false() 585.29/149.30 , #cklt(#LT()) -> #true() 585.29/149.30 , #cklt(#GT()) -> #false() 585.29/149.30 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.30 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.30 , #sub(@x, #0()) -> @x 585.29/149.30 , diff(@x, @y, @r) -> 585.29/149.30 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.30 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.30 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.30 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.30 , #mult(#neg(@x), #0()) -> #0() 585.29/149.30 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.30 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.30 , #mult(#pos(@x), #0()) -> #0() 585.29/149.30 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.30 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.30 , #mult(#0(), #0()) -> #0() 585.29/149.30 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.30 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.30 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.30 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.30 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.30 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.30 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.30 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.30 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.30 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.30 , #div(#0(), #neg(@y)) -> #0() 585.29/149.30 , #div(#0(), #pos(@y)) -> #0() 585.29/149.30 , #div(#0(), #0()) -> #divByZero() 585.29/149.30 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.30 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.30 , #abs(#0()) -> #0() 585.29/149.30 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.30 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.30 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.30 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.30 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.30 Obligation: 585.29/149.30 innermost runtime complexity 585.29/149.30 Answer: 585.29/149.30 YES(O(1),O(1)) 585.29/149.30 585.29/149.30 The following weak DPs constitute a sub-graph of the DG that is 585.29/149.30 closed under successors. The DPs are removed. 585.29/149.30 585.29/149.30 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.29/149.30 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.29/149.30 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.30 c_13(sub'^#(@xs, @ys, @r')) 585.29/149.30 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.30 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.29/149.30 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.30 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.29/149.31 585.29/149.31 We are left with following problem, upon which TcT provides the 585.29/149.31 certificate YES(O(1),O(1)). 585.29/149.31 585.29/149.31 Weak Trs: 585.29/149.31 { #natsub(@x, #0()) -> @x 585.29/149.31 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.31 , -(@x, @y) -> #sub(@x, @y) 585.29/149.31 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.31 , diff#1(#false()) -> #abs(#0()) 585.29/149.31 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.31 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.31 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.31 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.31 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.31 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.31 , #add(#0(), @y) -> @y 585.29/149.31 , div(@x, @y) -> #div(@x, @y) 585.29/149.31 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.31 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.31 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.31 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.31 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.31 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.31 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.31 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.31 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.31 , #compare(#0(), #0()) -> #EQ() 585.29/149.31 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.31 , #compare(#s(@x), #0()) -> #GT() 585.29/149.31 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.31 , +(@x, @y) -> #add(@x, @y) 585.29/149.31 , *(@x, @y) -> #mult(@x, @y) 585.29/149.31 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.31 , #natmult(#0(), @y) -> #0() 585.29/149.31 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.31 , #cklt(#EQ()) -> #false() 585.29/149.31 , #cklt(#LT()) -> #true() 585.29/149.31 , #cklt(#GT()) -> #false() 585.29/149.31 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.31 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.31 , #sub(@x, #0()) -> @x 585.29/149.31 , diff(@x, @y, @r) -> 585.29/149.31 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.31 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.31 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.31 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.31 , #mult(#neg(@x), #0()) -> #0() 585.29/149.31 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.31 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.31 , #mult(#pos(@x), #0()) -> #0() 585.29/149.31 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.31 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.31 , #mult(#0(), #0()) -> #0() 585.29/149.31 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.31 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.31 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.31 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.31 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.31 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.31 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.31 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.31 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.31 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.31 , #div(#0(), #neg(@y)) -> #0() 585.29/149.31 , #div(#0(), #pos(@y)) -> #0() 585.29/149.31 , #div(#0(), #0()) -> #divByZero() 585.29/149.31 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.31 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.31 , #abs(#0()) -> #0() 585.29/149.31 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.31 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.31 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.31 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.31 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.31 Obligation: 585.29/149.31 innermost runtime complexity 585.29/149.31 Answer: 585.29/149.31 YES(O(1),O(1)) 585.29/149.31 585.29/149.31 No rule is usable, rules are removed from the input problem. 585.29/149.31 585.29/149.31 We are left with following problem, upon which TcT provides the 585.29/149.31 certificate YES(O(1),O(1)). 585.29/149.31 585.29/149.31 Rules: Empty 585.29/149.31 Obligation: 585.29/149.31 innermost runtime complexity 585.29/149.31 Answer: 585.29/149.31 YES(O(1),O(1)) 585.29/149.31 585.29/149.31 Empty rules are trivially bounded 585.29/149.31 585.29/149.31 S) We are left with following problem, upon which TcT provides the 585.29/149.31 certificate YES(O(1),O(n^2)). 585.29/149.31 585.29/149.31 Strict DPs: 585.29/149.31 { mult#2^#(@zs, @b2, @x) -> 585.29/149.31 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.31 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.31 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.31 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.31 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.31 , mult3^#(@b1, @b2, @b3) -> 585.29/149.31 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.31 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.31 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.31 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.31 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.31 mult^#(@xs, @b2)) 585.29/149.31 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.31 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.31 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.31 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.31 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.31 c_18(add'^#(@xs, @ys, @r')) 585.29/149.31 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.31 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.31 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.31 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.29/149.31 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.31 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.31 Weak DPs: 585.29/149.31 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.29/149.31 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.29/149.31 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.31 c_13(sub'^#(@xs, @ys, @r')) 585.29/149.31 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.31 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.29/149.31 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.31 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.29/149.31 Weak Trs: 585.29/149.31 { #natsub(@x, #0()) -> @x 585.29/149.31 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.31 , -(@x, @y) -> #sub(@x, @y) 585.29/149.31 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.31 , diff#1(#false()) -> #abs(#0()) 585.29/149.31 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.31 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.31 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.31 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.31 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.31 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.31 , #add(#0(), @y) -> @y 585.29/149.31 , mult#2(@zs, @b2, @x) -> 585.29/149.31 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.31 , div(@x, @y) -> #div(@x, @y) 585.29/149.31 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.31 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.31 , #and(#true(), #true()) -> #true() 585.29/149.31 , #and(#true(), #false()) -> #false() 585.29/149.31 , #and(#false(), #true()) -> #false() 585.29/149.31 , #and(#false(), #false()) -> #false() 585.29/149.31 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.31 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.31 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.31 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.31 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.31 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.31 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.31 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.31 , #compare(#0(), #0()) -> #EQ() 585.29/149.31 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.31 , #compare(#s(@x), #0()) -> #GT() 585.29/149.31 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.31 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.31 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.31 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.31 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.31 , +(@x, @y) -> #add(@x, @y) 585.29/149.31 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.31 , sum#4(#false()) -> 585.29/149.31 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.31 , *(@x, @y) -> #mult(@x, @y) 585.29/149.31 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.31 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.31 , #eq(nil(), nil()) -> #true() 585.29/149.31 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.31 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.31 , #eq(#neg(@x), #0()) -> #false() 585.29/149.31 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.31 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.31 , #eq(#pos(@x), #0()) -> #false() 585.29/149.31 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.31 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.31 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.31 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.31 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.31 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.31 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.31 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.31 , #eq(#0(), #0()) -> #true() 585.29/149.31 , #eq(#0(), #s(@y)) -> #false() 585.29/149.31 , #eq(#s(@x), #0()) -> #false() 585.29/149.31 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.31 , #natmult(#0(), @y) -> #0() 585.29/149.31 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.31 , #cklt(#EQ()) -> #false() 585.29/149.31 , #cklt(#LT()) -> #true() 585.29/149.31 , #cklt(#GT()) -> #false() 585.29/149.31 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.31 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.31 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.31 , #sub(@x, #0()) -> @x 585.29/149.31 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.31 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.31 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.31 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.31 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.31 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.31 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.31 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.31 , diff(@x, @y, @r) -> 585.29/149.31 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.31 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.31 , mult#1(nil(), @b2) -> nil() 585.29/149.31 , mult#1(::(@x, @xs), @b2) -> 585.29/149.31 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.31 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.31 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.31 , #mult(#neg(@x), #0()) -> #0() 585.29/149.31 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.31 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.31 , #mult(#pos(@x), #0()) -> #0() 585.29/149.31 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.31 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.31 , #mult(#0(), #0()) -> #0() 585.29/149.31 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.31 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.31 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.31 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.31 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.31 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.31 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.31 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.31 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.31 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.31 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.31 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.31 , #div(#0(), #neg(@y)) -> #0() 585.29/149.31 , #div(#0(), #pos(@y)) -> #0() 585.29/149.31 , #div(#0(), #0()) -> #divByZero() 585.29/149.31 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.31 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.31 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.31 , #abs(#0()) -> #0() 585.29/149.31 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.31 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.31 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.31 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.31 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.31 Obligation: 585.29/149.31 innermost runtime complexity 585.29/149.31 Answer: 585.29/149.31 YES(O(1),O(n^2)) 585.29/149.31 585.29/149.31 The following weak DPs constitute a sub-graph of the DG that is 585.29/149.31 closed under successors. The DPs are removed. 585.29/149.31 585.29/149.31 { sub^#(@b1, @b2) -> c_1(sub'^#(@b1, @b2, #abs(#0()))) 585.29/149.31 , sub'^#(@b1, @b2, @r) -> c_2(sub'#1^#(@b1, @b2, @r)) 585.29/149.31 , sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.31 c_13(sub'^#(@xs, @ys, @r')) 585.29/149.31 , sub'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.31 c_14(sub'#3^#(diff(@x, @y, @r), @xs, @ys)) 585.29/149.31 , sub'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.31 c_19(sub'#2^#(@b2, @r, @x, @xs)) } 585.29/149.31 585.29/149.31 We are left with following problem, upon which TcT provides the 585.29/149.31 certificate YES(O(1),O(n^2)). 585.29/149.31 585.29/149.31 Strict DPs: 585.29/149.31 { mult#2^#(@zs, @b2, @x) -> 585.29/149.31 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.31 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.31 , bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.31 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.31 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.31 , mult3^#(@b1, @b2, @b3) -> 585.29/149.31 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.31 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.31 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.31 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.31 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.31 mult^#(@xs, @b2)) 585.29/149.31 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.31 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.31 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.31 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.31 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.31 c_18(add'^#(@xs, @ys, @r')) 585.29/149.31 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.31 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.31 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.31 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.29/149.31 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.31 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.31 Weak Trs: 585.29/149.31 { #natsub(@x, #0()) -> @x 585.29/149.31 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.31 , -(@x, @y) -> #sub(@x, @y) 585.29/149.31 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.31 , diff#1(#false()) -> #abs(#0()) 585.29/149.31 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.31 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.31 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.31 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.31 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.31 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.31 , #add(#0(), @y) -> @y 585.29/149.31 , mult#2(@zs, @b2, @x) -> 585.29/149.31 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.31 , div(@x, @y) -> #div(@x, @y) 585.29/149.31 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.31 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.31 , #and(#true(), #true()) -> #true() 585.29/149.31 , #and(#true(), #false()) -> #false() 585.29/149.31 , #and(#false(), #true()) -> #false() 585.29/149.31 , #and(#false(), #false()) -> #false() 585.29/149.31 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.31 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.31 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.31 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.31 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.31 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.31 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.31 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.31 , #compare(#0(), #0()) -> #EQ() 585.29/149.31 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.31 , #compare(#s(@x), #0()) -> #GT() 585.29/149.31 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.31 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.31 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.31 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.31 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.31 , +(@x, @y) -> #add(@x, @y) 585.29/149.31 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.31 , sum#4(#false()) -> 585.29/149.31 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.31 , *(@x, @y) -> #mult(@x, @y) 585.29/149.31 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.31 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.31 , #eq(nil(), nil()) -> #true() 585.29/149.31 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.31 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.31 , #eq(#neg(@x), #0()) -> #false() 585.29/149.31 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.31 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.31 , #eq(#pos(@x), #0()) -> #false() 585.29/149.31 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.31 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.31 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.31 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.31 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.31 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.31 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.31 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.31 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.31 , #eq(#0(), #0()) -> #true() 585.29/149.31 , #eq(#0(), #s(@y)) -> #false() 585.29/149.31 , #eq(#s(@x), #0()) -> #false() 585.29/149.31 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.31 , #natmult(#0(), @y) -> #0() 585.29/149.31 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.31 , #cklt(#EQ()) -> #false() 585.29/149.31 , #cklt(#LT()) -> #true() 585.29/149.31 , #cklt(#GT()) -> #false() 585.29/149.31 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.31 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.31 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.32 , #sub(@x, #0()) -> @x 585.29/149.32 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.32 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.32 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.32 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.32 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.32 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.32 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.32 , diff(@x, @y, @r) -> 585.29/149.32 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.32 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.32 , mult#1(nil(), @b2) -> nil() 585.29/149.32 , mult#1(::(@x, @xs), @b2) -> 585.29/149.32 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.32 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #0()) -> #0() 585.29/149.32 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #0()) -> #0() 585.29/149.32 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.32 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.32 , #mult(#0(), #0()) -> #0() 585.29/149.32 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.32 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.32 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.32 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.32 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.32 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.32 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.32 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.32 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.32 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.32 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.32 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.32 , #div(#0(), #neg(@y)) -> #0() 585.29/149.32 , #div(#0(), #pos(@y)) -> #0() 585.29/149.32 , #div(#0(), #0()) -> #divByZero() 585.29/149.32 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.32 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.32 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.32 , #abs(#0()) -> #0() 585.29/149.32 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.32 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.32 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.32 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.32 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.32 Obligation: 585.29/149.32 innermost runtime complexity 585.29/149.32 Answer: 585.29/149.32 YES(O(1),O(n^2)) 585.29/149.32 585.29/149.32 We analyse the complexity of following sub-problems (R) and (S). 585.29/149.32 Problem (S) is obtained from the input problem by shifting strict 585.29/149.32 rules from (R) into the weak component: 585.29/149.32 585.29/149.32 Problem (R): 585.29/149.32 ------------ 585.29/149.32 Strict DPs: 585.29/149.32 { mult#2^#(@zs, @b2, @x) -> 585.29/149.32 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.32 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.32 , mult3^#(@b1, @b2, @b3) -> 585.29/149.32 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.32 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.32 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.32 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.32 mult^#(@xs, @b2)) 585.29/149.32 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.32 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.32 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.32 c_18(add'^#(@xs, @ys, @r')) 585.29/149.32 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.32 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.32 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.32 Weak DPs: 585.29/149.32 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.32 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.32 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.32 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.32 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.32 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.32 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.32 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.32 Weak Trs: 585.29/149.32 { #natsub(@x, #0()) -> @x 585.29/149.32 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.32 , -(@x, @y) -> #sub(@x, @y) 585.29/149.32 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.32 , diff#1(#false()) -> #abs(#0()) 585.29/149.32 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.32 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.32 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.32 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.32 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.32 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.32 , #add(#0(), @y) -> @y 585.29/149.32 , mult#2(@zs, @b2, @x) -> 585.29/149.32 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.32 , div(@x, @y) -> #div(@x, @y) 585.29/149.32 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.32 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.32 , #and(#true(), #true()) -> #true() 585.29/149.32 , #and(#true(), #false()) -> #false() 585.29/149.32 , #and(#false(), #true()) -> #false() 585.29/149.32 , #and(#false(), #false()) -> #false() 585.29/149.32 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.32 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.32 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.32 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.32 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.32 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.32 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.32 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.32 , #compare(#0(), #0()) -> #EQ() 585.29/149.32 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.32 , #compare(#s(@x), #0()) -> #GT() 585.29/149.32 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.32 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.32 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.32 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.32 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.32 , +(@x, @y) -> #add(@x, @y) 585.29/149.32 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.32 , sum#4(#false()) -> 585.29/149.32 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.32 , *(@x, @y) -> #mult(@x, @y) 585.29/149.32 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.32 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.32 , #eq(nil(), nil()) -> #true() 585.29/149.32 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.32 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.32 , #eq(#neg(@x), #0()) -> #false() 585.29/149.32 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.32 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.32 , #eq(#pos(@x), #0()) -> #false() 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.32 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.32 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.32 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.32 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.32 , #eq(#0(), #0()) -> #true() 585.29/149.32 , #eq(#0(), #s(@y)) -> #false() 585.29/149.32 , #eq(#s(@x), #0()) -> #false() 585.29/149.32 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.32 , #natmult(#0(), @y) -> #0() 585.29/149.32 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.32 , #cklt(#EQ()) -> #false() 585.29/149.32 , #cklt(#LT()) -> #true() 585.29/149.32 , #cklt(#GT()) -> #false() 585.29/149.32 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.32 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.32 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.32 , #sub(@x, #0()) -> @x 585.29/149.32 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.32 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.32 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.32 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.32 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.32 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.32 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.32 , diff(@x, @y, @r) -> 585.29/149.32 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.32 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.32 , mult#1(nil(), @b2) -> nil() 585.29/149.32 , mult#1(::(@x, @xs), @b2) -> 585.29/149.32 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.32 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #0()) -> #0() 585.29/149.32 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #0()) -> #0() 585.29/149.32 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.32 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.32 , #mult(#0(), #0()) -> #0() 585.29/149.32 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.32 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.32 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.32 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.32 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.32 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.32 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.32 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.32 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.32 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.32 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.32 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.32 , #div(#0(), #neg(@y)) -> #0() 585.29/149.32 , #div(#0(), #pos(@y)) -> #0() 585.29/149.32 , #div(#0(), #0()) -> #divByZero() 585.29/149.32 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.32 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.32 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.32 , #abs(#0()) -> #0() 585.29/149.32 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.32 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.32 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.32 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.32 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.32 StartTerms: basic terms 585.29/149.32 Strategy: innermost 585.29/149.32 585.29/149.32 Problem (S): 585.29/149.32 ------------ 585.29/149.32 Strict DPs: 585.29/149.32 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.32 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.32 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.32 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.32 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.32 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.32 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.32 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.32 Weak DPs: 585.29/149.32 { mult#2^#(@zs, @b2, @x) -> 585.29/149.32 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.32 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.32 , mult3^#(@b1, @b2, @b3) -> 585.29/149.32 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.32 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.32 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.32 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.32 mult^#(@xs, @b2)) 585.29/149.32 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.32 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.32 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.32 c_18(add'^#(@xs, @ys, @r')) 585.29/149.32 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.32 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.32 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.32 Weak Trs: 585.29/149.32 { #natsub(@x, #0()) -> @x 585.29/149.32 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.32 , -(@x, @y) -> #sub(@x, @y) 585.29/149.32 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.32 , diff#1(#false()) -> #abs(#0()) 585.29/149.32 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.32 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.32 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.32 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.32 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.32 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.32 , #add(#0(), @y) -> @y 585.29/149.32 , mult#2(@zs, @b2, @x) -> 585.29/149.32 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.32 , div(@x, @y) -> #div(@x, @y) 585.29/149.32 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.32 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.32 , #and(#true(), #true()) -> #true() 585.29/149.32 , #and(#true(), #false()) -> #false() 585.29/149.32 , #and(#false(), #true()) -> #false() 585.29/149.32 , #and(#false(), #false()) -> #false() 585.29/149.32 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.32 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.32 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.32 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.32 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.32 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.32 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.32 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.32 , #compare(#0(), #0()) -> #EQ() 585.29/149.32 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.32 , #compare(#s(@x), #0()) -> #GT() 585.29/149.32 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.32 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.32 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.32 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.32 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.32 , +(@x, @y) -> #add(@x, @y) 585.29/149.32 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.32 , sum#4(#false()) -> 585.29/149.32 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.32 , *(@x, @y) -> #mult(@x, @y) 585.29/149.32 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.32 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.32 , #eq(nil(), nil()) -> #true() 585.29/149.32 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.32 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.32 , #eq(#neg(@x), #0()) -> #false() 585.29/149.32 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.32 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.32 , #eq(#pos(@x), #0()) -> #false() 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.32 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.32 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.32 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.32 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.32 , #eq(#0(), #0()) -> #true() 585.29/149.32 , #eq(#0(), #s(@y)) -> #false() 585.29/149.32 , #eq(#s(@x), #0()) -> #false() 585.29/149.32 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.32 , #natmult(#0(), @y) -> #0() 585.29/149.32 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.32 , #cklt(#EQ()) -> #false() 585.29/149.32 , #cklt(#LT()) -> #true() 585.29/149.32 , #cklt(#GT()) -> #false() 585.29/149.32 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.32 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.32 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.32 , #sub(@x, #0()) -> @x 585.29/149.32 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.32 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.32 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.32 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.32 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.32 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.32 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.32 , diff(@x, @y, @r) -> 585.29/149.32 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.32 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.32 , mult#1(nil(), @b2) -> nil() 585.29/149.32 , mult#1(::(@x, @xs), @b2) -> 585.29/149.32 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.32 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #0()) -> #0() 585.29/149.32 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #0()) -> #0() 585.29/149.32 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.32 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.32 , #mult(#0(), #0()) -> #0() 585.29/149.32 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.32 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.32 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.32 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.32 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.32 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.32 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.32 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.32 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.32 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.32 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.32 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.32 , #div(#0(), #neg(@y)) -> #0() 585.29/149.32 , #div(#0(), #pos(@y)) -> #0() 585.29/149.32 , #div(#0(), #0()) -> #divByZero() 585.29/149.32 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.32 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.32 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.32 , #abs(#0()) -> #0() 585.29/149.32 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.32 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.32 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.32 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.32 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.32 StartTerms: basic terms 585.29/149.32 Strategy: innermost 585.29/149.32 585.29/149.32 Overall, the transformation results in the following sub-problem(s): 585.29/149.32 585.29/149.32 Generated new problems: 585.29/149.32 ----------------------- 585.29/149.32 R) Strict DPs: 585.29/149.32 { mult#2^#(@zs, @b2, @x) -> 585.29/149.32 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.32 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.32 , mult3^#(@b1, @b2, @b3) -> 585.29/149.32 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.32 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.32 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.32 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.32 mult^#(@xs, @b2)) 585.29/149.32 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.32 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.32 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.32 c_18(add'^#(@xs, @ys, @r')) 585.29/149.32 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.32 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.32 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.32 Weak DPs: 585.29/149.32 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.32 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.32 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.32 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.32 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.32 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.32 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.32 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.32 Weak Trs: 585.29/149.32 { #natsub(@x, #0()) -> @x 585.29/149.32 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.32 , -(@x, @y) -> #sub(@x, @y) 585.29/149.32 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.32 , diff#1(#false()) -> #abs(#0()) 585.29/149.32 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.32 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.32 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.32 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.32 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.32 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.32 , #add(#0(), @y) -> @y 585.29/149.32 , mult#2(@zs, @b2, @x) -> 585.29/149.32 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.32 , div(@x, @y) -> #div(@x, @y) 585.29/149.32 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.32 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.32 , #and(#true(), #true()) -> #true() 585.29/149.32 , #and(#true(), #false()) -> #false() 585.29/149.32 , #and(#false(), #true()) -> #false() 585.29/149.32 , #and(#false(), #false()) -> #false() 585.29/149.32 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.32 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.32 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.32 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.32 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.32 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.32 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.32 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.32 , #compare(#0(), #0()) -> #EQ() 585.29/149.32 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.32 , #compare(#s(@x), #0()) -> #GT() 585.29/149.32 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.32 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.32 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.32 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.32 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.32 , +(@x, @y) -> #add(@x, @y) 585.29/149.32 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.32 , sum#4(#false()) -> 585.29/149.32 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.32 , *(@x, @y) -> #mult(@x, @y) 585.29/149.32 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.32 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.32 , #eq(nil(), nil()) -> #true() 585.29/149.32 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.32 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.32 , #eq(#neg(@x), #0()) -> #false() 585.29/149.32 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.32 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.32 , #eq(#pos(@x), #0()) -> #false() 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.32 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.32 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.32 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.32 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.32 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.32 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.32 , #eq(#0(), #0()) -> #true() 585.29/149.32 , #eq(#0(), #s(@y)) -> #false() 585.29/149.32 , #eq(#s(@x), #0()) -> #false() 585.29/149.32 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.32 , #natmult(#0(), @y) -> #0() 585.29/149.32 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.32 , #cklt(#EQ()) -> #false() 585.29/149.32 , #cklt(#LT()) -> #true() 585.29/149.32 , #cklt(#GT()) -> #false() 585.29/149.32 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.32 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.32 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.32 , #sub(@x, #0()) -> @x 585.29/149.32 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.32 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.32 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.32 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.32 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.32 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.32 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.32 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.32 , diff(@x, @y, @r) -> 585.29/149.32 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.32 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.32 , mult#1(nil(), @b2) -> nil() 585.29/149.32 , mult#1(::(@x, @xs), @b2) -> 585.29/149.32 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.32 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#neg(@x), #0()) -> #0() 585.29/149.32 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.32 , #mult(#pos(@x), #0()) -> #0() 585.29/149.32 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.32 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.32 , #mult(#0(), #0()) -> #0() 585.29/149.32 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.32 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.32 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.32 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.33 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.33 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.33 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.33 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.33 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.33 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.33 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.33 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.33 , #div(#0(), #neg(@y)) -> #0() 585.29/149.33 , #div(#0(), #pos(@y)) -> #0() 585.29/149.33 , #div(#0(), #0()) -> #divByZero() 585.29/149.33 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.33 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.33 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.33 , #abs(#0()) -> #0() 585.29/149.33 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.33 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.33 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.33 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.33 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.33 StartTerms: basic terms 585.29/149.33 Strategy: innermost 585.29/149.33 585.29/149.33 This problem was proven YES(O(1),O(n^2)). 585.29/149.33 585.29/149.33 S) Strict DPs: 585.29/149.33 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.33 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.33 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.33 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.33 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.33 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.33 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.33 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.33 Weak DPs: 585.29/149.33 { mult#2^#(@zs, @b2, @x) -> 585.29/149.33 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.33 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.33 , mult3^#(@b1, @b2, @b3) -> 585.29/149.33 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.33 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.33 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.33 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.33 mult^#(@xs, @b2)) 585.29/149.33 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.33 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.33 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.33 c_18(add'^#(@xs, @ys, @r')) 585.29/149.33 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.33 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.33 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.33 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.33 Weak Trs: 585.29/149.33 { #natsub(@x, #0()) -> @x 585.29/149.33 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.33 , -(@x, @y) -> #sub(@x, @y) 585.29/149.33 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.33 , diff#1(#false()) -> #abs(#0()) 585.29/149.33 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.33 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.33 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.33 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.33 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.33 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.33 , #add(#0(), @y) -> @y 585.29/149.33 , mult#2(@zs, @b2, @x) -> 585.29/149.33 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.33 , div(@x, @y) -> #div(@x, @y) 585.29/149.33 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.33 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.33 , #and(#true(), #true()) -> #true() 585.29/149.33 , #and(#true(), #false()) -> #false() 585.29/149.33 , #and(#false(), #true()) -> #false() 585.29/149.33 , #and(#false(), #false()) -> #false() 585.29/149.33 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.33 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.33 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.33 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.33 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.33 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.33 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.33 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.33 , #compare(#0(), #0()) -> #EQ() 585.29/149.33 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.33 , #compare(#s(@x), #0()) -> #GT() 585.29/149.33 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.33 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.33 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.33 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.33 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.33 , +(@x, @y) -> #add(@x, @y) 585.29/149.33 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.33 , sum#4(#false()) -> 585.29/149.33 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.33 , *(@x, @y) -> #mult(@x, @y) 585.29/149.33 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.33 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.33 , #eq(nil(), nil()) -> #true() 585.29/149.33 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.33 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.33 , #eq(#neg(@x), #0()) -> #false() 585.29/149.33 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.33 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.33 , #eq(#pos(@x), #0()) -> #false() 585.29/149.33 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.33 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.33 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.33 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.33 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.33 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.33 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.33 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.33 , #eq(#0(), #0()) -> #true() 585.29/149.33 , #eq(#0(), #s(@y)) -> #false() 585.29/149.33 , #eq(#s(@x), #0()) -> #false() 585.29/149.33 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.33 , #natmult(#0(), @y) -> #0() 585.29/149.33 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.33 , #cklt(#EQ()) -> #false() 585.29/149.33 , #cklt(#LT()) -> #true() 585.29/149.33 , #cklt(#GT()) -> #false() 585.29/149.33 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.33 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.33 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.33 , #sub(@x, #0()) -> @x 585.29/149.33 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.33 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.33 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.33 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.33 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.33 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.33 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.33 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.33 , diff(@x, @y, @r) -> 585.29/149.33 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.33 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.33 , mult#1(nil(), @b2) -> nil() 585.29/149.33 , mult#1(::(@x, @xs), @b2) -> 585.29/149.33 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.33 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.33 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.33 , #mult(#neg(@x), #0()) -> #0() 585.29/149.33 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.33 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.33 , #mult(#pos(@x), #0()) -> #0() 585.29/149.33 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.33 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.33 , #mult(#0(), #0()) -> #0() 585.29/149.33 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.33 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.33 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.33 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.33 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.33 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.33 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.33 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.33 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.33 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.33 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.33 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.33 , #div(#0(), #neg(@y)) -> #0() 585.29/149.33 , #div(#0(), #pos(@y)) -> #0() 585.29/149.33 , #div(#0(), #0()) -> #divByZero() 585.29/149.33 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.33 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.33 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.33 , #abs(#0()) -> #0() 585.29/149.33 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.33 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.33 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.33 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.33 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.33 StartTerms: basic terms 585.29/149.33 Strategy: innermost 585.29/149.33 585.29/149.33 This problem was proven YES(O(1),O(n^1)). 585.29/149.33 585.29/149.33 585.29/149.33 Proofs for generated problems: 585.29/149.33 ------------------------------ 585.29/149.33 R) We are left with following problem, upon which TcT provides the 585.29/149.33 certificate YES(O(1),O(n^2)). 585.29/149.33 585.29/149.33 Strict DPs: 585.29/149.33 { mult#2^#(@zs, @b2, @x) -> 585.29/149.33 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.33 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.33 , mult3^#(@b1, @b2, @b3) -> 585.29/149.33 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.33 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.33 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.33 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.33 mult^#(@xs, @b2)) 585.29/149.33 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.33 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.33 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.33 c_18(add'^#(@xs, @ys, @r')) 585.29/149.33 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.33 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.33 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.33 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.33 Weak DPs: 585.29/149.33 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.33 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.33 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.33 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.33 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.33 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.33 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.33 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.33 Weak Trs: 585.29/149.33 { #natsub(@x, #0()) -> @x 585.29/149.33 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.33 , -(@x, @y) -> #sub(@x, @y) 585.29/149.33 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.33 , diff#1(#false()) -> #abs(#0()) 585.29/149.33 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.33 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.33 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.33 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.33 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.33 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.33 , #add(#0(), @y) -> @y 585.29/149.33 , mult#2(@zs, @b2, @x) -> 585.29/149.33 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.33 , div(@x, @y) -> #div(@x, @y) 585.29/149.33 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.33 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.33 , #and(#true(), #true()) -> #true() 585.29/149.33 , #and(#true(), #false()) -> #false() 585.29/149.33 , #and(#false(), #true()) -> #false() 585.29/149.33 , #and(#false(), #false()) -> #false() 585.29/149.33 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.33 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.33 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.33 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.33 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.33 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.33 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.33 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.33 , #compare(#0(), #0()) -> #EQ() 585.29/149.33 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.33 , #compare(#s(@x), #0()) -> #GT() 585.29/149.33 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.33 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.33 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.33 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.33 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.33 , +(@x, @y) -> #add(@x, @y) 585.29/149.33 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.33 , sum#4(#false()) -> 585.29/149.33 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.33 , *(@x, @y) -> #mult(@x, @y) 585.29/149.33 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.33 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.33 , #eq(nil(), nil()) -> #true() 585.29/149.33 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.33 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.33 , #eq(#neg(@x), #0()) -> #false() 585.29/149.33 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.33 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.33 , #eq(#pos(@x), #0()) -> #false() 585.29/149.33 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.33 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.33 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.33 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.33 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.33 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.33 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.33 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.33 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.33 , #eq(#0(), #0()) -> #true() 585.29/149.33 , #eq(#0(), #s(@y)) -> #false() 585.29/149.33 , #eq(#s(@x), #0()) -> #false() 585.29/149.33 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.33 , #natmult(#0(), @y) -> #0() 585.29/149.33 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.33 , #cklt(#EQ()) -> #false() 585.29/149.33 , #cklt(#LT()) -> #true() 585.29/149.33 , #cklt(#GT()) -> #false() 585.29/149.33 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.33 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.33 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.33 , #sub(@x, #0()) -> @x 585.29/149.33 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.33 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.33 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.33 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.33 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.33 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.33 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.33 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.33 , diff(@x, @y, @r) -> 585.29/149.33 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.33 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.33 , mult#1(nil(), @b2) -> nil() 585.29/149.33 , mult#1(::(@x, @xs), @b2) -> 585.29/149.33 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.33 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.33 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.33 , #mult(#neg(@x), #0()) -> #0() 585.29/149.33 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.33 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.33 , #mult(#pos(@x), #0()) -> #0() 585.29/149.33 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.33 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.33 , #mult(#0(), #0()) -> #0() 585.29/149.33 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.33 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.33 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.33 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.33 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.33 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.33 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.33 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.33 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.33 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.33 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.33 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.33 , #div(#0(), #neg(@y)) -> #0() 585.29/149.33 , #div(#0(), #pos(@y)) -> #0() 585.29/149.33 , #div(#0(), #0()) -> #divByZero() 585.29/149.33 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.33 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.33 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.33 , #abs(#0()) -> #0() 585.29/149.33 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.33 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.33 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.33 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.33 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.33 Obligation: 585.29/149.33 innermost runtime complexity 585.29/149.33 Answer: 585.29/149.33 YES(O(1),O(n^2)) 585.29/149.33 585.29/149.33 The following weak DPs constitute a sub-graph of the DG that is 585.29/149.33 closed under successors. The DPs are removed. 585.29/149.33 585.29/149.33 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.33 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.33 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.33 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.33 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.33 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.33 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.33 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.33 585.29/149.33 We are left with following problem, upon which TcT provides the 585.29/149.33 certificate YES(O(1),O(n^2)). 585.29/149.33 585.29/149.33 Strict DPs: 585.29/149.33 { mult#2^#(@zs, @b2, @x) -> 585.29/149.33 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.33 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.33 , mult3^#(@b1, @b2, @b3) -> 585.29/149.33 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.33 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.34 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.34 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.34 mult^#(@xs, @b2)) 585.29/149.34 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.34 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.34 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.34 c_18(add'^#(@xs, @ys, @r')) 585.29/149.34 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.34 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.34 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.34 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.34 Weak Trs: 585.29/149.34 { #natsub(@x, #0()) -> @x 585.29/149.34 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.34 , -(@x, @y) -> #sub(@x, @y) 585.29/149.34 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.34 , diff#1(#false()) -> #abs(#0()) 585.29/149.34 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.34 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.34 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.34 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.34 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.34 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.34 , #add(#0(), @y) -> @y 585.29/149.34 , mult#2(@zs, @b2, @x) -> 585.29/149.34 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.34 , div(@x, @y) -> #div(@x, @y) 585.29/149.34 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.34 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.34 , #and(#true(), #true()) -> #true() 585.29/149.34 , #and(#true(), #false()) -> #false() 585.29/149.34 , #and(#false(), #true()) -> #false() 585.29/149.34 , #and(#false(), #false()) -> #false() 585.29/149.34 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.34 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.34 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.34 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.34 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.34 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.34 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.34 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.34 , #compare(#0(), #0()) -> #EQ() 585.29/149.34 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.34 , #compare(#s(@x), #0()) -> #GT() 585.29/149.34 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.34 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.34 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.34 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.34 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.34 , +(@x, @y) -> #add(@x, @y) 585.29/149.34 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.34 , sum#4(#false()) -> 585.29/149.34 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.34 , *(@x, @y) -> #mult(@x, @y) 585.29/149.34 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.34 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.34 , #eq(nil(), nil()) -> #true() 585.29/149.34 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.34 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.34 , #eq(#neg(@x), #0()) -> #false() 585.29/149.34 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.34 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.34 , #eq(#pos(@x), #0()) -> #false() 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.34 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.34 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.34 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.34 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.34 , #eq(#0(), #0()) -> #true() 585.29/149.34 , #eq(#0(), #s(@y)) -> #false() 585.29/149.34 , #eq(#s(@x), #0()) -> #false() 585.29/149.34 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.34 , #natmult(#0(), @y) -> #0() 585.29/149.34 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.34 , #cklt(#EQ()) -> #false() 585.29/149.34 , #cklt(#LT()) -> #true() 585.29/149.34 , #cklt(#GT()) -> #false() 585.29/149.34 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.34 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.34 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.34 , #sub(@x, #0()) -> @x 585.29/149.34 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.34 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.34 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.34 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.34 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.34 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.34 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.34 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.34 , diff(@x, @y, @r) -> 585.29/149.34 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.34 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.34 , mult#1(nil(), @b2) -> nil() 585.29/149.34 , mult#1(::(@x, @xs), @b2) -> 585.29/149.34 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.34 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.34 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.34 , #mult(#neg(@x), #0()) -> #0() 585.29/149.34 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.34 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.34 , #mult(#pos(@x), #0()) -> #0() 585.29/149.34 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.34 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.34 , #mult(#0(), #0()) -> #0() 585.29/149.34 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.34 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.34 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.34 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.34 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.34 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.34 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.34 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.34 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.34 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.34 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.34 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.34 , #div(#0(), #neg(@y)) -> #0() 585.29/149.34 , #div(#0(), #pos(@y)) -> #0() 585.29/149.34 , #div(#0(), #0()) -> #divByZero() 585.29/149.34 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.34 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.34 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.34 , #abs(#0()) -> #0() 585.29/149.34 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.34 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.34 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.34 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.34 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.34 Obligation: 585.29/149.34 innermost runtime complexity 585.29/149.34 Answer: 585.29/149.34 YES(O(1),O(n^2)) 585.29/149.34 585.29/149.34 We replace rewrite rules by usable rules: 585.29/149.34 585.29/149.34 Weak Usable Rules: 585.29/149.34 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.34 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.34 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.34 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.34 , #add(#0(), @y) -> @y 585.29/149.34 , mult#2(@zs, @b2, @x) -> 585.29/149.34 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.34 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.34 , #and(#true(), #true()) -> #true() 585.29/149.34 , #and(#true(), #false()) -> #false() 585.29/149.34 , #and(#false(), #true()) -> #false() 585.29/149.34 , #and(#false(), #false()) -> #false() 585.29/149.34 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.34 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.34 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.34 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.34 , +(@x, @y) -> #add(@x, @y) 585.29/149.34 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.34 , sum#4(#false()) -> 585.29/149.34 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.34 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.34 , #eq(nil(), nil()) -> #true() 585.29/149.34 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.34 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.34 , #eq(#neg(@x), #0()) -> #false() 585.29/149.34 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.34 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.34 , #eq(#pos(@x), #0()) -> #false() 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.34 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.34 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.34 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.34 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.34 , #eq(#0(), #0()) -> #true() 585.29/149.34 , #eq(#0(), #s(@y)) -> #false() 585.29/149.34 , #eq(#s(@x), #0()) -> #false() 585.29/149.34 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.34 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.34 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.34 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.34 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.34 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.34 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.34 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.34 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.34 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.34 , mult#1(nil(), @b2) -> nil() 585.29/149.34 , mult#1(::(@x, @xs), @b2) -> 585.29/149.34 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.34 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.34 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.34 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.34 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.34 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.34 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.34 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.34 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.34 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.34 , #abs(#0()) -> #0() 585.29/149.34 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.34 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.34 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.34 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.34 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.34 585.29/149.34 We are left with following problem, upon which TcT provides the 585.29/149.34 certificate YES(O(1),O(n^2)). 585.29/149.34 585.29/149.34 Strict DPs: 585.29/149.34 { mult#2^#(@zs, @b2, @x) -> 585.29/149.34 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.34 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.34 , mult3^#(@b1, @b2, @b3) -> 585.29/149.34 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.34 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.34 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.34 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.34 mult^#(@xs, @b2)) 585.29/149.34 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.34 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.34 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.34 c_18(add'^#(@xs, @ys, @r')) 585.29/149.34 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.34 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.34 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.34 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.34 Weak Trs: 585.29/149.34 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.34 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.34 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.34 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.34 , #add(#0(), @y) -> @y 585.29/149.34 , mult#2(@zs, @b2, @x) -> 585.29/149.34 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.34 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.34 , #and(#true(), #true()) -> #true() 585.29/149.34 , #and(#true(), #false()) -> #false() 585.29/149.34 , #and(#false(), #true()) -> #false() 585.29/149.34 , #and(#false(), #false()) -> #false() 585.29/149.34 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.34 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.34 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.34 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.34 , +(@x, @y) -> #add(@x, @y) 585.29/149.34 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.34 , sum#4(#false()) -> 585.29/149.34 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.34 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.34 , #eq(nil(), nil()) -> #true() 585.29/149.34 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.34 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.34 , #eq(#neg(@x), #0()) -> #false() 585.29/149.34 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.34 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.34 , #eq(#pos(@x), #0()) -> #false() 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.34 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.34 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.34 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.34 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.34 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.34 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.34 , #eq(#0(), #0()) -> #true() 585.29/149.34 , #eq(#0(), #s(@y)) -> #false() 585.29/149.34 , #eq(#s(@x), #0()) -> #false() 585.29/149.34 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.34 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.34 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.34 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.34 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.34 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.34 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.34 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.34 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.34 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.34 , mult#1(nil(), @b2) -> nil() 585.29/149.34 , mult#1(::(@x, @xs), @b2) -> 585.29/149.34 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.34 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.34 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.34 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.34 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.34 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.34 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.34 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.34 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.34 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.34 , #abs(#0()) -> #0() 585.29/149.34 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.34 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.34 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.34 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.34 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.34 Obligation: 585.29/149.34 innermost runtime complexity 585.29/149.34 Answer: 585.29/149.34 YES(O(1),O(n^2)) 585.29/149.34 585.29/149.34 We decompose the input problem according to the dependency graph 585.29/149.34 into the upper component 585.29/149.34 585.29/149.34 { mult3^#(@b1, @b2, @b3) -> 585.29/149.34 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.34 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.34 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.34 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.34 mult^#(@xs, @b2)) } 585.29/149.34 585.29/149.34 and lower component 585.29/149.34 585.29/149.34 { mult#2^#(@zs, @b2, @x) -> 585.29/149.34 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.34 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.34 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.34 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.34 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.34 c_18(add'^#(@xs, @ys, @r')) 585.29/149.34 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.34 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.34 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.34 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.34 585.29/149.34 Further, following extension rules are added to the lower 585.29/149.34 component. 585.29/149.34 585.29/149.34 { mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.34 , mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.34 , mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.34 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.34 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.35 , mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) } 585.29/149.35 585.29/149.35 TcT solves the upper component with certificate YES(O(1),O(n^1)). 585.29/149.35 585.29/149.35 Sub-proof: 585.29/149.35 ---------- 585.29/149.35 We are left with following problem, upon which TcT provides the 585.29/149.35 certificate YES(O(1),O(n^1)). 585.29/149.35 585.29/149.35 Strict DPs: 585.29/149.35 { mult3^#(@b1, @b2, @b3) -> 585.29/149.35 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.35 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.35 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.35 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.35 mult^#(@xs, @b2)) } 585.29/149.35 Weak Trs: 585.29/149.35 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.35 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.35 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.35 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.35 , #add(#0(), @y) -> @y 585.29/149.35 , mult#2(@zs, @b2, @x) -> 585.29/149.35 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.35 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.35 , #and(#true(), #true()) -> #true() 585.29/149.35 , #and(#true(), #false()) -> #false() 585.29/149.35 , #and(#false(), #true()) -> #false() 585.29/149.35 , #and(#false(), #false()) -> #false() 585.29/149.35 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.35 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.35 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.35 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.35 , +(@x, @y) -> #add(@x, @y) 585.29/149.35 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.35 , sum#4(#false()) -> 585.29/149.35 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.35 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.35 , #eq(nil(), nil()) -> #true() 585.29/149.35 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.35 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.35 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.35 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.35 , #eq(#neg(@x), #0()) -> #false() 585.29/149.35 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.35 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.35 , #eq(#pos(@x), #0()) -> #false() 585.29/149.35 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.35 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.35 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.35 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.35 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.35 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.35 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.35 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.35 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.35 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.35 , #eq(#0(), #0()) -> #true() 585.29/149.35 , #eq(#0(), #s(@y)) -> #false() 585.29/149.35 , #eq(#s(@x), #0()) -> #false() 585.29/149.35 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.35 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.35 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.35 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.35 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.35 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.35 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.35 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.35 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.35 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.35 , mult#1(nil(), @b2) -> nil() 585.29/149.35 , mult#1(::(@x, @xs), @b2) -> 585.29/149.35 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.35 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.35 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.35 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.35 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.35 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.35 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.35 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.35 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.35 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.35 , #abs(#0()) -> #0() 585.29/149.35 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.35 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.35 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.35 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.35 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.35 Obligation: 585.29/149.35 innermost runtime complexity 585.29/149.35 Answer: 585.29/149.35 YES(O(1),O(n^1)) 585.29/149.35 585.29/149.35 We use the processor 'matrix interpretation of dimension 1' to 585.29/149.35 orient following rules strictly. 585.29/149.35 585.29/149.35 DPs: 585.29/149.35 { 3: mult#1^#(::(@x, @xs), @b2) -> 585.29/149.35 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.35 mult^#(@xs, @b2)) } 585.29/149.35 585.29/149.35 Sub-proof: 585.29/149.35 ---------- 585.29/149.35 The following argument positions are usable: 585.29/149.35 Uargs(c_7) = {1, 2}, Uargs(c_8) = {1}, Uargs(c_11) = {1, 2} 585.29/149.35 585.29/149.35 TcT has computed the following constructor-based matrix 585.29/149.35 interpretation satisfying not(EDA). 585.29/149.35 585.29/149.35 [#add](x1, x2) = [4] x2 + [0] 585.29/149.35 585.29/149.35 [mult#2](x1, x2, x3) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [sum](x1, x2, x3) = [0] 585.29/149.35 585.29/149.35 [#and](x1, x2) = [0] 585.29/149.35 585.29/149.35 [nil] = [0] 585.29/149.35 585.29/149.35 [mult](x1, x2) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [sum#2](x1, x2) = [0] 585.29/149.35 585.29/149.35 [sum#1](x1) = [0] 585.29/149.35 585.29/149.35 [+](x1, x2) = [0] 585.29/149.35 585.29/149.35 [sum#4](x1) = [0] 585.29/149.35 585.29/149.35 [#neg](x1) = [0] 585.29/149.35 585.29/149.35 [#equal](x1, x2) = [0] 585.29/149.35 585.29/149.35 [#eq](x1, x2) = [0] 585.29/149.35 585.29/149.35 [#true] = [0] 585.29/149.35 585.29/149.35 [add](x1, x2) = [1] x2 + [0] 585.29/149.35 585.29/149.35 [#pos](x1) = [0] 585.29/149.35 585.29/149.35 [add'#3](x1, x2, x3) = [1] x3 + [2] 585.29/149.35 585.29/149.35 [mult#3](x1, x2, x3) = [1] x3 + [0] 585.29/149.35 585.29/149.35 [add'#1](x1, x2, x3) = [1] x2 + [0] 585.29/149.35 585.29/149.35 [add'#2](x1, x2, x3, x4) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [tuple#2](x1, x2) = [0] 585.29/149.35 585.29/149.35 [#false] = [0] 585.29/149.35 585.29/149.35 [mult#1](x1, x2) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [::](x1, x2) = [1] x2 + [2] 585.29/149.35 585.29/149.35 [#succ](x1) = [0] 585.29/149.35 585.29/149.35 [#0] = [0] 585.29/149.35 585.29/149.35 [sum#3](x1, x2) = [0] 585.29/149.35 585.29/149.35 [add'](x1, x2, x3) = [1] x2 + [0] 585.29/149.35 585.29/149.35 [#abs](x1) = [0] 585.29/149.35 585.29/149.35 [#pred](x1) = [0] 585.29/149.35 585.29/149.35 [#s](x1) = [0] 585.29/149.35 585.29/149.35 [mult#2^#](x1, x2, x3) = [1] 585.29/149.35 585.29/149.35 [mult3^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [7] 585.29/149.35 585.29/149.35 [mult^#](x1, x2) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [mult#1^#](x1, x2) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [c_7](x1, x2) = [4] x1 + [2] x2 + [7] 585.29/149.35 585.29/149.35 [c_8](x1) = [1] x1 + [0] 585.29/149.35 585.29/149.35 [c_11](x1, x2) = [1] x1 + [1] x2 + [0] 585.29/149.35 585.29/149.35 The order satisfies the following ordering constraints: 585.29/149.35 585.29/149.35 [#add(#neg(#s(#0())), @y)] = [4] @y + [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pred(@y)] 585.29/149.35 585.29/149.35 [#add(#neg(#s(#s(@x))), @y)] = [4] @y + [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pred(#add(#pos(#s(@x)), @y))] 585.29/149.35 585.29/149.35 [#add(#pos(#s(#0())), @y)] = [4] @y + [0] 585.29/149.35 >= [0] 585.29/149.35 = [#succ(@y)] 585.29/149.35 585.29/149.35 [#add(#pos(#s(#s(@x))), @y)] = [4] @y + [0] 585.29/149.35 >= [0] 585.29/149.35 = [#succ(#add(#pos(#s(@x)), @y))] 585.29/149.35 585.29/149.35 [#add(#0(), @y)] = [4] @y + [0] 585.29/149.35 >= [1] @y + [0] 585.29/149.35 = [@y] 585.29/149.35 585.29/149.35 [mult#2(@zs, @b2, @x)] = [1] @zs + [0] 585.29/149.35 >= [1] @zs + [0] 585.29/149.35 = [mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)] 585.29/149.35 585.29/149.35 [sum(@x, @y, @r)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [sum#1(+(+(@x, @y), @r))] 585.29/149.35 585.29/149.35 [#and(#true(), #true())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#true()] 585.29/149.35 585.29/149.35 [#and(#true(), #false())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#and(#false(), #true())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#and(#false(), #false())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [mult(@b1, @b2)] = [1] @b1 + [0] 585.29/149.35 >= [1] @b1 + [0] 585.29/149.35 = [mult#1(@b1, @b2)] 585.29/149.35 585.29/149.35 [sum#2(#true(), @s)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [tuple#2(#abs(#0()), #abs(#0()))] 585.29/149.35 585.29/149.35 [sum#2(#false(), @s)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [sum#3(#equal(@s, #pos(#s(#0()))), @s)] 585.29/149.35 585.29/149.35 [sum#1(@s)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [sum#2(#equal(@s, #0()), @s)] 585.29/149.35 585.29/149.35 [+(@x, @y)] = [0] 585.29/149.35 ? [4] @y + [0] 585.29/149.35 = [#add(@x, @y)] 585.29/149.35 585.29/149.35 [sum#4(#true())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))] 585.29/149.35 585.29/149.35 [sum#4(#false())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))] 585.29/149.35 585.29/149.35 [#equal(@x, @y)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#eq(@x, @y)] 585.29/149.35 585.29/149.35 [#eq(nil(), nil())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#true()] 585.29/149.35 585.29/149.35 [#eq(nil(), tuple#2(@y_1, @y_2))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(nil(), ::(@y_1, @y_2))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#neg(@x), #neg(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#eq(@x, @y)] 585.29/149.35 585.29/149.35 [#eq(#neg(@x), #pos(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#neg(@x), #0())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#pos(@x), #neg(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#pos(@x), #pos(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#eq(@x, @y)] 585.29/149.35 585.29/149.35 [#eq(#pos(@x), #0())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(tuple#2(@x_1, @x_2), nil())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 585.29/149.35 585.29/149.35 [#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(::(@x_1, @x_2), nil())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 585.29/149.35 585.29/149.35 [#eq(#0(), #neg(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#0(), #pos(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#0(), #0())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#true()] 585.29/149.35 585.29/149.35 [#eq(#0(), #s(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#s(@x), #0())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#false()] 585.29/149.35 585.29/149.35 [#eq(#s(@x), #s(@y))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#eq(@x, @y)] 585.29/149.35 585.29/149.35 [add(@b1, @b2)] = [1] @b2 + [0] 585.29/149.35 >= [1] @b2 + [0] 585.29/149.35 = [add'(@b1, @b2, #abs(#0()))] 585.29/149.35 585.29/149.35 [add'#3(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [2] 585.29/149.35 >= [1] @ys + [2] 585.29/149.35 = [::(@z, add'(@xs, @ys, @r'))] 585.29/149.35 585.29/149.35 [mult#3(#true(), @b2, @zs)] = [1] @zs + [0] 585.29/149.35 >= [1] @zs + [0] 585.29/149.35 = [add(@b2, @zs)] 585.29/149.35 585.29/149.35 [mult#3(#false(), @b2, @zs)] = [1] @zs + [0] 585.29/149.35 >= [1] @zs + [0] 585.29/149.35 = [@zs] 585.29/149.35 585.29/149.35 [add'#1(nil(), @b2, @r)] = [1] @b2 + [0] 585.29/149.35 >= [0] 585.29/149.35 = [nil()] 585.29/149.35 585.29/149.35 [add'#1(::(@x, @xs), @b2, @r)] = [1] @b2 + [0] 585.29/149.35 >= [1] @b2 + [0] 585.29/149.35 = [add'#2(@b2, @r, @x, @xs)] 585.29/149.35 585.29/149.35 [add'#2(nil(), @r, @x, @xs)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [nil()] 585.29/149.35 585.29/149.35 [add'#2(::(@y, @ys), @r, @x, @xs)] = [1] @ys + [2] 585.29/149.35 >= [1] @ys + [2] 585.29/149.35 = [add'#3(sum(@x, @y, @r), @xs, @ys)] 585.29/149.35 585.29/149.35 [mult#1(nil(), @b2)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [nil()] 585.29/149.35 585.29/149.35 [mult#1(::(@x, @xs), @b2)] = [1] @xs + [2] 585.29/149.35 >= [1] @xs + [2] 585.29/149.35 = [mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)] 585.29/149.35 585.29/149.35 [#succ(#neg(#s(#0())))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#0()] 585.29/149.35 585.29/149.35 [#succ(#neg(#s(#s(@x))))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#neg(#s(@x))] 585.29/149.35 585.29/149.35 [#succ(#pos(#s(@x)))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pos(#s(#s(@x)))] 585.29/149.35 585.29/149.35 [#succ(#0())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pos(#s(#0()))] 585.29/149.35 585.29/149.35 [sum#3(#true(), @s)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))] 585.29/149.35 585.29/149.35 [sum#3(#false(), @s)] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [sum#4(#equal(@s, #pos(#s(#s(#0())))))] 585.29/149.35 585.29/149.35 [add'(@b1, @b2, @r)] = [1] @b2 + [0] 585.29/149.35 >= [1] @b2 + [0] 585.29/149.35 = [add'#1(@b1, @b2, @r)] 585.29/149.35 585.29/149.35 [#abs(#neg(@x))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pos(@x)] 585.29/149.35 585.29/149.35 [#abs(#pos(@x))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pos(@x)] 585.29/149.35 585.29/149.35 [#abs(#0())] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#0()] 585.29/149.35 585.29/149.35 [#abs(#s(@x))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#pos(#s(@x))] 585.29/149.35 585.29/149.35 [#pred(#neg(#s(@x)))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#neg(#s(#s(@x)))] 585.29/149.35 585.29/149.35 [#pred(#pos(#s(#0())))] = [0] 585.29/149.35 >= [0] 585.29/149.35 = [#0()] 585.29/149.35 585.29/149.36 [#pred(#pos(#s(#s(@x))))] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [#pos(#s(@x))] 585.29/149.36 585.29/149.36 [#pred(#0())] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [#neg(#s(#0()))] 585.29/149.36 585.29/149.36 [mult3^#(@b1, @b2, @b3)] = [7] @b1 + [7] @b2 + [7] @b3 + [7] 585.29/149.36 >= [6] @b1 + [7] 585.29/149.36 = [c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))] 585.29/149.36 585.29/149.36 [mult^#(@b1, @b2)] = [1] @b1 + [0] 585.29/149.36 >= [1] @b1 + [0] 585.29/149.36 = [c_8(mult#1^#(@b1, @b2))] 585.29/149.36 585.29/149.36 [mult#1^#(::(@x, @xs), @b2)] = [1] @xs + [2] 585.29/149.36 > [1] @xs + [1] 585.29/149.36 = [c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.36 mult^#(@xs, @b2))] 585.29/149.36 585.29/149.36 585.29/149.36 We return to the main proof. Consider the set of all dependency 585.29/149.36 pairs 585.29/149.36 585.29/149.36 : 585.29/149.36 { 1: mult3^#(@b1, @b2, @b3) -> 585.29/149.36 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.36 , 2: mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.36 , 3: mult#1^#(::(@x, @xs), @b2) -> 585.29/149.36 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.36 mult^#(@xs, @b2)) } 585.29/149.36 585.29/149.36 Processor 'matrix interpretation of dimension 1' induces the 585.29/149.36 complexity certificate YES(?,O(n^1)) on application of dependency 585.29/149.36 pairs {3}. These cover all (indirect) predecessors of dependency 585.29/149.36 pairs {1,2,3}, their number of application is equally bounded. The 585.29/149.36 dependency pairs are shifted into the weak component. 585.29/149.36 585.29/149.36 We are left with following problem, upon which TcT provides the 585.29/149.36 certificate YES(O(1),O(1)). 585.29/149.36 585.29/149.36 Weak DPs: 585.29/149.36 { mult3^#(@b1, @b2, @b3) -> 585.29/149.36 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.36 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.36 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.36 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.36 mult^#(@xs, @b2)) } 585.29/149.36 Weak Trs: 585.29/149.36 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.36 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.36 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.36 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.36 , #add(#0(), @y) -> @y 585.29/149.36 , mult#2(@zs, @b2, @x) -> 585.29/149.36 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.36 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.36 , #and(#true(), #true()) -> #true() 585.29/149.36 , #and(#true(), #false()) -> #false() 585.29/149.36 , #and(#false(), #true()) -> #false() 585.29/149.36 , #and(#false(), #false()) -> #false() 585.29/149.36 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.36 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.36 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.36 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.36 , +(@x, @y) -> #add(@x, @y) 585.29/149.36 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.36 , sum#4(#false()) -> 585.29/149.36 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.36 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.36 , #eq(nil(), nil()) -> #true() 585.29/149.36 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.36 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.36 , #eq(#neg(@x), #0()) -> #false() 585.29/149.36 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.36 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.36 , #eq(#pos(@x), #0()) -> #false() 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.36 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.36 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.36 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.36 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.36 , #eq(#0(), #0()) -> #true() 585.29/149.36 , #eq(#0(), #s(@y)) -> #false() 585.29/149.36 , #eq(#s(@x), #0()) -> #false() 585.29/149.36 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.36 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.36 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.36 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.36 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.36 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.36 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.36 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.36 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.36 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.36 , mult#1(nil(), @b2) -> nil() 585.29/149.36 , mult#1(::(@x, @xs), @b2) -> 585.29/149.36 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.36 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.36 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.36 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.36 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.36 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.36 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.36 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.36 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.36 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.36 , #abs(#0()) -> #0() 585.29/149.36 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.36 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.36 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.36 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.36 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.36 Obligation: 585.29/149.36 innermost runtime complexity 585.29/149.36 Answer: 585.29/149.36 YES(O(1),O(1)) 585.29/149.36 585.29/149.36 The following weak DPs constitute a sub-graph of the DG that is 585.29/149.36 closed under successors. The DPs are removed. 585.29/149.36 585.29/149.36 { mult3^#(@b1, @b2, @b3) -> 585.29/149.36 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.36 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.36 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.36 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.36 mult^#(@xs, @b2)) } 585.29/149.36 585.29/149.36 We are left with following problem, upon which TcT provides the 585.29/149.36 certificate YES(O(1),O(1)). 585.29/149.36 585.29/149.36 Weak Trs: 585.29/149.36 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.36 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.36 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.36 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.36 , #add(#0(), @y) -> @y 585.29/149.36 , mult#2(@zs, @b2, @x) -> 585.29/149.36 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.36 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.36 , #and(#true(), #true()) -> #true() 585.29/149.36 , #and(#true(), #false()) -> #false() 585.29/149.36 , #and(#false(), #true()) -> #false() 585.29/149.36 , #and(#false(), #false()) -> #false() 585.29/149.36 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.36 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.36 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.36 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.36 , +(@x, @y) -> #add(@x, @y) 585.29/149.36 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.36 , sum#4(#false()) -> 585.29/149.36 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.36 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.36 , #eq(nil(), nil()) -> #true() 585.29/149.36 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.36 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.36 , #eq(#neg(@x), #0()) -> #false() 585.29/149.36 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.36 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.36 , #eq(#pos(@x), #0()) -> #false() 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.36 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.36 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.36 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.36 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.36 , #eq(#0(), #0()) -> #true() 585.29/149.36 , #eq(#0(), #s(@y)) -> #false() 585.29/149.36 , #eq(#s(@x), #0()) -> #false() 585.29/149.36 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.36 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.36 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.36 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.36 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.36 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.36 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.36 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.36 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.36 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.36 , mult#1(nil(), @b2) -> nil() 585.29/149.36 , mult#1(::(@x, @xs), @b2) -> 585.29/149.36 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.36 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.36 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.36 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.36 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.36 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.36 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.36 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.36 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.36 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.36 , #abs(#0()) -> #0() 585.29/149.36 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.36 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.36 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.36 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.36 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.36 Obligation: 585.29/149.36 innermost runtime complexity 585.29/149.36 Answer: 585.29/149.36 YES(O(1),O(1)) 585.29/149.36 585.29/149.36 No rule is usable, rules are removed from the input problem. 585.29/149.36 585.29/149.36 We are left with following problem, upon which TcT provides the 585.29/149.36 certificate YES(O(1),O(1)). 585.29/149.36 585.29/149.36 Rules: Empty 585.29/149.36 Obligation: 585.29/149.36 innermost runtime complexity 585.29/149.36 Answer: 585.29/149.36 YES(O(1),O(1)) 585.29/149.36 585.29/149.36 Empty rules are trivially bounded 585.29/149.36 585.29/149.36 We return to the main proof. 585.29/149.36 585.29/149.36 We are left with following problem, upon which TcT provides the 585.29/149.36 certificate YES(O(1),O(n^1)). 585.29/149.36 585.29/149.36 Strict DPs: 585.29/149.36 { mult#2^#(@zs, @b2, @x) -> 585.29/149.36 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.36 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.36 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.36 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.36 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.36 c_18(add'^#(@xs, @ys, @r')) 585.29/149.36 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.36 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.36 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.36 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.36 Weak DPs: 585.29/149.36 { mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.36 , mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.36 , mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.36 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.36 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.36 , mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) } 585.29/149.36 Weak Trs: 585.29/149.36 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.36 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.36 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.36 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.36 , #add(#0(), @y) -> @y 585.29/149.36 , mult#2(@zs, @b2, @x) -> 585.29/149.36 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.36 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.36 , #and(#true(), #true()) -> #true() 585.29/149.36 , #and(#true(), #false()) -> #false() 585.29/149.36 , #and(#false(), #true()) -> #false() 585.29/149.36 , #and(#false(), #false()) -> #false() 585.29/149.36 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.36 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.36 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.36 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.36 , +(@x, @y) -> #add(@x, @y) 585.29/149.36 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.36 , sum#4(#false()) -> 585.29/149.36 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.36 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.36 , #eq(nil(), nil()) -> #true() 585.29/149.36 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.36 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.36 , #eq(#neg(@x), #0()) -> #false() 585.29/149.36 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.36 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.36 , #eq(#pos(@x), #0()) -> #false() 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.36 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.36 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.36 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.36 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.36 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.36 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.36 , #eq(#0(), #0()) -> #true() 585.29/149.36 , #eq(#0(), #s(@y)) -> #false() 585.29/149.36 , #eq(#s(@x), #0()) -> #false() 585.29/149.36 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.36 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.36 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.36 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.36 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.36 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.36 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.36 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.36 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.36 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.36 , mult#1(nil(), @b2) -> nil() 585.29/149.36 , mult#1(::(@x, @xs), @b2) -> 585.29/149.36 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.36 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.36 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.36 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.36 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.36 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.36 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.36 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.36 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.36 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.36 , #abs(#0()) -> #0() 585.29/149.36 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.36 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.36 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.36 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.36 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.36 Obligation: 585.29/149.36 innermost runtime complexity 585.29/149.36 Answer: 585.29/149.36 YES(O(1),O(n^1)) 585.29/149.36 585.29/149.36 We use the processor 'matrix interpretation of dimension 1' to 585.29/149.36 orient following rules strictly. 585.29/149.36 585.29/149.36 DPs: 585.29/149.36 { 6: add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.36 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.36 , 8: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.36 , 9: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) } 585.29/149.36 Trs: { add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) } 585.29/149.36 585.29/149.36 Sub-proof: 585.29/149.36 ---------- 585.29/149.36 The following argument positions are usable: 585.29/149.36 Uargs(c_3) = {1}, Uargs(c_4) = {1}, Uargs(c_16) = {1}, 585.29/149.36 Uargs(c_17) = {1}, Uargs(c_18) = {1}, Uargs(c_20) = {1}, 585.29/149.36 Uargs(c_21) = {1} 585.29/149.36 585.29/149.36 TcT has computed the following constructor-based matrix 585.29/149.36 interpretation satisfying not(EDA). 585.29/149.36 585.29/149.36 [#add](x1, x2) = [4] x2 + [0] 585.29/149.36 585.29/149.36 [mult#2](x1, x2, x3) = [7] x3 + [0] 585.29/149.36 585.29/149.36 [sum](x1, x2, x3) = [0] 585.29/149.36 585.29/149.36 [#and](x1, x2) = [0] 585.29/149.36 585.29/149.36 [nil] = [0] 585.29/149.36 585.29/149.36 [mult](x1, x2) = [0] 585.29/149.36 585.29/149.36 [sum#2](x1, x2) = [0] 585.29/149.36 585.29/149.36 [sum#1](x1) = [0] 585.29/149.36 585.29/149.36 [+](x1, x2) = [0] 585.29/149.36 585.29/149.36 [sum#4](x1) = [0] 585.29/149.36 585.29/149.36 [#neg](x1) = [0] 585.29/149.36 585.29/149.36 [#equal](x1, x2) = [0] 585.29/149.36 585.29/149.36 [#eq](x1, x2) = [0] 585.29/149.36 585.29/149.36 [#true] = [0] 585.29/149.36 585.29/149.36 [add](x1, x2) = [4] x1 + [4] x2 + [1] 585.29/149.36 585.29/149.36 [#pos](x1) = [0] 585.29/149.36 585.29/149.36 [add'#3](x1, x2, x3) = [4] x2 + [4] x3 + [0] 585.29/149.36 585.29/149.36 [mult#3](x1, x2, x3) = [4] x2 + [4] x3 + [0] 585.29/149.36 585.29/149.36 [add'#1](x1, x2, x3) = [4] x2 + [7] x3 + [0] 585.29/149.36 585.29/149.36 [add'#2](x1, x2, x3, x4) = [3] x2 + [7] x3 + [4] x4 + [0] 585.29/149.36 585.29/149.36 [tuple#2](x1, x2) = [0] 585.29/149.36 585.29/149.36 [#false] = [0] 585.29/149.36 585.29/149.36 [mult#1](x1, x2) = [4] x2 + [0] 585.29/149.36 585.29/149.36 [::](x1, x2) = [1] x2 + [3] 585.29/149.36 585.29/149.36 [#succ](x1) = [0] 585.29/149.36 585.29/149.36 [#0] = [0] 585.29/149.36 585.29/149.36 [sum#3](x1, x2) = [0] 585.29/149.36 585.29/149.36 [add'](x1, x2, x3) = [4] x1 + [4] x2 + [0] 585.29/149.36 585.29/149.36 [#abs](x1) = [0] 585.29/149.36 585.29/149.36 [#pred](x1) = [0] 585.29/149.36 585.29/149.36 [#s](x1) = [0] 585.29/149.36 585.29/149.36 [mult#2^#](x1, x2, x3) = [6] x2 + [0] 585.29/149.36 585.29/149.36 [mult#3^#](x1, x2, x3) = [3] x2 + [0] 585.29/149.36 585.29/149.36 [mult3^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [7] 585.29/149.36 585.29/149.36 [mult^#](x1, x2) = [6] x2 + [0] 585.29/149.36 585.29/149.36 [mult#1^#](x1, x2) = [6] x2 + [0] 585.29/149.36 585.29/149.36 [add^#](x1, x2) = [3] x1 + [0] 585.29/149.36 585.29/149.36 [add'^#](x1, x2, x3) = [3] x1 + [0] 585.29/149.36 585.29/149.36 [add'#3^#](x1, x2, x3) = [3] x2 + [0] 585.29/149.36 585.29/149.36 [add'#1^#](x1, x2, x3) = [3] x1 + [0] 585.29/149.36 585.29/149.36 [add'#2^#](x1, x2, x3, x4) = [3] x4 + [0] 585.29/149.36 585.29/149.36 [c_3](x1) = [2] x1 + [0] 585.29/149.36 585.29/149.36 [c_4](x1) = [1] x1 + [0] 585.29/149.36 585.29/149.36 [c_16](x1) = [1] x1 + [0] 585.29/149.36 585.29/149.36 [c_17](x1) = [1] x1 + [0] 585.29/149.36 585.29/149.36 [c_18](x1) = [1] x1 + [0] 585.29/149.36 585.29/149.36 [c_20](x1) = [1] x1 + [5] 585.29/149.36 585.29/149.36 [c_21](x1) = [1] x1 + [0] 585.29/149.36 585.29/149.36 The order satisfies the following ordering constraints: 585.29/149.36 585.29/149.36 [#add(#neg(#s(#0())), @y)] = [4] @y + [0] 585.29/149.36 >= [0] 585.29/149.36 = [#pred(@y)] 585.29/149.36 585.29/149.36 [#add(#neg(#s(#s(@x))), @y)] = [4] @y + [0] 585.29/149.36 >= [0] 585.29/149.36 = [#pred(#add(#pos(#s(@x)), @y))] 585.29/149.36 585.29/149.36 [#add(#pos(#s(#0())), @y)] = [4] @y + [0] 585.29/149.36 >= [0] 585.29/149.36 = [#succ(@y)] 585.29/149.36 585.29/149.36 [#add(#pos(#s(#s(@x))), @y)] = [4] @y + [0] 585.29/149.36 >= [0] 585.29/149.36 = [#succ(#add(#pos(#s(@x)), @y))] 585.29/149.36 585.29/149.36 [#add(#0(), @y)] = [4] @y + [0] 585.29/149.36 >= [1] @y + [0] 585.29/149.36 = [@y] 585.29/149.36 585.29/149.36 [mult#2(@zs, @b2, @x)] = [7] @x + [0] 585.29/149.36 ? [4] @b2 + [4] @zs + [0] 585.29/149.36 = [mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)] 585.29/149.36 585.29/149.36 [sum(@x, @y, @r)] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [sum#1(+(+(@x, @y), @r))] 585.29/149.36 585.29/149.36 [#and(#true(), #true())] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [#true()] 585.29/149.36 585.29/149.36 [#and(#true(), #false())] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [#false()] 585.29/149.36 585.29/149.36 [#and(#false(), #true())] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [#false()] 585.29/149.36 585.29/149.36 [#and(#false(), #false())] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [#false()] 585.29/149.36 585.29/149.36 [mult(@b1, @b2)] = [0] 585.29/149.36 ? [4] @b2 + [0] 585.29/149.36 = [mult#1(@b1, @b2)] 585.29/149.36 585.29/149.36 [sum#2(#true(), @s)] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [tuple#2(#abs(#0()), #abs(#0()))] 585.29/149.36 585.29/149.36 [sum#2(#false(), @s)] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [sum#3(#equal(@s, #pos(#s(#0()))), @s)] 585.29/149.36 585.29/149.36 [sum#1(@s)] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [sum#2(#equal(@s, #0()), @s)] 585.29/149.36 585.29/149.36 [+(@x, @y)] = [0] 585.29/149.36 ? [4] @y + [0] 585.29/149.36 = [#add(@x, @y)] 585.29/149.36 585.29/149.36 [sum#4(#true())] = [0] 585.29/149.36 >= [0] 585.29/149.36 = [tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))] 585.29/149.36 585.29/149.36 [sum#4(#false())] = [0] 585.29/149.36 >= [0] 585.29/149.37 = [tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))] 585.29/149.37 585.29/149.37 [#equal(@x, @y)] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#eq(@x, @y)] 585.29/149.37 585.29/149.37 [#eq(nil(), nil())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#true()] 585.29/149.37 585.29/149.37 [#eq(nil(), tuple#2(@y_1, @y_2))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(nil(), ::(@y_1, @y_2))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#neg(@x), #neg(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#eq(@x, @y)] 585.29/149.37 585.29/149.37 [#eq(#neg(@x), #pos(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#neg(@x), #0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#pos(@x), #neg(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#pos(@x), #pos(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#eq(@x, @y)] 585.29/149.37 585.29/149.37 [#eq(#pos(@x), #0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(tuple#2(@x_1, @x_2), nil())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 585.29/149.37 585.29/149.37 [#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(::(@x_1, @x_2), nil())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 585.29/149.37 585.29/149.37 [#eq(#0(), #neg(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#0(), #pos(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#0(), #0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#true()] 585.29/149.37 585.29/149.37 [#eq(#0(), #s(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#s(@x), #0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#false()] 585.29/149.37 585.29/149.37 [#eq(#s(@x), #s(@y))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#eq(@x, @y)] 585.29/149.37 585.29/149.37 [add(@b1, @b2)] = [4] @b1 + [4] @b2 + [1] 585.29/149.37 > [4] @b1 + [4] @b2 + [0] 585.29/149.37 = [add'(@b1, @b2, #abs(#0()))] 585.29/149.37 585.29/149.37 [add'#3(tuple#2(@z, @r'), @xs, @ys)] = [4] @xs + [4] @ys + [0] 585.29/149.37 ? [4] @xs + [4] @ys + [3] 585.29/149.37 = [::(@z, add'(@xs, @ys, @r'))] 585.29/149.37 585.29/149.37 [mult#3(#true(), @b2, @zs)] = [4] @b2 + [4] @zs + [0] 585.29/149.37 ? [4] @b2 + [4] @zs + [1] 585.29/149.37 = [add(@b2, @zs)] 585.29/149.37 585.29/149.37 [mult#3(#false(), @b2, @zs)] = [4] @b2 + [4] @zs + [0] 585.29/149.37 >= [1] @zs + [0] 585.29/149.37 = [@zs] 585.29/149.37 585.29/149.37 [add'#1(nil(), @b2, @r)] = [4] @b2 + [7] @r + [0] 585.29/149.37 >= [0] 585.29/149.37 = [nil()] 585.29/149.37 585.29/149.37 [add'#1(::(@x, @xs), @b2, @r)] = [4] @b2 + [7] @r + [0] 585.29/149.37 ? [7] @x + [3] @r + [4] @xs + [0] 585.29/149.37 = [add'#2(@b2, @r, @x, @xs)] 585.29/149.37 585.29/149.37 [add'#2(nil(), @r, @x, @xs)] = [7] @x + [3] @r + [4] @xs + [0] 585.29/149.37 >= [0] 585.29/149.37 = [nil()] 585.29/149.37 585.29/149.37 [add'#2(::(@y, @ys), @r, @x, @xs)] = [7] @x + [3] @r + [4] @xs + [0] 585.29/149.37 ? [4] @xs + [4] @ys + [0] 585.29/149.37 = [add'#3(sum(@x, @y, @r), @xs, @ys)] 585.29/149.37 585.29/149.37 [mult#1(nil(), @b2)] = [4] @b2 + [0] 585.29/149.37 >= [0] 585.29/149.37 = [nil()] 585.29/149.37 585.29/149.37 [mult#1(::(@x, @xs), @b2)] = [4] @b2 + [0] 585.29/149.37 ? [7] @x + [0] 585.29/149.37 = [mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)] 585.29/149.37 585.29/149.37 [#succ(#neg(#s(#0())))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#0()] 585.29/149.37 585.29/149.37 [#succ(#neg(#s(#s(@x))))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#neg(#s(@x))] 585.29/149.37 585.29/149.37 [#succ(#pos(#s(@x)))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pos(#s(#s(@x)))] 585.29/149.37 585.29/149.37 [#succ(#0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pos(#s(#0()))] 585.29/149.37 585.29/149.37 [sum#3(#true(), @s)] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))] 585.29/149.37 585.29/149.37 [sum#3(#false(), @s)] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [sum#4(#equal(@s, #pos(#s(#s(#0())))))] 585.29/149.37 585.29/149.37 [add'(@b1, @b2, @r)] = [4] @b1 + [4] @b2 + [0] 585.29/149.37 ? [4] @b2 + [7] @r + [0] 585.29/149.37 = [add'#1(@b1, @b2, @r)] 585.29/149.37 585.29/149.37 [#abs(#neg(@x))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pos(@x)] 585.29/149.37 585.29/149.37 [#abs(#pos(@x))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pos(@x)] 585.29/149.37 585.29/149.37 [#abs(#0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#0()] 585.29/149.37 585.29/149.37 [#abs(#s(@x))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pos(#s(@x))] 585.29/149.37 585.29/149.37 [#pred(#neg(#s(@x)))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#neg(#s(#s(@x)))] 585.29/149.37 585.29/149.37 [#pred(#pos(#s(#0())))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#0()] 585.29/149.37 585.29/149.37 [#pred(#pos(#s(#s(@x))))] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pos(#s(@x))] 585.29/149.37 585.29/149.37 [#pred(#0())] = [0] 585.29/149.37 >= [0] 585.29/149.37 = [#neg(#s(#0()))] 585.29/149.37 585.29/149.37 [mult#2^#(@zs, @b2, @x)] = [6] @b2 + [0] 585.29/149.37 >= [6] @b2 + [0] 585.29/149.37 = [c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs))] 585.29/149.37 585.29/149.37 [mult#3^#(#true(), @b2, @zs)] = [3] @b2 + [0] 585.29/149.37 >= [3] @b2 + [0] 585.29/149.37 = [c_4(add^#(@b2, @zs))] 585.29/149.37 585.29/149.37 [mult3^#(@b1, @b2, @b3)] = [7] @b1 + [7] @b2 + [7] @b3 + [7] 585.29/149.37 > [6] @b2 + [0] 585.29/149.37 = [mult^#(@b1, @b2)] 585.29/149.37 585.29/149.37 [mult3^#(@b1, @b2, @b3)] = [7] @b1 + [7] @b2 + [7] @b3 + [7] 585.29/149.37 > [6] @b2 + [0] 585.29/149.37 = [mult^#(mult(@b1, @b2), @b2)] 585.29/149.37 585.29/149.37 [mult^#(@b1, @b2)] = [6] @b2 + [0] 585.29/149.37 >= [6] @b2 + [0] 585.29/149.37 = [mult#1^#(@b1, @b2)] 585.29/149.37 585.29/149.37 [mult#1^#(::(@x, @xs), @b2)] = [6] @b2 + [0] 585.29/149.37 >= [6] @b2 + [0] 585.29/149.37 = [mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)] 585.29/149.37 585.29/149.37 [mult#1^#(::(@x, @xs), @b2)] = [6] @b2 + [0] 585.29/149.37 >= [6] @b2 + [0] 585.29/149.37 = [mult^#(@xs, @b2)] 585.29/149.37 585.29/149.37 [add^#(@b1, @b2)] = [3] @b1 + [0] 585.29/149.37 >= [3] @b1 + [0] 585.29/149.37 = [c_16(add'^#(@b1, @b2, #abs(#0())))] 585.29/149.37 585.29/149.37 [add'^#(@b1, @b2, @r)] = [3] @b1 + [0] 585.29/149.37 >= [3] @b1 + [0] 585.29/149.37 = [c_17(add'#1^#(@b1, @b2, @r))] 585.29/149.37 585.29/149.37 [add'#3^#(tuple#2(@z, @r'), @xs, @ys)] = [3] @xs + [0] 585.29/149.37 >= [3] @xs + [0] 585.29/149.37 = [c_18(add'^#(@xs, @ys, @r'))] 585.29/149.37 585.29/149.37 [add'#1^#(::(@x, @xs), @b2, @r)] = [3] @xs + [9] 585.29/149.37 > [3] @xs + [5] 585.29/149.37 = [c_20(add'#2^#(@b2, @r, @x, @xs))] 585.29/149.37 585.29/149.37 [add'#2^#(::(@y, @ys), @r, @x, @xs)] = [3] @xs + [0] 585.29/149.37 >= [3] @xs + [0] 585.29/149.37 = [c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys))] 585.29/149.37 585.29/149.37 585.29/149.37 We return to the main proof. Consider the set of all dependency 585.29/149.37 pairs 585.29/149.37 585.29/149.37 : 585.29/149.37 { 1: mult#2^#(@zs, @b2, @x) -> 585.29/149.37 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.37 , 2: mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.37 , 3: add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.37 , 4: add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.37 , 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.37 c_18(add'^#(@xs, @ys, @r')) 585.29/149.37 , 6: add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.37 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.37 , 7: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.37 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) 585.29/149.37 , 8: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.37 , 9: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.37 , 10: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.37 , 11: mult#1^#(::(@x, @xs), @b2) -> 585.29/149.37 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.37 , 12: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) } 585.29/149.37 585.29/149.37 Processor 'matrix interpretation of dimension 1' induces the 585.29/149.37 complexity certificate YES(?,O(n^1)) on application of dependency 585.29/149.37 pairs {6,8,9}. These cover all (indirect) predecessors of 585.29/149.37 dependency pairs {5,6,7,8,9}, their number of application is 585.29/149.37 equally bounded. The dependency pairs are shifted into the weak 585.29/149.37 component. 585.29/149.37 585.29/149.37 We are left with following problem, upon which TcT provides the 585.29/149.37 certificate YES(O(1),O(n^1)). 585.29/149.37 585.29/149.37 Strict DPs: 585.29/149.37 { mult#2^#(@zs, @b2, @x) -> 585.29/149.37 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.37 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.37 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.37 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) } 585.29/149.37 Weak DPs: 585.29/149.37 { mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.37 , mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.37 , mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.37 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.37 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.37 , mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) 585.29/149.37 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.37 c_18(add'^#(@xs, @ys, @r')) 585.29/149.37 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.37 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.37 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.37 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.37 Weak Trs: 585.29/149.37 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.37 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.37 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.37 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.37 , #add(#0(), @y) -> @y 585.29/149.37 , mult#2(@zs, @b2, @x) -> 585.29/149.37 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.37 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.37 , #and(#true(), #true()) -> #true() 585.29/149.37 , #and(#true(), #false()) -> #false() 585.29/149.37 , #and(#false(), #true()) -> #false() 585.29/149.37 , #and(#false(), #false()) -> #false() 585.29/149.37 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.37 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.37 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.37 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.37 , +(@x, @y) -> #add(@x, @y) 585.29/149.37 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.37 , sum#4(#false()) -> 585.29/149.37 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.37 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.37 , #eq(nil(), nil()) -> #true() 585.29/149.37 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.37 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.37 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.37 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.37 , #eq(#neg(@x), #0()) -> #false() 585.29/149.37 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.37 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.37 , #eq(#pos(@x), #0()) -> #false() 585.29/149.37 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.37 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.37 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.37 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.37 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.37 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.37 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.37 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.37 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.37 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.37 , #eq(#0(), #0()) -> #true() 585.29/149.37 , #eq(#0(), #s(@y)) -> #false() 585.29/149.37 , #eq(#s(@x), #0()) -> #false() 585.29/149.37 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.37 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.37 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.37 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.37 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.37 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.37 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.37 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.37 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.37 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.37 , mult#1(nil(), @b2) -> nil() 585.29/149.37 , mult#1(::(@x, @xs), @b2) -> 585.29/149.37 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.37 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.37 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.37 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.37 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.37 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.37 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.37 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.37 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.37 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.37 , #abs(#0()) -> #0() 585.29/149.37 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.37 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.37 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.37 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.37 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.37 Obligation: 585.29/149.37 innermost runtime complexity 585.29/149.37 Answer: 585.29/149.37 YES(O(1),O(n^1)) 585.29/149.37 585.29/149.37 We use the processor 'matrix interpretation of dimension 1' to 585.29/149.37 orient following rules strictly. 585.29/149.37 585.29/149.37 DPs: 585.29/149.37 { 5: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.37 , 6: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.37 , 7: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.37 , 9: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) 585.29/149.37 , 12: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.37 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.37 585.29/149.37 Sub-proof: 585.29/149.37 ---------- 585.29/149.37 The following argument positions are usable: 585.29/149.37 Uargs(c_3) = {1}, Uargs(c_4) = {1}, Uargs(c_16) = {1}, 585.29/149.37 Uargs(c_17) = {1}, Uargs(c_18) = {1}, Uargs(c_20) = {1}, 585.29/149.37 Uargs(c_21) = {1} 585.29/149.37 585.29/149.37 TcT has computed the following constructor-based matrix 585.29/149.37 interpretation satisfying not(EDA). 585.29/149.37 585.29/149.37 [#add](x1, x2) = [4] x2 + [0] 585.29/149.37 585.29/149.37 [mult#2](x1, x2, x3) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [sum](x1, x2, x3) = [0] 585.29/149.37 585.29/149.37 [#and](x1, x2) = [0] 585.29/149.37 585.29/149.37 [nil] = [0] 585.29/149.37 585.29/149.37 [mult](x1, x2) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [sum#2](x1, x2) = [0] 585.29/149.37 585.29/149.37 [sum#1](x1) = [0] 585.29/149.37 585.29/149.37 [+](x1, x2) = [0] 585.29/149.37 585.29/149.37 [sum#4](x1) = [0] 585.29/149.37 585.29/149.37 [#neg](x1) = [0] 585.29/149.37 585.29/149.37 [#equal](x1, x2) = [0] 585.29/149.37 585.29/149.37 [#eq](x1, x2) = [0] 585.29/149.37 585.29/149.37 [#true] = [0] 585.29/149.37 585.29/149.37 [add](x1, x2) = [1] x2 + [0] 585.29/149.37 585.29/149.37 [#pos](x1) = [0] 585.29/149.37 585.29/149.37 [add'#3](x1, x2, x3) = [1] x3 + [4] 585.29/149.37 585.29/149.37 [mult#3](x1, x2, x3) = [1] x3 + [0] 585.29/149.37 585.29/149.37 [add'#1](x1, x2, x3) = [1] x2 + [0] 585.29/149.37 585.29/149.37 [add'#2](x1, x2, x3, x4) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [tuple#2](x1, x2) = [0] 585.29/149.37 585.29/149.37 [#false] = [0] 585.29/149.37 585.29/149.37 [mult#1](x1, x2) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [::](x1, x2) = [1] x2 + [4] 585.29/149.37 585.29/149.37 [#succ](x1) = [0] 585.29/149.37 585.29/149.37 [#0] = [0] 585.29/149.37 585.29/149.37 [sum#3](x1, x2) = [0] 585.29/149.37 585.29/149.37 [add'](x1, x2, x3) = [1] x2 + [0] 585.29/149.37 585.29/149.37 [#abs](x1) = [0] 585.29/149.37 585.29/149.37 [#pred](x1) = [0] 585.29/149.37 585.29/149.37 [#s](x1) = [0] 585.29/149.37 585.29/149.37 [mult#2^#](x1, x2, x3) = [2] x1 + [0] 585.29/149.37 585.29/149.37 [mult#3^#](x1, x2, x3) = [2] x3 + [0] 585.29/149.37 585.29/149.37 [mult3^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [7] 585.29/149.37 585.29/149.37 [mult^#](x1, x2) = [2] x1 + [4] 585.29/149.37 585.29/149.37 [mult#1^#](x1, x2) = [2] x1 + [0] 585.29/149.37 585.29/149.37 [add^#](x1, x2) = [2] x2 + [0] 585.29/149.37 585.29/149.37 [add'^#](x1, x2, x3) = [1] x2 + [0] 585.29/149.37 585.29/149.37 [add'#3^#](x1, x2, x3) = [1] x3 + [0] 585.29/149.37 585.29/149.37 [add'#1^#](x1, x2, x3) = [1] x2 + [0] 585.29/149.37 585.29/149.37 [add'#2^#](x1, x2, x3, x4) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [c_3](x1) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [c_4](x1) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [c_16](x1) = [2] x1 + [0] 585.29/149.37 585.29/149.37 [c_17](x1) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [c_18](x1) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [c_20](x1) = [1] x1 + [0] 585.29/149.37 585.29/149.37 [c_21](x1) = [1] x1 + [1] 585.29/149.37 585.29/149.37 The order satisfies the following ordering constraints: 585.29/149.37 585.29/149.37 [#add(#neg(#s(#0())), @y)] = [4] @y + [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pred(@y)] 585.29/149.37 585.29/149.37 [#add(#neg(#s(#s(@x))), @y)] = [4] @y + [0] 585.29/149.37 >= [0] 585.29/149.37 = [#pred(#add(#pos(#s(@x)), @y))] 585.29/149.37 585.29/149.37 [#add(#pos(#s(#0())), @y)] = [4] @y + [0] 585.29/149.37 >= [0] 585.29/149.37 = [#succ(@y)] 585.29/149.37 585.29/149.37 [#add(#pos(#s(#s(@x))), @y)] = [4] @y + [0] 585.29/149.37 >= [0] 585.29/149.37 = [#succ(#add(#pos(#s(@x)), @y))] 585.29/149.37 585.29/149.37 [#add(#0(), @y)] = [4] @y + [0] 585.29/149.37 >= [1] @y + [0] 585.29/149.37 = [@y] 585.29/149.37 585.29/149.37 [mult#2(@zs, @b2, @x)] = [1] @zs + [0] 585.29/149.37 >= [1] @zs + [0] 585.29/149.38 = [mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)] 585.29/149.38 585.29/149.38 [sum(@x, @y, @r)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [sum#1(+(+(@x, @y), @r))] 585.29/149.38 585.29/149.38 [#and(#true(), #true())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#true()] 585.29/149.38 585.29/149.38 [#and(#true(), #false())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#and(#false(), #true())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#and(#false(), #false())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [mult(@b1, @b2)] = [1] @b1 + [0] 585.29/149.38 >= [1] @b1 + [0] 585.29/149.38 = [mult#1(@b1, @b2)] 585.29/149.38 585.29/149.38 [sum#2(#true(), @s)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [tuple#2(#abs(#0()), #abs(#0()))] 585.29/149.38 585.29/149.38 [sum#2(#false(), @s)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [sum#3(#equal(@s, #pos(#s(#0()))), @s)] 585.29/149.38 585.29/149.38 [sum#1(@s)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [sum#2(#equal(@s, #0()), @s)] 585.29/149.38 585.29/149.38 [+(@x, @y)] = [0] 585.29/149.38 ? [4] @y + [0] 585.29/149.38 = [#add(@x, @y)] 585.29/149.38 585.29/149.38 [sum#4(#true())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))] 585.29/149.38 585.29/149.38 [sum#4(#false())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))] 585.29/149.38 585.29/149.38 [#equal(@x, @y)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#eq(@x, @y)] 585.29/149.38 585.29/149.38 [#eq(nil(), nil())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#true()] 585.29/149.38 585.29/149.38 [#eq(nil(), tuple#2(@y_1, @y_2))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(nil(), ::(@y_1, @y_2))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#neg(@x), #neg(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#eq(@x, @y)] 585.29/149.38 585.29/149.38 [#eq(#neg(@x), #pos(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#neg(@x), #0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#pos(@x), #neg(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#pos(@x), #pos(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#eq(@x, @y)] 585.29/149.38 585.29/149.38 [#eq(#pos(@x), #0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(tuple#2(@x_1, @x_2), nil())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 585.29/149.38 585.29/149.38 [#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(::(@x_1, @x_2), nil())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 585.29/149.38 585.29/149.38 [#eq(#0(), #neg(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#0(), #pos(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#0(), #0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#true()] 585.29/149.38 585.29/149.38 [#eq(#0(), #s(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#s(@x), #0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#false()] 585.29/149.38 585.29/149.38 [#eq(#s(@x), #s(@y))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#eq(@x, @y)] 585.29/149.38 585.29/149.38 [add(@b1, @b2)] = [1] @b2 + [0] 585.29/149.38 >= [1] @b2 + [0] 585.29/149.38 = [add'(@b1, @b2, #abs(#0()))] 585.29/149.38 585.29/149.38 [add'#3(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [4] 585.29/149.38 >= [1] @ys + [4] 585.29/149.38 = [::(@z, add'(@xs, @ys, @r'))] 585.29/149.38 585.29/149.38 [mult#3(#true(), @b2, @zs)] = [1] @zs + [0] 585.29/149.38 >= [1] @zs + [0] 585.29/149.38 = [add(@b2, @zs)] 585.29/149.38 585.29/149.38 [mult#3(#false(), @b2, @zs)] = [1] @zs + [0] 585.29/149.38 >= [1] @zs + [0] 585.29/149.38 = [@zs] 585.29/149.38 585.29/149.38 [add'#1(nil(), @b2, @r)] = [1] @b2 + [0] 585.29/149.38 >= [0] 585.29/149.38 = [nil()] 585.29/149.38 585.29/149.38 [add'#1(::(@x, @xs), @b2, @r)] = [1] @b2 + [0] 585.29/149.38 >= [1] @b2 + [0] 585.29/149.38 = [add'#2(@b2, @r, @x, @xs)] 585.29/149.38 585.29/149.38 [add'#2(nil(), @r, @x, @xs)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [nil()] 585.29/149.38 585.29/149.38 [add'#2(::(@y, @ys), @r, @x, @xs)] = [1] @ys + [4] 585.29/149.38 >= [1] @ys + [4] 585.29/149.38 = [add'#3(sum(@x, @y, @r), @xs, @ys)] 585.29/149.38 585.29/149.38 [mult#1(nil(), @b2)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [nil()] 585.29/149.38 585.29/149.38 [mult#1(::(@x, @xs), @b2)] = [1] @xs + [4] 585.29/149.38 >= [1] @xs + [4] 585.29/149.38 = [mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)] 585.29/149.38 585.29/149.38 [#succ(#neg(#s(#0())))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#0()] 585.29/149.38 585.29/149.38 [#succ(#neg(#s(#s(@x))))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#neg(#s(@x))] 585.29/149.38 585.29/149.38 [#succ(#pos(#s(@x)))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#pos(#s(#s(@x)))] 585.29/149.38 585.29/149.38 [#succ(#0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#pos(#s(#0()))] 585.29/149.38 585.29/149.38 [sum#3(#true(), @s)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))] 585.29/149.38 585.29/149.38 [sum#3(#false(), @s)] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [sum#4(#equal(@s, #pos(#s(#s(#0())))))] 585.29/149.38 585.29/149.38 [add'(@b1, @b2, @r)] = [1] @b2 + [0] 585.29/149.38 >= [1] @b2 + [0] 585.29/149.38 = [add'#1(@b1, @b2, @r)] 585.29/149.38 585.29/149.38 [#abs(#neg(@x))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#pos(@x)] 585.29/149.38 585.29/149.38 [#abs(#pos(@x))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#pos(@x)] 585.29/149.38 585.29/149.38 [#abs(#0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#0()] 585.29/149.38 585.29/149.38 [#abs(#s(@x))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#pos(#s(@x))] 585.29/149.38 585.29/149.38 [#pred(#neg(#s(@x)))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#neg(#s(#s(@x)))] 585.29/149.38 585.29/149.38 [#pred(#pos(#s(#0())))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#0()] 585.29/149.38 585.29/149.38 [#pred(#pos(#s(#s(@x))))] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#pos(#s(@x))] 585.29/149.38 585.29/149.38 [#pred(#0())] = [0] 585.29/149.38 >= [0] 585.29/149.38 = [#neg(#s(#0()))] 585.29/149.38 585.29/149.38 [mult#2^#(@zs, @b2, @x)] = [2] @zs + [0] 585.29/149.38 >= [2] @zs + [0] 585.29/149.38 = [c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs))] 585.29/149.38 585.29/149.38 [mult#3^#(#true(), @b2, @zs)] = [2] @zs + [0] 585.29/149.38 >= [2] @zs + [0] 585.29/149.38 = [c_4(add^#(@b2, @zs))] 585.29/149.38 585.29/149.38 [mult3^#(@b1, @b2, @b3)] = [7] @b1 + [7] @b2 + [7] @b3 + [7] 585.29/149.38 > [2] @b1 + [4] 585.29/149.38 = [mult^#(@b1, @b2)] 585.29/149.38 585.29/149.38 [mult3^#(@b1, @b2, @b3)] = [7] @b1 + [7] @b2 + [7] @b3 + [7] 585.29/149.38 > [2] @b1 + [4] 585.29/149.38 = [mult^#(mult(@b1, @b2), @b2)] 585.29/149.38 585.29/149.38 [mult^#(@b1, @b2)] = [2] @b1 + [4] 585.29/149.38 > [2] @b1 + [0] 585.29/149.38 = [mult#1^#(@b1, @b2)] 585.29/149.38 585.29/149.38 [mult#1^#(::(@x, @xs), @b2)] = [2] @xs + [8] 585.29/149.38 >= [2] @xs + [8] 585.29/149.38 = [mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)] 585.29/149.38 585.29/149.38 [mult#1^#(::(@x, @xs), @b2)] = [2] @xs + [8] 585.29/149.38 > [2] @xs + [4] 585.29/149.38 = [mult^#(@xs, @b2)] 585.29/149.38 585.29/149.38 [add^#(@b1, @b2)] = [2] @b2 + [0] 585.29/149.38 >= [2] @b2 + [0] 585.29/149.38 = [c_16(add'^#(@b1, @b2, #abs(#0())))] 585.29/149.38 585.29/149.38 [add'^#(@b1, @b2, @r)] = [1] @b2 + [0] 585.29/149.38 >= [1] @b2 + [0] 585.29/149.38 = [c_17(add'#1^#(@b1, @b2, @r))] 585.29/149.38 585.29/149.38 [add'#3^#(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [0] 585.29/149.38 >= [1] @ys + [0] 585.29/149.38 = [c_18(add'^#(@xs, @ys, @r'))] 585.29/149.38 585.29/149.38 [add'#1^#(::(@x, @xs), @b2, @r)] = [1] @b2 + [0] 585.29/149.38 >= [1] @b2 + [0] 585.29/149.38 = [c_20(add'#2^#(@b2, @r, @x, @xs))] 585.29/149.38 585.29/149.38 [add'#2^#(::(@y, @ys), @r, @x, @xs)] = [1] @ys + [4] 585.29/149.38 > [1] @ys + [1] 585.29/149.38 = [c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys))] 585.29/149.38 585.29/149.38 585.29/149.38 We return to the main proof. Consider the set of all dependency 585.29/149.38 pairs 585.29/149.38 585.29/149.38 : 585.29/149.38 { 1: mult#2^#(@zs, @b2, @x) -> 585.29/149.38 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.38 , 2: mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.38 , 3: add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.38 , 4: add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.38 , 5: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.38 , 6: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.38 , 7: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.38 , 8: mult#1^#(::(@x, @xs), @b2) -> 585.29/149.38 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.38 , 9: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) 585.29/149.38 , 10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.38 c_18(add'^#(@xs, @ys, @r')) 585.29/149.38 , 11: add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.38 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.38 , 12: add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.38 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.38 585.29/149.38 Processor 'matrix interpretation of dimension 1' induces the 585.29/149.38 complexity certificate YES(?,O(n^1)) on application of dependency 585.29/149.38 pairs {5,6,7,9,12}. These cover all (indirect) predecessors of 585.29/149.38 dependency pairs {1,2,3,4,5,6,7,8,9,10,11,12}, their number of 585.29/149.38 application is equally bounded. The dependency pairs are shifted 585.29/149.38 into the weak component. 585.29/149.38 585.29/149.38 We are left with following problem, upon which TcT provides the 585.29/149.38 certificate YES(O(1),O(1)). 585.29/149.38 585.29/149.38 Weak DPs: 585.29/149.38 { mult#2^#(@zs, @b2, @x) -> 585.29/149.38 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.38 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.38 , mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.38 , mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.38 , mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.38 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.38 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.38 , mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) 585.29/149.38 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.38 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.38 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.38 c_18(add'^#(@xs, @ys, @r')) 585.29/149.38 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.38 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.38 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.38 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.38 Weak Trs: 585.29/149.38 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.38 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.38 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.38 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.38 , #add(#0(), @y) -> @y 585.29/149.38 , mult#2(@zs, @b2, @x) -> 585.29/149.38 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.38 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.38 , #and(#true(), #true()) -> #true() 585.29/149.38 , #and(#true(), #false()) -> #false() 585.29/149.38 , #and(#false(), #true()) -> #false() 585.29/149.38 , #and(#false(), #false()) -> #false() 585.29/149.38 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.38 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.38 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.38 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.38 , +(@x, @y) -> #add(@x, @y) 585.29/149.38 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.38 , sum#4(#false()) -> 585.29/149.38 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.38 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.38 , #eq(nil(), nil()) -> #true() 585.29/149.38 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.38 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.38 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.38 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.38 , #eq(#neg(@x), #0()) -> #false() 585.29/149.38 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.38 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.38 , #eq(#pos(@x), #0()) -> #false() 585.29/149.38 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.38 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.38 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.38 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.38 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.38 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.38 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.38 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.38 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.38 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.38 , #eq(#0(), #0()) -> #true() 585.29/149.39 , #eq(#0(), #s(@y)) -> #false() 585.29/149.39 , #eq(#s(@x), #0()) -> #false() 585.29/149.39 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.39 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.39 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.39 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.39 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.39 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.39 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.39 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.39 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.39 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.39 , mult#1(nil(), @b2) -> nil() 585.29/149.39 , mult#1(::(@x, @xs), @b2) -> 585.29/149.39 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.39 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.39 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.39 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.39 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.39 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.39 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.39 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.39 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.39 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.39 , #abs(#0()) -> #0() 585.29/149.39 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.39 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.39 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.39 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.39 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.39 Obligation: 585.29/149.39 innermost runtime complexity 585.29/149.39 Answer: 585.29/149.39 YES(O(1),O(1)) 585.29/149.39 585.29/149.39 The following weak DPs constitute a sub-graph of the DG that is 585.29/149.39 closed under successors. The DPs are removed. 585.29/149.39 585.29/149.39 { mult#2^#(@zs, @b2, @x) -> 585.29/149.39 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.39 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.39 , mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2) 585.29/149.39 , mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) 585.29/149.39 , mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) 585.29/149.39 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.39 mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.39 , mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) 585.29/149.39 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.39 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.39 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.39 c_18(add'^#(@xs, @ys, @r')) 585.29/149.39 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.39 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.39 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.39 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.39 585.29/149.39 We are left with following problem, upon which TcT provides the 585.29/149.39 certificate YES(O(1),O(1)). 585.29/149.39 585.29/149.39 Weak Trs: 585.29/149.39 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.39 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.39 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.39 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.39 , #add(#0(), @y) -> @y 585.29/149.39 , mult#2(@zs, @b2, @x) -> 585.29/149.39 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.39 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.39 , #and(#true(), #true()) -> #true() 585.29/149.39 , #and(#true(), #false()) -> #false() 585.29/149.39 , #and(#false(), #true()) -> #false() 585.29/149.39 , #and(#false(), #false()) -> #false() 585.29/149.39 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.39 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.39 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.39 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.39 , +(@x, @y) -> #add(@x, @y) 585.29/149.39 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.39 , sum#4(#false()) -> 585.29/149.39 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.39 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.39 , #eq(nil(), nil()) -> #true() 585.29/149.39 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.39 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.39 , #eq(#neg(@x), #0()) -> #false() 585.29/149.39 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.39 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.39 , #eq(#pos(@x), #0()) -> #false() 585.29/149.39 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.39 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.39 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.39 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.39 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.39 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.39 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.39 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.39 , #eq(#0(), #0()) -> #true() 585.29/149.39 , #eq(#0(), #s(@y)) -> #false() 585.29/149.39 , #eq(#s(@x), #0()) -> #false() 585.29/149.39 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.39 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.39 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.39 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.39 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.39 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.39 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.39 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.39 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.39 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.39 , mult#1(nil(), @b2) -> nil() 585.29/149.39 , mult#1(::(@x, @xs), @b2) -> 585.29/149.39 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.39 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.39 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.39 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.39 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.39 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.39 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.39 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.39 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.39 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.39 , #abs(#0()) -> #0() 585.29/149.39 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.39 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.39 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.39 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.39 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.39 Obligation: 585.29/149.39 innermost runtime complexity 585.29/149.39 Answer: 585.29/149.39 YES(O(1),O(1)) 585.29/149.39 585.29/149.39 No rule is usable, rules are removed from the input problem. 585.29/149.39 585.29/149.39 We are left with following problem, upon which TcT provides the 585.29/149.39 certificate YES(O(1),O(1)). 585.29/149.39 585.29/149.39 Rules: Empty 585.29/149.39 Obligation: 585.29/149.39 innermost runtime complexity 585.29/149.39 Answer: 585.29/149.39 YES(O(1),O(1)) 585.29/149.39 585.29/149.39 Empty rules are trivially bounded 585.29/149.39 585.29/149.39 S) We are left with following problem, upon which TcT provides the 585.29/149.39 certificate YES(O(1),O(n^1)). 585.29/149.39 585.29/149.39 Strict DPs: 585.29/149.39 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.39 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.39 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.39 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.39 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.39 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.39 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.39 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.39 Weak DPs: 585.29/149.39 { mult#2^#(@zs, @b2, @x) -> 585.29/149.39 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.39 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.39 , mult3^#(@b1, @b2, @b3) -> 585.29/149.39 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.39 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.39 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.39 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.39 mult^#(@xs, @b2)) 585.29/149.39 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.39 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.39 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.39 c_18(add'^#(@xs, @ys, @r')) 585.29/149.39 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.39 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.39 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.39 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.39 Weak Trs: 585.29/149.39 { #natsub(@x, #0()) -> @x 585.29/149.39 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.39 , -(@x, @y) -> #sub(@x, @y) 585.29/149.39 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.39 , diff#1(#false()) -> #abs(#0()) 585.29/149.39 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.39 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.39 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.39 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.39 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.39 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.29/149.39 , #add(#0(), @y) -> @y 585.29/149.39 , mult#2(@zs, @b2, @x) -> 585.29/149.39 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.29/149.39 , div(@x, @y) -> #div(@x, @y) 585.29/149.39 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.29/149.39 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.29/149.39 , #and(#true(), #true()) -> #true() 585.29/149.39 , #and(#true(), #false()) -> #false() 585.29/149.39 , #and(#false(), #true()) -> #false() 585.29/149.39 , #and(#false(), #false()) -> #false() 585.29/149.39 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.29/149.39 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.29/149.39 , #compare(#neg(@x), #0()) -> #LT() 585.29/149.39 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.29/149.39 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.29/149.39 , #compare(#pos(@x), #0()) -> #GT() 585.29/149.39 , #compare(#0(), #neg(@y)) -> #GT() 585.29/149.39 , #compare(#0(), #pos(@y)) -> #LT() 585.29/149.39 , #compare(#0(), #0()) -> #EQ() 585.29/149.39 , #compare(#0(), #s(@y)) -> #LT() 585.29/149.39 , #compare(#s(@x), #0()) -> #GT() 585.29/149.39 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.29/149.39 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.29/149.39 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.29/149.39 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.29/149.39 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.29/149.39 , +(@x, @y) -> #add(@x, @y) 585.29/149.39 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.29/149.39 , sum#4(#false()) -> 585.29/149.39 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.29/149.39 , *(@x, @y) -> #mult(@x, @y) 585.29/149.39 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.29/149.39 , #equal(@x, @y) -> #eq(@x, @y) 585.29/149.39 , #eq(nil(), nil()) -> #true() 585.29/149.39 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.29/149.39 , #eq(#neg(@x), #pos(@y)) -> #false() 585.29/149.39 , #eq(#neg(@x), #0()) -> #false() 585.29/149.39 , #eq(#pos(@x), #neg(@y)) -> #false() 585.29/149.39 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.29/149.39 , #eq(#pos(@x), #0()) -> #false() 585.29/149.39 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.29/149.39 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.29/149.39 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.39 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.29/149.39 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.29/149.39 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.29/149.39 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.29/149.39 , #eq(#0(), #neg(@y)) -> #false() 585.29/149.39 , #eq(#0(), #pos(@y)) -> #false() 585.29/149.39 , #eq(#0(), #0()) -> #true() 585.29/149.39 , #eq(#0(), #s(@y)) -> #false() 585.29/149.39 , #eq(#s(@x), #0()) -> #false() 585.29/149.39 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.29/149.39 , #natmult(#0(), @y) -> #0() 585.29/149.39 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.29/149.39 , #cklt(#EQ()) -> #false() 585.29/149.39 , #cklt(#LT()) -> #true() 585.29/149.39 , #cklt(#GT()) -> #false() 585.29/149.39 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.29/149.39 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.29/149.39 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.29/149.39 , #sub(@x, #0()) -> @x 585.29/149.39 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.29/149.39 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.29/149.39 , mult#3(#false(), @b2, @zs) -> @zs 585.29/149.39 , add'#1(nil(), @b2, @r) -> nil() 585.29/149.39 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.29/149.39 , add'#2(nil(), @r, @x, @xs) -> nil() 585.29/149.39 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.29/149.39 add'#3(sum(@x, @y, @r), @xs, @ys) 585.29/149.39 , diff(@x, @y, @r) -> 585.29/149.39 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.29/149.39 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.29/149.39 , mult#1(nil(), @b2) -> nil() 585.29/149.39 , mult#1(::(@x, @xs), @b2) -> 585.29/149.39 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.29/149.39 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.39 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.39 , #mult(#neg(@x), #0()) -> #0() 585.29/149.39 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.29/149.39 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.29/149.39 , #mult(#pos(@x), #0()) -> #0() 585.29/149.39 , #mult(#0(), #neg(@y)) -> #0() 585.29/149.39 , #mult(#0(), #pos(@y)) -> #0() 585.29/149.39 , #mult(#0(), #0()) -> #0() 585.29/149.39 , #succ(#neg(#s(#0()))) -> #0() 585.29/149.39 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.29/149.39 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.29/149.39 , #succ(#0()) -> #pos(#s(#0())) 585.29/149.39 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.29/149.39 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.29/149.39 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.39 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.39 , #div(#neg(@x), #0()) -> #divByZero() 585.29/149.39 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.29/149.39 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.29/149.39 , #div(#pos(@x), #0()) -> #divByZero() 585.29/149.39 , #div(#0(), #neg(@y)) -> #0() 585.29/149.39 , #div(#0(), #pos(@y)) -> #0() 585.29/149.39 , #div(#0(), #0()) -> #divByZero() 585.29/149.39 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.29/149.39 , #abs(#neg(@x)) -> #pos(@x) 585.29/149.39 , #abs(#pos(@x)) -> #pos(@x) 585.29/149.39 , #abs(#0()) -> #0() 585.29/149.39 , #abs(#s(@x)) -> #pos(#s(@x)) 585.29/149.39 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.29/149.39 , #pred(#pos(#s(#0()))) -> #0() 585.29/149.39 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.29/149.39 , #pred(#0()) -> #neg(#s(#0())) } 585.29/149.39 Obligation: 585.29/149.39 innermost runtime complexity 585.29/149.39 Answer: 585.29/149.39 YES(O(1),O(n^1)) 585.29/149.39 585.29/149.39 The following weak DPs constitute a sub-graph of the DG that is 585.29/149.39 closed under successors. The DPs are removed. 585.29/149.39 585.29/149.39 { mult#2^#(@zs, @b2, @x) -> 585.29/149.39 c_3(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)) 585.29/149.39 , mult#3^#(#true(), @b2, @zs) -> c_4(add^#(@b2, @zs)) 585.29/149.39 , mult3^#(@b1, @b2, @b3) -> 585.29/149.39 c_7(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) 585.29/149.39 , mult^#(@b1, @b2) -> c_8(mult#1^#(@b1, @b2)) 585.29/149.39 , mult#1^#(::(@x, @xs), @b2) -> 585.29/149.39 c_11(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x), 585.29/149.39 mult^#(@xs, @b2)) 585.29/149.39 , add^#(@b1, @b2) -> c_16(add'^#(@b1, @b2, #abs(#0()))) 585.29/149.39 , add'^#(@b1, @b2, @r) -> c_17(add'#1^#(@b1, @b2, @r)) 585.29/149.39 , add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> 585.29/149.39 c_18(add'^#(@xs, @ys, @r')) 585.29/149.39 , add'#1^#(::(@x, @xs), @b2, @r) -> 585.29/149.39 c_20(add'#2^#(@b2, @r, @x, @xs)) 585.29/149.39 , add'#2^#(::(@y, @ys), @r, @x, @xs) -> 585.29/149.39 c_21(add'#3^#(sum(@x, @y, @r), @xs, @ys)) } 585.29/149.39 585.29/149.39 We are left with following problem, upon which TcT provides the 585.29/149.39 certificate YES(O(1),O(n^1)). 585.29/149.39 585.29/149.39 Strict DPs: 585.29/149.39 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.29/149.39 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.29/149.39 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.29/149.39 , compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.29/149.39 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) 585.29/149.39 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.29/149.39 , compare#1^#(::(@x, @xs), @b2) -> 585.29/149.39 c_22(compare#2^#(@b2, @x, @xs)) } 585.29/149.39 Weak Trs: 585.29/149.39 { #natsub(@x, #0()) -> @x 585.29/149.39 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.29/149.39 , -(@x, @y) -> #sub(@x, @y) 585.29/149.39 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.29/149.39 , diff#1(#false()) -> #abs(#0()) 585.29/149.39 , #natdiv(#0(), #0()) -> #divByZero() 585.29/149.39 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.29/149.39 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.29/149.39 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.29/149.39 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.29/149.39 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.40 , #add(#0(), @y) -> @y 585.53/149.40 , mult#2(@zs, @b2, @x) -> 585.53/149.40 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.40 , div(@x, @y) -> #div(@x, @y) 585.53/149.40 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.40 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.40 , #and(#true(), #true()) -> #true() 585.53/149.40 , #and(#true(), #false()) -> #false() 585.53/149.40 , #and(#false(), #true()) -> #false() 585.53/149.40 , #and(#false(), #false()) -> #false() 585.53/149.40 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.40 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.40 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.40 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.40 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.40 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.40 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.40 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.40 , #compare(#0(), #0()) -> #EQ() 585.53/149.40 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.40 , #compare(#s(@x), #0()) -> #GT() 585.53/149.40 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.40 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.40 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.40 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.40 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.40 , +(@x, @y) -> #add(@x, @y) 585.53/149.40 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.40 , sum#4(#false()) -> 585.53/149.40 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.40 , *(@x, @y) -> #mult(@x, @y) 585.53/149.40 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.40 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.40 , #eq(nil(), nil()) -> #true() 585.53/149.40 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.40 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.40 , #eq(#neg(@x), #0()) -> #false() 585.53/149.40 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.40 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.40 , #eq(#pos(@x), #0()) -> #false() 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.40 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.40 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.40 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.40 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.40 , #eq(#0(), #0()) -> #true() 585.53/149.40 , #eq(#0(), #s(@y)) -> #false() 585.53/149.40 , #eq(#s(@x), #0()) -> #false() 585.53/149.40 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.40 , #natmult(#0(), @y) -> #0() 585.53/149.40 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.40 , #cklt(#EQ()) -> #false() 585.53/149.40 , #cklt(#LT()) -> #true() 585.53/149.40 , #cklt(#GT()) -> #false() 585.53/149.40 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.40 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.40 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.40 , #sub(@x, #0()) -> @x 585.53/149.40 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.40 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.40 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.40 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.40 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.40 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.40 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.40 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.40 , diff(@x, @y, @r) -> 585.53/149.40 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.40 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.40 , mult#1(nil(), @b2) -> nil() 585.53/149.40 , mult#1(::(@x, @xs), @b2) -> 585.53/149.40 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.40 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.40 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.40 , #mult(#neg(@x), #0()) -> #0() 585.53/149.40 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.40 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.40 , #mult(#pos(@x), #0()) -> #0() 585.53/149.40 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.40 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.40 , #mult(#0(), #0()) -> #0() 585.53/149.40 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.40 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.40 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.40 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.40 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.40 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.40 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.40 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.40 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.40 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.40 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.40 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.40 , #div(#0(), #neg(@y)) -> #0() 585.53/149.40 , #div(#0(), #pos(@y)) -> #0() 585.53/149.40 , #div(#0(), #0()) -> #divByZero() 585.53/149.40 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.40 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.40 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.40 , #abs(#0()) -> #0() 585.53/149.40 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.40 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.40 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.40 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.40 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.40 Obligation: 585.53/149.40 innermost runtime complexity 585.53/149.40 Answer: 585.53/149.40 YES(O(1),O(n^1)) 585.53/149.40 585.53/149.40 We analyse the complexity of following sub-problems (R) and (S). 585.53/149.40 Problem (S) is obtained from the input problem by shifting strict 585.53/149.40 rules from (R) into the weak component: 585.53/149.40 585.53/149.40 Problem (R): 585.53/149.40 ------------ 585.53/149.40 Strict DPs: 585.53/149.40 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.40 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.40 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.40 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.40 Weak DPs: 585.53/149.40 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.40 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.40 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.40 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.40 Weak Trs: 585.53/149.40 { #natsub(@x, #0()) -> @x 585.53/149.40 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.40 , -(@x, @y) -> #sub(@x, @y) 585.53/149.40 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.40 , diff#1(#false()) -> #abs(#0()) 585.53/149.40 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.40 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.40 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.40 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.40 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.40 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.40 , #add(#0(), @y) -> @y 585.53/149.40 , mult#2(@zs, @b2, @x) -> 585.53/149.40 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.40 , div(@x, @y) -> #div(@x, @y) 585.53/149.40 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.40 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.40 , #and(#true(), #true()) -> #true() 585.53/149.40 , #and(#true(), #false()) -> #false() 585.53/149.40 , #and(#false(), #true()) -> #false() 585.53/149.40 , #and(#false(), #false()) -> #false() 585.53/149.40 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.40 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.40 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.40 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.40 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.40 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.40 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.40 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.40 , #compare(#0(), #0()) -> #EQ() 585.53/149.40 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.40 , #compare(#s(@x), #0()) -> #GT() 585.53/149.40 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.40 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.40 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.40 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.40 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.40 , +(@x, @y) -> #add(@x, @y) 585.53/149.40 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.40 , sum#4(#false()) -> 585.53/149.40 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.40 , *(@x, @y) -> #mult(@x, @y) 585.53/149.40 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.40 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.40 , #eq(nil(), nil()) -> #true() 585.53/149.40 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.40 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.40 , #eq(#neg(@x), #0()) -> #false() 585.53/149.40 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.40 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.40 , #eq(#pos(@x), #0()) -> #false() 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.40 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.40 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.40 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.40 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.40 , #eq(#0(), #0()) -> #true() 585.53/149.40 , #eq(#0(), #s(@y)) -> #false() 585.53/149.40 , #eq(#s(@x), #0()) -> #false() 585.53/149.40 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.40 , #natmult(#0(), @y) -> #0() 585.53/149.40 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.40 , #cklt(#EQ()) -> #false() 585.53/149.40 , #cklt(#LT()) -> #true() 585.53/149.40 , #cklt(#GT()) -> #false() 585.53/149.40 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.40 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.40 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.40 , #sub(@x, #0()) -> @x 585.53/149.40 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.40 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.40 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.40 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.40 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.40 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.40 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.40 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.40 , diff(@x, @y, @r) -> 585.53/149.40 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.40 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.40 , mult#1(nil(), @b2) -> nil() 585.53/149.40 , mult#1(::(@x, @xs), @b2) -> 585.53/149.40 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.40 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.40 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.40 , #mult(#neg(@x), #0()) -> #0() 585.53/149.40 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.40 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.40 , #mult(#pos(@x), #0()) -> #0() 585.53/149.40 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.40 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.40 , #mult(#0(), #0()) -> #0() 585.53/149.40 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.40 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.40 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.40 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.40 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.40 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.40 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.40 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.40 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.40 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.40 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.40 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.40 , #div(#0(), #neg(@y)) -> #0() 585.53/149.40 , #div(#0(), #pos(@y)) -> #0() 585.53/149.40 , #div(#0(), #0()) -> #divByZero() 585.53/149.40 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.40 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.40 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.40 , #abs(#0()) -> #0() 585.53/149.40 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.40 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.40 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.40 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.40 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.40 StartTerms: basic terms 585.53/149.40 Strategy: innermost 585.53/149.40 585.53/149.40 Problem (S): 585.53/149.40 ------------ 585.53/149.40 Strict DPs: 585.53/149.40 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.40 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.40 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.40 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.40 Weak DPs: 585.53/149.40 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.40 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.40 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.40 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.40 Weak Trs: 585.53/149.40 { #natsub(@x, #0()) -> @x 585.53/149.40 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.40 , -(@x, @y) -> #sub(@x, @y) 585.53/149.40 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.40 , diff#1(#false()) -> #abs(#0()) 585.53/149.40 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.40 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.40 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.40 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.40 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.40 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.40 , #add(#0(), @y) -> @y 585.53/149.40 , mult#2(@zs, @b2, @x) -> 585.53/149.40 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.40 , div(@x, @y) -> #div(@x, @y) 585.53/149.40 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.40 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.40 , #and(#true(), #true()) -> #true() 585.53/149.40 , #and(#true(), #false()) -> #false() 585.53/149.40 , #and(#false(), #true()) -> #false() 585.53/149.40 , #and(#false(), #false()) -> #false() 585.53/149.40 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.40 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.40 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.40 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.40 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.40 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.40 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.40 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.40 , #compare(#0(), #0()) -> #EQ() 585.53/149.40 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.40 , #compare(#s(@x), #0()) -> #GT() 585.53/149.40 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.40 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.40 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.40 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.40 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.40 , +(@x, @y) -> #add(@x, @y) 585.53/149.40 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.40 , sum#4(#false()) -> 585.53/149.40 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.40 , *(@x, @y) -> #mult(@x, @y) 585.53/149.40 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.40 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.40 , #eq(nil(), nil()) -> #true() 585.53/149.40 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.40 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.40 , #eq(#neg(@x), #0()) -> #false() 585.53/149.40 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.40 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.40 , #eq(#pos(@x), #0()) -> #false() 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.40 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.40 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.40 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.40 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.40 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.41 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.41 , #eq(#0(), #0()) -> #true() 585.53/149.41 , #eq(#0(), #s(@y)) -> #false() 585.53/149.41 , #eq(#s(@x), #0()) -> #false() 585.53/149.41 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.41 , #natmult(#0(), @y) -> #0() 585.53/149.41 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.41 , #cklt(#EQ()) -> #false() 585.53/149.41 , #cklt(#LT()) -> #true() 585.53/149.41 , #cklt(#GT()) -> #false() 585.53/149.41 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.41 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.41 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.41 , #sub(@x, #0()) -> @x 585.53/149.41 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.41 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.41 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.41 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.41 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.41 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.41 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.41 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.41 , diff(@x, @y, @r) -> 585.53/149.41 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.41 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.41 , mult#1(nil(), @b2) -> nil() 585.53/149.41 , mult#1(::(@x, @xs), @b2) -> 585.53/149.41 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.41 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.41 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.41 , #mult(#neg(@x), #0()) -> #0() 585.53/149.41 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.41 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.41 , #mult(#pos(@x), #0()) -> #0() 585.53/149.41 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.41 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.41 , #mult(#0(), #0()) -> #0() 585.53/149.41 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.41 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.41 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.41 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.41 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.41 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.41 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.41 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.41 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.41 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.41 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.41 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.41 , #div(#0(), #neg(@y)) -> #0() 585.53/149.41 , #div(#0(), #pos(@y)) -> #0() 585.53/149.41 , #div(#0(), #0()) -> #divByZero() 585.53/149.41 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.41 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.41 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.41 , #abs(#0()) -> #0() 585.53/149.41 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.41 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.41 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.41 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.41 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.41 StartTerms: basic terms 585.53/149.41 Strategy: innermost 585.53/149.41 585.53/149.41 Overall, the transformation results in the following sub-problem(s): 585.53/149.41 585.53/149.41 Generated new problems: 585.53/149.41 ----------------------- 585.53/149.41 R) Strict DPs: 585.53/149.41 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.41 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.41 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.41 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.41 Weak DPs: 585.53/149.41 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.41 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.41 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.41 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.41 Weak Trs: 585.53/149.41 { #natsub(@x, #0()) -> @x 585.53/149.41 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.41 , -(@x, @y) -> #sub(@x, @y) 585.53/149.41 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.41 , diff#1(#false()) -> #abs(#0()) 585.53/149.41 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.41 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.41 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.41 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.41 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.41 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.41 , #add(#0(), @y) -> @y 585.53/149.41 , mult#2(@zs, @b2, @x) -> 585.53/149.41 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.41 , div(@x, @y) -> #div(@x, @y) 585.53/149.41 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.41 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.41 , #and(#true(), #true()) -> #true() 585.53/149.41 , #and(#true(), #false()) -> #false() 585.53/149.41 , #and(#false(), #true()) -> #false() 585.53/149.41 , #and(#false(), #false()) -> #false() 585.53/149.41 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.41 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.41 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.41 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.41 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.41 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.41 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.41 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.41 , #compare(#0(), #0()) -> #EQ() 585.53/149.41 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.41 , #compare(#s(@x), #0()) -> #GT() 585.53/149.41 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.41 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.41 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.41 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.41 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.41 , +(@x, @y) -> #add(@x, @y) 585.53/149.41 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.41 , sum#4(#false()) -> 585.53/149.41 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.41 , *(@x, @y) -> #mult(@x, @y) 585.53/149.41 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.41 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.41 , #eq(nil(), nil()) -> #true() 585.53/149.41 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.41 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.41 , #eq(#neg(@x), #0()) -> #false() 585.53/149.41 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.41 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.41 , #eq(#pos(@x), #0()) -> #false() 585.53/149.41 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.41 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.41 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.41 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.41 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.41 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.41 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.41 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.41 , #eq(#0(), #0()) -> #true() 585.53/149.41 , #eq(#0(), #s(@y)) -> #false() 585.53/149.41 , #eq(#s(@x), #0()) -> #false() 585.53/149.41 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.41 , #natmult(#0(), @y) -> #0() 585.53/149.41 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.41 , #cklt(#EQ()) -> #false() 585.53/149.41 , #cklt(#LT()) -> #true() 585.53/149.41 , #cklt(#GT()) -> #false() 585.53/149.41 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.41 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.41 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.41 , #sub(@x, #0()) -> @x 585.53/149.41 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.41 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.41 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.41 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.41 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.41 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.41 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.41 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.41 , diff(@x, @y, @r) -> 585.53/149.41 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.41 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.41 , mult#1(nil(), @b2) -> nil() 585.53/149.41 , mult#1(::(@x, @xs), @b2) -> 585.53/149.41 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.41 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.41 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.41 , #mult(#neg(@x), #0()) -> #0() 585.53/149.41 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.41 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.41 , #mult(#pos(@x), #0()) -> #0() 585.53/149.41 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.41 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.41 , #mult(#0(), #0()) -> #0() 585.53/149.41 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.41 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.41 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.41 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.41 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.41 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.41 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.41 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.41 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.41 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.41 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.41 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.41 , #div(#0(), #neg(@y)) -> #0() 585.53/149.41 , #div(#0(), #pos(@y)) -> #0() 585.53/149.41 , #div(#0(), #0()) -> #divByZero() 585.53/149.41 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.41 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.41 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.41 , #abs(#0()) -> #0() 585.53/149.41 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.41 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.41 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.41 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.41 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.41 StartTerms: basic terms 585.53/149.41 Strategy: innermost 585.53/149.41 585.53/149.41 This problem was proven YES(O(1),O(n^1)). 585.53/149.41 585.53/149.41 S) Strict DPs: 585.53/149.41 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.41 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.41 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.41 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.41 Weak DPs: 585.53/149.41 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.41 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.41 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.41 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.41 Weak Trs: 585.53/149.41 { #natsub(@x, #0()) -> @x 585.53/149.41 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.41 , -(@x, @y) -> #sub(@x, @y) 585.53/149.41 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.41 , diff#1(#false()) -> #abs(#0()) 585.53/149.41 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.41 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.41 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.41 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.41 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.41 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.41 , #add(#0(), @y) -> @y 585.53/149.41 , mult#2(@zs, @b2, @x) -> 585.53/149.41 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.41 , div(@x, @y) -> #div(@x, @y) 585.53/149.41 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.41 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.41 , #and(#true(), #true()) -> #true() 585.53/149.41 , #and(#true(), #false()) -> #false() 585.53/149.41 , #and(#false(), #true()) -> #false() 585.53/149.41 , #and(#false(), #false()) -> #false() 585.53/149.41 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.41 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.41 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.41 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.41 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.41 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.41 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.41 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.41 , #compare(#0(), #0()) -> #EQ() 585.53/149.41 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.41 , #compare(#s(@x), #0()) -> #GT() 585.53/149.41 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.41 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.41 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.41 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.41 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.41 , +(@x, @y) -> #add(@x, @y) 585.53/149.41 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.41 , sum#4(#false()) -> 585.53/149.41 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.41 , *(@x, @y) -> #mult(@x, @y) 585.53/149.41 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.41 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.41 , #eq(nil(), nil()) -> #true() 585.53/149.41 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.41 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.41 , #eq(#neg(@x), #0()) -> #false() 585.53/149.41 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.41 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.41 , #eq(#pos(@x), #0()) -> #false() 585.53/149.41 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.41 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.41 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.41 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.41 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.41 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.41 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.41 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.41 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.41 , #eq(#0(), #0()) -> #true() 585.53/149.41 , #eq(#0(), #s(@y)) -> #false() 585.53/149.41 , #eq(#s(@x), #0()) -> #false() 585.53/149.41 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.41 , #natmult(#0(), @y) -> #0() 585.53/149.41 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.41 , #cklt(#EQ()) -> #false() 585.53/149.41 , #cklt(#LT()) -> #true() 585.53/149.41 , #cklt(#GT()) -> #false() 585.53/149.41 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.41 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.41 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.41 , #sub(@x, #0()) -> @x 585.53/149.41 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.41 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.41 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.41 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.41 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.41 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.41 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.41 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.41 , diff(@x, @y, @r) -> 585.53/149.41 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.41 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.41 , mult#1(nil(), @b2) -> nil() 585.53/149.41 , mult#1(::(@x, @xs), @b2) -> 585.53/149.41 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.41 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.41 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.41 , #mult(#neg(@x), #0()) -> #0() 585.53/149.41 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.41 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.41 , #mult(#pos(@x), #0()) -> #0() 585.53/149.41 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.41 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.41 , #mult(#0(), #0()) -> #0() 585.53/149.41 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.41 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.41 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.41 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.41 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.41 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.42 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.42 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.42 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.42 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.42 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.42 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.42 , #div(#0(), #neg(@y)) -> #0() 585.53/149.42 , #div(#0(), #pos(@y)) -> #0() 585.53/149.42 , #div(#0(), #0()) -> #divByZero() 585.53/149.42 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.42 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.42 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.42 , #abs(#0()) -> #0() 585.53/149.42 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.42 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.42 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.42 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.42 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.42 StartTerms: basic terms 585.53/149.42 Strategy: innermost 585.53/149.42 585.53/149.42 This problem was proven YES(O(1),O(n^1)). 585.53/149.42 585.53/149.42 585.53/149.42 Proofs for generated problems: 585.53/149.42 ------------------------------ 585.53/149.42 R) We are left with following problem, upon which TcT provides the 585.53/149.42 certificate YES(O(1),O(n^1)). 585.53/149.42 585.53/149.42 Strict DPs: 585.53/149.42 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.42 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.42 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.42 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.42 Weak DPs: 585.53/149.42 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.42 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.42 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.42 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.42 Weak Trs: 585.53/149.42 { #natsub(@x, #0()) -> @x 585.53/149.42 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.42 , -(@x, @y) -> #sub(@x, @y) 585.53/149.42 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.42 , diff#1(#false()) -> #abs(#0()) 585.53/149.42 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.42 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.42 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.42 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.42 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#0(), @y) -> @y 585.53/149.42 , mult#2(@zs, @b2, @x) -> 585.53/149.42 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.42 , div(@x, @y) -> #div(@x, @y) 585.53/149.42 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.42 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.42 , #and(#true(), #true()) -> #true() 585.53/149.42 , #and(#true(), #false()) -> #false() 585.53/149.42 , #and(#false(), #true()) -> #false() 585.53/149.42 , #and(#false(), #false()) -> #false() 585.53/149.42 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.42 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.42 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.42 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.42 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.42 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.42 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.42 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.42 , #compare(#0(), #0()) -> #EQ() 585.53/149.42 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.42 , #compare(#s(@x), #0()) -> #GT() 585.53/149.42 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.42 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.42 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.42 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.42 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.42 , +(@x, @y) -> #add(@x, @y) 585.53/149.42 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.42 , sum#4(#false()) -> 585.53/149.42 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.42 , *(@x, @y) -> #mult(@x, @y) 585.53/149.42 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.42 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.42 , #eq(nil(), nil()) -> #true() 585.53/149.42 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.42 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.42 , #eq(#neg(@x), #0()) -> #false() 585.53/149.42 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.42 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.42 , #eq(#pos(@x), #0()) -> #false() 585.53/149.42 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.42 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.42 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.42 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.42 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.42 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.42 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.42 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.42 , #eq(#0(), #0()) -> #true() 585.53/149.42 , #eq(#0(), #s(@y)) -> #false() 585.53/149.42 , #eq(#s(@x), #0()) -> #false() 585.53/149.42 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.42 , #natmult(#0(), @y) -> #0() 585.53/149.42 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.42 , #cklt(#EQ()) -> #false() 585.53/149.42 , #cklt(#LT()) -> #true() 585.53/149.42 , #cklt(#GT()) -> #false() 585.53/149.42 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.42 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.42 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.42 , #sub(@x, #0()) -> @x 585.53/149.42 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.42 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.42 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.42 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.42 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.42 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.42 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.42 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.42 , diff(@x, @y, @r) -> 585.53/149.42 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.42 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.42 , mult#1(nil(), @b2) -> nil() 585.53/149.42 , mult#1(::(@x, @xs), @b2) -> 585.53/149.42 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.42 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #0()) -> #0() 585.53/149.42 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #0()) -> #0() 585.53/149.42 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.42 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.42 , #mult(#0(), #0()) -> #0() 585.53/149.42 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.42 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.42 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.42 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.42 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.42 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.42 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.42 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.42 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.42 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.42 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.42 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.42 , #div(#0(), #neg(@y)) -> #0() 585.53/149.42 , #div(#0(), #pos(@y)) -> #0() 585.53/149.42 , #div(#0(), #0()) -> #divByZero() 585.53/149.42 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.42 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.42 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.42 , #abs(#0()) -> #0() 585.53/149.42 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.42 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.42 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.42 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.42 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.42 Obligation: 585.53/149.42 innermost runtime complexity 585.53/149.42 Answer: 585.53/149.42 YES(O(1),O(n^1)) 585.53/149.42 585.53/149.42 The following weak DPs constitute a sub-graph of the DG that is 585.53/149.42 closed under successors. The DPs are removed. 585.53/149.42 585.53/149.42 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.42 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.42 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.42 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.42 585.53/149.42 We are left with following problem, upon which TcT provides the 585.53/149.42 certificate YES(O(1),O(n^1)). 585.53/149.42 585.53/149.42 Strict DPs: 585.53/149.42 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.42 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.42 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.42 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.42 Weak Trs: 585.53/149.42 { #natsub(@x, #0()) -> @x 585.53/149.42 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.42 , -(@x, @y) -> #sub(@x, @y) 585.53/149.42 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.42 , diff#1(#false()) -> #abs(#0()) 585.53/149.42 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.42 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.42 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.42 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.42 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#0(), @y) -> @y 585.53/149.42 , mult#2(@zs, @b2, @x) -> 585.53/149.42 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.42 , div(@x, @y) -> #div(@x, @y) 585.53/149.42 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.42 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.42 , #and(#true(), #true()) -> #true() 585.53/149.42 , #and(#true(), #false()) -> #false() 585.53/149.42 , #and(#false(), #true()) -> #false() 585.53/149.42 , #and(#false(), #false()) -> #false() 585.53/149.42 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.42 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.42 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.42 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.42 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.42 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.42 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.42 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.42 , #compare(#0(), #0()) -> #EQ() 585.53/149.42 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.42 , #compare(#s(@x), #0()) -> #GT() 585.53/149.42 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.42 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.42 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.42 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.42 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.42 , +(@x, @y) -> #add(@x, @y) 585.53/149.42 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.42 , sum#4(#false()) -> 585.53/149.42 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.42 , *(@x, @y) -> #mult(@x, @y) 585.53/149.42 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.42 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.42 , #eq(nil(), nil()) -> #true() 585.53/149.42 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.42 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.42 , #eq(#neg(@x), #0()) -> #false() 585.53/149.42 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.42 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.42 , #eq(#pos(@x), #0()) -> #false() 585.53/149.42 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.42 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.42 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.42 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.42 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.42 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.42 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.42 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.42 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.42 , #eq(#0(), #0()) -> #true() 585.53/149.42 , #eq(#0(), #s(@y)) -> #false() 585.53/149.42 , #eq(#s(@x), #0()) -> #false() 585.53/149.42 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.42 , #natmult(#0(), @y) -> #0() 585.53/149.42 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.42 , #cklt(#EQ()) -> #false() 585.53/149.42 , #cklt(#LT()) -> #true() 585.53/149.42 , #cklt(#GT()) -> #false() 585.53/149.42 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.42 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.42 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.42 , #sub(@x, #0()) -> @x 585.53/149.42 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.42 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.42 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.42 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.42 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.42 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.42 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.42 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.42 , diff(@x, @y, @r) -> 585.53/149.42 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.42 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.42 , mult#1(nil(), @b2) -> nil() 585.53/149.42 , mult#1(::(@x, @xs), @b2) -> 585.53/149.42 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.42 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #0()) -> #0() 585.53/149.42 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #0()) -> #0() 585.53/149.42 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.42 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.42 , #mult(#0(), #0()) -> #0() 585.53/149.42 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.42 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.42 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.42 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.42 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.42 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.42 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.42 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.42 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.42 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.42 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.42 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.42 , #div(#0(), #neg(@y)) -> #0() 585.53/149.42 , #div(#0(), #pos(@y)) -> #0() 585.53/149.42 , #div(#0(), #0()) -> #divByZero() 585.53/149.42 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.42 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.42 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.42 , #abs(#0()) -> #0() 585.53/149.42 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.42 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.42 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.42 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.42 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.42 Obligation: 585.53/149.42 innermost runtime complexity 585.53/149.42 Answer: 585.53/149.42 YES(O(1),O(n^1)) 585.53/149.42 585.53/149.42 We replace rewrite rules by usable rules: 585.53/149.42 585.53/149.42 Weak Usable Rules: 585.53/149.42 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.42 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.42 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#0(), @y) -> @y 585.53/149.42 , *(@x, @y) -> #mult(@x, @y) 585.53/149.42 , #natmult(#0(), @y) -> #0() 585.53/149.42 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #0()) -> #0() 585.53/149.42 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #0()) -> #0() 585.53/149.42 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.42 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.42 , #mult(#0(), #0()) -> #0() 585.53/149.42 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.42 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.42 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.42 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.42 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.42 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.42 , #abs(#0()) -> #0() 585.53/149.42 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.42 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.42 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.42 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.42 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.42 585.53/149.42 We are left with following problem, upon which TcT provides the 585.53/149.42 certificate YES(O(1),O(n^1)). 585.53/149.42 585.53/149.42 Strict DPs: 585.53/149.42 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.42 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.42 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.42 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.42 Weak Trs: 585.53/149.42 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.42 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.42 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.42 , #add(#0(), @y) -> @y 585.53/149.42 , *(@x, @y) -> #mult(@x, @y) 585.53/149.42 , #natmult(#0(), @y) -> #0() 585.53/149.42 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#neg(@x), #0()) -> #0() 585.53/149.42 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.42 , #mult(#pos(@x), #0()) -> #0() 585.53/149.42 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.42 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.42 , #mult(#0(), #0()) -> #0() 585.53/149.42 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.42 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.42 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.42 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.42 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.42 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.42 , #abs(#0()) -> #0() 585.53/149.42 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.42 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.42 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.42 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.42 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.42 Obligation: 585.53/149.42 innermost runtime complexity 585.53/149.42 Answer: 585.53/149.42 YES(O(1),O(n^1)) 585.53/149.42 585.53/149.42 We use the processor 'matrix interpretation of dimension 1' to 585.53/149.42 orient following rules strictly. 585.53/149.42 585.53/149.42 DPs: 585.53/149.42 { 1: bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.42 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) } 585.53/149.42 585.53/149.42 Sub-proof: 585.53/149.42 ---------- 585.53/149.42 The following argument positions are usable: 585.53/149.42 Uargs(c_5) = {1}, Uargs(c_6) = {1}, Uargs(c_12) = {1} 585.53/149.42 585.53/149.42 TcT has computed the following constructor-based matrix 585.53/149.42 interpretation satisfying not(EDA). 585.53/149.42 585.53/149.42 [#add](x1, x2) = [0] 585.53/149.42 585.53/149.42 [*](x1, x2) = [0] 585.53/149.42 585.53/149.42 [#neg](x1) = [0] 585.53/149.42 585.53/149.42 [#natmult](x1, x2) = [0] 585.53/149.42 585.53/149.42 [#pos](x1) = [0] 585.53/149.42 585.53/149.42 [::](x1, x2) = [1] x1 + [1] x2 + [4] 585.53/149.42 585.53/149.42 [#mult](x1, x2) = [0] 585.53/149.42 585.53/149.42 [#succ](x1) = [0] 585.53/149.42 585.53/149.42 [#0] = [0] 585.53/149.42 585.53/149.42 [#abs](x1) = [0] 585.53/149.42 585.53/149.42 [#pred](x1) = [0] 585.53/149.42 585.53/149.42 [#s](x1) = [0] 585.53/149.42 585.53/149.42 [bitToInt'#1^#](x1, x2) = [2] x1 + [0] 585.53/149.42 585.53/149.42 [bitToInt'^#](x1, x2) = [2] x1 + [4] x2 + [0] 585.53/149.42 585.53/149.42 [bitToInt^#](x1) = [7] x1 + [7] 585.53/149.42 585.53/149.42 [c_5](x1) = [1] x1 + [1] 585.53/149.42 585.53/149.42 [c_6](x1) = [1] x1 + [0] 585.53/149.42 585.53/149.42 [c_12](x1) = [1] x1 + [7] 585.53/149.42 585.53/149.42 The order satisfies the following ordering constraints: 585.53/149.42 585.53/149.42 [#add(#neg(#s(#0())), @y)] = [0] 585.53/149.42 >= [0] 585.53/149.42 = [#pred(@y)] 585.53/149.42 585.53/149.42 [#add(#neg(#s(#s(@x))), @y)] = [0] 585.53/149.42 >= [0] 585.53/149.42 = [#pred(#add(#pos(#s(@x)), @y))] 585.53/149.42 585.53/149.42 [#add(#pos(#s(#0())), @y)] = [0] 585.53/149.42 >= [0] 585.53/149.42 = [#succ(@y)] 585.53/149.42 585.53/149.42 [#add(#pos(#s(#s(@x))), @y)] = [0] 585.53/149.42 >= [0] 585.53/149.42 = [#succ(#add(#pos(#s(@x)), @y))] 585.53/149.42 585.53/149.42 [#add(#0(), @y)] = [0] 585.53/149.42 ? [1] @y + [0] 585.53/149.42 = [@y] 585.53/149.42 585.53/149.42 [*(@x, @y)] = [0] 585.53/149.42 >= [0] 585.53/149.42 = [#mult(@x, @y)] 585.53/149.42 585.53/149.42 [#natmult(#0(), @y)] = [0] 585.53/149.42 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#natmult(#s(@x), @y)] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#add(#pos(@y), #natmult(@x, @y))] 585.53/149.43 585.53/149.43 [#mult(#neg(@x), #neg(@y))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(#natmult(@x, @y))] 585.53/149.43 585.53/149.43 [#mult(#neg(@x), #pos(@y))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#neg(#natmult(@x, @y))] 585.53/149.43 585.53/149.43 [#mult(#neg(@x), #0())] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#mult(#pos(@x), #neg(@y))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#neg(#natmult(@x, @y))] 585.53/149.43 585.53/149.43 [#mult(#pos(@x), #pos(@y))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(#natmult(@x, @y))] 585.53/149.43 585.53/149.43 [#mult(#pos(@x), #0())] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#mult(#0(), #neg(@y))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#mult(#0(), #pos(@y))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#mult(#0(), #0())] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#succ(#neg(#s(#0())))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#succ(#neg(#s(#s(@x))))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#neg(#s(@x))] 585.53/149.43 585.53/149.43 [#succ(#pos(#s(@x)))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(#s(#s(@x)))] 585.53/149.43 585.53/149.43 [#succ(#0())] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(#s(#0()))] 585.53/149.43 585.53/149.43 [#abs(#neg(@x))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(@x)] 585.53/149.43 585.53/149.43 [#abs(#pos(@x))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(@x)] 585.53/149.43 585.53/149.43 [#abs(#0())] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#abs(#s(@x))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(#s(@x))] 585.53/149.43 585.53/149.43 [#pred(#neg(#s(@x)))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#neg(#s(#s(@x)))] 585.53/149.43 585.53/149.43 [#pred(#pos(#s(#0())))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#0()] 585.53/149.43 585.53/149.43 [#pred(#pos(#s(#s(@x))))] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#pos(#s(@x))] 585.53/149.43 585.53/149.43 [#pred(#0())] = [0] 585.53/149.43 >= [0] 585.53/149.43 = [#neg(#s(#0()))] 585.53/149.43 585.53/149.43 [bitToInt'#1^#(::(@x, @xs), @n)] = [2] @x + [2] @xs + [8] 585.53/149.43 > [2] @xs + [1] 585.53/149.43 = [c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))))] 585.53/149.43 585.53/149.43 [bitToInt'^#(@b, @n)] = [2] @b + [4] @n + [0] 585.53/149.43 >= [2] @b + [0] 585.53/149.43 = [c_6(bitToInt'#1^#(@b, @n))] 585.53/149.43 585.53/149.43 [bitToInt^#(@b)] = [7] @b + [7] 585.53/149.43 >= [2] @b + [7] 585.53/149.43 = [c_12(bitToInt'^#(@b, #abs(#pos(#s(#0())))))] 585.53/149.43 585.53/149.43 585.53/149.43 We return to the main proof. Consider the set of all dependency 585.53/149.43 pairs 585.53/149.43 585.53/149.43 : 585.53/149.43 { 1: bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.43 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.43 , 2: bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.43 , 3: bitToInt^#(@b) -> 585.53/149.43 c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.43 585.53/149.43 Processor 'matrix interpretation of dimension 1' induces the 585.53/149.43 complexity certificate YES(?,O(n^1)) on application of dependency 585.53/149.43 pairs {1}. These cover all (indirect) predecessors of dependency 585.53/149.43 pairs {1,2,3}, their number of application is equally bounded. The 585.53/149.43 dependency pairs are shifted into the weak component. 585.53/149.43 585.53/149.43 We are left with following problem, upon which TcT provides the 585.53/149.43 certificate YES(O(1),O(1)). 585.53/149.43 585.53/149.43 Weak DPs: 585.53/149.43 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.43 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.43 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.43 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.43 Weak Trs: 585.53/149.43 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.43 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.43 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.43 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.43 , #add(#0(), @y) -> @y 585.53/149.43 , *(@x, @y) -> #mult(@x, @y) 585.53/149.43 , #natmult(#0(), @y) -> #0() 585.53/149.43 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #0()) -> #0() 585.53/149.43 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.43 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.43 , #mult(#pos(@x), #0()) -> #0() 585.53/149.43 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.43 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.43 , #mult(#0(), #0()) -> #0() 585.53/149.43 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.43 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.43 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.43 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.43 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.43 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.43 , #abs(#0()) -> #0() 585.53/149.43 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.43 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.43 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.43 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.43 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.43 Obligation: 585.53/149.43 innermost runtime complexity 585.53/149.43 Answer: 585.53/149.43 YES(O(1),O(1)) 585.53/149.43 585.53/149.43 The following weak DPs constitute a sub-graph of the DG that is 585.53/149.43 closed under successors. The DPs are removed. 585.53/149.43 585.53/149.43 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.43 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.43 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.43 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.43 585.53/149.43 We are left with following problem, upon which TcT provides the 585.53/149.43 certificate YES(O(1),O(1)). 585.53/149.43 585.53/149.43 Weak Trs: 585.53/149.43 { #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.43 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.43 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.43 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.43 , #add(#0(), @y) -> @y 585.53/149.43 , *(@x, @y) -> #mult(@x, @y) 585.53/149.43 , #natmult(#0(), @y) -> #0() 585.53/149.43 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #0()) -> #0() 585.53/149.43 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.43 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.43 , #mult(#pos(@x), #0()) -> #0() 585.53/149.43 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.43 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.43 , #mult(#0(), #0()) -> #0() 585.53/149.43 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.43 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.43 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.43 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.43 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.43 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.43 , #abs(#0()) -> #0() 585.53/149.43 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.43 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.43 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.43 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.43 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.43 Obligation: 585.53/149.43 innermost runtime complexity 585.53/149.43 Answer: 585.53/149.43 YES(O(1),O(1)) 585.53/149.43 585.53/149.43 No rule is usable, rules are removed from the input problem. 585.53/149.43 585.53/149.43 We are left with following problem, upon which TcT provides the 585.53/149.43 certificate YES(O(1),O(1)). 585.53/149.43 585.53/149.43 Rules: Empty 585.53/149.43 Obligation: 585.53/149.43 innermost runtime complexity 585.53/149.43 Answer: 585.53/149.43 YES(O(1),O(1)) 585.53/149.43 585.53/149.43 Empty rules are trivially bounded 585.53/149.43 585.53/149.43 S) We are left with following problem, upon which TcT provides the 585.53/149.43 certificate YES(O(1),O(n^1)). 585.53/149.43 585.53/149.43 Strict DPs: 585.53/149.43 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.43 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.43 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.43 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.43 Weak DPs: 585.53/149.43 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.43 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.43 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.43 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.43 Weak Trs: 585.53/149.43 { #natsub(@x, #0()) -> @x 585.53/149.43 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.43 , -(@x, @y) -> #sub(@x, @y) 585.53/149.43 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.43 , diff#1(#false()) -> #abs(#0()) 585.53/149.43 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.43 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.43 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.43 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.43 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.43 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.43 , #add(#0(), @y) -> @y 585.53/149.43 , mult#2(@zs, @b2, @x) -> 585.53/149.43 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.43 , div(@x, @y) -> #div(@x, @y) 585.53/149.43 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.43 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.43 , #and(#true(), #true()) -> #true() 585.53/149.43 , #and(#true(), #false()) -> #false() 585.53/149.43 , #and(#false(), #true()) -> #false() 585.53/149.43 , #and(#false(), #false()) -> #false() 585.53/149.43 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.43 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.43 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.43 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.43 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.43 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.43 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.43 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.43 , #compare(#0(), #0()) -> #EQ() 585.53/149.43 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.43 , #compare(#s(@x), #0()) -> #GT() 585.53/149.43 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.43 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.43 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.43 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.43 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.43 , +(@x, @y) -> #add(@x, @y) 585.53/149.43 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.43 , sum#4(#false()) -> 585.53/149.43 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.43 , *(@x, @y) -> #mult(@x, @y) 585.53/149.43 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.43 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.43 , #eq(nil(), nil()) -> #true() 585.53/149.43 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.43 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.43 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.43 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.43 , #eq(#neg(@x), #0()) -> #false() 585.53/149.43 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.43 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.43 , #eq(#pos(@x), #0()) -> #false() 585.53/149.43 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.43 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.43 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.43 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.43 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.43 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.43 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.43 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.43 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.43 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.43 , #eq(#0(), #0()) -> #true() 585.53/149.43 , #eq(#0(), #s(@y)) -> #false() 585.53/149.43 , #eq(#s(@x), #0()) -> #false() 585.53/149.43 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.43 , #natmult(#0(), @y) -> #0() 585.53/149.43 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.43 , #cklt(#EQ()) -> #false() 585.53/149.43 , #cklt(#LT()) -> #true() 585.53/149.43 , #cklt(#GT()) -> #false() 585.53/149.43 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.43 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.43 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.43 , #sub(@x, #0()) -> @x 585.53/149.43 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.43 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.43 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.43 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.43 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.43 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.43 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.43 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.43 , diff(@x, @y, @r) -> 585.53/149.43 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.43 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.43 , mult#1(nil(), @b2) -> nil() 585.53/149.43 , mult#1(::(@x, @xs), @b2) -> 585.53/149.43 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.43 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.43 , #mult(#neg(@x), #0()) -> #0() 585.53/149.43 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.43 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.43 , #mult(#pos(@x), #0()) -> #0() 585.53/149.43 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.43 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.43 , #mult(#0(), #0()) -> #0() 585.53/149.43 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.43 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.43 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.44 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.44 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.44 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.44 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.44 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.44 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.44 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.44 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.44 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.44 , #div(#0(), #neg(@y)) -> #0() 585.53/149.44 , #div(#0(), #pos(@y)) -> #0() 585.53/149.44 , #div(#0(), #0()) -> #divByZero() 585.53/149.44 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.44 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.44 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.44 , #abs(#0()) -> #0() 585.53/149.44 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.44 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.44 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.44 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.44 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.44 Obligation: 585.53/149.44 innermost runtime complexity 585.53/149.44 Answer: 585.53/149.44 YES(O(1),O(n^1)) 585.53/149.44 585.53/149.44 The following weak DPs constitute a sub-graph of the DG that is 585.53/149.44 closed under successors. The DPs are removed. 585.53/149.44 585.53/149.44 { bitToInt'#1^#(::(@x, @xs), @n) -> 585.53/149.44 c_5(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))) 585.53/149.44 , bitToInt'^#(@b, @n) -> c_6(bitToInt'#1^#(@b, @n)) 585.53/149.44 , bitToInt^#(@b) -> c_12(bitToInt'^#(@b, #abs(#pos(#s(#0()))))) } 585.53/149.44 585.53/149.44 We are left with following problem, upon which TcT provides the 585.53/149.44 certificate YES(O(1),O(n^1)). 585.53/149.44 585.53/149.44 Strict DPs: 585.53/149.44 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.44 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.44 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.44 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.44 Weak Trs: 585.53/149.44 { #natsub(@x, #0()) -> @x 585.53/149.44 , #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) 585.53/149.44 , -(@x, @y) -> #sub(@x, @y) 585.53/149.44 , diff#1(#true()) -> #abs(#pos(#s(#0()))) 585.53/149.44 , diff#1(#false()) -> #abs(#0()) 585.53/149.44 , #natdiv(#0(), #0()) -> #divByZero() 585.53/149.44 , #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y))) 585.53/149.44 , #add(#neg(#s(#0())), @y) -> #pred(@y) 585.53/149.44 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 585.53/149.44 , #add(#pos(#s(#0())), @y) -> #succ(@y) 585.53/149.44 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 585.53/149.44 , #add(#0(), @y) -> @y 585.53/149.44 , mult#2(@zs, @b2, @x) -> 585.53/149.44 mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs) 585.53/149.44 , div(@x, @y) -> #div(@x, @y) 585.53/149.44 , sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r)) 585.53/149.44 , mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) 585.53/149.44 , #and(#true(), #true()) -> #true() 585.53/149.44 , #and(#true(), #false()) -> #false() 585.53/149.44 , #and(#false(), #true()) -> #false() 585.53/149.44 , #and(#false(), #false()) -> #false() 585.53/149.44 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 585.53/149.44 , #compare(#neg(@x), #pos(@y)) -> #LT() 585.53/149.44 , #compare(#neg(@x), #0()) -> #LT() 585.53/149.44 , #compare(#pos(@x), #neg(@y)) -> #GT() 585.53/149.44 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 585.53/149.44 , #compare(#pos(@x), #0()) -> #GT() 585.53/149.44 , #compare(#0(), #neg(@y)) -> #GT() 585.53/149.44 , #compare(#0(), #pos(@y)) -> #LT() 585.53/149.44 , #compare(#0(), #0()) -> #EQ() 585.53/149.44 , #compare(#0(), #s(@y)) -> #LT() 585.53/149.44 , #compare(#s(@x), #0()) -> #GT() 585.53/149.44 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 585.53/149.44 , mult(@b1, @b2) -> mult#1(@b1, @b2) 585.53/149.44 , sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0())) 585.53/149.44 , sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s) 585.53/149.44 , sum#1(@s) -> sum#2(#equal(@s, #0()), @s) 585.53/149.44 , +(@x, @y) -> #add(@x, @y) 585.53/149.44 , sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) 585.53/149.44 , sum#4(#false()) -> 585.53/149.44 tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0())))) 585.53/149.44 , *(@x, @y) -> #mult(@x, @y) 585.53/149.44 , #less(@x, @y) -> #cklt(#compare(@x, @y)) 585.53/149.44 , #equal(@x, @y) -> #eq(@x, @y) 585.53/149.44 , #eq(nil(), nil()) -> #true() 585.53/149.44 , #eq(nil(), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.44 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 585.53/149.44 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 585.53/149.44 , #eq(#neg(@x), #pos(@y)) -> #false() 585.53/149.44 , #eq(#neg(@x), #0()) -> #false() 585.53/149.44 , #eq(#pos(@x), #neg(@y)) -> #false() 585.53/149.44 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 585.53/149.44 , #eq(#pos(@x), #0()) -> #false() 585.53/149.44 , #eq(tuple#2(@x_1, @x_2), nil()) -> #false() 585.53/149.44 , #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> 585.53/149.44 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.44 , #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false() 585.53/149.44 , #eq(::(@x_1, @x_2), nil()) -> #false() 585.53/149.44 , #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false() 585.53/149.44 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 585.53/149.44 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 585.53/149.44 , #eq(#0(), #neg(@y)) -> #false() 585.53/149.44 , #eq(#0(), #pos(@y)) -> #false() 585.53/149.44 , #eq(#0(), #0()) -> #true() 585.53/149.44 , #eq(#0(), #s(@y)) -> #false() 585.53/149.44 , #eq(#s(@x), #0()) -> #false() 585.53/149.44 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 585.53/149.44 , #natmult(#0(), @y) -> #0() 585.53/149.44 , #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) 585.53/149.44 , #cklt(#EQ()) -> #false() 585.53/149.44 , #cklt(#LT()) -> #true() 585.53/149.44 , #cklt(#GT()) -> #false() 585.53/149.44 , add(@b1, @b2) -> add'(@b1, @b2, #abs(#0())) 585.53/149.44 , #sub(@x, #neg(@y)) -> #add(@x, #pos(@y)) 585.53/149.44 , #sub(@x, #pos(@y)) -> #add(@x, #neg(@y)) 585.53/149.44 , #sub(@x, #0()) -> @x 585.53/149.44 , add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r')) 585.53/149.44 , mult#3(#true(), @b2, @zs) -> add(@b2, @zs) 585.53/149.44 , mult#3(#false(), @b2, @zs) -> @zs 585.53/149.44 , add'#1(nil(), @b2, @r) -> nil() 585.53/149.44 , add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs) 585.53/149.44 , add'#2(nil(), @r, @x, @xs) -> nil() 585.53/149.44 , add'#2(::(@y, @ys), @r, @x, @xs) -> 585.53/149.44 add'#3(sum(@x, @y, @r), @xs, @ys) 585.53/149.44 , diff(@x, @y, @r) -> 585.53/149.44 tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))), 585.53/149.44 diff#1(#less(-(-(@x, @y), @r), #0()))) 585.53/149.44 , mult#1(nil(), @b2) -> nil() 585.53/149.44 , mult#1(::(@x, @xs), @b2) -> 585.53/149.44 mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) 585.53/149.44 , #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.44 , #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.44 , #mult(#neg(@x), #0()) -> #0() 585.53/149.44 , #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y)) 585.53/149.44 , #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y)) 585.53/149.44 , #mult(#pos(@x), #0()) -> #0() 585.53/149.44 , #mult(#0(), #neg(@y)) -> #0() 585.53/149.44 , #mult(#0(), #pos(@y)) -> #0() 585.53/149.44 , #mult(#0(), #0()) -> #0() 585.53/149.44 , #succ(#neg(#s(#0()))) -> #0() 585.53/149.44 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 585.53/149.44 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 585.53/149.44 , #succ(#0()) -> #pos(#s(#0())) 585.53/149.44 , sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0())) 585.53/149.44 , sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0()))))) 585.53/149.44 , #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.44 , #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.44 , #div(#neg(@x), #0()) -> #divByZero() 585.53/149.44 , #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y)) 585.53/149.44 , #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y)) 585.53/149.44 , #div(#pos(@x), #0()) -> #divByZero() 585.53/149.44 , #div(#0(), #neg(@y)) -> #0() 585.53/149.44 , #div(#0(), #pos(@y)) -> #0() 585.53/149.44 , #div(#0(), #0()) -> #divByZero() 585.53/149.44 , add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r) 585.53/149.44 , #abs(#neg(@x)) -> #pos(@x) 585.53/149.44 , #abs(#pos(@x)) -> #pos(@x) 585.53/149.44 , #abs(#0()) -> #0() 585.53/149.44 , #abs(#s(@x)) -> #pos(#s(@x)) 585.53/149.44 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 585.53/149.44 , #pred(#pos(#s(#0()))) -> #0() 585.53/149.44 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 585.53/149.44 , #pred(#0()) -> #neg(#s(#0())) } 585.53/149.44 Obligation: 585.53/149.44 innermost runtime complexity 585.53/149.44 Answer: 585.53/149.44 YES(O(1),O(n^1)) 585.53/149.44 585.53/149.44 No rule is usable, rules are removed from the input problem. 585.53/149.44 585.53/149.44 We are left with following problem, upon which TcT provides the 585.53/149.44 certificate YES(O(1),O(n^1)). 585.53/149.44 585.53/149.44 Strict DPs: 585.53/149.44 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.44 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.44 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.44 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.44 Obligation: 585.53/149.44 innermost runtime complexity 585.53/149.44 Answer: 585.53/149.44 YES(O(1),O(n^1)) 585.53/149.44 585.53/149.44 We use the processor 'matrix interpretation of dimension 1' to 585.53/149.44 orient following rules strictly. 585.53/149.44 585.53/149.44 DPs: 585.53/149.44 { 2: compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.44 , 3: compare#1^#(::(@x, @xs), @b2) -> 585.53/149.44 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.44 585.53/149.44 Sub-proof: 585.53/149.44 ---------- 585.53/149.44 The following argument positions are usable: 585.53/149.44 Uargs(c_10) = {1}, Uargs(c_15) = {1}, Uargs(c_22) = {1} 585.53/149.44 585.53/149.44 TcT has computed the following constructor-based matrix 585.53/149.44 interpretation satisfying not(EDA). 585.53/149.44 585.53/149.44 [::](x1, x2) = [1] x1 + [1] x2 + [2] 585.53/149.44 585.53/149.44 [compare^#](x1, x2) = [1] x1 + [4] x2 + [4] 585.53/149.44 585.53/149.44 [compare#2^#](x1, x2, x3) = [4] x1 + [1] x2 + [1] x3 + [0] 585.53/149.44 585.53/149.44 [compare#1^#](x1, x2) = [1] x1 + [4] x2 + [2] 585.53/149.44 585.53/149.44 [c_10](x1) = [1] x1 + [2] 585.53/149.44 585.53/149.44 [c_15](x1) = [1] x1 + [1] 585.53/149.44 585.53/149.44 [c_22](x1) = [1] x1 + [3] 585.53/149.44 585.53/149.44 The order satisfies the following ordering constraints: 585.53/149.44 585.53/149.44 [compare^#(@b1, @b2)] = [1] @b1 + [4] @b2 + [4] 585.53/149.44 >= [1] @b1 + [4] @b2 + [4] 585.53/149.44 = [c_10(compare#1^#(@b1, @b2))] 585.53/149.44 585.53/149.44 [compare#2^#(::(@y, @ys), @x, @xs)] = [1] @x + [4] @y + [1] @xs + [4] @ys + [8] 585.53/149.44 > [1] @xs + [4] @ys + [5] 585.53/149.44 = [c_15(compare^#(@xs, @ys))] 585.53/149.44 585.53/149.44 [compare#1^#(::(@x, @xs), @b2)] = [1] @x + [4] @b2 + [1] @xs + [4] 585.53/149.44 > [1] @x + [4] @b2 + [1] @xs + [3] 585.53/149.44 = [c_22(compare#2^#(@b2, @x, @xs))] 585.53/149.44 585.53/149.44 585.53/149.44 We return to the main proof. Consider the set of all dependency 585.53/149.44 pairs 585.53/149.44 585.53/149.44 : 585.53/149.44 { 1: compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.44 , 2: compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.44 , 3: compare#1^#(::(@x, @xs), @b2) -> 585.53/149.44 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.44 585.53/149.44 Processor 'matrix interpretation of dimension 1' induces the 585.53/149.44 complexity certificate YES(?,O(n^1)) on application of dependency 585.53/149.44 pairs {2,3}. These cover all (indirect) predecessors of dependency 585.53/149.44 pairs {1,2,3}, their number of application is equally bounded. The 585.53/149.44 dependency pairs are shifted into the weak component. 585.53/149.44 585.53/149.44 We are left with following problem, upon which TcT provides the 585.53/149.44 certificate YES(O(1),O(1)). 585.53/149.44 585.53/149.44 Weak DPs: 585.53/149.44 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.44 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.44 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.44 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.44 Obligation: 585.53/149.44 innermost runtime complexity 585.53/149.44 Answer: 585.53/149.44 YES(O(1),O(1)) 585.53/149.44 585.53/149.44 The following weak DPs constitute a sub-graph of the DG that is 585.53/149.44 closed under successors. The DPs are removed. 585.53/149.44 585.53/149.44 { compare^#(@b1, @b2) -> c_10(compare#1^#(@b1, @b2)) 585.53/149.44 , compare#2^#(::(@y, @ys), @x, @xs) -> c_15(compare^#(@xs, @ys)) 585.53/149.44 , compare#1^#(::(@x, @xs), @b2) -> 585.53/149.44 c_22(compare#2^#(@b2, @x, @xs)) } 585.53/149.44 585.53/149.44 We are left with following problem, upon which TcT provides the 585.53/149.44 certificate YES(O(1),O(1)). 585.53/149.44 585.53/149.44 Rules: Empty 585.53/149.44 Obligation: 585.53/149.44 innermost runtime complexity 585.53/149.44 Answer: 585.53/149.44 YES(O(1),O(1)) 585.53/149.44 585.53/149.44 Empty rules are trivially bounded 585.53/149.44 585.53/149.44 585.53/149.44 585.53/149.44 585.53/149.44 Hurray, we answered YES(O(1),O(n^2)) 586.20/150.01 EOF