tct
YES(?,O(n^2))
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, *(@x, @y) -> #mult(@x, @y)
, +(@x, @y) -> #add(@x, @y)
, -(@x, @y) -> #sub(@x, @y)
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) }
Weak Trs:
{ #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We add following dependency tuples
Strict DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, *^#(@x, @y) -> #mult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, -^#(@x, @y) -> #sub^#(@x, @y)
, add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#1^#(nil(), @b2) -> c_43()
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#false(), @b2, @zs) -> c_45()
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) }
Weak DPs:
{ #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
and replace the set of basic marked basic terms accordingly.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, *^#(@x, @y) -> #mult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, -^#(@x, @y) -> #sub^#(@x, @y)
, add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#1^#(nil(), @b2) -> c_43()
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#false(), @b2, @zs) -> c_45()
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) }
Weak DPs:
{ #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: #abs^#(#0()) -> c_1()
2: #abs^#(#neg(@x)) -> c_2()
3: #abs^#(#pos(@x)) -> c_3()
4: #abs^#(#s(@x)) -> c_4()
5: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
6: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_2 #compare^#(#s(@x), #0()) -> c_97() :100
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_2 #compare^#(#0(), #0()) -> c_87() :90
-->_1 #ckgt^#(#LT()) -> c_101() :89
-->_1 #ckgt^#(#GT()) -> c_100() :88
-->_1 #ckgt^#(#EQ()) -> c_99() :87
7: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #cklt^#(#LT()) -> c_104() :104
-->_1 #cklt^#(#GT()) -> c_103() :103
-->_1 #cklt^#(#EQ()) -> c_102() :102
-->_2 #compare^#(#s(@x), #0()) -> c_97() :100
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_2 #compare^#(#0(), #0()) -> c_87() :90
8: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :113
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :112
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :110
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :109
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :111
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :108
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :107
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :106
-->_1 #mult^#(#0(), #0()) -> c_105() :105
9: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :116
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :115
-->_1 #add^#(#0(), @y) -> c_114() :114
10: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :121
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :120
-->_1 #sub^#(@x, #0()) -> c_119() :119
11: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :12
-->_2 #abs^#(#0()) -> c_1() :1
12: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :13
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :14
13: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :15
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :16
14: add'#1^#(nil(), @b2, @r) -> c_14()
15: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)),
+^#(+(@x, @y), @r),
+^#(@x, @y)) :18
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :17
16: add'#2^#(nil(), @r, @x, @xs) -> c_16()
17: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :12
18: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :19
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :9
19: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :61
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :60
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
20: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :21
-->_2 #abs^#(#pos(@x)) -> c_3() :3
21: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :23
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :22
22: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :21
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :8
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :8
23: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
24: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :26
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :25
25: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :28
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :27
26: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
27: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :29
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :24
28: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
29: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :31
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :30
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
30: compare#4^#(#false(), @r, @x, @y) -> c_29()
31: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0()))) :33
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :32
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :7
32: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :35
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :34
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :6
33: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :10
34: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
35: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :3
36: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :39
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :38
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :37
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :10
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :10
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :7
37: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :40
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :10
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :8
38: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
39: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :3
40: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :130
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :129
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :127
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :126
-->_1 #div^#(#pos(@x), #0()) -> c_128() :128
-->_1 #div^#(#neg(@x), #0()) -> c_125() :125
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :124
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :123
-->_1 #div^#(#0(), #0()) -> c_122() :122
41: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :24
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :7
42: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :43
-->_1 mult#1^#(nil(), @b2) -> c_43() :44
43: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :45
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :42
-->_2 #abs^#(#0()) -> c_1() :1
44: mult#1^#(nil(), @b2) -> c_43()
45: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :47
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :46
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
46: mult#3^#(#false(), @b2, @zs) -> c_45()
47: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :11
48: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :42
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :42
49: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :51
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :50
-->_3 #abs^#(#0()) -> c_1() :1
50: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
51: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :52
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :53
52: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :54
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :55
53: sub'#1^#(nil(), @b2, @r) -> c_52()
54: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :56
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :36
55: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
56: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :57
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :51
57: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :59
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :58
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
58: sub'#5^#(#false(), @z, @zs) -> c_57()
59: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
60: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :63
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :62
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
61: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :1
-->_1 #abs^#(#0()) -> c_1() :1
62: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :65
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :64
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
63: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :3
-->_2 #abs^#(#0()) -> c_1() :1
64: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :3
-->_1 #abs^#(#pos(@x)) -> c_3() :3
65: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :3
-->_1 #abs^#(#0()) -> c_1() :1
66: #eq^#(#0(), #0()) -> c_66()
67: #eq^#(#0(), #neg(@y)) -> c_67()
68: #eq^#(#0(), #pos(@y)) -> c_68()
69: #eq^#(#0(), #s(@y)) -> c_69()
70: #eq^#(#neg(@x), #0()) -> c_70()
71: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
72: #eq^#(#neg(@x), #pos(@y)) -> c_72()
73: #eq^#(#pos(@x), #0()) -> c_73()
74: #eq^#(#pos(@x), #neg(@y)) -> c_74()
75: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
76: #eq^#(#s(@x), #0()) -> c_76()
77: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
78: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_3 #eq^#(nil(), nil()) -> c_82() :82
-->_2 #eq^#(nil(), nil()) -> c_82() :82
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_3 #eq^#(#s(@x), #0()) -> c_76() :76
-->_2 #eq^#(#s(@x), #0()) -> c_76() :76
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_3 #eq^#(#0(), #0()) -> c_66() :66
-->_2 #eq^#(#0(), #0()) -> c_66() :66
79: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
80: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
81: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
82: #eq^#(nil(), nil()) -> c_82()
83: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
84: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
85: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
86: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_3 #eq^#(nil(), nil()) -> c_82() :82
-->_2 #eq^#(nil(), nil()) -> c_82() :82
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_3 #eq^#(#s(@x), #0()) -> c_76() :76
-->_2 #eq^#(#s(@x), #0()) -> c_76() :76
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_3 #eq^#(#0(), #0()) -> c_66() :66
-->_2 #eq^#(#0(), #0()) -> c_66() :66
87: #ckgt^#(#EQ()) -> c_99()
88: #ckgt^#(#GT()) -> c_100()
89: #ckgt^#(#LT()) -> c_101()
90: #compare^#(#0(), #0()) -> c_87()
91: #compare^#(#0(), #neg(@y)) -> c_88()
92: #compare^#(#0(), #pos(@y)) -> c_89()
93: #compare^#(#0(), #s(@y)) -> c_90()
94: #compare^#(#neg(@x), #0()) -> c_91()
95: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_1 #compare^#(#s(@x), #0()) -> c_97() :100
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_1 #compare^#(#0(), #0()) -> c_87() :90
96: #compare^#(#neg(@x), #pos(@y)) -> c_93()
97: #compare^#(#pos(@x), #0()) -> c_94()
98: #compare^#(#pos(@x), #neg(@y)) -> c_95()
99: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_1 #compare^#(#s(@x), #0()) -> c_97() :100
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_1 #compare^#(#0(), #0()) -> c_87() :90
100: #compare^#(#s(@x), #0()) -> c_97()
101: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_1 #compare^#(#s(@x), #0()) -> c_97() :100
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_1 #compare^#(#0(), #0()) -> c_87() :90
102: #cklt^#(#EQ()) -> c_102()
103: #cklt^#(#GT()) -> c_103()
104: #cklt^#(#LT()) -> c_104()
105: #mult^#(#0(), #0()) -> c_105()
106: #mult^#(#0(), #neg(@y)) -> c_106()
107: #mult^#(#0(), #pos(@y)) -> c_107()
108: #mult^#(#neg(@x), #0()) -> c_108()
109: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
110: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
111: #mult^#(#pos(@x), #0()) -> c_111()
112: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
113: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
114: #add^#(#0(), @y) -> c_114()
115: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
116: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
117: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
118: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
119: #sub^#(@x, #0()) -> c_119()
120: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :116
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :115
-->_1 #add^#(#0(), @y) -> c_114() :114
121: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :116
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :115
-->_1 #add^#(#0(), @y) -> c_114() :114
122: #div^#(#0(), #0()) -> c_122()
123: #div^#(#0(), #neg(@y)) -> c_123()
124: #div^#(#0(), #pos(@y)) -> c_124()
125: #div^#(#neg(@x), #0()) -> c_125()
126: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
127: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
128: #div^#(#pos(@x), #0()) -> c_128()
129: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
130: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {50} and add Pre({50}) = {49} to the strict component.
- We remove {53} and add Pre({53}) = {51} to the strict component.
- We remove {55} and add Pre({55}) = {52} to the strict component.
- We remove {58} and add Pre({58}) = {57} to the strict component.
- We remove {44} and add Pre({44}) = {42} to the strict component.
- We remove {46} and add Pre({46}) = {45} to the strict component.
- We remove {40} and add Pre({40}) = {37} to the strict component.
- We remove {30} and add Pre({30}) = {29} to the strict component.
- We remove {14} and add Pre({14}) = {12} to the strict component.
- We remove {16} and add Pre({16}) = {13} to the strict component.
- We remove {10} and add Pre({10}) = {37,36,36,33} to the strict component.
- We remove {9} and add Pre({9}) = {36,36,22,18,18} to the strict component.
- We remove {8} and add Pre({8}) = {37,22,22} to the strict component.
- We remove {7} and add Pre({7}) = {41,36,31} to the strict component.
- We remove {6} and add Pre({6}) = {32} to the strict component.
- We remove {5} and add Pre({5}) = {62,60,57,45,29,19} to the strict component.
- We remove {4} and add Pre({4}) = {} to the strict component.
- We remove {3} and add Pre({3}) = {65,64,64,63,39,35,20} to the strict component.
- We remove {2} and add Pre({2}) = {} to the strict component.
- We remove {1} and add Pre({1}) = {65,63,61,61,59,49,43,38,34,28,26,23,11} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#5^#(#false(), @z, @zs) -> c_57()
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :46
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :112
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :113
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :41
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :40
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :48
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :11
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :92
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :92
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
12: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :14
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :13
13: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :16
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :15
14: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
15: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :17
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :12
16: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
17: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :18
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :114
18: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :88
-->_1 compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0()))) :20
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :19
19: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :72
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :22
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :21
20: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :108
21: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
22: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :48
23: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :108
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :108
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :88
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :26
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :25
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :24
24: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :115
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :108
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :92
25: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
26: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :48
27: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :88
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :12
28: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :29
-->_1 mult#1^#(nil(), @b2) -> c_43() :125
29: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :30
-->_2 #abs^#(#0()) -> c_1() :46
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :28
30: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :31
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :126
31: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
32: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :28
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :28
33: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :34
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :127
-->_3 #abs^#(#0()) -> c_1() :46
34: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :35
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :128
35: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :36
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :129
36: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :37
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :23
37: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :38
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :34
38: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :39
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :130
39: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
40: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :43
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :42
41: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :46
-->_1 #abs^#(#0()) -> c_1() :46
42: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :45
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :44
43: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :48
-->_2 #abs^#(#0()) -> c_1() :46
44: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :48
-->_1 #abs^#(#pos(@x)) -> c_3() :48
45: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :48
-->_1 #abs^#(#0()) -> c_1() :46
46: #abs^#(#0()) -> c_1()
47: #abs^#(#neg(@x)) -> c_2()
48: #abs^#(#pos(@x)) -> c_3()
49: #abs^#(#s(@x)) -> c_4()
50: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
51: #eq^#(#0(), #0()) -> c_66()
52: #eq^#(#0(), #neg(@y)) -> c_67()
53: #eq^#(#0(), #pos(@y)) -> c_68()
54: #eq^#(#0(), #s(@y)) -> c_69()
55: #eq^#(#neg(@x), #0()) -> c_70()
56: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
57: #eq^#(#neg(@x), #pos(@y)) -> c_72()
58: #eq^#(#pos(@x), #0()) -> c_73()
59: #eq^#(#pos(@x), #neg(@y)) -> c_74()
60: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
61: #eq^#(#s(@x), #0()) -> c_76()
62: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
63: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_3 #eq^#(nil(), nil()) -> c_82() :67
-->_2 #eq^#(nil(), nil()) -> c_82() :67
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_3 #eq^#(#s(@x), #0()) -> c_76() :61
-->_2 #eq^#(#s(@x), #0()) -> c_76() :61
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_3 #eq^#(#0(), #0()) -> c_66() :51
-->_2 #eq^#(#0(), #0()) -> c_66() :51
64: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
65: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
66: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
67: #eq^#(nil(), nil()) -> c_82()
68: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
69: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
70: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
71: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_3 #eq^#(nil(), nil()) -> c_82() :67
-->_2 #eq^#(nil(), nil()) -> c_82() :67
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_3 #eq^#(#s(@x), #0()) -> c_76() :61
-->_2 #eq^#(#s(@x), #0()) -> c_76() :61
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_3 #eq^#(#0(), #0()) -> c_66() :51
-->_2 #eq^#(#0(), #0()) -> c_66() :51
72: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_2 #compare^#(#s(@x), #0()) -> c_97() :86
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_2 #compare^#(#0(), #0()) -> c_87() :76
-->_1 #ckgt^#(#LT()) -> c_101() :75
-->_1 #ckgt^#(#GT()) -> c_100() :74
-->_1 #ckgt^#(#EQ()) -> c_99() :73
73: #ckgt^#(#EQ()) -> c_99()
74: #ckgt^#(#GT()) -> c_100()
75: #ckgt^#(#LT()) -> c_101()
76: #compare^#(#0(), #0()) -> c_87()
77: #compare^#(#0(), #neg(@y)) -> c_88()
78: #compare^#(#0(), #pos(@y)) -> c_89()
79: #compare^#(#0(), #s(@y)) -> c_90()
80: #compare^#(#neg(@x), #0()) -> c_91()
81: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_1 #compare^#(#s(@x), #0()) -> c_97() :86
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_1 #compare^#(#0(), #0()) -> c_87() :76
82: #compare^#(#neg(@x), #pos(@y)) -> c_93()
83: #compare^#(#pos(@x), #0()) -> c_94()
84: #compare^#(#pos(@x), #neg(@y)) -> c_95()
85: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_1 #compare^#(#s(@x), #0()) -> c_97() :86
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_1 #compare^#(#0(), #0()) -> c_87() :76
86: #compare^#(#s(@x), #0()) -> c_97()
87: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_1 #compare^#(#s(@x), #0()) -> c_97() :86
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_1 #compare^#(#0(), #0()) -> c_87() :76
88: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :91
-->_1 #cklt^#(#GT()) -> c_103() :90
-->_1 #cklt^#(#EQ()) -> c_102() :89
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_2 #compare^#(#s(@x), #0()) -> c_97() :86
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_2 #compare^#(#0(), #0()) -> c_87() :76
89: #cklt^#(#EQ()) -> c_102()
90: #cklt^#(#GT()) -> c_103()
91: #cklt^#(#LT()) -> c_104()
92: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :101
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :100
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :98
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :97
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :99
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :96
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :95
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :94
-->_1 #mult^#(#0(), #0()) -> c_105() :93
93: #mult^#(#0(), #0()) -> c_105()
94: #mult^#(#0(), #neg(@y)) -> c_106()
95: #mult^#(#0(), #pos(@y)) -> c_107()
96: #mult^#(#neg(@x), #0()) -> c_108()
97: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
98: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
99: #mult^#(#pos(@x), #0()) -> c_111()
100: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
101: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
102: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :105
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :104
-->_1 #add^#(#0(), @y) -> c_114() :103
103: #add^#(#0(), @y) -> c_114()
104: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
105: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
106: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
107: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
108: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :111
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :110
-->_1 #sub^#(@x, #0()) -> c_119() :109
109: #sub^#(@x, #0()) -> c_119()
110: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :105
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :104
-->_1 #add^#(#0(), @y) -> c_114() :103
111: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :105
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :104
-->_1 #add^#(#0(), @y) -> c_114() :103
112: add'#1^#(nil(), @b2, @r) -> c_14()
113: add'#2^#(nil(), @r, @x, @xs) -> c_16()
114: compare#4^#(#false(), @r, @x, @y) -> c_29()
115: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :124
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :123
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :121
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :120
-->_1 #div^#(#pos(@x), #0()) -> c_128() :122
-->_1 #div^#(#neg(@x), #0()) -> c_125() :119
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :118
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :117
-->_1 #div^#(#0(), #0()) -> c_122() :116
116: #div^#(#0(), #0()) -> c_122()
117: #div^#(#0(), #neg(@y)) -> c_123()
118: #div^#(#0(), #pos(@y)) -> c_124()
119: #div^#(#neg(@x), #0()) -> c_125()
120: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
121: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
122: #div^#(#pos(@x), #0()) -> c_128()
123: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
124: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
125: mult#1^#(nil(), @b2) -> c_43()
126: mult#3^#(#false(), @b2, @zs) -> c_45()
127: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
128: sub'#1^#(nil(), @b2, @r) -> c_52()
129: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
130: sub'#5^#(#false(), @z, @zs) -> c_57()
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {39} and add Pre({39}) = {38} to the strict component.
- We remove {24} and add Pre({24}) = {23} to the strict component.
- We remove {25} and add Pre({25}) = {23} to the strict component.
- We remove {26} and add Pre({26}) = {23} to the strict component.
- We remove {21} and add Pre({21}) = {19} to the strict component.
- We remove {22} and add Pre({22}) = {19} to the strict component.
- We remove {20} and add Pre({20}) = {18} to the strict component.
- We remove {16} and add Pre({16}) = {13} to the strict component.
- We remove {14} and add Pre({14}) = {12} to the strict component.
- We remove {11} and add Pre({11}) = {9} to the strict component.
- We remove {44} and add Pre({44}) = {42} to the strict component.
- We remove {45} and add Pre({45}) = {42} to the strict component.
- We remove {43} and add Pre({43}) = {40} to the strict component.
- We remove {41} and add Pre({41}) = {7} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :32
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :98
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :99
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :30
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :34
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :100
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :78
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :78
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :101
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :12
12: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :102
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :13
13: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :14
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
14: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :15
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :103
15: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :104
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :74
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :16
16: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :106
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :105
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :58
17: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :109
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :108
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :107
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :94
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :94
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :74
18: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :74
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
19: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :20
-->_1 mult#1^#(nil(), @b2) -> c_43() :120
20: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :21
-->_2 #abs^#(#0()) -> c_1() :32
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :19
21: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :22
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :121
22: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
23: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :19
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :19
24: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :25
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :122
-->_3 #abs^#(#0()) -> c_1() :32
25: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :26
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :123
26: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :27
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :124
27: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :28
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :17
28: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :29
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :25
29: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :126
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :125
30: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :31
31: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
32: #abs^#(#0()) -> c_1()
33: #abs^#(#neg(@x)) -> c_2()
34: #abs^#(#pos(@x)) -> c_3()
35: #abs^#(#s(@x)) -> c_4()
36: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
37: #eq^#(#0(), #0()) -> c_66()
38: #eq^#(#0(), #neg(@y)) -> c_67()
39: #eq^#(#0(), #pos(@y)) -> c_68()
40: #eq^#(#0(), #s(@y)) -> c_69()
41: #eq^#(#neg(@x), #0()) -> c_70()
42: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
43: #eq^#(#neg(@x), #pos(@y)) -> c_72()
44: #eq^#(#pos(@x), #0()) -> c_73()
45: #eq^#(#pos(@x), #neg(@y)) -> c_74()
46: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
47: #eq^#(#s(@x), #0()) -> c_76()
48: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
49: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_3 #eq^#(nil(), nil()) -> c_82() :53
-->_2 #eq^#(nil(), nil()) -> c_82() :53
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_3 #eq^#(#s(@x), #0()) -> c_76() :47
-->_2 #eq^#(#s(@x), #0()) -> c_76() :47
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_3 #eq^#(#0(), #0()) -> c_66() :37
-->_2 #eq^#(#0(), #0()) -> c_66() :37
50: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
51: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
52: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
53: #eq^#(nil(), nil()) -> c_82()
54: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
55: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
56: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
57: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_3 #eq^#(nil(), nil()) -> c_82() :53
-->_2 #eq^#(nil(), nil()) -> c_82() :53
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_3 #eq^#(#s(@x), #0()) -> c_76() :47
-->_2 #eq^#(#s(@x), #0()) -> c_76() :47
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_3 #eq^#(#0(), #0()) -> c_66() :37
-->_2 #eq^#(#0(), #0()) -> c_66() :37
58: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_2 #compare^#(#s(@x), #0()) -> c_97() :72
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_2 #compare^#(#0(), #0()) -> c_87() :62
-->_1 #ckgt^#(#LT()) -> c_101() :61
-->_1 #ckgt^#(#GT()) -> c_100() :60
-->_1 #ckgt^#(#EQ()) -> c_99() :59
59: #ckgt^#(#EQ()) -> c_99()
60: #ckgt^#(#GT()) -> c_100()
61: #ckgt^#(#LT()) -> c_101()
62: #compare^#(#0(), #0()) -> c_87()
63: #compare^#(#0(), #neg(@y)) -> c_88()
64: #compare^#(#0(), #pos(@y)) -> c_89()
65: #compare^#(#0(), #s(@y)) -> c_90()
66: #compare^#(#neg(@x), #0()) -> c_91()
67: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_1 #compare^#(#s(@x), #0()) -> c_97() :72
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_1 #compare^#(#0(), #0()) -> c_87() :62
68: #compare^#(#neg(@x), #pos(@y)) -> c_93()
69: #compare^#(#pos(@x), #0()) -> c_94()
70: #compare^#(#pos(@x), #neg(@y)) -> c_95()
71: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_1 #compare^#(#s(@x), #0()) -> c_97() :72
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_1 #compare^#(#0(), #0()) -> c_87() :62
72: #compare^#(#s(@x), #0()) -> c_97()
73: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_1 #compare^#(#s(@x), #0()) -> c_97() :72
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_1 #compare^#(#0(), #0()) -> c_87() :62
74: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :77
-->_1 #cklt^#(#GT()) -> c_103() :76
-->_1 #cklt^#(#EQ()) -> c_102() :75
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_2 #compare^#(#s(@x), #0()) -> c_97() :72
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_2 #compare^#(#0(), #0()) -> c_87() :62
75: #cklt^#(#EQ()) -> c_102()
76: #cklt^#(#GT()) -> c_103()
77: #cklt^#(#LT()) -> c_104()
78: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :87
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :86
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :84
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :83
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :85
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :82
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :81
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :80
-->_1 #mult^#(#0(), #0()) -> c_105() :79
79: #mult^#(#0(), #0()) -> c_105()
80: #mult^#(#0(), #neg(@y)) -> c_106()
81: #mult^#(#0(), #pos(@y)) -> c_107()
82: #mult^#(#neg(@x), #0()) -> c_108()
83: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
84: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
85: #mult^#(#pos(@x), #0()) -> c_111()
86: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
87: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
88: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :91
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :90
-->_1 #add^#(#0(), @y) -> c_114() :89
89: #add^#(#0(), @y) -> c_114()
90: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
91: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
92: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
93: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
94: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :97
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :96
-->_1 #sub^#(@x, #0()) -> c_119() :95
95: #sub^#(@x, #0()) -> c_119()
96: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :91
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :90
-->_1 #add^#(#0(), @y) -> c_114() :89
97: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :91
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :90
-->_1 #add^#(#0(), @y) -> c_114() :89
98: add'#1^#(nil(), @b2, @r) -> c_14()
99: add'#2^#(nil(), @r, @x, @xs) -> c_16()
100: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
101: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
102: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
103: compare#4^#(#false(), @r, @x, @y) -> c_29()
104: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :94
105: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
106: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :34
107: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :110
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :94
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :78
108: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
109: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :34
110: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :119
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :118
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :115
-->_1 #div^#(#pos(@x), #0()) -> c_128() :117
-->_1 #div^#(#neg(@x), #0()) -> c_125() :114
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :113
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :112
-->_1 #div^#(#0(), #0()) -> c_122() :111
111: #div^#(#0(), #0()) -> c_122()
112: #div^#(#0(), #neg(@y)) -> c_123()
113: #div^#(#0(), #pos(@y)) -> c_124()
114: #div^#(#neg(@x), #0()) -> c_125()
115: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
116: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: #div^#(#pos(@x), #0()) -> c_128()
118: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
119: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
120: mult#1^#(nil(), @b2) -> c_43()
121: mult#3^#(#false(), @b2, @zs) -> c_45()
122: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
123: sub'#1^#(nil(), @b2, @r) -> c_52()
124: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
125: sub'#5^#(#false(), @z, @zs) -> c_57()
126: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
127: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :32
-->_1 #abs^#(#0()) -> c_1() :32
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :34
-->_2 #abs^#(#0()) -> c_1() :32
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :34
-->_1 #abs^#(#pos(@x)) -> c_3() :34
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :34
-->_1 #abs^#(#0()) -> c_1() :32
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {29} and add Pre({29}) = {28} to the strict component.
- We remove {17} and add Pre({17}) = {27} to the strict component.
- We remove {16} and add Pre({16}) = {15} to the strict component.
- We remove {31} and add Pre({31}) = {30} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :28
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :94
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :95
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :126
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :27
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :30
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :96
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :74
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :74
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :97
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :12
12: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :98
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :13
13: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :14
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
14: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :15
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :99
15: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :101
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :100
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :70
16: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :70
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
17: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :18
-->_1 mult#1^#(nil(), @b2) -> c_43() :118
18: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :19
-->_2 #abs^#(#0()) -> c_1() :28
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :17
19: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :20
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :119
20: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
21: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :17
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :17
22: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :23
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :120
-->_3 #abs^#(#0()) -> c_1() :28
23: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :24
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :121
24: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :25
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :122
25: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :104
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :26
26: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :123
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :23
27: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
28: #abs^#(#0()) -> c_1()
29: #abs^#(#neg(@x)) -> c_2()
30: #abs^#(#pos(@x)) -> c_3()
31: #abs^#(#s(@x)) -> c_4()
32: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
33: #eq^#(#0(), #0()) -> c_66()
34: #eq^#(#0(), #neg(@y)) -> c_67()
35: #eq^#(#0(), #pos(@y)) -> c_68()
36: #eq^#(#0(), #s(@y)) -> c_69()
37: #eq^#(#neg(@x), #0()) -> c_70()
38: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
39: #eq^#(#neg(@x), #pos(@y)) -> c_72()
40: #eq^#(#pos(@x), #0()) -> c_73()
41: #eq^#(#pos(@x), #neg(@y)) -> c_74()
42: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
43: #eq^#(#s(@x), #0()) -> c_76()
44: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
45: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_3 #eq^#(nil(), nil()) -> c_82() :49
-->_2 #eq^#(nil(), nil()) -> c_82() :49
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_3 #eq^#(#s(@x), #0()) -> c_76() :43
-->_2 #eq^#(#s(@x), #0()) -> c_76() :43
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_3 #eq^#(#0(), #0()) -> c_66() :33
-->_2 #eq^#(#0(), #0()) -> c_66() :33
46: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
47: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
48: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
49: #eq^#(nil(), nil()) -> c_82()
50: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
51: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
52: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
53: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_3 #eq^#(nil(), nil()) -> c_82() :49
-->_2 #eq^#(nil(), nil()) -> c_82() :49
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_3 #eq^#(#s(@x), #0()) -> c_76() :43
-->_2 #eq^#(#s(@x), #0()) -> c_76() :43
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_3 #eq^#(#0(), #0()) -> c_66() :33
-->_2 #eq^#(#0(), #0()) -> c_66() :33
54: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_2 #compare^#(#s(@x), #0()) -> c_97() :68
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_2 #compare^#(#0(), #0()) -> c_87() :58
-->_1 #ckgt^#(#LT()) -> c_101() :57
-->_1 #ckgt^#(#GT()) -> c_100() :56
-->_1 #ckgt^#(#EQ()) -> c_99() :55
55: #ckgt^#(#EQ()) -> c_99()
56: #ckgt^#(#GT()) -> c_100()
57: #ckgt^#(#LT()) -> c_101()
58: #compare^#(#0(), #0()) -> c_87()
59: #compare^#(#0(), #neg(@y)) -> c_88()
60: #compare^#(#0(), #pos(@y)) -> c_89()
61: #compare^#(#0(), #s(@y)) -> c_90()
62: #compare^#(#neg(@x), #0()) -> c_91()
63: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#s(@x), #0()) -> c_97() :68
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_1 #compare^#(#0(), #0()) -> c_87() :58
64: #compare^#(#neg(@x), #pos(@y)) -> c_93()
65: #compare^#(#pos(@x), #0()) -> c_94()
66: #compare^#(#pos(@x), #neg(@y)) -> c_95()
67: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_1 #compare^#(#s(@x), #0()) -> c_97() :68
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_1 #compare^#(#0(), #0()) -> c_87() :58
68: #compare^#(#s(@x), #0()) -> c_97()
69: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_1 #compare^#(#s(@x), #0()) -> c_97() :68
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_1 #compare^#(#0(), #0()) -> c_87() :58
70: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :73
-->_1 #cklt^#(#GT()) -> c_103() :72
-->_1 #cklt^#(#EQ()) -> c_102() :71
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_2 #compare^#(#s(@x), #0()) -> c_97() :68
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_2 #compare^#(#0(), #0()) -> c_87() :58
71: #cklt^#(#EQ()) -> c_102()
72: #cklt^#(#GT()) -> c_103()
73: #cklt^#(#LT()) -> c_104()
74: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :83
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :82
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :80
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :79
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :81
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :78
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :77
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :76
-->_1 #mult^#(#0(), #0()) -> c_105() :75
75: #mult^#(#0(), #0()) -> c_105()
76: #mult^#(#0(), #neg(@y)) -> c_106()
77: #mult^#(#0(), #pos(@y)) -> c_107()
78: #mult^#(#neg(@x), #0()) -> c_108()
79: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
80: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
81: #mult^#(#pos(@x), #0()) -> c_111()
82: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
83: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
84: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :86
-->_1 #add^#(#0(), @y) -> c_114() :85
85: #add^#(#0(), @y) -> c_114()
86: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
87: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
88: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
89: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
90: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :93
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :92
-->_1 #sub^#(@x, #0()) -> c_119() :91
91: #sub^#(@x, #0()) -> c_119()
92: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :86
-->_1 #add^#(#0(), @y) -> c_114() :85
93: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :86
-->_1 #add^#(#0(), @y) -> c_114() :85
94: add'#1^#(nil(), @b2, @r) -> c_14()
95: add'#2^#(nil(), @r, @x, @xs) -> c_16()
96: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
97: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
98: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
99: compare#4^#(#false(), @r, @x, @y) -> c_29()
100: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :103
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :102
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :54
101: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :90
102: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
103: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :30
104: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :107
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :106
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :105
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :90
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :90
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :70
105: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :108
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :90
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :74
106: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
107: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :30
108: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :117
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :114
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :113
-->_1 #div^#(#pos(@x), #0()) -> c_128() :115
-->_1 #div^#(#neg(@x), #0()) -> c_125() :112
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :111
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :110
-->_1 #div^#(#0(), #0()) -> c_122() :109
109: #div^#(#0(), #0()) -> c_122()
110: #div^#(#0(), #neg(@y)) -> c_123()
111: #div^#(#0(), #pos(@y)) -> c_124()
112: #div^#(#neg(@x), #0()) -> c_125()
113: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
114: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
115: #div^#(#pos(@x), #0()) -> c_128()
116: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
118: mult#1^#(nil(), @b2) -> c_43()
119: mult#3^#(#false(), @b2, @zs) -> c_45()
120: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
121: sub'#1^#(nil(), @b2, @r) -> c_52()
122: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
123: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :125
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :124
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
124: sub'#5^#(#false(), @z, @zs) -> c_57()
125: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :28
-->_1 #abs^#(#0()) -> c_1() :28
127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :30
-->_2 #abs^#(#0()) -> c_1() :28
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :30
-->_1 #abs^#(#pos(@x)) -> c_3() :30
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :30
-->_1 #abs^#(#0()) -> c_1() :28
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {15} and add Pre({15}) = {14} to the strict component.
- We remove {27} and add Pre({27}) = {7} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :26
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :92
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :93
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :126
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :125
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :28
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :94
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :72
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :72
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :95
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :12
12: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :96
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :13
13: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :14
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
14: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :98
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :97
15: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :68
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
16: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :17
-->_1 mult#1^#(nil(), @b2) -> c_43() :117
17: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :18
-->_2 #abs^#(#0()) -> c_1() :26
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :16
18: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :19
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :118
19: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
20: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :16
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :16
21: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :22
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :119
-->_3 #abs^#(#0()) -> c_1() :26
22: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :23
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :120
23: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :24
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :121
24: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :103
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :25
25: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :122
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :22
26: #abs^#(#0()) -> c_1()
27: #abs^#(#neg(@x)) -> c_2()
28: #abs^#(#pos(@x)) -> c_3()
29: #abs^#(#s(@x)) -> c_4()
30: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
31: #eq^#(#0(), #0()) -> c_66()
32: #eq^#(#0(), #neg(@y)) -> c_67()
33: #eq^#(#0(), #pos(@y)) -> c_68()
34: #eq^#(#0(), #s(@y)) -> c_69()
35: #eq^#(#neg(@x), #0()) -> c_70()
36: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
37: #eq^#(#neg(@x), #pos(@y)) -> c_72()
38: #eq^#(#pos(@x), #0()) -> c_73()
39: #eq^#(#pos(@x), #neg(@y)) -> c_74()
40: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
41: #eq^#(#s(@x), #0()) -> c_76()
42: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
43: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_3 #eq^#(nil(), nil()) -> c_82() :47
-->_2 #eq^#(nil(), nil()) -> c_82() :47
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#s(@x), #0()) -> c_76() :41
-->_2 #eq^#(#s(@x), #0()) -> c_76() :41
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_3 #eq^#(#0(), #0()) -> c_66() :31
-->_2 #eq^#(#0(), #0()) -> c_66() :31
44: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
45: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
46: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
47: #eq^#(nil(), nil()) -> c_82()
48: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
49: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
50: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
51: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_3 #eq^#(nil(), nil()) -> c_82() :47
-->_2 #eq^#(nil(), nil()) -> c_82() :47
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#s(@x), #0()) -> c_76() :41
-->_2 #eq^#(#s(@x), #0()) -> c_76() :41
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_3 #eq^#(#0(), #0()) -> c_66() :31
-->_2 #eq^#(#0(), #0()) -> c_66() :31
52: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_2 #compare^#(#s(@x), #0()) -> c_97() :66
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_2 #compare^#(#0(), #0()) -> c_87() :56
-->_1 #ckgt^#(#LT()) -> c_101() :55
-->_1 #ckgt^#(#GT()) -> c_100() :54
-->_1 #ckgt^#(#EQ()) -> c_99() :53
53: #ckgt^#(#EQ()) -> c_99()
54: #ckgt^#(#GT()) -> c_100()
55: #ckgt^#(#LT()) -> c_101()
56: #compare^#(#0(), #0()) -> c_87()
57: #compare^#(#0(), #neg(@y)) -> c_88()
58: #compare^#(#0(), #pos(@y)) -> c_89()
59: #compare^#(#0(), #s(@y)) -> c_90()
60: #compare^#(#neg(@x), #0()) -> c_91()
61: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#s(@x), #0()) -> c_97() :66
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_1 #compare^#(#0(), #0()) -> c_87() :56
62: #compare^#(#neg(@x), #pos(@y)) -> c_93()
63: #compare^#(#pos(@x), #0()) -> c_94()
64: #compare^#(#pos(@x), #neg(@y)) -> c_95()
65: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#s(@x), #0()) -> c_97() :66
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_1 #compare^#(#0(), #0()) -> c_87() :56
66: #compare^#(#s(@x), #0()) -> c_97()
67: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#s(@x), #0()) -> c_97() :66
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_1 #compare^#(#0(), #0()) -> c_87() :56
68: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :71
-->_1 #cklt^#(#GT()) -> c_103() :70
-->_1 #cklt^#(#EQ()) -> c_102() :69
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#s(@x), #0()) -> c_97() :66
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_2 #compare^#(#0(), #0()) -> c_87() :56
69: #cklt^#(#EQ()) -> c_102()
70: #cklt^#(#GT()) -> c_103()
71: #cklt^#(#LT()) -> c_104()
72: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :81
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :80
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :78
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :77
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :79
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :76
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :75
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :74
-->_1 #mult^#(#0(), #0()) -> c_105() :73
73: #mult^#(#0(), #0()) -> c_105()
74: #mult^#(#0(), #neg(@y)) -> c_106()
75: #mult^#(#0(), #pos(@y)) -> c_107()
76: #mult^#(#neg(@x), #0()) -> c_108()
77: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
78: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
79: #mult^#(#pos(@x), #0()) -> c_111()
80: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
81: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
82: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :84
-->_1 #add^#(#0(), @y) -> c_114() :83
83: #add^#(#0(), @y) -> c_114()
84: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
85: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
86: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
87: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
88: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :91
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :90
-->_1 #sub^#(@x, #0()) -> c_119() :89
89: #sub^#(@x, #0()) -> c_119()
90: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :84
-->_1 #add^#(#0(), @y) -> c_114() :83
91: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :84
-->_1 #add^#(#0(), @y) -> c_114() :83
92: add'#1^#(nil(), @b2, @r) -> c_14()
93: add'#2^#(nil(), @r, @x, @xs) -> c_16()
94: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
95: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
96: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
97: compare#4^#(#false(), @r, @x, @y) -> c_29()
98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :100
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :99
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :68
99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :102
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :101
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :52
100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :88
101: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :28
103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :106
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :105
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :104
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :88
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :88
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :68
104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :107
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :88
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :72
105: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :28
107: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :115
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :113
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :112
-->_1 #div^#(#pos(@x), #0()) -> c_128() :114
-->_1 #div^#(#neg(@x), #0()) -> c_125() :111
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :110
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :109
-->_1 #div^#(#0(), #0()) -> c_122() :108
108: #div^#(#0(), #0()) -> c_122()
109: #div^#(#0(), #neg(@y)) -> c_123()
110: #div^#(#0(), #pos(@y)) -> c_124()
111: #div^#(#neg(@x), #0()) -> c_125()
112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
114: #div^#(#pos(@x), #0()) -> c_128()
115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: mult#1^#(nil(), @b2) -> c_43()
118: mult#3^#(#false(), @b2, @zs) -> c_45()
119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
120: sub'#1^#(nil(), @b2, @r) -> c_52()
121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :124
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :123
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
123: sub'#5^#(#false(), @z, @zs) -> c_57()
124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :26
-->_1 #abs^#(#0()) -> c_1() :26
127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :28
-->_2 #abs^#(#0()) -> c_1() :26
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :28
-->_1 #abs^#(#pos(@x)) -> c_3() :28
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :28
-->_1 #abs^#(#0()) -> c_1() :26
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {14} and add Pre({14}) = {13} to the strict component.
- We remove {7} and add Pre({7}) = {6} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :24
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :90
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :91
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :92
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :80
7: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :8
-->_2 #abs^#(#pos(@x)) -> c_3() :26
8: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :93
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :9
9: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :70
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :70
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :8
10: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :94
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :11
11: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :95
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :12
12: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :96
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :10
13: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :66
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :10
14: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :15
-->_1 mult#1^#(nil(), @b2) -> c_43() :117
15: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :16
-->_2 #abs^#(#0()) -> c_1() :24
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :14
16: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :17
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :118
17: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
18: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :14
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :14
19: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :20
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :119
-->_3 #abs^#(#0()) -> c_1() :24
20: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :21
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :120
21: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :22
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :121
22: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :103
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :23
23: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :122
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :20
24: #abs^#(#0()) -> c_1()
25: #abs^#(#neg(@x)) -> c_2()
26: #abs^#(#pos(@x)) -> c_3()
27: #abs^#(#s(@x)) -> c_4()
28: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
29: #eq^#(#0(), #0()) -> c_66()
30: #eq^#(#0(), #neg(@y)) -> c_67()
31: #eq^#(#0(), #pos(@y)) -> c_68()
32: #eq^#(#0(), #s(@y)) -> c_69()
33: #eq^#(#neg(@x), #0()) -> c_70()
34: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
35: #eq^#(#neg(@x), #pos(@y)) -> c_72()
36: #eq^#(#pos(@x), #0()) -> c_73()
37: #eq^#(#pos(@x), #neg(@y)) -> c_74()
38: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
39: #eq^#(#s(@x), #0()) -> c_76()
40: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
41: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_3 #eq^#(nil(), nil()) -> c_82() :45
-->_2 #eq^#(nil(), nil()) -> c_82() :45
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#s(@x), #0()) -> c_76() :39
-->_2 #eq^#(#s(@x), #0()) -> c_76() :39
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_3 #eq^#(#0(), #0()) -> c_66() :29
-->_2 #eq^#(#0(), #0()) -> c_66() :29
42: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
43: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
44: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
45: #eq^#(nil(), nil()) -> c_82()
46: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
47: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
48: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
49: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_3 #eq^#(nil(), nil()) -> c_82() :45
-->_2 #eq^#(nil(), nil()) -> c_82() :45
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#s(@x), #0()) -> c_76() :39
-->_2 #eq^#(#s(@x), #0()) -> c_76() :39
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_3 #eq^#(#0(), #0()) -> c_66() :29
-->_2 #eq^#(#0(), #0()) -> c_66() :29
50: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_2 #compare^#(#s(@x), #0()) -> c_97() :64
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_2 #compare^#(#0(), #0()) -> c_87() :54
-->_1 #ckgt^#(#LT()) -> c_101() :53
-->_1 #ckgt^#(#GT()) -> c_100() :52
-->_1 #ckgt^#(#EQ()) -> c_99() :51
51: #ckgt^#(#EQ()) -> c_99()
52: #ckgt^#(#GT()) -> c_100()
53: #ckgt^#(#LT()) -> c_101()
54: #compare^#(#0(), #0()) -> c_87()
55: #compare^#(#0(), #neg(@y)) -> c_88()
56: #compare^#(#0(), #pos(@y)) -> c_89()
57: #compare^#(#0(), #s(@y)) -> c_90()
58: #compare^#(#neg(@x), #0()) -> c_91()
59: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_1 #compare^#(#s(@x), #0()) -> c_97() :64
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_1 #compare^#(#0(), #0()) -> c_87() :54
60: #compare^#(#neg(@x), #pos(@y)) -> c_93()
61: #compare^#(#pos(@x), #0()) -> c_94()
62: #compare^#(#pos(@x), #neg(@y)) -> c_95()
63: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#s(@x), #0()) -> c_97() :64
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_1 #compare^#(#0(), #0()) -> c_87() :54
64: #compare^#(#s(@x), #0()) -> c_97()
65: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#s(@x), #0()) -> c_97() :64
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_1 #compare^#(#0(), #0()) -> c_87() :54
66: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :69
-->_1 #cklt^#(#GT()) -> c_103() :68
-->_1 #cklt^#(#EQ()) -> c_102() :67
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#s(@x), #0()) -> c_97() :64
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_2 #compare^#(#0(), #0()) -> c_87() :54
67: #cklt^#(#EQ()) -> c_102()
68: #cklt^#(#GT()) -> c_103()
69: #cklt^#(#LT()) -> c_104()
70: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :79
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :78
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :76
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :75
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :77
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :74
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :73
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :72
-->_1 #mult^#(#0(), #0()) -> c_105() :71
71: #mult^#(#0(), #0()) -> c_105()
72: #mult^#(#0(), #neg(@y)) -> c_106()
73: #mult^#(#0(), #pos(@y)) -> c_107()
74: #mult^#(#neg(@x), #0()) -> c_108()
75: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
76: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
77: #mult^#(#pos(@x), #0()) -> c_111()
78: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
79: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
80: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :83
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :82
-->_1 #add^#(#0(), @y) -> c_114() :81
81: #add^#(#0(), @y) -> c_114()
82: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
83: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
84: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
85: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
86: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :89
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :88
-->_1 #sub^#(@x, #0()) -> c_119() :87
87: #sub^#(@x, #0()) -> c_119()
88: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :83
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :82
-->_1 #add^#(#0(), @y) -> c_114() :81
89: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :83
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :82
-->_1 #add^#(#0(), @y) -> c_114() :81
90: add'#1^#(nil(), @b2, @r) -> c_14()
91: add'#2^#(nil(), @r, @x, @xs) -> c_16()
92: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :126
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :125
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
93: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
94: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
95: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
96: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :98
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :97
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
97: compare#4^#(#false(), @r, @x, @y) -> c_29()
98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :100
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :99
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :66
99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :102
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :101
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :50
100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :86
101: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :26
103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :106
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :105
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :104
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :86
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :86
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :66
104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :107
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :86
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :70
105: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :26
107: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :115
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :113
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :112
-->_1 #div^#(#pos(@x), #0()) -> c_128() :114
-->_1 #div^#(#neg(@x), #0()) -> c_125() :111
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :110
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :109
-->_1 #div^#(#0(), #0()) -> c_122() :108
108: #div^#(#0(), #0()) -> c_122()
109: #div^#(#0(), #neg(@y)) -> c_123()
110: #div^#(#0(), #pos(@y)) -> c_124()
111: #div^#(#neg(@x), #0()) -> c_125()
112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
114: #div^#(#pos(@x), #0()) -> c_128()
115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: mult#1^#(nil(), @b2) -> c_43()
118: mult#3^#(#false(), @b2, @zs) -> c_45()
119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
120: sub'#1^#(nil(), @b2, @r) -> c_52()
121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :124
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :123
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
123: sub'#5^#(#false(), @z, @zs) -> c_57()
124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :24
-->_1 #abs^#(#0()) -> c_1() :24
127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :26
-->_2 #abs^#(#0()) -> c_1() :24
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :26
-->_1 #abs^#(#pos(@x)) -> c_3() :26
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :26
-->_1 #abs^#(#0()) -> c_1() :24
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {6} and add Pre({6}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the the dependency graph
->68:{6}
|
|->69:{7,8}
| |
| |->70:{69} Weak SCC
| | |
| | |->71:{70} Weak SCC
| | |
| | |->72:{71} Weak SCC
| | |
| | |->73:{72} Weak SCC
| | |
| | |->74:{73} Weak SCC
| | |
| | |->76:{74} Weak SCC
| | | |
| | | |->81:{135} Weak SCC
| | | |
| | | `->80:{136} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->81:{135} Weak SCC
| | |
| | |->77:{75} Weak SCC
| | | |
| | | |->81:{135} Weak SCC
| | | |
| | | `->80:{136} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->81:{135} Weak SCC
| | |
| | |->75:{76} Weak SCC
| | |
| | |->78:{77} Weak SCC
| | | |
| | | |->81:{135} Weak SCC
| | | |
| | | `->80:{136} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->81:{135} Weak SCC
| | |
| | `->79:{78} Weak SCC
| | |
| | |->81:{135} Weak SCC
| | |
| | `->80:{136} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->96:{84} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | `->81:{135} Weak SCC
| |
| |->88:{79} Weak SCC
| | |
| | |->89:{80} Weak SCC
| | |
| | |->90:{81} Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->91:{82} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | `->96:{84} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->98:{141} Weak SCC
| | |
| | |->99:{142} Weak SCC
| | |
| | |->100:{143} Weak SCC
| | |
| | `->101:{144} Weak SCC
| |
| `->82:{93} Weak SCC
| |
| `->132:{23} Weak SCC
|
`->130:{25} Weak SCC
->35:{12}
|
|->36:{9,11,10}
| |
| |->67:{94} Weak SCC
| | |
| | `->132:{23} Weak SCC
| |
| |->66:{95} Weak SCC
| | |
| | `->132:{23} Weak SCC
| |
| `->37:{96} Weak SCC
| |
| |->105:{27} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | `->106:{48,40,39,37,33} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | |->123:{131} Weak SCC
| | |
| | |->124:{132} Weak SCC
| | |
| | |->125:{133} Weak SCC
| | |
| | `->126:{134} Weak SCC
| |
| |->38:{97} Weak SCC
| |
| `->39:{98} Weak SCC
| |
| |->40:{65} Weak SCC
| | |
| | |->50:{53} Weak SCC
| | |
| | |->51:{54} Weak SCC
| | |
| | |->52:{55} Weak SCC
| | |
| | |->53:{56} Weak SCC
| | |
| | |->54:{57} Weak SCC
| | |
| | |->55:{59} Weak SCC
| | |
| | |->56:{60} Weak SCC
| | |
| | |->57:{61} Weak SCC
| | |
| | |->58:{63} Weak SCC
| | |
| | |->49:{64,62,58} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | `->58:{63} Weak SCC
| | |
| | |->41:{66} Weak SCC
| | |
| | |->42:{67} Weak SCC
| | |
| | `->43:{68} Weak SCC
| |
| |->44:{99} Weak SCC
| | |
| | |->45:{49} Weak SCC
| | | |
| | | |->46:{50} Weak SCC
| | | |
| | | |->47:{51} Weak SCC
| | | |
| | | |->48:{52} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | |->58:{63} Weak SCC
| | | |
| | | `->49:{64,62,58} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | `->58:{63} Weak SCC
| | |
| | |->59:{101} Weak SCC
| | | |
| | | `->132:{23} Weak SCC
| | |
| | `->60:{102} Weak SCC
| | |
| | `->130:{25} Weak SCC
| |
| `->61:{100} Weak SCC
| |
| `->62:{85} Weak SCC
| |
| |->63:{86} Weak SCC
| |
| |->64:{87} Weak SCC
| | |
| | |->89:{80} Weak SCC
| | |
| | |->90:{81} Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->91:{82} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83}
Weak SCC
| | | | | |
| | | | | |->98:{141}
Weak SCC
| | | | | |
| | | | | |->99:{142}
Weak SCC
| | | | | |
| | | | | |->100:{143}
Weak SCC
| | | | | |
| | | | | `->101:{144}
Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | `->96:{84} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141}
Weak SCC
| | | |
| | | |->99:{142}
Weak SCC
| | | |
| | | |->100:{143}
Weak SCC
| | | |
| | | `->101:{144}
Weak SCC
| | |
| | |->98:{141} Weak SCC
| | |
| | |->99:{142} Weak SCC
| | |
| | |->100:{143} Weak SCC
| | |
| | `->101:{144} Weak SCC
| |
| `->65:{88} Weak SCC
| |
| |->89:{80} Weak SCC
| |
| |->90:{81} Weak SCC
| | |
| | |->92:{137} Weak SCC
| | |
| | |->93:{138} Weak SCC
| | |
| | |->94:{139} Weak SCC
| | |
| | `->95:{140} Weak SCC
| |
| |->91:{82} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141}
Weak SCC
| | | |
| | | |->99:{142}
Weak SCC
| | | |
| | | |->100:{143}
Weak SCC
| | | |
| | | `->101:{144}
Weak SCC
| | |
| | |->96:{84} Weak SCC
| | | |
| | | |->97:{83}
Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | |->98:{141}
Weak SCC
| | | |
| | | |->99:{142}
Weak SCC
| | | |
| | | |->100:{143}
Weak SCC
| | | |
| | | `->101:{144}
Weak SCC
| | |
| | |->92:{137} Weak SCC
| | |
| | |->93:{138} Weak SCC
| | |
| | |->94:{139} Weak SCC
| | |
| | `->95:{140} Weak SCC
| |
| |->97:{83} Weak SCC
| | |
| | |->98:{141} Weak SCC
| | |
| | |->99:{142} Weak SCC
| | |
| | |->100:{143} Weak SCC
| | |
| | `->101:{144} Weak SCC
| |
| `->96:{84} Weak SCC
| |
| |->97:{83} Weak SCC
| | |
| | |->98:{141}
Weak SCC
| | |
| | |->99:{142}
Weak SCC
| | |
| | |->100:{143}
Weak SCC
| | |
| | `->101:{144}
Weak SCC
| |
| |->98:{141} Weak SCC
| |
| |->99:{142} Weak SCC
| |
| |->100:{143} Weak SCC
| |
| `->101:{144} Weak SCC
|
`->40:{65} Weak SCC
|
|->50:{53} Weak SCC
|
|->51:{54} Weak SCC
|
|->52:{55} Weak SCC
|
|->53:{56} Weak SCC
|
|->54:{57} Weak SCC
|
|->55:{59} Weak SCC
|
|->56:{60} Weak SCC
|
|->57:{61} Weak SCC
|
|->58:{63} Weak SCC
|
|->49:{64,62,58} Weak SCC
| |
| |->50:{53} Weak SCC
| |
| |->51:{54} Weak SCC
| |
| |->52:{55} Weak SCC
| |
| |->53:{56} Weak SCC
| |
| |->54:{57} Weak SCC
| |
| |->55:{59} Weak SCC
| |
| |->56:{60} Weak SCC
| |
| |->57:{61} Weak SCC
| |
| `->58:{63} Weak SCC
|
|->41:{66} Weak SCC
|
|->42:{67} Weak SCC
|
`->43:{68} Weak SCC
->29:{17}
|
`->30:{13,14}
|
|->32:{15}
| |
| |->34:{16}
| | |
| | `->83:{1}
| | |
| | |->84:{2,5,4,3}
| | | |
| | | |->85:{89} Weak SCC
| | | |
| | | |->86:{90} Weak SCC
| | | |
| | | `->87:{91} Weak SCC
| | | |
| | | |->88:{79} Weak SCC
| | | | |
| | | | |->89:{80} Weak SCC
| | | | |
| | | | |->90:{81} Weak SCC
| | | | | |
| | | | | |->92:{137}
Weak SCC
| | | | | |
| | | | | |->93:{138}
Weak SCC
| | | | | |
| | | | | |->94:{139}
Weak SCC
| | | | | |
| | | | | `->95:{140}
Weak SCC
| | | | |
| | | | |->91:{82} Weak SCC
| | | | | |
| | | | | |->97:{83}
Weak SCC
| | | | | | |
| | | | | | |->98:{141}
Weak SCC
| | | | | | |
| | | | | | |->99:{142}
Weak SCC
| | | | | | |
| | | | | | |->100:{143}
Weak SCC
| | | | | | |
| | | | | | `->101:{144}
Weak SCC
| | | | | |
| | | | | |->96:{84}
Weak SCC
| | | | | | |
| | | | | | |->97:{83}
Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141}
Weak SCC
| | | | | | |
| | | | | | |->99:{142}
Weak SCC
| | | | | | |
| | | | | | |->100:{143}
Weak SCC
| | | | | | |
| | | | | | `->101:{144}
Weak SCC
| | | | | |
| | | | | |->92:{137}
Weak SCC
| | | | | |
| | | | | |->93:{138}
Weak SCC
| | | | | |
| | | | | |->94:{139}
Weak SCC
| | | | | |
| | | | | `->95:{140}
Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141}
Weak SCC
| | | | | |
| | | | | |->99:{142}
Weak SCC
| | | | | |
| | | | | |->100:{143}
Weak SCC
| | | | | |
| | | | | `->101:{144}
Weak SCC
| | | | |
| | | | `->96:{84} Weak SCC
| | | | |
| | | | |->97:{83}
Weak SCC
| | | | | |
| | | | | |->98:{141}
Weak SCC
| | | | | |
| | | | | |->99:{142}
Weak SCC
| | | | | |
| | | | | |->100:{143}
Weak SCC
| | | | | |
| | | | | `->101:{144}
Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | `->102:{92} Weak SCC
| | | |
| | | |->105:{27} Weak SCC
| | | | |
| | | | |->107:{28}
Weak SCC
| | | | |
| | | | |->108:{29}
Weak SCC
| | | | |
| | | | |->109:{30}
Weak SCC
| | | | |
| | | | |->110:{31}
Weak SCC
| | | | |
| | | | |->111:{32}
Weak SCC
| | | | |
| | | | |->112:{34}
Weak SCC
| | | | |
| | | | |->113:{35}
Weak SCC
| | | | |
| | | | |->114:{36}
Weak SCC
| | | | |
| | | | |->115:{38}
Weak SCC
| | | | |
| | | | |->116:{41}
Weak SCC
| | | | |
| | | | |->117:{42}
Weak SCC
| | | | |
| | | | |->118:{43}
Weak SCC
| | | | |
| | | | |->119:{44}
Weak SCC
| | | | |
| | | | |->120:{45}
Weak SCC
| | | | |
| | | | |->121:{46}
Weak SCC
| | | | |
| | | | |->122:{47}
Weak SCC
| | | | |
| | | | `->106:{48,40,39,37,33}
Weak SCC
| | | | |
| | | | |->107:{28}
Weak SCC
| | | | |
| | | | |->108:{29}
Weak SCC
| | | | |
| | | | |->109:{30}
Weak SCC
| | | | |
| | | | |->110:{31}
Weak SCC
| | | | |
| | | | |->111:{32}
Weak SCC
| | | | |
| | | | |->112:{34}
Weak SCC
| | | | |
| | | | |->113:{35}
Weak SCC
| | | | |
| | | | |->114:{36}
Weak SCC
| | | | |
| | | | |->115:{38}
Weak SCC
| | | | |
| | | | |->116:{41}
Weak SCC
| | | | |
| | | | |->117:{42}
Weak SCC
| | | | |
| | | | |->118:{43}
Weak SCC
| | | | |
| | | | |->119:{44}
Weak SCC
| | | | |
| | | | |->120:{45}
Weak SCC
| | | | |
| | | | |->121:{46}
Weak SCC
| | | | |
| | | | |->122:{47}
Weak SCC
| | | | |
| | | | |->123:{131}
Weak SCC
| | | | |
| | | | |->124:{132}
Weak SCC
| | | | |
| | | | |->125:{133}
Weak SCC
| | | | |
| | | | `->126:{134}
Weak SCC
| | | |
| | | |->103:{125} Weak SCC
| | | | |
| | | | |->105:{27}
Weak SCC
| | | | | |
| | | | | |->107:{28}
Weak SCC
| | | | | |
| | | | | |->108:{29}
Weak SCC
| | | | | |
| | | | | |->109:{30}
Weak SCC
| | | | | |
| | | | | |->110:{31}
Weak SCC
| | | | | |
| | | | | |->111:{32}
Weak SCC
| | | | | |
| | | | | |->112:{34}
Weak SCC
| | | | | |
| | | | | |->113:{35}
Weak SCC
| | | | | |
| | | | | |->114:{36}
Weak SCC
| | | | | |
| | | | | |->115:{38}
Weak SCC
| | | | | |
| | | | | |->116:{41}
Weak SCC
| | | | | |
| | | | | |->117:{42}
Weak SCC
| | | | | |
| | | | | |->118:{43}
Weak SCC
| | | | | |
| | | | | |->119:{44}
Weak SCC
| | | | | |
| | | | | |->120:{45}
Weak SCC
| | | | | |
| | | | | |->121:{46}
Weak SCC
| | | | | |
| | | | | |->122:{47}
Weak SCC
| | | | | |
| | | | | `->106:{48,40,39,37,33}
Weak SCC
| | | | | |
| | | | | |->107:{28}
Weak SCC
| | | | | |
| | | | | |->108:{29}
Weak SCC
| | | | | |
| | | | | |->109:{30}
Weak SCC
| | | | | |
| | | | | |->110:{31}
Weak SCC
| | | | | |
| | | | | |->111:{32}
Weak SCC
| | | | | |
| | | | | |->112:{34}
Weak SCC
| | | | | |
| | | | | |->113:{35}
Weak SCC
| | | | | |
| | | | | |->114:{36}
Weak SCC
| | | | | |
| | | | | |->115:{38}
Weak SCC
| | | | | |
| | | | | |->116:{41}
Weak SCC
| | | | | |
| | | | | |->117:{42}
Weak SCC
| | | | | |
| | | | | |->118:{43}
Weak SCC
| | | | | |
| | | | | |->119:{44}
Weak SCC
| | | | | |
| | | | | |->120:{45}
Weak SCC
| | | | | |
| | | | | |->121:{46}
Weak SCC
| | | | | |
| | | | | |->122:{47}
Weak SCC
| | | | | |
| | | | | |->123:{131}
Weak SCC
| | | | | |
| | | | | |->124:{132}
Weak SCC
| | | | | |
| | | | | |->125:{133}
Weak SCC
| | | | | |
| | | | | `->126:{134}
Weak SCC
| | | | |
| | | | |->104:{127}
Weak SCC
| | | | | |
| | | | | |->105:{27}
Weak SCC
| | | | | | |
| | | | | | |->107:{28}
Weak SCC
| | | | | | |
| | | | | | |->108:{29}
Weak SCC
| | | | | | |
| | | | | | |->109:{30}
Weak SCC
| | | | | | |
| | | | | | |->110:{31}
Weak SCC
| | | | | | |
| | | | | | |->111:{32}
Weak SCC
| | | | | | |
| | | | | | |->112:{34}
Weak SCC
| | | | | | |
| | | | | | |->113:{35}
Weak SCC
| | | | | | |
| | | | | | |->114:{36}
Weak SCC
| | | | | | |
| | | | | | |->115:{38}
Weak SCC
| | | | | | |
| | | | | | |->116:{41}
Weak SCC
| | | | | | |
| | | | | | |->117:{42}
Weak SCC
| | | | | | |
| | | | | | |->118:{43}
Weak SCC
| | | | | | |
| | | | | | |->119:{44}
Weak SCC
| | | | | | |
| | | | | | |->120:{45}
Weak SCC
| | | | | | |
| | | | | | |->121:{46}
Weak SCC
| | | | | | |
| | | | | | |->122:{47}
Weak SCC
| | | | | | |
| | | | | | `->106:{48,40,39,37,33}
Weak SCC
| | | | | | |
| | | | | | |->107:{28}
Weak SCC
| | | | | | |
| | | | | | |->108:{29}
Weak SCC
| | | | | | |
| | | | | | |->109:{30}
Weak SCC
| | | | | | |
| | | | | | |->110:{31}
Weak SCC
| | | | | | |
| | | | | | |->111:{32}
Weak SCC
| | | | | | |
| | | | | | |->112:{34}
Weak SCC
| | | | | | |
| | | | | | |->113:{35}
Weak SCC
| | | | | | |
| | | | | | |->114:{36}
Weak SCC
| | | | | | |
| | | | | | |->115:{38}
Weak SCC
| | | | | | |
| | | | | | |->116:{41}
Weak SCC
| | | | | | |
| | | | | | |->117:{42}
Weak SCC
| | | | | | |
| | | | | | |->118:{43}
Weak SCC
| | | | | | |
| | | | | | |->119:{44}
Weak SCC
| | | | | | |
| | | | | | |->120:{45}
Weak SCC
| | | | | | |
| | | | | | |->121:{46}
Weak SCC
| | | | | | |
| | | | | | |->122:{47}
Weak SCC
| | | | | | |
| | | | | | |->123:{131}
Weak SCC
| | | | | | |
| | | | | | |->124:{132}
Weak SCC
| | | | | | |
| | | | | | |->125:{133}
Weak SCC
| | | | | | |
| | | | | | `->126:{134}
Weak SCC
| | | | | |
| | | | | |->127:{129}
Weak SCC
| | | | | | |
| | | | | | `->130:{25}
Weak SCC
| | | | | |
| | | | | `->128:{130}
Weak SCC
| | | | | |
| | | | | |->132:{23}
Weak SCC
| | | | | |
| | | | | `->130:{25}
Weak SCC
| | | | |
| | | | `->129:{128}
Weak SCC
| | | | |
| | | | |->132:{23}
Weak SCC
| | | | |
| | | | `->130:{25}
Weak SCC
| | | |
| | | `->131:{126} Weak SCC
| | | |
| | | `->132:{23}
Weak SCC
| | |
| | `->132:{23} Weak SCC
| |
| |->105:{27} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | `->106:{48,40,39,37,33} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | |->123:{131} Weak SCC
| | |
| | |->124:{132} Weak SCC
| | |
| | |->125:{133} Weak SCC
| | |
| | `->126:{134} Weak SCC
| |
| `->33:{118} Weak SCC
|
|->132:{23} Weak SCC
|
`->31:{117} Weak SCC
->3:{18}
|
|->5:{19,22,21,20}
| |
| |->11:{103} Weak SCC
| | |
| | |->40:{65} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | |->58:{63} Weak SCC
| | | |
| | | |->49:{64,62,58} Weak SCC
| | | | |
| | | | |->50:{53} Weak SCC
| | | | |
| | | | |->51:{54} Weak SCC
| | | | |
| | | | |->52:{55} Weak SCC
| | | | |
| | | | |->53:{56} Weak SCC
| | | | |
| | | | |->54:{57} Weak SCC
| | | | |
| | | | |->55:{59} Weak SCC
| | | | |
| | | | |->56:{60} Weak SCC
| | | | |
| | | | |->57:{61} Weak SCC
| | | | |
| | | | `->58:{63} Weak SCC
| | | |
| | | |->41:{66} Weak SCC
| | | |
| | | |->42:{67} Weak SCC
| | | |
| | | `->43:{68} Weak SCC
| | |
| | |->88:{79} Weak SCC
| | | |
| | | |->89:{80} Weak SCC
| | | |
| | | |->90:{81} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->91:{82} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->96:{84} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->62:{85} Weak SCC
| | | |
| | | |->63:{86} Weak SCC
| | | |
| | | |->64:{87} Weak SCC
| | | | |
| | | | |->89:{80} Weak SCC
| | | | |
| | | | |->90:{81} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->91:{82} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141} Weak SCC
| | | | | | | |
| | | | | | | |->99:{142} Weak SCC
| | | | | | | |
| | | | | | | |->100:{143} Weak SCC
| | | | | | | |
| | | | | | | `->101:{144} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->65:{88} Weak SCC
| | | |
| | | |->89:{80} Weak SCC
| | | |
| | | |->90:{81} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->91:{82} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->96:{84} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->12:{104} Weak SCC
| | | |
| | | |->70:{69} Weak SCC
| | | | |
| | | | |->71:{70} Weak SCC
| | | | |
| | | | |->72:{71} Weak SCC
| | | | |
| | | | |->73:{72} Weak SCC
| | | | |
| | | | |->74:{73} Weak SCC
| | | | |
| | | | |->76:{74} Weak SCC
| | | | | |
| | | | | |->81:{135} Weak SCC
| | | | | |
| | | | | `->80:{136} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->81:{135} Weak SCC
| | | | |
| | | | |->77:{75} Weak SCC
| | | | | |
| | | | | |->81:{135} Weak SCC
| | | | | |
| | | | | `->80:{136} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->81:{135} Weak SCC
| | | | |
| | | | |->75:{76} Weak SCC
| | | | |
| | | | |->78:{77} Weak SCC
| | | | | |
| | | | | |->81:{135} Weak SCC
| | | | | |
| | | | | `->80:{136} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->81:{135} Weak SCC
| | | | |
| | | | `->79:{78} Weak SCC
| | | | |
| | | | |->81:{135} Weak SCC
| | | | |
| | | | `->80:{136} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141}
Weak SCC
| | | | | | |
| | | | | | |->99:{142}
Weak SCC
| | | | | | |
| | | | | | |->100:{143}
Weak SCC
| | | | | | |
| | | | | | `->101:{144}
Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->81:{135} Weak SCC
| | | |
| | | |->62:{85} Weak SCC
| | | | |
| | | | |->63:{86} Weak SCC
| | | | |
| | | | |->64:{87} Weak SCC
| | | | | |
| | | | | |->89:{80} Weak SCC
| | | | | |
| | | | | |->90:{81} Weak SCC
| | | | | | |
| | | | | | |->92:{137} Weak SCC
| | | | | | |
| | | | | | |->93:{138} Weak SCC
| | | | | | |
| | | | | | |->94:{139} Weak SCC
| | | | | | |
| | | | | | `->95:{140} Weak SCC
| | | | | |
| | | | | |->91:{82} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141} Weak SCC
| | | | | | | |
| | | | | | | |->99:{142} Weak SCC
| | | | | | | |
| | | | | | | |->100:{143} Weak SCC
| | | | | | | |
| | | | | | | `->101:{144} Weak SCC
| | | | | | |
| | | | | | |->96:{84} Weak SCC
| | | | | | | |
| | | | | | | |->97:{83} Weak SCC
| | | | | | | | |
| | | | | | | | |->98:{141}
Weak SCC
| | | | | | | | |
| | | | | | | | |->99:{142}
Weak SCC
| | | | | | | | |
| | | | | | | | |->100:{143}
Weak SCC
| | | | | | | | |
| | | | | | | | `->101:{144}
Weak SCC
| | | | | | | |
| | | | | | | |->98:{141} Weak SCC
| | | | | | | |
| | | | | | | |->99:{142} Weak SCC
| | | | | | | |
| | | | | | | |->100:{143} Weak SCC
| | | | | | | |
| | | | | | | `->101:{144} Weak SCC
| | | | | | |
| | | | | | |->92:{137} Weak SCC
| | | | | | |
| | | | | | |->93:{138} Weak SCC
| | | | | | |
| | | | | | |->94:{139} Weak SCC
| | | | | | |
| | | | | | `->95:{140} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->65:{88} Weak SCC
| | | | |
| | | | |->89:{80} Weak SCC
| | | | |
| | | | |->90:{81} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->91:{82} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->13:{107} Weak SCC
| | | |
| | | |->14:{108} Weak SCC
| | | |
| | | |->15:{109} Weak SCC
| | | |
| | | |->16:{110} Weak SCC
| | | |
| | | |->17:{111} Weak SCC
| | | |
| | | |->19:{112} Weak SCC
| | | | |
| | | | |->23:{145} Weak SCC
| | | | |
| | | | `->24:{146} Weak SCC
| | | | |
| | | | |->26:{147} Weak SCC
| | | | |
| | | | `->25:{148} Weak SCC
| | | | |
| | | | `->26:{147} Weak SCC
| | | |
| | | |->20:{113} Weak SCC
| | | | |
| | | | |->23:{145} Weak SCC
| | | | |
| | | | `->24:{146} Weak SCC
| | | | |
| | | | |->26:{147} Weak SCC
| | | | |
| | | | `->25:{148} Weak SCC
| | | | |
| | | | `->26:{147} Weak SCC
| | | |
| | | |->18:{114} Weak SCC
| | | |
| | | |->21:{115} Weak SCC
| | | | |
| | | | |->23:{145} Weak SCC
| | | | |
| | | | `->24:{146} Weak SCC
| | | | |
| | | | |->26:{147} Weak SCC
| | | | |
| | | | `->25:{148} Weak SCC
| | | | |
| | | | `->26:{147} Weak SCC
| | | |
| | | `->22:{116} Weak SCC
| | | |
| | | |->23:{145} Weak SCC
| | | |
| | | `->24:{146} Weak SCC
| | | |
| | | |->26:{147} Weak SCC
| | | |
| | | `->25:{148} Weak SCC
| | | |
| | | `->26:{147} Weak SCC
| | |
| | |->27:{105} Weak SCC
| | | |
| | | `->132:{23} Weak SCC
| | |
| | `->28:{106} Weak SCC
| | |
| | `->130:{25} Weak SCC
| |
| |->6:{120} Weak SCC
| |
| |->7:{121} Weak SCC
| |
| `->8:{122} Weak SCC
| |
| |->105:{27} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | `->106:{48,40,39,37,33} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | |->123:{131} Weak SCC
| | |
| | |->124:{132} Weak SCC
| | |
| | |->125:{133} Weak SCC
| | |
| | `->126:{134} Weak SCC
| |
| |->9:{123} Weak SCC
| |
| `->10:{124} Weak SCC
| |
| `->132:{23} Weak SCC
|
|->132:{23} Weak SCC
|
`->4:{119} Weak SCC
->2:{24} Weak SCC
->1:{26} Weak SCC
Here dependency-pairs are as follows:
Strict DPs:
{ 1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, 7: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 8: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, 9: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 10: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 11: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, 12: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, 13: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 14: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, 15: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, 16: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 17: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, 18: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, 19: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 20: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, 21: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, 22: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ 23: #abs^#(#0()) -> c_1()
, 24: #abs^#(#neg(@x)) -> c_2()
, 25: #abs^#(#pos(@x)) -> c_3()
, 26: #abs^#(#s(@x)) -> c_4()
, 27: #equal^#(@x, @y) -> #eq^#(@x, @y)
, 28: #eq^#(#0(), #0()) -> c_66()
, 29: #eq^#(#0(), #neg(@y)) -> c_67()
, 30: #eq^#(#0(), #pos(@y)) -> c_68()
, 31: #eq^#(#0(), #s(@y)) -> c_69()
, 32: #eq^#(#neg(@x), #0()) -> c_70()
, 33: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, 34: #eq^#(#neg(@x), #pos(@y)) -> c_72()
, 35: #eq^#(#pos(@x), #0()) -> c_73()
, 36: #eq^#(#pos(@x), #neg(@y)) -> c_74()
, 37: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, 38: #eq^#(#s(@x), #0()) -> c_76()
, 39: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, 40: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 41: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, 42: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, 43: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, 44: #eq^#(nil(), nil()) -> c_82()
, 45: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, 46: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, 47: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, 48: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 49: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 50: #ckgt^#(#EQ()) -> c_99()
, 51: #ckgt^#(#GT()) -> c_100()
, 52: #ckgt^#(#LT()) -> c_101()
, 53: #compare^#(#0(), #0()) -> c_87()
, 54: #compare^#(#0(), #neg(@y)) -> c_88()
, 55: #compare^#(#0(), #pos(@y)) -> c_89()
, 56: #compare^#(#0(), #s(@y)) -> c_90()
, 57: #compare^#(#neg(@x), #0()) -> c_91()
, 58: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, 59: #compare^#(#neg(@x), #pos(@y)) -> c_93()
, 60: #compare^#(#pos(@x), #0()) -> c_94()
, 61: #compare^#(#pos(@x), #neg(@y)) -> c_95()
, 62: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, 63: #compare^#(#s(@x), #0()) -> c_97()
, 64: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, 65: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 66: #cklt^#(#EQ()) -> c_102()
, 67: #cklt^#(#GT()) -> c_103()
, 68: #cklt^#(#LT()) -> c_104()
, 69: *^#(@x, @y) -> #mult^#(@x, @y)
, 70: #mult^#(#0(), #0()) -> c_105()
, 71: #mult^#(#0(), #neg(@y)) -> c_106()
, 72: #mult^#(#0(), #pos(@y)) -> c_107()
, 73: #mult^#(#neg(@x), #0()) -> c_108()
, 74: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 75: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 76: #mult^#(#pos(@x), #0()) -> c_111()
, 77: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 78: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 79: +^#(@x, @y) -> #add^#(@x, @y)
, 80: #add^#(#0(), @y) -> c_114()
, 81: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, 82: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 83: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, 84: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 85: -^#(@x, @y) -> #sub^#(@x, @y)
, 86: #sub^#(@x, #0()) -> c_119()
, 87: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, 88: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, 89: add'#1^#(nil(), @b2, @r) -> c_14()
, 90: add'#2^#(nil(), @r, @x, @xs) -> c_16()
, 91: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, 92: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, 93: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, 94: compare#1^#(nil(), @b2) -> #abs^#(#0())
, 95: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, 96: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, 97: compare#4^#(#false(), @r, @x, @y) -> c_29()
, 98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, 99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, 100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, 101: compare#6^#(#false()) -> #abs^#(#0())
, 102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, 103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, 104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, 105: diff#1^#(#false()) -> #abs^#(#0())
, 106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, 107: div^#(@x, @y) -> #div^#(@x, @y)
, 108: #div^#(#0(), #0()) -> c_122()
, 109: #div^#(#0(), #neg(@y)) -> c_123()
, 110: #div^#(#0(), #pos(@y)) -> c_124()
, 111: #div^#(#neg(@x), #0()) -> c_125()
, 112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 114: #div^#(#pos(@x), #0()) -> c_128()
, 115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 117: mult#1^#(nil(), @b2) -> c_43()
, 118: mult#3^#(#false(), @b2, @zs) -> c_45()
, 119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, 120: sub'#1^#(nil(), @b2, @r) -> c_52()
, 121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, 122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, 123: sub'#5^#(#false(), @z, @zs) -> c_57()
, 124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, 125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, 126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, 127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, 128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, 129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, 130: sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, 131: #and^#(#false(), #false()) -> c_139()
, 132: #and^#(#false(), #true()) -> c_140()
, 133: #and^#(#true(), #false()) -> c_141()
, 134: #and^#(#true(), #true()) -> c_142()
, 135: #natmult^#(#0(), @y) -> c_145()
, 136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, 137: #pred^#(#0()) -> c_131()
, 138: #pred^#(#neg(#s(@x))) -> c_132()
, 139: #pred^#(#pos(#s(#0()))) -> c_133()
, 140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
, 141: #succ^#(#0()) -> c_135()
, 142: #succ^#(#neg(#s(#0()))) -> c_136()
, 143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
, 144: #succ^#(#pos(#s(@x))) -> c_138()
, 145: #natdiv^#(#0(), #0()) -> c_143()
, 146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, 147: #natsub^#(@x, #0()) -> c_147()
, 148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 26: #abs^#(#s(@x)) -> c_4()
, 24: #abs^#(#neg(@x)) -> c_2()
, 119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, 120: sub'#1^#(nil(), @b2, @r) -> c_52()
, 121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, 122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, 123: sub'#5^#(#false(), @z, @zs) -> c_57()
, 124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, 103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, 104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, 107: div^#(@x, @y) -> #div^#(@x, @y)
, 108: #div^#(#0(), #0()) -> c_122()
, 109: #div^#(#0(), #neg(@y)) -> c_123()
, 110: #div^#(#0(), #pos(@y)) -> c_124()
, 111: #div^#(#neg(@x), #0()) -> c_125()
, 114: #div^#(#pos(@x), #0()) -> c_128()
, 112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 145: #natdiv^#(#0(), #0()) -> c_143()
, 146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, 148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
, 147: #natsub^#(@x, #0()) -> c_147()
, 105: diff#1^#(#false()) -> #abs^#(#0())
, 106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, 117: mult#1^#(nil(), @b2) -> c_43()
, 118: mult#3^#(#false(), @b2, @zs) -> c_45()
, 96: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, 97: compare#4^#(#false(), @r, @x, @y) -> c_29()
, 98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, 65: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 66: #cklt^#(#EQ()) -> c_102()
, 67: #cklt^#(#GT()) -> c_103()
, 68: #cklt^#(#LT()) -> c_104()
, 99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, 49: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 50: #ckgt^#(#EQ()) -> c_99()
, 51: #ckgt^#(#GT()) -> c_100()
, 52: #ckgt^#(#LT()) -> c_101()
, 64: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, 62: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, 58: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, 53: #compare^#(#0(), #0()) -> c_87()
, 54: #compare^#(#0(), #neg(@y)) -> c_88()
, 55: #compare^#(#0(), #pos(@y)) -> c_89()
, 56: #compare^#(#0(), #s(@y)) -> c_90()
, 57: #compare^#(#neg(@x), #0()) -> c_91()
, 59: #compare^#(#neg(@x), #pos(@y)) -> c_93()
, 60: #compare^#(#pos(@x), #0()) -> c_94()
, 61: #compare^#(#pos(@x), #neg(@y)) -> c_95()
, 63: #compare^#(#s(@x), #0()) -> c_97()
, 101: compare#6^#(#false()) -> #abs^#(#0())
, 102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, 100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, 85: -^#(@x, @y) -> #sub^#(@x, @y)
, 86: #sub^#(@x, #0()) -> c_119()
, 87: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, 88: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, 95: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, 94: compare#1^#(nil(), @b2) -> #abs^#(#0())
, 69: *^#(@x, @y) -> #mult^#(@x, @y)
, 70: #mult^#(#0(), #0()) -> c_105()
, 71: #mult^#(#0(), #neg(@y)) -> c_106()
, 72: #mult^#(#0(), #pos(@y)) -> c_107()
, 73: #mult^#(#neg(@x), #0()) -> c_108()
, 76: #mult^#(#pos(@x), #0()) -> c_111()
, 74: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 75: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 77: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 78: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, 135: #natmult^#(#0(), @y) -> c_145()
, 93: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, 89: add'#1^#(nil(), @b2, @r) -> c_14()
, 90: add'#2^#(nil(), @r, @x, @xs) -> c_16()
, 91: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, 79: +^#(@x, @y) -> #add^#(@x, @y)
, 80: #add^#(#0(), @y) -> c_114()
, 81: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, 82: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 137: #pred^#(#0()) -> c_131()
, 138: #pred^#(#neg(#s(@x))) -> c_132()
, 139: #pred^#(#pos(#s(#0()))) -> c_133()
, 140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
, 84: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 83: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, 141: #succ^#(#0()) -> c_135()
, 142: #succ^#(#neg(#s(#0()))) -> c_136()
, 143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
, 144: #succ^#(#pos(#s(@x))) -> c_138()
, 92: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, 125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, 127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, 27: #equal^#(@x, @y) -> #eq^#(@x, @y)
, 48: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 40: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 39: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, 37: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, 33: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, 28: #eq^#(#0(), #0()) -> c_66()
, 29: #eq^#(#0(), #neg(@y)) -> c_67()
, 30: #eq^#(#0(), #pos(@y)) -> c_68()
, 31: #eq^#(#0(), #s(@y)) -> c_69()
, 32: #eq^#(#neg(@x), #0()) -> c_70()
, 34: #eq^#(#neg(@x), #pos(@y)) -> c_72()
, 35: #eq^#(#pos(@x), #0()) -> c_73()
, 36: #eq^#(#pos(@x), #neg(@y)) -> c_74()
, 38: #eq^#(#s(@x), #0()) -> c_76()
, 41: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, 42: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, 43: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, 44: #eq^#(nil(), nil()) -> c_82()
, 45: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, 46: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, 47: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, 131: #and^#(#false(), #false()) -> c_139()
, 132: #and^#(#false(), #true()) -> c_140()
, 133: #and^#(#true(), #false()) -> c_141()
, 134: #and^#(#true(), #true()) -> c_142()
, 129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, 130: sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, 128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, 25: #abs^#(#pos(@x)) -> c_3()
, 126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, 23: #abs^#(#0()) -> c_1() }
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the following dependency-graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :7
7: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :8
8: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :7
9: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :10
10: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :11
11: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :9
12: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :9
13: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :14
14: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :15
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :13
15: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :16
16: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
17: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :13
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :13
18: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :19
19: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :20
20: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :21
21: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :22
22: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :19
Due to missing edges in the dependency-graph, the right-hand sides
of following rules could be simplified:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We employ 'linear path analysis' using the following approximated
dependency graph:
->9:{6} [ ? ]
|
`->10:{7,8} [ YES(O(1),O(n^1)) ]
->7:{12} [ ? ]
|
`->8:{9,11,10} [ YES(O(1),O(n^1)) ]
->3:{17} [ ? ]
|
`->4:{13,14} [ ? ]
|
`->5:{15} [ ? ]
|
`->6:{16} [ ? ]
|
`->11:{1} [ ? ]
|
`->12:{2,5,4,3} [ YES(O(1),O(n^2)) ]
->1:{18} [ ? ]
|
`->2:{19,22,21,20} [ YES(O(1),O(n^1)) ]
Here dependency-pairs are as follows:
Strict DPs:
{ 1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 7: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 8: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
, 9: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 10: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 11: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 12: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
, 13: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 14: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, 15: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, 16: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 17: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, 18: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 19: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 20: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, 21: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, 22: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') }
* Path 9:{6}->10:{7,8}: YES(O(1),O(n^1))
--------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) :3
3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) }
Weak DPs:
{ bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) :3
3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {1} and add Pre({1}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) }
Weak DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We replace strict/weak-rules by the corresponding usable rules:
Weak Usable Rules:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) }
Weak DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 2: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Trs: { *(@x, @y) -> #mult(@x, @y) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(#abs) = {}, Uargs(#neg) = {}, Uargs(#pos) = {},
Uargs(#s) = {}, Uargs(*) = {}, Uargs(#mult) = {}, Uargs(#add) = {},
Uargs(::) = {}, Uargs(tuple#2) = {}, Uargs(#pred) = {},
Uargs(#succ) = {}, Uargs(#natmult) = {}, Uargs(#abs^#) = {},
Uargs(#equal^#) = {}, Uargs(#eq^#) = {}, Uargs(#greater^#) = {},
Uargs(#ckgt^#) = {}, Uargs(#compare^#) = {}, Uargs(#less^#) = {},
Uargs(#cklt^#) = {}, Uargs(*^#) = {}, Uargs(#mult^#) = {},
Uargs(+^#) = {}, Uargs(#add^#) = {}, Uargs(-^#) = {},
Uargs(#sub^#) = {}, Uargs(add^#) = {}, Uargs(add'^#) = {},
Uargs(add'#1^#) = {}, Uargs(add'#2^#) = {}, Uargs(add'#3^#) = {},
Uargs(sum^#) = {}, Uargs(sum#1^#) = {}, Uargs(bitToInt^#) = {},
Uargs(bitToInt'^#) = {}, Uargs(bitToInt'#1^#) = {},
Uargs(compare^#) = {}, Uargs(compare#1^#) = {},
Uargs(compare#2^#) = {}, Uargs(compare#3^#) = {},
Uargs(compare#4^#) = {}, Uargs(compare#5^#) = {},
Uargs(compare#6^#) = {}, Uargs(diff^#) = {}, Uargs(mod^#) = {},
Uargs(diff#1^#) = {}, Uargs(div^#) = {}, Uargs(#div^#) = {},
Uargs(leq^#) = {}, Uargs(mult^#) = {}, Uargs(mult#1^#) = {},
Uargs(mult#2^#) = {}, Uargs(mult#3^#) = {}, Uargs(mult3^#) = {},
Uargs(sub^#) = {}, Uargs(sub#1^#) = {}, Uargs(sub'^#) = {},
Uargs(sub'#1^#) = {}, Uargs(sub'#2^#) = {}, Uargs(sub'#3^#) = {},
Uargs(sub'#4^#) = {}, Uargs(sub'#5^#) = {}, Uargs(sum#2^#) = {},
Uargs(sum#3^#) = {}, Uargs(sum#4^#) = {}, Uargs(#and^#) = {},
Uargs(#natmult^#) = {}, Uargs(#pred^#) = {}, Uargs(#succ^#) = {},
Uargs(#natdiv^#) = {}, Uargs(#natsub^#) = {}
TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).
[#0] = [0]
[#abs](x1) = [0]
[#neg](x1) = [0]
[#pos](x1) = [0]
[#s](x1) = [0]
[*](x1, x2) = [1] x1 + [2]
[#mult](x1, x2) = [0]
[#add](x1, x2) = [2] x2 + [0]
[::](x1, x2) = [1] x2 + [3]
[nil] = [0]
[tuple#2](x1, x2) = [0]
[#false] = [0]
[#true] = [0]
[#pred](x1) = [0]
[#succ](x1) = [0]
[#EQ] = [0]
[#GT] = [0]
[#LT] = [0]
[#divByZero] = [0]
[#natmult](x1, x2) = [0]
[#abs^#](x1) = [0]
[#equal^#](x1, x2) = [0]
[#eq^#](x1, x2) = [0]
[#greater^#](x1, x2) = [0]
[#ckgt^#](x1) = [0]
[#compare^#](x1, x2) = [0]
[#less^#](x1, x2) = [0]
[#cklt^#](x1) = [0]
[*^#](x1, x2) = [0]
[#mult^#](x1, x2) = [0]
[+^#](x1, x2) = [0]
[#add^#](x1, x2) = [0]
[-^#](x1, x2) = [0]
[#sub^#](x1, x2) = [0]
[add^#](x1, x2) = [0]
[add'^#](x1, x2, x3) = [0]
[add'#1^#](x1, x2, x3) = [0]
[add'#2^#](x1, x2, x3, x4) = [0]
[add'#3^#](x1, x2, x3) = [0]
[sum^#](x1, x2, x3) = [0]
[sum#1^#](x1) = [0]
[bitToInt^#](x1) = [3] x1 + [3]
[bitToInt'^#](x1, x2) = [3] x1 + [0]
[bitToInt'#1^#](x1, x2) = [3] x1 + [0]
[compare^#](x1, x2) = [0]
[compare#1^#](x1, x2) = [0]
[compare#2^#](x1, x2, x3) = [0]
[compare#3^#](x1, x2, x3) = [0]
[compare#4^#](x1, x2, x3, x4) = [0]
[compare#5^#](x1, x2, x3) = [0]
[compare#6^#](x1) = [0]
[diff^#](x1, x2, x3) = [0]
[mod^#](x1, x2) = [0]
[diff#1^#](x1) = [0]
[div^#](x1, x2) = [0]
[#div^#](x1, x2) = [0]
[leq^#](x1, x2) = [0]
[mult^#](x1, x2) = [0]
[mult#1^#](x1, x2) = [0]
[mult#2^#](x1, x2, x3) = [0]
[mult#3^#](x1, x2, x3) = [0]
[mult3^#](x1, x2, x3) = [0]
[sub^#](x1, x2) = [0]
[sub#1^#](x1) = [0]
[sub'^#](x1, x2, x3) = [0]
[sub'#1^#](x1, x2, x3) = [0]
[sub'#2^#](x1, x2, x3, x4) = [0]
[sub'#3^#](x1, x2, x3) = [0]
[sub'#4^#](x1, x2) = [0]
[sub'#5^#](x1, x2, x3) = [0]
[sum#2^#](x1, x2) = [0]
[sum#3^#](x1, x2) = [0]
[sum#4^#](x1) = [0]
[#and^#](x1, x2) = [0]
[#natmult^#](x1, x2) = [0]
[#pred^#](x1) = [0]
[#succ^#](x1) = [0]
[#natdiv^#](x1, x2) = [0]
[#natsub^#](x1, x2) = [0]
This order satisfies following ordering constraints
[#abs(#0())] = [0]
>= [0]
= [#0()]
[#abs(#neg(@x))] = [0]
>= [0]
= [#pos(@x)]
[#abs(#pos(@x))] = [0]
>= [0]
= [#pos(@x)]
[#abs(#s(@x))] = [0]
>= [0]
= [#pos(#s(@x))]
[*(@x, @y)] = [1] @x + [2]
> [0]
= [#mult(@x, @y)]
[#mult(#0(), #0())] = [0]
>= [0]
= [#0()]
[#mult(#0(), #neg(@y))] = [0]
>= [0]
= [#0()]
[#mult(#0(), #pos(@y))] = [0]
>= [0]
= [#0()]
[#mult(#neg(@x), #0())] = [0]
>= [0]
= [#0()]
[#mult(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#pos(#natmult(@x, @y))]
[#mult(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#neg(#natmult(@x, @y))]
[#mult(#pos(@x), #0())] = [0]
>= [0]
= [#0()]
[#mult(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#neg(#natmult(@x, @y))]
[#mult(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#pos(#natmult(@x, @y))]
[#add(#0(), @y)] = [2] @y + [0]
>= [1] @y + [0]
= [@y]
[#add(#neg(#s(#0())), @y)] = [2] @y + [0]
>= [0]
= [#pred(@y)]
[#add(#neg(#s(#s(@x))), @y)] = [2] @y + [0]
>= [0]
= [#pred(#add(#pos(#s(@x)), @y))]
[#add(#pos(#s(#0())), @y)] = [2] @y + [0]
>= [0]
= [#succ(@y)]
[#add(#pos(#s(#s(@x))), @y)] = [2] @y + [0]
>= [0]
= [#succ(#add(#pos(#s(@x)), @y))]
[#pred(#0())] = [0]
>= [0]
= [#neg(#s(#0()))]
[#pred(#neg(#s(@x)))] = [0]
>= [0]
= [#neg(#s(#s(@x)))]
[#pred(#pos(#s(#0())))] = [0]
>= [0]
= [#0()]
[#pred(#pos(#s(#s(@x))))] = [0]
>= [0]
= [#pos(#s(@x))]
[#succ(#0())] = [0]
>= [0]
= [#pos(#s(#0()))]
[#succ(#neg(#s(#0())))] = [0]
>= [0]
= [#0()]
[#succ(#neg(#s(#s(@x))))] = [0]
>= [0]
= [#neg(#s(@x))]
[#succ(#pos(#s(@x)))] = [0]
>= [0]
= [#pos(#s(#s(@x)))]
[#natmult(#0(), @y)] = [0]
>= [0]
= [#0()]
[#natmult(#s(@x), @y)] = [0]
>= [0]
= [#add(#pos(@y), #natmult(@x, @y))]
[bitToInt^#(@b)] = [3] @b + [3]
> [3] @b + [0]
= [bitToInt'^#(@b, #abs(#pos(#s(#0()))))]
[bitToInt'^#(@b, @n)] = [3] @b + [0]
>= [3] @b + [0]
= [bitToInt'#1^#(@b, @n)]
[bitToInt'#1^#(::(@x, @xs), @n)] = [3] @xs + [9]
> [3] @xs + [0]
= [bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))]
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of rules {2,3}.
Here rules are labeled according to the (estimated) dependency
graph
1: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) :3
2: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :1
3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :1
- The rules {2,3} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules {1,2,3}
is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{1} Weak SCC
|
`->2:{2,3} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
* Path 7:{12}->8:{9,11,10}: YES(O(1),O(n^1))
------------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :2
2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :3
3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
4: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak DPs:
{ compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :2
2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :4
3: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
4: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {2} and add Pre({2}) = {1} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak DPs:
{ compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :3
2: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
3: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :4
4: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {2} and add Pre({2}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) }
Weak DPs:
{ compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
No rule is usable.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) }
Weak DPs:
{ compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 4: leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(#neg) = {}, Uargs(#pos) = {}, Uargs(#s) = {}, Uargs(::) = {},
Uargs(tuple#2) = {}, Uargs(#abs^#) = {}, Uargs(#equal^#) = {},
Uargs(#eq^#) = {}, Uargs(#greater^#) = {}, Uargs(#ckgt^#) = {},
Uargs(#compare^#) = {}, Uargs(#less^#) = {}, Uargs(#cklt^#) = {},
Uargs(*^#) = {}, Uargs(#mult^#) = {}, Uargs(+^#) = {},
Uargs(#add^#) = {}, Uargs(-^#) = {}, Uargs(#sub^#) = {},
Uargs(add^#) = {}, Uargs(add'^#) = {}, Uargs(add'#1^#) = {},
Uargs(add'#2^#) = {}, Uargs(add'#3^#) = {}, Uargs(sum^#) = {},
Uargs(sum#1^#) = {}, Uargs(bitToInt^#) = {},
Uargs(bitToInt'^#) = {}, Uargs(bitToInt'#1^#) = {},
Uargs(compare^#) = {}, Uargs(compare#1^#) = {},
Uargs(compare#2^#) = {}, Uargs(compare#3^#) = {},
Uargs(compare#4^#) = {}, Uargs(compare#5^#) = {},
Uargs(compare#6^#) = {}, Uargs(diff^#) = {}, Uargs(mod^#) = {},
Uargs(diff#1^#) = {}, Uargs(div^#) = {}, Uargs(#div^#) = {},
Uargs(leq^#) = {}, Uargs(mult^#) = {}, Uargs(mult#1^#) = {},
Uargs(mult#2^#) = {}, Uargs(mult#3^#) = {}, Uargs(mult3^#) = {},
Uargs(sub^#) = {}, Uargs(sub#1^#) = {}, Uargs(sub'^#) = {},
Uargs(sub'#1^#) = {}, Uargs(sub'#2^#) = {}, Uargs(sub'#3^#) = {},
Uargs(sub'#4^#) = {}, Uargs(sub'#5^#) = {}, Uargs(sum#2^#) = {},
Uargs(sum#3^#) = {}, Uargs(sum#4^#) = {}, Uargs(#and^#) = {},
Uargs(#natmult^#) = {}, Uargs(#pred^#) = {}, Uargs(#succ^#) = {},
Uargs(#natdiv^#) = {}, Uargs(#natsub^#) = {}
TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).
[#0] = [0]
[#neg](x1) = [0]
[#pos](x1) = [0]
[#s](x1) = [0]
[::](x1, x2) = [1] x2 + [2]
[nil] = [0]
[tuple#2](x1, x2) = [0]
[#false] = [0]
[#true] = [0]
[#EQ] = [0]
[#GT] = [0]
[#LT] = [0]
[#divByZero] = [0]
[#abs^#](x1) = [0]
[#equal^#](x1, x2) = [0]
[#eq^#](x1, x2) = [0]
[#greater^#](x1, x2) = [0]
[#ckgt^#](x1) = [0]
[#compare^#](x1, x2) = [0]
[#less^#](x1, x2) = [0]
[#cklt^#](x1) = [0]
[*^#](x1, x2) = [0]
[#mult^#](x1, x2) = [0]
[+^#](x1, x2) = [0]
[#add^#](x1, x2) = [0]
[-^#](x1, x2) = [0]
[#sub^#](x1, x2) = [0]
[add^#](x1, x2) = [0]
[add'^#](x1, x2, x3) = [0]
[add'#1^#](x1, x2, x3) = [0]
[add'#2^#](x1, x2, x3, x4) = [0]
[add'#3^#](x1, x2, x3) = [0]
[sum^#](x1, x2, x3) = [0]
[sum#1^#](x1) = [0]
[bitToInt^#](x1) = [0]
[bitToInt'^#](x1, x2) = [0]
[bitToInt'#1^#](x1, x2) = [0]
[compare^#](x1, x2) = [2] x1 + [1]
[compare#1^#](x1, x2) = [2] x1 + [0]
[compare#2^#](x1, x2, x3) = [2] x3 + [3]
[compare#3^#](x1, x2, x3) = [0]
[compare#4^#](x1, x2, x3, x4) = [0]
[compare#5^#](x1, x2, x3) = [0]
[compare#6^#](x1) = [0]
[diff^#](x1, x2, x3) = [0]
[mod^#](x1, x2) = [0]
[diff#1^#](x1) = [0]
[div^#](x1, x2) = [0]
[#div^#](x1, x2) = [0]
[leq^#](x1, x2) = [3] x1 + [3] x2 + [3]
[mult^#](x1, x2) = [0]
[mult#1^#](x1, x2) = [0]
[mult#2^#](x1, x2, x3) = [0]
[mult#3^#](x1, x2, x3) = [0]
[mult3^#](x1, x2, x3) = [0]
[sub^#](x1, x2) = [0]
[sub#1^#](x1) = [0]
[sub'^#](x1, x2, x3) = [0]
[sub'#1^#](x1, x2, x3) = [0]
[sub'#2^#](x1, x2, x3, x4) = [0]
[sub'#3^#](x1, x2, x3) = [0]
[sub'#4^#](x1, x2) = [0]
[sub'#5^#](x1, x2, x3) = [0]
[sum#2^#](x1, x2) = [0]
[sum#3^#](x1, x2) = [0]
[sum#4^#](x1) = [0]
[#and^#](x1, x2) = [0]
[#natmult^#](x1, x2) = [0]
[#pred^#](x1) = [0]
[#succ^#](x1) = [0]
[#natdiv^#](x1, x2) = [0]
[#natsub^#](x1, x2) = [0]
This order satisfies following ordering constraints
[compare^#(@b1, @b2)] = [2] @b1 + [1]
> [2] @b1 + [0]
= [compare#1^#(@b1, @b2)]
[compare#1^#(::(@x, @xs), @b2)] = [2] @xs + [4]
> [2] @xs + [3]
= [compare#2^#(@b2, @x, @xs)]
[compare#2^#(::(@y, @ys), @x, @xs)] = [2] @xs + [3]
> [2] @xs + [1]
= [compare^#(@xs, @ys)]
[leq^#(@b1, @b2)] = [3] @b1 + [3] @b2 + [3]
> [2] @b1 + [1]
= [compare^#(@b1, @b2)]
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of rules
{1,2,3,4}. Here rules are labeled according to the (estimated)
dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :2
2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :3
3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
4: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
Overall, we obtain that the number of applications of rules
{1,2,3,4} is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{4} Weak SCC
|
`->2:{1,3,2} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 4: leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 4: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
, 1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) }
We apply the transformation 'usablerules' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
* Path 3:{17}->4:{13,14}->5:{15}->6:{16}->11:{1}->12:{2,5,4,3}: YES(O(1),O(n^2))
------------------------------------------------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :7
7: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :8
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
8: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :9
9: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
10: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {5} and add Pre({5}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
5: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :6
6: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :7
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :5
7: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :8
8: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
9: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :5
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :5
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {4} and add Pre({4}) = {3} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :9
4: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :5
5: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :6
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :4
6: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :7
7: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
8: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :4
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :4
9: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :8
3: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :4
4: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :5
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :3
5: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :6
6: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
7: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :3
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :3
8: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :9
9: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {1} and add Pre({1}) = {6} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :8
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :3
3: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :4
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :5
5: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :7
6: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
7: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
8: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :9
9: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {5} and add Pre({5}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :7
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :3
3: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :4
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
5: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
6: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
7: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :8
8: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :9
9: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :6
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {4} and add Pre({4}) = {3} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :6
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :3
3: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :9
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
5: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
6: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :7
7: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :8
8: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :5
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :5
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :8
3: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
5: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :6
6: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :7
7: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
8: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :9
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :4
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We replace strict/weak-rules by the corresponding usable rules:
Weak Usable Rules:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We measure the number of applications of following selected rules
relative to the remaining rules.
Selected Rules (A):
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Remaining Rules (B):
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
The length of a single A-subderivation is expressed by the
following problem.
Problem (A):
------------
Strict DPs: { add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
The number of B-applications is expressed by the following problem.
Problem (B):
------------
Strict DPs:
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) }
Weak DPs:
{ mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
TcT answers on problem (B) YES(O(1),O(n^1)).
Sub-proof:
----------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) }
Weak DPs:
{ mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :2
2: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
3: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {2} and add Pre({2}) = {1} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the following dependency-graph
1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :2
2: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
3: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
Due to missing edges in the dependency-graph, the right-hand sides
of following rules could be simplified:
{ mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) }
Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x)) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(#abs) = {}, Uargs(#neg) = {}, Uargs(#pos) = {},
Uargs(#s) = {}, Uargs(#equal) = {}, Uargs(#eq) = {}, Uargs(+) = {},
Uargs(#add) = {}, Uargs(add) = {}, Uargs(add') = {},
Uargs(add'#1) = {}, Uargs(::) = {}, Uargs(add'#2) = {},
Uargs(sum) = {}, Uargs(add'#3) = {}, Uargs(tuple#2) = {},
Uargs(mult) = {}, Uargs(mult#1) = {}, Uargs(mult#2) = {},
Uargs(mult#3) = {}, Uargs(sum#1) = {}, Uargs(sum#2) = {},
Uargs(sum#3) = {}, Uargs(sum#4) = {}, Uargs(#pred) = {},
Uargs(#succ) = {}, Uargs(#and) = {}, Uargs(#abs^#) = {},
Uargs(#equal^#) = {}, Uargs(#eq^#) = {}, Uargs(#greater^#) = {},
Uargs(#ckgt^#) = {}, Uargs(#compare^#) = {}, Uargs(#less^#) = {},
Uargs(#cklt^#) = {}, Uargs(*^#) = {}, Uargs(#mult^#) = {},
Uargs(+^#) = {}, Uargs(#add^#) = {}, Uargs(-^#) = {},
Uargs(#sub^#) = {}, Uargs(add^#) = {}, Uargs(add'^#) = {},
Uargs(add'#1^#) = {}, Uargs(add'#2^#) = {}, Uargs(add'#3^#) = {},
Uargs(sum^#) = {}, Uargs(sum#1^#) = {}, Uargs(bitToInt^#) = {},
Uargs(bitToInt'^#) = {}, Uargs(bitToInt'#1^#) = {},
Uargs(compare^#) = {}, Uargs(compare#1^#) = {},
Uargs(compare#2^#) = {}, Uargs(compare#3^#) = {},
Uargs(compare#4^#) = {}, Uargs(compare#5^#) = {},
Uargs(compare#6^#) = {}, Uargs(diff^#) = {}, Uargs(mod^#) = {},
Uargs(diff#1^#) = {}, Uargs(div^#) = {}, Uargs(#div^#) = {},
Uargs(leq^#) = {}, Uargs(mult^#) = {}, Uargs(mult#1^#) = {},
Uargs(mult#2^#) = {}, Uargs(mult#3^#) = {}, Uargs(mult3^#) = {},
Uargs(sub^#) = {}, Uargs(sub#1^#) = {}, Uargs(sub'^#) = {},
Uargs(sub'#1^#) = {}, Uargs(sub'#2^#) = {}, Uargs(sub'#3^#) = {},
Uargs(sub'#4^#) = {}, Uargs(sub'#5^#) = {}, Uargs(sum#2^#) = {},
Uargs(sum#3^#) = {}, Uargs(sum#4^#) = {}, Uargs(#and^#) = {},
Uargs(#natmult^#) = {}, Uargs(#pred^#) = {}, Uargs(#succ^#) = {},
Uargs(#natdiv^#) = {}, Uargs(#natsub^#) = {}, Uargs(c_1) = {},
Uargs(c_2) = {}, Uargs(c_1) = {1, 2}
TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).
[#0] = [0]
[#abs](x1) = [1]
[#neg](x1) = [0]
[#pos](x1) = [0]
[#s](x1) = [0]
[#equal](x1, x2) = [0]
[#eq](x1, x2) = [0]
[+](x1, x2) = [1] x2 + [0]
[#add](x1, x2) = [1] x2 + [0]
[add](x1, x2) = [1] x2 + [0]
[add'](x1, x2, x3) = [1] x2 + [0]
[add'#1](x1, x2, x3) = [1] x2 + [0]
[::](x1, x2) = [1] x2 + [1]
[add'#2](x1, x2, x3, x4) = [1] x1 + [0]
[nil] = [0]
[sum](x1, x2, x3) = [1]
[add'#3](x1, x2, x3) = [1] x1 + [1] x3 + [0]
[tuple#2](x1, x2) = [1]
[#false] = [0]
[#true] = [0]
[mult](x1, x2) = [1] x1 + [0]
[mult#1](x1, x2) = [1] x1 + [0]
[mult#2](x1, x2, x3) = [1] x1 + [0]
[mult#3](x1, x2, x3) = [1] x3 + [0]
[sum#1](x1) = [1]
[sum#2](x1, x2) = [1]
[sum#3](x1, x2) = [1]
[sum#4](x1) = [1]
[#pred](x1) = [0]
[#succ](x1) = [0]
[#and](x1, x2) = [0]
[#EQ] = [0]
[#GT] = [0]
[#LT] = [0]
[#divByZero] = [0]
[#abs^#](x1) = [0]
[#equal^#](x1, x2) = [0]
[#eq^#](x1, x2) = [0]
[#greater^#](x1, x2) = [0]
[#ckgt^#](x1) = [0]
[#compare^#](x1, x2) = [0]
[#less^#](x1, x2) = [0]
[#cklt^#](x1) = [0]
[*^#](x1, x2) = [0]
[#mult^#](x1, x2) = [0]
[+^#](x1, x2) = [0]
[#add^#](x1, x2) = [0]
[-^#](x1, x2) = [0]
[#sub^#](x1, x2) = [0]
[add^#](x1, x2) = [0]
[add'^#](x1, x2, x3) = [0]
[add'#1^#](x1, x2, x3) = [0]
[add'#2^#](x1, x2, x3, x4) = [0]
[add'#3^#](x1, x2, x3) = [0]
[sum^#](x1, x2, x3) = [0]
[sum#1^#](x1) = [0]
[bitToInt^#](x1) = [0]
[bitToInt'^#](x1, x2) = [0]
[bitToInt'#1^#](x1, x2) = [0]
[compare^#](x1, x2) = [0]
[compare#1^#](x1, x2) = [0]
[compare#2^#](x1, x2, x3) = [0]
[compare#3^#](x1, x2, x3) = [0]
[compare#4^#](x1, x2, x3, x4) = [0]
[compare#5^#](x1, x2, x3) = [0]
[compare#6^#](x1) = [0]
[diff^#](x1, x2, x3) = [0]
[mod^#](x1, x2) = [0]
[diff#1^#](x1) = [0]
[div^#](x1, x2) = [0]
[#div^#](x1, x2) = [0]
[leq^#](x1, x2) = [0]
[mult^#](x1, x2) = [1] x1 + [1]
[mult#1^#](x1, x2) = [1] x1 + [1]
[mult#2^#](x1, x2, x3) = [0]
[mult#3^#](x1, x2, x3) = [0]
[mult3^#](x1, x2, x3) = [3] x1 + [3] x2 + [3]
[sub^#](x1, x2) = [0]
[sub#1^#](x1) = [0]
[sub'^#](x1, x2, x3) = [0]
[sub'#1^#](x1, x2, x3) = [0]
[sub'#2^#](x1, x2, x3, x4) = [0]
[sub'#3^#](x1, x2, x3) = [0]
[sub'#4^#](x1, x2) = [0]
[sub'#5^#](x1, x2, x3) = [0]
[sum#2^#](x1, x2) = [0]
[sum#3^#](x1, x2) = [0]
[sum#4^#](x1) = [0]
[#and^#](x1, x2) = [0]
[#natmult^#](x1, x2) = [0]
[#pred^#](x1) = [0]
[#succ^#](x1) = [0]
[#natdiv^#](x1, x2) = [0]
[#natsub^#](x1, x2) = [0]
[c_1](x1, x2) = [0]
[c_2](x1, x2) = [0]
[c] = [0]
[c_1](x1, x2) = [2] x1 + [1] x2 + [0]
This order satisfies following ordering constraints
[#abs(#0())] = [1]
> [0]
= [#0()]
[#abs(#neg(@x))] = [1]
> [0]
= [#pos(@x)]
[#abs(#pos(@x))] = [1]
> [0]
= [#pos(@x)]
[#abs(#s(@x))] = [1]
> [0]
= [#pos(#s(@x))]
[#equal(@x, @y)] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#0(), #0())] = [0]
>= [0]
= [#true()]
[#eq(#0(), #neg(@y))] = [0]
>= [0]
= [#false()]
[#eq(#0(), #pos(@y))] = [0]
>= [0]
= [#false()]
[#eq(#0(), #s(@y))] = [0]
>= [0]
= [#false()]
[#eq(#neg(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#s(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#s(@x), #s(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0]
>= [0]
= [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))]
[#eq(::(@x_1, @x_2), nil())] = [0]
>= [0]
= [#false()]
[#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(nil(), ::(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(nil(), nil())] = [0]
>= [0]
= [#true()]
[#eq(nil(), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), nil())] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))]
[+(@x, @y)] = [1] @y + [0]
>= [1] @y + [0]
= [#add(@x, @y)]
[#add(#0(), @y)] = [1] @y + [0]
>= [1] @y + [0]
= [@y]
[#add(#neg(#s(#0())), @y)] = [1] @y + [0]
>= [0]
= [#pred(@y)]
[#add(#neg(#s(#s(@x))), @y)] = [1] @y + [0]
>= [0]
= [#pred(#add(#pos(#s(@x)), @y))]
[#add(#pos(#s(#0())), @y)] = [1] @y + [0]
>= [0]
= [#succ(@y)]
[#add(#pos(#s(#s(@x))), @y)] = [1] @y + [0]
>= [0]
= [#succ(#add(#pos(#s(@x)), @y))]
[add(@b1, @b2)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'(@b1, @b2, #abs(#0()))]
[add'(@b1, @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'#1(@b1, @b2, @r)]
[add'#1(::(@x, @xs), @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'#2(@b2, @r, @x, @xs)]
[add'#1(nil(), @b2, @r)] = [1] @b2 + [0]
>= [0]
= [nil()]
[add'#2(::(@y, @ys), @r, @x, @xs)] = [1] @ys + [1]
>= [1] @ys + [1]
= [add'#3(sum(@x, @y, @r), @xs, @ys)]
[add'#2(nil(), @r, @x, @xs)] = [0]
>= [0]
= [nil()]
[sum(@x, @y, @r)] = [1]
>= [1]
= [sum#1(+(+(@x, @y), @r))]
[add'#3(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [1]
>= [1] @ys + [1]
= [::(@z, add'(@xs, @ys, @r'))]
[mult(@b1, @b2)] = [1] @b1 + [0]
>= [1] @b1 + [0]
= [mult#1(@b1, @b2)]
[mult#1(::(@x, @xs), @b2)] = [1] @xs + [1]
>= [1] @xs + [1]
= [mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)]
[mult#1(nil(), @b2)] = [0]
>= [0]
= [nil()]
[mult#2(@zs, @b2, @x)] = [1] @zs + [0]
>= [1] @zs + [0]
= [mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)]
[mult#3(#false(), @b2, @zs)] = [1] @zs + [0]
>= [1] @zs + [0]
= [@zs]
[mult#3(#true(), @b2, @zs)] = [1] @zs + [0]
>= [1] @zs + [0]
= [add(@b2, @zs)]
[sum#1(@s)] = [1]
>= [1]
= [sum#2(#equal(@s, #0()), @s)]
[sum#2(#false(), @s)] = [1]
>= [1]
= [sum#3(#equal(@s, #pos(#s(#0()))), @s)]
[sum#2(#true(), @s)] = [1]
>= [1]
= [tuple#2(#abs(#0()), #abs(#0()))]
[sum#3(#false(), @s)] = [1]
>= [1]
= [sum#4(#equal(@s, #pos(#s(#s(#0())))))]
[sum#3(#true(), @s)] = [1]
>= [1]
= [tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))]
[sum#4(#false())] = [1]
>= [1]
= [tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))]
[sum#4(#true())] = [1]
>= [1]
= [tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))]
[#pred(#0())] = [0]
>= [0]
= [#neg(#s(#0()))]
[#pred(#neg(#s(@x)))] = [0]
>= [0]
= [#neg(#s(#s(@x)))]
[#pred(#pos(#s(#0())))] = [0]
>= [0]
= [#0()]
[#pred(#pos(#s(#s(@x))))] = [0]
>= [0]
= [#pos(#s(@x))]
[#succ(#0())] = [0]
>= [0]
= [#pos(#s(#0()))]
[#succ(#neg(#s(#0())))] = [0]
>= [0]
= [#0()]
[#succ(#neg(#s(#s(@x))))] = [0]
>= [0]
= [#neg(#s(@x))]
[#succ(#pos(#s(@x)))] = [0]
>= [0]
= [#pos(#s(#s(@x)))]
[#and(#false(), #false())] = [0]
>= [0]
= [#false()]
[#and(#false(), #true())] = [0]
>= [0]
= [#false()]
[#and(#true(), #false())] = [0]
>= [0]
= [#false()]
[#and(#true(), #true())] = [0]
>= [0]
= [#true()]
[mult^#(@b1, @b2)] = [1] @b1 + [1]
>= [1] @b1 + [1]
= [mult#1^#(@b1, @b2)]
[mult#1^#(::(@x, @xs), @b2)] = [1] @xs + [2]
> [1] @xs + [1]
= [mult^#(@xs, @b2)]
[mult3^#(@b1, @b2, @b3)] = [3] @b1 + [3] @b2 + [3]
>= [3] @b1 + [3]
= [c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))]
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of rules {2}.
Here rules are labeled according to the (estimated) dependency
graph
1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) :2
2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
3: mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
- The rules {2} have known complexity. These cover all predecessors
of {3}, their complexity is equally bounded.
- The rules {2,3} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules {1,2,3}
is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{3} Weak SCC
|
`->2:{1,2} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, 3: mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 3: mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, 1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(#abs) = {}, Uargs(#neg) = {}, Uargs(#pos) = {},
Uargs(#s) = {}, Uargs(#equal) = {}, Uargs(#eq) = {}, Uargs(+) = {},
Uargs(#add) = {}, Uargs(add) = {}, Uargs(add') = {},
Uargs(add'#1) = {}, Uargs(::) = {}, Uargs(add'#2) = {},
Uargs(sum) = {}, Uargs(add'#3) = {}, Uargs(tuple#2) = {},
Uargs(mult) = {}, Uargs(mult#1) = {}, Uargs(mult#2) = {},
Uargs(mult#3) = {}, Uargs(sum#1) = {}, Uargs(sum#2) = {},
Uargs(sum#3) = {}, Uargs(sum#4) = {}, Uargs(#pred) = {},
Uargs(#succ) = {}, Uargs(#and) = {}, Uargs(#abs^#) = {},
Uargs(#equal^#) = {}, Uargs(#eq^#) = {}, Uargs(#greater^#) = {},
Uargs(#ckgt^#) = {}, Uargs(#compare^#) = {}, Uargs(#less^#) = {},
Uargs(#cklt^#) = {}, Uargs(*^#) = {}, Uargs(#mult^#) = {},
Uargs(+^#) = {}, Uargs(#add^#) = {}, Uargs(-^#) = {},
Uargs(#sub^#) = {}, Uargs(add^#) = {}, Uargs(add'^#) = {},
Uargs(add'#1^#) = {}, Uargs(add'#2^#) = {}, Uargs(add'#3^#) = {},
Uargs(sum^#) = {}, Uargs(sum#1^#) = {}, Uargs(bitToInt^#) = {},
Uargs(bitToInt'^#) = {}, Uargs(bitToInt'#1^#) = {},
Uargs(compare^#) = {}, Uargs(compare#1^#) = {},
Uargs(compare#2^#) = {}, Uargs(compare#3^#) = {},
Uargs(compare#4^#) = {}, Uargs(compare#5^#) = {},
Uargs(compare#6^#) = {}, Uargs(diff^#) = {}, Uargs(mod^#) = {},
Uargs(diff#1^#) = {}, Uargs(div^#) = {}, Uargs(#div^#) = {},
Uargs(leq^#) = {}, Uargs(mult^#) = {}, Uargs(mult#1^#) = {},
Uargs(mult#2^#) = {}, Uargs(mult#3^#) = {}, Uargs(mult3^#) = {},
Uargs(sub^#) = {}, Uargs(sub#1^#) = {}, Uargs(sub'^#) = {},
Uargs(sub'#1^#) = {}, Uargs(sub'#2^#) = {}, Uargs(sub'#3^#) = {},
Uargs(sub'#4^#) = {}, Uargs(sub'#5^#) = {}, Uargs(sum#2^#) = {},
Uargs(sum#3^#) = {}, Uargs(sum#4^#) = {}, Uargs(#and^#) = {},
Uargs(#natmult^#) = {}, Uargs(#pred^#) = {}, Uargs(#succ^#) = {},
Uargs(#natdiv^#) = {}, Uargs(#natsub^#) = {}
TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).
[#0] = [0]
[#abs](x1) = [0]
[#neg](x1) = [0]
[#pos](x1) = [0]
[#s](x1) = [0]
[#equal](x1, x2) = [0]
[#eq](x1, x2) = [0]
[+](x1, x2) = [1] x2 + [0]
[#add](x1, x2) = [1] x2 + [0]
[add](x1, x2) = [1] x2 + [0]
[add'](x1, x2, x3) = [1] x2 + [0]
[add'#1](x1, x2, x3) = [1] x2 + [0]
[::](x1, x2) = [1] x2 + [1]
[add'#2](x1, x2, x3, x4) = [1] x1 + [0]
[nil] = [0]
[sum](x1, x2, x3) = [1]
[add'#3](x1, x2, x3) = [1] x1 + [1] x3 + [0]
[tuple#2](x1, x2) = [1]
[#false] = [0]
[#true] = [0]
[mult](x1, x2) = [1] x1 + [0]
[mult#1](x1, x2) = [1] x1 + [0]
[mult#2](x1, x2, x3) = [1] x1 + [0]
[mult#3](x1, x2, x3) = [1] x3 + [0]
[sum#1](x1) = [1]
[sum#2](x1, x2) = [1]
[sum#3](x1, x2) = [1]
[sum#4](x1) = [1]
[#pred](x1) = [0]
[#succ](x1) = [0]
[#and](x1, x2) = [0]
[#EQ] = [0]
[#GT] = [0]
[#LT] = [0]
[#divByZero] = [0]
[#abs^#](x1) = [0]
[#equal^#](x1, x2) = [0]
[#eq^#](x1, x2) = [0]
[#greater^#](x1, x2) = [0]
[#ckgt^#](x1) = [0]
[#compare^#](x1, x2) = [0]
[#less^#](x1, x2) = [0]
[#cklt^#](x1) = [0]
[*^#](x1, x2) = [0]
[#mult^#](x1, x2) = [0]
[+^#](x1, x2) = [0]
[#add^#](x1, x2) = [0]
[-^#](x1, x2) = [0]
[#sub^#](x1, x2) = [0]
[add^#](x1, x2) = [2] x1 + [2] x2 + [0]
[add'^#](x1, x2, x3) = [2] x1 + [2] x2 + [0]
[add'#1^#](x1, x2, x3) = [2] x1 + [2] x2 + [0]
[add'#2^#](x1, x2, x3, x4) = [2] x1 + [2] x4 + [2]
[add'#3^#](x1, x2, x3) = [2] x1 + [2] x2 + [2] x3 + [1]
[sum^#](x1, x2, x3) = [0]
[sum#1^#](x1) = [0]
[bitToInt^#](x1) = [0]
[bitToInt'^#](x1, x2) = [0]
[bitToInt'#1^#](x1, x2) = [0]
[compare^#](x1, x2) = [0]
[compare#1^#](x1, x2) = [0]
[compare#2^#](x1, x2, x3) = [0]
[compare#3^#](x1, x2, x3) = [0]
[compare#4^#](x1, x2, x3, x4) = [0]
[compare#5^#](x1, x2, x3) = [0]
[compare#6^#](x1) = [0]
[diff^#](x1, x2, x3) = [0]
[mod^#](x1, x2) = [0]
[diff#1^#](x1) = [0]
[div^#](x1, x2) = [0]
[#div^#](x1, x2) = [0]
[leq^#](x1, x2) = [0]
[mult^#](x1, x2) = [2] x1 + [2] x2 + [3]
[mult#1^#](x1, x2) = [2] x1 + [2] x2 + [1]
[mult#2^#](x1, x2, x3) = [2] x1 + [2] x2 + [0]
[mult#3^#](x1, x2, x3) = [2] x2 + [2] x3 + [0]
[mult3^#](x1, x2, x3) = [3] x1 + [3] x2 + [3]
[sub^#](x1, x2) = [0]
[sub#1^#](x1) = [0]
[sub'^#](x1, x2, x3) = [0]
[sub'#1^#](x1, x2, x3) = [0]
[sub'#2^#](x1, x2, x3, x4) = [0]
[sub'#3^#](x1, x2, x3) = [0]
[sub'#4^#](x1, x2) = [0]
[sub'#5^#](x1, x2, x3) = [0]
[sum#2^#](x1, x2) = [0]
[sum#3^#](x1, x2) = [0]
[sum#4^#](x1) = [0]
[#and^#](x1, x2) = [0]
[#natmult^#](x1, x2) = [0]
[#pred^#](x1) = [0]
[#succ^#](x1) = [0]
[#natdiv^#](x1, x2) = [0]
[#natsub^#](x1, x2) = [0]
This order satisfies following ordering constraints
[#abs(#0())] = [0]
>= [0]
= [#0()]
[#abs(#neg(@x))] = [0]
>= [0]
= [#pos(@x)]
[#abs(#pos(@x))] = [0]
>= [0]
= [#pos(@x)]
[#abs(#s(@x))] = [0]
>= [0]
= [#pos(#s(@x))]
[#equal(@x, @y)] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#0(), #0())] = [0]
>= [0]
= [#true()]
[#eq(#0(), #neg(@y))] = [0]
>= [0]
= [#false()]
[#eq(#0(), #pos(@y))] = [0]
>= [0]
= [#false()]
[#eq(#0(), #s(@y))] = [0]
>= [0]
= [#false()]
[#eq(#neg(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#s(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#s(@x), #s(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0]
>= [0]
= [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))]
[#eq(::(@x_1, @x_2), nil())] = [0]
>= [0]
= [#false()]
[#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(nil(), ::(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(nil(), nil())] = [0]
>= [0]
= [#true()]
[#eq(nil(), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), nil())] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))]
[+(@x, @y)] = [1] @y + [0]
>= [1] @y + [0]
= [#add(@x, @y)]
[#add(#0(), @y)] = [1] @y + [0]
>= [1] @y + [0]
= [@y]
[#add(#neg(#s(#0())), @y)] = [1] @y + [0]
>= [0]
= [#pred(@y)]
[#add(#neg(#s(#s(@x))), @y)] = [1] @y + [0]
>= [0]
= [#pred(#add(#pos(#s(@x)), @y))]
[#add(#pos(#s(#0())), @y)] = [1] @y + [0]
>= [0]
= [#succ(@y)]
[#add(#pos(#s(#s(@x))), @y)] = [1] @y + [0]
>= [0]
= [#succ(#add(#pos(#s(@x)), @y))]
[add(@b1, @b2)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'(@b1, @b2, #abs(#0()))]
[add'(@b1, @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'#1(@b1, @b2, @r)]
[add'#1(::(@x, @xs), @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'#2(@b2, @r, @x, @xs)]
[add'#1(nil(), @b2, @r)] = [1] @b2 + [0]
>= [0]
= [nil()]
[add'#2(::(@y, @ys), @r, @x, @xs)] = [1] @ys + [1]
>= [1] @ys + [1]
= [add'#3(sum(@x, @y, @r), @xs, @ys)]
[add'#2(nil(), @r, @x, @xs)] = [0]
>= [0]
= [nil()]
[sum(@x, @y, @r)] = [1]
>= [1]
= [sum#1(+(+(@x, @y), @r))]
[add'#3(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [1]
>= [1] @ys + [1]
= [::(@z, add'(@xs, @ys, @r'))]
[mult(@b1, @b2)] = [1] @b1 + [0]
>= [1] @b1 + [0]
= [mult#1(@b1, @b2)]
[mult#1(::(@x, @xs), @b2)] = [1] @xs + [1]
>= [1] @xs + [1]
= [mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)]
[mult#1(nil(), @b2)] = [0]
>= [0]
= [nil()]
[mult#2(@zs, @b2, @x)] = [1] @zs + [0]
>= [1] @zs + [0]
= [mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)]
[mult#3(#false(), @b2, @zs)] = [1] @zs + [0]
>= [1] @zs + [0]
= [@zs]
[mult#3(#true(), @b2, @zs)] = [1] @zs + [0]
>= [1] @zs + [0]
= [add(@b2, @zs)]
[sum#1(@s)] = [1]
>= [1]
= [sum#2(#equal(@s, #0()), @s)]
[sum#2(#false(), @s)] = [1]
>= [1]
= [sum#3(#equal(@s, #pos(#s(#0()))), @s)]
[sum#2(#true(), @s)] = [1]
>= [1]
= [tuple#2(#abs(#0()), #abs(#0()))]
[sum#3(#false(), @s)] = [1]
>= [1]
= [sum#4(#equal(@s, #pos(#s(#s(#0())))))]
[sum#3(#true(), @s)] = [1]
>= [1]
= [tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))]
[sum#4(#false())] = [1]
>= [1]
= [tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))]
[sum#4(#true())] = [1]
>= [1]
= [tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))]
[#pred(#0())] = [0]
>= [0]
= [#neg(#s(#0()))]
[#pred(#neg(#s(@x)))] = [0]
>= [0]
= [#neg(#s(#s(@x)))]
[#pred(#pos(#s(#0())))] = [0]
>= [0]
= [#0()]
[#pred(#pos(#s(#s(@x))))] = [0]
>= [0]
= [#pos(#s(@x))]
[#succ(#0())] = [0]
>= [0]
= [#pos(#s(#0()))]
[#succ(#neg(#s(#0())))] = [0]
>= [0]
= [#0()]
[#succ(#neg(#s(#s(@x))))] = [0]
>= [0]
= [#neg(#s(@x))]
[#succ(#pos(#s(@x)))] = [0]
>= [0]
= [#pos(#s(#s(@x)))]
[#and(#false(), #false())] = [0]
>= [0]
= [#false()]
[#and(#false(), #true())] = [0]
>= [0]
= [#false()]
[#and(#true(), #false())] = [0]
>= [0]
= [#false()]
[#and(#true(), #true())] = [0]
>= [0]
= [#true()]
[add^#(@b1, @b2)] = [2] @b1 + [2] @b2 + [0]
>= [2] @b1 + [2] @b2 + [0]
= [add'^#(@b1, @b2, #abs(#0()))]
[add'^#(@b1, @b2, @r)] = [2] @b1 + [2] @b2 + [0]
>= [2] @b1 + [2] @b2 + [0]
= [add'#1^#(@b1, @b2, @r)]
[add'#1^#(::(@x, @xs), @b2, @r)] = [2] @b2 + [2] @xs + [2]
>= [2] @b2 + [2] @xs + [2]
= [add'#2^#(@b2, @r, @x, @xs)]
[add'#2^#(::(@y, @ys), @r, @x, @xs)] = [2] @xs + [2] @ys + [4]
> [2] @xs + [2] @ys + [3]
= [add'#3^#(sum(@x, @y, @r), @xs, @ys)]
[add'#3^#(tuple#2(@z, @r'), @xs, @ys)] = [2] @xs + [2] @ys + [3]
> [2] @xs + [2] @ys + [0]
= [add'^#(@xs, @ys, @r')]
[mult^#(@b1, @b2)] = [2] @b1 + [2] @b2 + [3]
> [2] @b1 + [2] @b2 + [1]
= [mult#1^#(@b1, @b2)]
[mult#1^#(::(@x, @xs), @b2)] = [2] @b2 + [2] @xs + [3]
>= [2] @b2 + [2] @xs + [3]
= [mult^#(@xs, @b2)]
[mult#1^#(::(@x, @xs), @b2)] = [2] @b2 + [2] @xs + [3]
> [2] @b2 + [2] @xs + [2]
= [mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)]
[mult#2^#(@zs, @b2, @x)] = [2] @b2 + [2] @zs + [0]
>= [2] @b2 + [2] @zs + [0]
= [mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)]
[mult#3^#(#true(), @b2, @zs)] = [2] @b2 + [2] @zs + [0]
>= [2] @b2 + [2] @zs + [0]
= [add^#(@b2, @zs)]
[mult3^#(@b1, @b2, @b3)] = [3] @b1 + [3] @b2 + [3]
>= [2] @b1 + [2] @b2 + [3]
= [mult^#(@b1, @b2)]
[mult3^#(@b1, @b2, @b3)] = [3] @b1 + [3] @b2 + [3]
>= [2] @b1 + [2] @b2 + [3]
= [mult^#(mult(@b1, @b2), @b2)]
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of rules
{4,5,6,8}. Here rules are labeled according to the (estimated)
dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
2: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) :8
-->_1 mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) :7
7: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :9
9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :2
11: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
12: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
- The rules {4,5,6,8} have known complexity. These cover all
predecessors of {7,9,11,12}, their complexity is equally bounded.
- The rules {4,5,6,7,8,9,11,12} have known complexity. These cover
all predecessors of {10}, their complexity is equally bounded.
- The rules {4,5,6,7,8,9,10,11,12} have known complexity. These
cover all predecessors of {2}, their complexity is equally bounded.
- The rules {2,4,5,6,7,8,9,10,11,12} have known complexity. These
cover all predecessors of {1}, their complexity is equally bounded.
- The rules {1,2,4,5,6,7,8,9,10,11,12} have known complexity. These
cover all predecessors of {3}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules
{1,2,3,4,5,6,7,8,9,10,11,12} is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->2:{11} Weak SCC
|
`->3:{6,7} Weak SCC
|
`->4:{8} Weak SCC
|
`->5:{9} Weak SCC
|
`->6:{10} Weak SCC
|
`->7:{1} Weak SCC
|
`->8:{2,5,4,3} Weak SCC
->1:{12} Weak SCC
|
`->3:{6,7} Weak SCC
|
`->4:{8} Weak SCC
|
`->5:{9} Weak SCC
|
`->6:{10} Weak SCC
|
`->7:{1} Weak SCC
|
`->8:{2,5,4,3} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 7: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, 8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, 9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, 10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 11: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, 12: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 12: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2)
, 11: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, 6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 7: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, 8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, 9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, 10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
* Path 1:{18}->2:{19,22,21,20}: YES(O(1),O(n^1))
----------------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {5} and add Pre({5}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) }
Weak DPs:
{ sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {4} and add Pre({4}) = {3} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs) }
Weak DPs:
{ sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) }
Weak DPs:
{ sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {1} and add Pre({1}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) }
Weak DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We replace strict/weak-rules by the corresponding usable rules:
Weak Usable Rules:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) }
Weak DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 2: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') }
Trs:
{ #less(@x, @y) -> #cklt(#compare(@x, @y))
, *(@x, @y) -> #mult(@x, @y)
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y))) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(#abs) = {}, Uargs(#neg) = {}, Uargs(#pos) = {},
Uargs(#s) = {}, Uargs(#compare) = {}, Uargs(#less) = {},
Uargs(#cklt) = {}, Uargs(*) = {}, Uargs(#mult) = {}, Uargs(+) = {},
Uargs(#add) = {}, Uargs(-) = {}, Uargs(#sub) = {}, Uargs(::) = {},
Uargs(tuple#2) = {}, Uargs(diff) = {}, Uargs(mod) = {},
Uargs(diff#1) = {}, Uargs(div) = {}, Uargs(#div) = {},
Uargs(#pred) = {}, Uargs(#succ) = {}, Uargs(#natdiv) = {},
Uargs(#natmult) = {}, Uargs(#natsub) = {}, Uargs(#abs^#) = {},
Uargs(#equal^#) = {}, Uargs(#eq^#) = {}, Uargs(#greater^#) = {},
Uargs(#ckgt^#) = {}, Uargs(#compare^#) = {}, Uargs(#less^#) = {},
Uargs(#cklt^#) = {}, Uargs(*^#) = {}, Uargs(#mult^#) = {},
Uargs(+^#) = {}, Uargs(#add^#) = {}, Uargs(-^#) = {},
Uargs(#sub^#) = {}, Uargs(add^#) = {}, Uargs(add'^#) = {},
Uargs(add'#1^#) = {}, Uargs(add'#2^#) = {}, Uargs(add'#3^#) = {},
Uargs(sum^#) = {}, Uargs(sum#1^#) = {}, Uargs(bitToInt^#) = {},
Uargs(bitToInt'^#) = {}, Uargs(bitToInt'#1^#) = {},
Uargs(compare^#) = {}, Uargs(compare#1^#) = {},
Uargs(compare#2^#) = {}, Uargs(compare#3^#) = {},
Uargs(compare#4^#) = {}, Uargs(compare#5^#) = {},
Uargs(compare#6^#) = {}, Uargs(diff^#) = {}, Uargs(mod^#) = {},
Uargs(diff#1^#) = {}, Uargs(div^#) = {}, Uargs(#div^#) = {},
Uargs(leq^#) = {}, Uargs(mult^#) = {}, Uargs(mult#1^#) = {},
Uargs(mult#2^#) = {}, Uargs(mult#3^#) = {}, Uargs(mult3^#) = {},
Uargs(sub^#) = {}, Uargs(sub#1^#) = {}, Uargs(sub'^#) = {},
Uargs(sub'#1^#) = {}, Uargs(sub'#2^#) = {}, Uargs(sub'#3^#) = {},
Uargs(sub'#4^#) = {}, Uargs(sub'#5^#) = {}, Uargs(sum#2^#) = {},
Uargs(sum#3^#) = {}, Uargs(sum#4^#) = {}, Uargs(#and^#) = {},
Uargs(#natmult^#) = {}, Uargs(#pred^#) = {}, Uargs(#succ^#) = {},
Uargs(#natdiv^#) = {}, Uargs(#natsub^#) = {}
TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).
[#0] = [0]
[#abs](x1) = [0]
[#neg](x1) = [0]
[#pos](x1) = [0]
[#s](x1) = [1] x1 + [0]
[#compare](x1, x2) = [0]
[#less](x1, x2) = [2]
[#cklt](x1) = [0]
[*](x1, x2) = [3] x1 + [3]
[#mult](x1, x2) = [0]
[+](x1, x2) = [2] x2 + [0]
[#add](x1, x2) = [2] x2 + [0]
[-](x1, x2) = [2] x1 + [0]
[#sub](x1, x2) = [1] x1 + [0]
[::](x1, x2) = [1] x1 + [1] x2 + [2]
[nil] = [0]
[tuple#2](x1, x2) = [1]
[#false] = [0]
[#true] = [0]
[diff](x1, x2, x3) = [2] x1 + [2] x2 + [3]
[mod](x1, x2) = [2] x1 + [3]
[diff#1](x1) = [0]
[div](x1, x2) = [0]
[#div](x1, x2) = [0]
[#pred](x1) = [0]
[#succ](x1) = [0]
[#EQ] = [0]
[#GT] = [0]
[#LT] = [0]
[#divByZero] = [0]
[#natdiv](x1, x2) = [0]
[#natmult](x1, x2) = [0]
[#natsub](x1, x2) = [1] x1 + [0]
[#abs^#](x1) = [0]
[#equal^#](x1, x2) = [0]
[#eq^#](x1, x2) = [0]
[#greater^#](x1, x2) = [0]
[#ckgt^#](x1) = [0]
[#compare^#](x1, x2) = [0]
[#less^#](x1, x2) = [0]
[#cklt^#](x1) = [0]
[*^#](x1, x2) = [0]
[#mult^#](x1, x2) = [0]
[+^#](x1, x2) = [0]
[#add^#](x1, x2) = [0]
[-^#](x1, x2) = [0]
[#sub^#](x1, x2) = [0]
[add^#](x1, x2) = [0]
[add'^#](x1, x2, x3) = [0]
[add'#1^#](x1, x2, x3) = [0]
[add'#2^#](x1, x2, x3, x4) = [0]
[add'#3^#](x1, x2, x3) = [0]
[sum^#](x1, x2, x3) = [0]
[sum#1^#](x1) = [0]
[bitToInt^#](x1) = [0]
[bitToInt'^#](x1, x2) = [0]
[bitToInt'#1^#](x1, x2) = [0]
[compare^#](x1, x2) = [0]
[compare#1^#](x1, x2) = [0]
[compare#2^#](x1, x2, x3) = [0]
[compare#3^#](x1, x2, x3) = [0]
[compare#4^#](x1, x2, x3, x4) = [0]
[compare#5^#](x1, x2, x3) = [0]
[compare#6^#](x1) = [0]
[diff^#](x1, x2, x3) = [0]
[mod^#](x1, x2) = [0]
[diff#1^#](x1) = [0]
[div^#](x1, x2) = [0]
[#div^#](x1, x2) = [0]
[leq^#](x1, x2) = [0]
[mult^#](x1, x2) = [0]
[mult#1^#](x1, x2) = [0]
[mult#2^#](x1, x2, x3) = [0]
[mult#3^#](x1, x2, x3) = [0]
[mult3^#](x1, x2, x3) = [0]
[sub^#](x1, x2) = [3] x1 + [3] x2 + [3]
[sub#1^#](x1) = [0]
[sub'^#](x1, x2, x3) = [1] x2 + [0]
[sub'#1^#](x1, x2, x3) = [1] x2 + [0]
[sub'#2^#](x1, x2, x3, x4) = [1] x1 + [0]
[sub'#3^#](x1, x2, x3) = [1] x3 + [2]
[sub'#4^#](x1, x2) = [0]
[sub'#5^#](x1, x2, x3) = [0]
[sum#2^#](x1, x2) = [0]
[sum#3^#](x1, x2) = [0]
[sum#4^#](x1) = [0]
[#and^#](x1, x2) = [0]
[#natmult^#](x1, x2) = [0]
[#pred^#](x1) = [0]
[#succ^#](x1) = [0]
[#natdiv^#](x1, x2) = [0]
[#natsub^#](x1, x2) = [0]
This order satisfies following ordering constraints
[#abs(#0())] = [0]
>= [0]
= [#0()]
[#abs(#neg(@x))] = [0]
>= [0]
= [#pos(@x)]
[#abs(#pos(@x))] = [0]
>= [0]
= [#pos(@x)]
[#abs(#s(@x))] = [0]
>= [0]
= [#pos(#s(@x))]
[#compare(#0(), #0())] = [0]
>= [0]
= [#EQ()]
[#compare(#0(), #neg(@y))] = [0]
>= [0]
= [#GT()]
[#compare(#0(), #pos(@y))] = [0]
>= [0]
= [#LT()]
[#compare(#0(), #s(@y))] = [0]
>= [0]
= [#LT()]
[#compare(#neg(@x), #0())] = [0]
>= [0]
= [#LT()]
[#compare(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#compare(@y, @x)]
[#compare(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#LT()]
[#compare(#pos(@x), #0())] = [0]
>= [0]
= [#GT()]
[#compare(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#GT()]
[#compare(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#compare(@x, @y)]
[#compare(#s(@x), #0())] = [0]
>= [0]
= [#GT()]
[#compare(#s(@x), #s(@y))] = [0]
>= [0]
= [#compare(@x, @y)]
[#less(@x, @y)] = [2]
> [0]
= [#cklt(#compare(@x, @y))]
[#cklt(#EQ())] = [0]
>= [0]
= [#false()]
[#cklt(#GT())] = [0]
>= [0]
= [#false()]
[#cklt(#LT())] = [0]
>= [0]
= [#true()]
[*(@x, @y)] = [3] @x + [3]
> [0]
= [#mult(@x, @y)]
[#mult(#0(), #0())] = [0]
>= [0]
= [#0()]
[#mult(#0(), #neg(@y))] = [0]
>= [0]
= [#0()]
[#mult(#0(), #pos(@y))] = [0]
>= [0]
= [#0()]
[#mult(#neg(@x), #0())] = [0]
>= [0]
= [#0()]
[#mult(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#pos(#natmult(@x, @y))]
[#mult(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#neg(#natmult(@x, @y))]
[#mult(#pos(@x), #0())] = [0]
>= [0]
= [#0()]
[#mult(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#neg(#natmult(@x, @y))]
[#mult(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#pos(#natmult(@x, @y))]
[+(@x, @y)] = [2] @y + [0]
>= [2] @y + [0]
= [#add(@x, @y)]
[#add(#0(), @y)] = [2] @y + [0]
>= [1] @y + [0]
= [@y]
[#add(#neg(#s(#0())), @y)] = [2] @y + [0]
>= [0]
= [#pred(@y)]
[#add(#neg(#s(#s(@x))), @y)] = [2] @y + [0]
>= [0]
= [#pred(#add(#pos(#s(@x)), @y))]
[#add(#pos(#s(#0())), @y)] = [2] @y + [0]
>= [0]
= [#succ(@y)]
[#add(#pos(#s(#s(@x))), @y)] = [2] @y + [0]
>= [0]
= [#succ(#add(#pos(#s(@x)), @y))]
[-(@x, @y)] = [2] @x + [0]
>= [1] @x + [0]
= [#sub(@x, @y)]
[#sub(@x, #0())] = [1] @x + [0]
>= [1] @x + [0]
= [@x]
[#sub(@x, #neg(@y))] = [1] @x + [0]
>= [0]
= [#add(@x, #pos(@y))]
[#sub(@x, #pos(@y))] = [1] @x + [0]
>= [0]
= [#add(@x, #neg(@y))]
[diff(@x, @y, @r)] = [2] @x + [2] @y + [3]
> [1]
= [tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))]
[mod(@x, @y)] = [2] @x + [3]
> [2] @x + [0]
= [-(@x, *(@x, div(@x, @y)))]
[diff#1(#false())] = [0]
>= [0]
= [#abs(#0())]
[diff#1(#true())] = [0]
>= [0]
= [#abs(#pos(#s(#0())))]
[div(@x, @y)] = [0]
>= [0]
= [#div(@x, @y)]
[#div(#0(), #0())] = [0]
>= [0]
= [#divByZero()]
[#div(#0(), #neg(@y))] = [0]
>= [0]
= [#0()]
[#div(#0(), #pos(@y))] = [0]
>= [0]
= [#0()]
[#div(#neg(@x), #0())] = [0]
>= [0]
= [#divByZero()]
[#div(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#pos(#natdiv(@x, @y))]
[#div(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#neg(#natdiv(@x, @y))]
[#div(#pos(@x), #0())] = [0]
>= [0]
= [#divByZero()]
[#div(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#neg(#natdiv(@x, @y))]
[#div(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#pos(#natdiv(@x, @y))]
[#pred(#0())] = [0]
>= [0]
= [#neg(#s(#0()))]
[#pred(#neg(#s(@x)))] = [0]
>= [0]
= [#neg(#s(#s(@x)))]
[#pred(#pos(#s(#0())))] = [0]
>= [0]
= [#0()]
[#pred(#pos(#s(#s(@x))))] = [0]
>= [0]
= [#pos(#s(@x))]
[#succ(#0())] = [0]
>= [0]
= [#pos(#s(#0()))]
[#succ(#neg(#s(#0())))] = [0]
>= [0]
= [#0()]
[#succ(#neg(#s(#s(@x))))] = [0]
>= [0]
= [#neg(#s(@x))]
[#succ(#pos(#s(@x)))] = [0]
>= [0]
= [#pos(#s(#s(@x)))]
[#natdiv(#0(), #0())] = [0]
>= [0]
= [#divByZero()]
[#natdiv(#s(@x), #s(@y))] = [0]
>= [0]
= [#s(#natdiv(#natsub(@x, @y), #s(@y)))]
[#natmult(#0(), @y)] = [0]
>= [0]
= [#0()]
[#natmult(#s(@x), @y)] = [0]
>= [0]
= [#add(#pos(@y), #natmult(@x, @y))]
[#natsub(@x, #0())] = [1] @x + [0]
>= [1] @x + [0]
= [@x]
[#natsub(#s(@x), #s(@y))] = [1] @x + [0]
>= [1] @x + [0]
= [#natsub(@x, @y)]
[sub^#(@b1, @b2)] = [3] @b1 + [3] @b2 + [3]
> [1] @b2 + [0]
= [sub'^#(@b1, @b2, #abs(#0()))]
[sub'^#(@b1, @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [sub'#1^#(@b1, @b2, @r)]
[sub'#1^#(::(@x, @xs), @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [sub'#2^#(@b2, @r, @x, @xs)]
[sub'#2^#(::(@y, @ys), @r, @x, @xs)] = [1] @y + [1] @ys + [2]
>= [1] @ys + [2]
= [sub'#3^#(diff(@x, @y, @r), @xs, @ys)]
[sub'#3^#(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [2]
> [1] @ys + [0]
= [sub'^#(@xs, @ys, @r')]
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of rules {2,5}.
Here rules are labeled according to the (estimated) dependency
graph
1: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
2: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :1
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :1
- The rules {2,5} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
- The rules {1,2,5} have known complexity. These cover all
predecessors of {3}, their complexity is equally bounded.
- The rules {1,2,3,5} have known complexity. These cover all
predecessors of {4}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules
{1,2,3,4,5} is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{1} Weak SCC
|
`->2:{2,5,4,3} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, 4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, 5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
, 4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, 3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
Hurray, we answered YES(?,O(n^2))
tct-popstar
YES(?,O(n^2))
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, *(@x, @y) -> #mult(@x, @y)
, +(@x, @y) -> #add(@x, @y)
, -(@x, @y) -> #sub(@x, @y)
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0())))) }
Weak Trs:
{ #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We add following dependency tuples
Strict DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, *^#(@x, @y) -> #mult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, -^#(@x, @y) -> #sub^#(@x, @y)
, add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#1^#(nil(), @b2) -> c_43()
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#false(), @b2, @zs) -> c_45()
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) }
Weak DPs:
{ #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
and replace the set of basic marked basic terms accordingly.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, *^#(@x, @y) -> #mult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, -^#(@x, @y) -> #sub^#(@x, @y)
, add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#1^#(nil(), @b2) -> c_43()
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#false(), @b2, @zs) -> c_45()
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) }
Weak DPs:
{ #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: #abs^#(#0()) -> c_1()
2: #abs^#(#neg(@x)) -> c_2()
3: #abs^#(#pos(@x)) -> c_3()
4: #abs^#(#s(@x)) -> c_4()
5: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
6: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_2 #compare^#(#s(@x), #0()) -> c_97() :100
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_2 #compare^#(#0(), #0()) -> c_87() :90
-->_1 #ckgt^#(#LT()) -> c_101() :89
-->_1 #ckgt^#(#GT()) -> c_100() :88
-->_1 #ckgt^#(#EQ()) -> c_99() :87
7: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #cklt^#(#LT()) -> c_104() :104
-->_1 #cklt^#(#GT()) -> c_103() :103
-->_1 #cklt^#(#EQ()) -> c_102() :102
-->_2 #compare^#(#s(@x), #0()) -> c_97() :100
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_2 #compare^#(#0(), #0()) -> c_87() :90
8: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :113
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :112
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :110
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :109
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :111
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :108
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :107
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :106
-->_1 #mult^#(#0(), #0()) -> c_105() :105
9: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :116
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :115
-->_1 #add^#(#0(), @y) -> c_114() :114
10: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :121
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :120
-->_1 #sub^#(@x, #0()) -> c_119() :119
11: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :12
-->_2 #abs^#(#0()) -> c_1() :1
12: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :13
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :14
13: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :15
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :16
14: add'#1^#(nil(), @b2, @r) -> c_14()
15: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)),
+^#(+(@x, @y), @r),
+^#(@x, @y)) :18
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :17
16: add'#2^#(nil(), @r, @x, @xs) -> c_16()
17: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :12
18: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :19
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :9
19: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :61
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :60
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
20: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :21
-->_2 #abs^#(#pos(@x)) -> c_3() :3
21: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :23
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :22
22: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :21
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :8
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :8
23: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
24: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :26
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :25
25: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :28
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :27
26: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
27: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :29
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :24
28: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
29: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :31
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :30
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
30: compare#4^#(#false(), @r, @x, @y) -> c_29()
31: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0()))) :33
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :32
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :7
32: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :35
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :34
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :6
33: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :10
34: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
35: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :3
36: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :39
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :38
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :37
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :10
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :10
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :9
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :7
37: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :40
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :10
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :8
38: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
39: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :3
40: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :130
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :129
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :127
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :126
-->_1 #div^#(#pos(@x), #0()) -> c_128() :128
-->_1 #div^#(#neg(@x), #0()) -> c_125() :125
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :124
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :123
-->_1 #div^#(#0(), #0()) -> c_122() :122
41: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :24
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :7
42: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :43
-->_1 mult#1^#(nil(), @b2) -> c_43() :44
43: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :45
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :42
-->_2 #abs^#(#0()) -> c_1() :1
44: mult#1^#(nil(), @b2) -> c_43()
45: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :47
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :46
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
46: mult#3^#(#false(), @b2, @zs) -> c_45()
47: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :11
48: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :42
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :42
49: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :51
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :50
-->_3 #abs^#(#0()) -> c_1() :1
50: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
51: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :52
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :53
52: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :54
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :55
53: sub'#1^#(nil(), @b2, @r) -> c_52()
54: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :56
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :36
55: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
56: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :57
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :51
57: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :59
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :58
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
58: sub'#5^#(#false(), @z, @zs) -> c_57()
59: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :1
60: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :63
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :62
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
61: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :1
-->_1 #abs^#(#0()) -> c_1() :1
62: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :65
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :64
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :5
63: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :3
-->_2 #abs^#(#0()) -> c_1() :1
64: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :3
-->_1 #abs^#(#pos(@x)) -> c_3() :3
65: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :3
-->_1 #abs^#(#0()) -> c_1() :1
66: #eq^#(#0(), #0()) -> c_66()
67: #eq^#(#0(), #neg(@y)) -> c_67()
68: #eq^#(#0(), #pos(@y)) -> c_68()
69: #eq^#(#0(), #s(@y)) -> c_69()
70: #eq^#(#neg(@x), #0()) -> c_70()
71: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
72: #eq^#(#neg(@x), #pos(@y)) -> c_72()
73: #eq^#(#pos(@x), #0()) -> c_73()
74: #eq^#(#pos(@x), #neg(@y)) -> c_74()
75: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
76: #eq^#(#s(@x), #0()) -> c_76()
77: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_1 #eq^#(nil(), nil()) -> c_82() :82
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_1 #eq^#(#s(@x), #0()) -> c_76() :76
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_1 #eq^#(#0(), #0()) -> c_66() :66
78: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_3 #eq^#(nil(), nil()) -> c_82() :82
-->_2 #eq^#(nil(), nil()) -> c_82() :82
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_3 #eq^#(#s(@x), #0()) -> c_76() :76
-->_2 #eq^#(#s(@x), #0()) -> c_76() :76
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_3 #eq^#(#0(), #0()) -> c_66() :66
-->_2 #eq^#(#0(), #0()) -> c_66() :66
79: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
80: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
81: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
82: #eq^#(nil(), nil()) -> c_82()
83: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
84: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
85: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
86: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :86
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :85
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :84
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :83
-->_3 #eq^#(nil(), nil()) -> c_82() :82
-->_2 #eq^#(nil(), nil()) -> c_82() :82
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :81
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :80
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :79
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :78
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :77
-->_3 #eq^#(#s(@x), #0()) -> c_76() :76
-->_2 #eq^#(#s(@x), #0()) -> c_76() :76
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :75
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :74
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :73
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :72
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :71
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :70
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :69
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :68
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :67
-->_3 #eq^#(#0(), #0()) -> c_66() :66
-->_2 #eq^#(#0(), #0()) -> c_66() :66
87: #ckgt^#(#EQ()) -> c_99()
88: #ckgt^#(#GT()) -> c_100()
89: #ckgt^#(#LT()) -> c_101()
90: #compare^#(#0(), #0()) -> c_87()
91: #compare^#(#0(), #neg(@y)) -> c_88()
92: #compare^#(#0(), #pos(@y)) -> c_89()
93: #compare^#(#0(), #s(@y)) -> c_90()
94: #compare^#(#neg(@x), #0()) -> c_91()
95: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_1 #compare^#(#s(@x), #0()) -> c_97() :100
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_1 #compare^#(#0(), #0()) -> c_87() :90
96: #compare^#(#neg(@x), #pos(@y)) -> c_93()
97: #compare^#(#pos(@x), #0()) -> c_94()
98: #compare^#(#pos(@x), #neg(@y)) -> c_95()
99: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_1 #compare^#(#s(@x), #0()) -> c_97() :100
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_1 #compare^#(#0(), #0()) -> c_87() :90
100: #compare^#(#s(@x), #0()) -> c_97()
101: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :101
-->_1 #compare^#(#s(@x), #0()) -> c_97() :100
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :99
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :98
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :97
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :96
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :95
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :94
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :93
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :92
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :91
-->_1 #compare^#(#0(), #0()) -> c_87() :90
102: #cklt^#(#EQ()) -> c_102()
103: #cklt^#(#GT()) -> c_103()
104: #cklt^#(#LT()) -> c_104()
105: #mult^#(#0(), #0()) -> c_105()
106: #mult^#(#0(), #neg(@y)) -> c_106()
107: #mult^#(#0(), #pos(@y)) -> c_107()
108: #mult^#(#neg(@x), #0()) -> c_108()
109: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
110: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
111: #mult^#(#pos(@x), #0()) -> c_111()
112: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
113: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
114: #add^#(#0(), @y) -> c_114()
115: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
116: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
117: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
118: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
119: #sub^#(@x, #0()) -> c_119()
120: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :116
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :115
-->_1 #add^#(#0(), @y) -> c_114() :114
121: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :116
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :115
-->_1 #add^#(#0(), @y) -> c_114() :114
122: #div^#(#0(), #0()) -> c_122()
123: #div^#(#0(), #neg(@y)) -> c_123()
124: #div^#(#0(), #pos(@y)) -> c_124()
125: #div^#(#neg(@x), #0()) -> c_125()
126: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
127: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
128: #div^#(#pos(@x), #0()) -> c_128()
129: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
130: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :118
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :117
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {50} and add Pre({50}) = {49} to the strict component.
- We remove {53} and add Pre({53}) = {51} to the strict component.
- We remove {55} and add Pre({55}) = {52} to the strict component.
- We remove {58} and add Pre({58}) = {57} to the strict component.
- We remove {44} and add Pre({44}) = {42} to the strict component.
- We remove {46} and add Pre({46}) = {45} to the strict component.
- We remove {40} and add Pre({40}) = {37} to the strict component.
- We remove {30} and add Pre({30}) = {29} to the strict component.
- We remove {14} and add Pre({14}) = {12} to the strict component.
- We remove {16} and add Pre({16}) = {13} to the strict component.
- We remove {10} and add Pre({10}) = {37,36,36,33} to the strict component.
- We remove {9} and add Pre({9}) = {36,36,22,18,18} to the strict component.
- We remove {8} and add Pre({8}) = {37,22,22} to the strict component.
- We remove {7} and add Pre({7}) = {41,36,31} to the strict component.
- We remove {6} and add Pre({6}) = {32} to the strict component.
- We remove {5} and add Pre({5}) = {62,60,57,45,29,19} to the strict component.
- We remove {4} and add Pre({4}) = {} to the strict component.
- We remove {3} and add Pre({3}) = {65,64,64,63,39,35,20} to the strict component.
- We remove {2} and add Pre({2}) = {} to the strict component.
- We remove {1} and add Pre({1}) = {65,63,61,61,59,49,43,38,34,28,26,23,11} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#5^#(#false(), @z, @zs) -> c_57()
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :46
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :112
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :113
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :41
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :40
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :48
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :11
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :92
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :92
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
12: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :14
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :13
13: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :16
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :15
14: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
15: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :17
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :12
16: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
17: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :18
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :114
18: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :88
-->_1 compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0()))) :20
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :19
19: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :72
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :22
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :21
20: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :108
21: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
22: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :48
23: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :108
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :108
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :102
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :88
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :26
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :25
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :24
24: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :115
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :108
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :92
25: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
26: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :48
27: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :88
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :12
28: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :29
-->_1 mult#1^#(nil(), @b2) -> c_43() :125
29: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :30
-->_2 #abs^#(#0()) -> c_1() :46
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :28
30: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :31
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :126
31: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
32: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :28
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :28
33: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :34
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :127
-->_3 #abs^#(#0()) -> c_1() :46
34: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :35
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :128
35: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :36
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :129
36: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :37
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :23
37: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :38
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :34
38: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :39
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :130
39: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :46
40: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :43
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :42
41: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :46
-->_1 #abs^#(#0()) -> c_1() :46
42: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :50
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :45
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :44
43: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :48
-->_2 #abs^#(#0()) -> c_1() :46
44: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :48
-->_1 #abs^#(#pos(@x)) -> c_3() :48
45: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :48
-->_1 #abs^#(#0()) -> c_1() :46
46: #abs^#(#0()) -> c_1()
47: #abs^#(#neg(@x)) -> c_2()
48: #abs^#(#pos(@x)) -> c_3()
49: #abs^#(#s(@x)) -> c_4()
50: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
51: #eq^#(#0(), #0()) -> c_66()
52: #eq^#(#0(), #neg(@y)) -> c_67()
53: #eq^#(#0(), #pos(@y)) -> c_68()
54: #eq^#(#0(), #s(@y)) -> c_69()
55: #eq^#(#neg(@x), #0()) -> c_70()
56: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
57: #eq^#(#neg(@x), #pos(@y)) -> c_72()
58: #eq^#(#pos(@x), #0()) -> c_73()
59: #eq^#(#pos(@x), #neg(@y)) -> c_74()
60: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
61: #eq^#(#s(@x), #0()) -> c_76()
62: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_1 #eq^#(nil(), nil()) -> c_82() :67
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_1 #eq^#(#s(@x), #0()) -> c_76() :61
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_1 #eq^#(#0(), #0()) -> c_66() :51
63: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_3 #eq^#(nil(), nil()) -> c_82() :67
-->_2 #eq^#(nil(), nil()) -> c_82() :67
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_3 #eq^#(#s(@x), #0()) -> c_76() :61
-->_2 #eq^#(#s(@x), #0()) -> c_76() :61
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_3 #eq^#(#0(), #0()) -> c_66() :51
-->_2 #eq^#(#0(), #0()) -> c_66() :51
64: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
65: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
66: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
67: #eq^#(nil(), nil()) -> c_82()
68: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
69: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
70: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
71: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :71
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :70
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :69
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :68
-->_3 #eq^#(nil(), nil()) -> c_82() :67
-->_2 #eq^#(nil(), nil()) -> c_82() :67
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :66
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :65
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :64
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :63
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :62
-->_3 #eq^#(#s(@x), #0()) -> c_76() :61
-->_2 #eq^#(#s(@x), #0()) -> c_76() :61
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :60
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :59
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :58
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :57
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :56
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :55
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :54
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :53
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :52
-->_3 #eq^#(#0(), #0()) -> c_66() :51
-->_2 #eq^#(#0(), #0()) -> c_66() :51
72: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_2 #compare^#(#s(@x), #0()) -> c_97() :86
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_2 #compare^#(#0(), #0()) -> c_87() :76
-->_1 #ckgt^#(#LT()) -> c_101() :75
-->_1 #ckgt^#(#GT()) -> c_100() :74
-->_1 #ckgt^#(#EQ()) -> c_99() :73
73: #ckgt^#(#EQ()) -> c_99()
74: #ckgt^#(#GT()) -> c_100()
75: #ckgt^#(#LT()) -> c_101()
76: #compare^#(#0(), #0()) -> c_87()
77: #compare^#(#0(), #neg(@y)) -> c_88()
78: #compare^#(#0(), #pos(@y)) -> c_89()
79: #compare^#(#0(), #s(@y)) -> c_90()
80: #compare^#(#neg(@x), #0()) -> c_91()
81: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_1 #compare^#(#s(@x), #0()) -> c_97() :86
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_1 #compare^#(#0(), #0()) -> c_87() :76
82: #compare^#(#neg(@x), #pos(@y)) -> c_93()
83: #compare^#(#pos(@x), #0()) -> c_94()
84: #compare^#(#pos(@x), #neg(@y)) -> c_95()
85: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_1 #compare^#(#s(@x), #0()) -> c_97() :86
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_1 #compare^#(#0(), #0()) -> c_87() :76
86: #compare^#(#s(@x), #0()) -> c_97()
87: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_1 #compare^#(#s(@x), #0()) -> c_97() :86
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_1 #compare^#(#0(), #0()) -> c_87() :76
88: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :91
-->_1 #cklt^#(#GT()) -> c_103() :90
-->_1 #cklt^#(#EQ()) -> c_102() :89
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :87
-->_2 #compare^#(#s(@x), #0()) -> c_97() :86
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :85
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :84
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :83
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :82
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :81
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :80
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :79
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :78
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :77
-->_2 #compare^#(#0(), #0()) -> c_87() :76
89: #cklt^#(#EQ()) -> c_102()
90: #cklt^#(#GT()) -> c_103()
91: #cklt^#(#LT()) -> c_104()
92: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :101
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :100
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :98
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :97
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :99
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :96
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :95
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :94
-->_1 #mult^#(#0(), #0()) -> c_105() :93
93: #mult^#(#0(), #0()) -> c_105()
94: #mult^#(#0(), #neg(@y)) -> c_106()
95: #mult^#(#0(), #pos(@y)) -> c_107()
96: #mult^#(#neg(@x), #0()) -> c_108()
97: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
98: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
99: #mult^#(#pos(@x), #0()) -> c_111()
100: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
101: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
102: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :105
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :104
-->_1 #add^#(#0(), @y) -> c_114() :103
103: #add^#(#0(), @y) -> c_114()
104: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
105: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
106: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
107: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
108: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :111
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :110
-->_1 #sub^#(@x, #0()) -> c_119() :109
109: #sub^#(@x, #0()) -> c_119()
110: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :105
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :104
-->_1 #add^#(#0(), @y) -> c_114() :103
111: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :105
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :104
-->_1 #add^#(#0(), @y) -> c_114() :103
112: add'#1^#(nil(), @b2, @r) -> c_14()
113: add'#2^#(nil(), @r, @x, @xs) -> c_16()
114: compare#4^#(#false(), @r, @x, @y) -> c_29()
115: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :124
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :123
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :121
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :120
-->_1 #div^#(#pos(@x), #0()) -> c_128() :122
-->_1 #div^#(#neg(@x), #0()) -> c_125() :119
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :118
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :117
-->_1 #div^#(#0(), #0()) -> c_122() :116
116: #div^#(#0(), #0()) -> c_122()
117: #div^#(#0(), #neg(@y)) -> c_123()
118: #div^#(#0(), #pos(@y)) -> c_124()
119: #div^#(#neg(@x), #0()) -> c_125()
120: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
121: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
122: #div^#(#pos(@x), #0()) -> c_128()
123: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
124: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
125: mult#1^#(nil(), @b2) -> c_43()
126: mult#3^#(#false(), @b2, @zs) -> c_45()
127: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
128: sub'#1^#(nil(), @b2, @r) -> c_52()
129: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
130: sub'#5^#(#false(), @z, @zs) -> c_57()
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :107
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :106
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {39} and add Pre({39}) = {38} to the strict component.
- We remove {24} and add Pre({24}) = {23} to the strict component.
- We remove {25} and add Pre({25}) = {23} to the strict component.
- We remove {26} and add Pre({26}) = {23} to the strict component.
- We remove {21} and add Pre({21}) = {19} to the strict component.
- We remove {22} and add Pre({22}) = {19} to the strict component.
- We remove {20} and add Pre({20}) = {18} to the strict component.
- We remove {16} and add Pre({16}) = {13} to the strict component.
- We remove {14} and add Pre({14}) = {12} to the strict component.
- We remove {11} and add Pre({11}) = {9} to the strict component.
- We remove {44} and add Pre({44}) = {42} to the strict component.
- We remove {45} and add Pre({45}) = {42} to the strict component.
- We remove {43} and add Pre({43}) = {40} to the strict component.
- We remove {41} and add Pre({41}) = {7} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :32
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :98
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :99
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :30
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :34
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :100
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :78
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :78
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :101
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :12
12: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :102
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :13
13: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :14
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
14: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :15
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :103
15: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :104
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :74
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :16
16: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :106
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :105
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :58
17: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :109
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :108
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :107
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :94
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :94
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :88
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :74
18: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :74
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
19: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :20
-->_1 mult#1^#(nil(), @b2) -> c_43() :120
20: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :21
-->_2 #abs^#(#0()) -> c_1() :32
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :19
21: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :22
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :121
22: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
23: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :19
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :19
24: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :25
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :122
-->_3 #abs^#(#0()) -> c_1() :32
25: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :26
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :123
26: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :27
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :124
27: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :28
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :17
28: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :29
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :25
29: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :126
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :125
30: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :31
31: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :36
32: #abs^#(#0()) -> c_1()
33: #abs^#(#neg(@x)) -> c_2()
34: #abs^#(#pos(@x)) -> c_3()
35: #abs^#(#s(@x)) -> c_4()
36: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
37: #eq^#(#0(), #0()) -> c_66()
38: #eq^#(#0(), #neg(@y)) -> c_67()
39: #eq^#(#0(), #pos(@y)) -> c_68()
40: #eq^#(#0(), #s(@y)) -> c_69()
41: #eq^#(#neg(@x), #0()) -> c_70()
42: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
43: #eq^#(#neg(@x), #pos(@y)) -> c_72()
44: #eq^#(#pos(@x), #0()) -> c_73()
45: #eq^#(#pos(@x), #neg(@y)) -> c_74()
46: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
47: #eq^#(#s(@x), #0()) -> c_76()
48: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_1 #eq^#(nil(), nil()) -> c_82() :53
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_1 #eq^#(#s(@x), #0()) -> c_76() :47
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_1 #eq^#(#0(), #0()) -> c_66() :37
49: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_3 #eq^#(nil(), nil()) -> c_82() :53
-->_2 #eq^#(nil(), nil()) -> c_82() :53
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_3 #eq^#(#s(@x), #0()) -> c_76() :47
-->_2 #eq^#(#s(@x), #0()) -> c_76() :47
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_3 #eq^#(#0(), #0()) -> c_66() :37
-->_2 #eq^#(#0(), #0()) -> c_66() :37
50: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
51: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
52: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
53: #eq^#(nil(), nil()) -> c_82()
54: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
55: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
56: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
57: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :57
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :56
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :55
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :54
-->_3 #eq^#(nil(), nil()) -> c_82() :53
-->_2 #eq^#(nil(), nil()) -> c_82() :53
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :52
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :51
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :50
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :48
-->_3 #eq^#(#s(@x), #0()) -> c_76() :47
-->_2 #eq^#(#s(@x), #0()) -> c_76() :47
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :46
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :45
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :44
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :43
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :41
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :40
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :39
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :38
-->_3 #eq^#(#0(), #0()) -> c_66() :37
-->_2 #eq^#(#0(), #0()) -> c_66() :37
58: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_2 #compare^#(#s(@x), #0()) -> c_97() :72
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_2 #compare^#(#0(), #0()) -> c_87() :62
-->_1 #ckgt^#(#LT()) -> c_101() :61
-->_1 #ckgt^#(#GT()) -> c_100() :60
-->_1 #ckgt^#(#EQ()) -> c_99() :59
59: #ckgt^#(#EQ()) -> c_99()
60: #ckgt^#(#GT()) -> c_100()
61: #ckgt^#(#LT()) -> c_101()
62: #compare^#(#0(), #0()) -> c_87()
63: #compare^#(#0(), #neg(@y)) -> c_88()
64: #compare^#(#0(), #pos(@y)) -> c_89()
65: #compare^#(#0(), #s(@y)) -> c_90()
66: #compare^#(#neg(@x), #0()) -> c_91()
67: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_1 #compare^#(#s(@x), #0()) -> c_97() :72
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_1 #compare^#(#0(), #0()) -> c_87() :62
68: #compare^#(#neg(@x), #pos(@y)) -> c_93()
69: #compare^#(#pos(@x), #0()) -> c_94()
70: #compare^#(#pos(@x), #neg(@y)) -> c_95()
71: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_1 #compare^#(#s(@x), #0()) -> c_97() :72
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_1 #compare^#(#0(), #0()) -> c_87() :62
72: #compare^#(#s(@x), #0()) -> c_97()
73: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_1 #compare^#(#s(@x), #0()) -> c_97() :72
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_1 #compare^#(#0(), #0()) -> c_87() :62
74: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :77
-->_1 #cklt^#(#GT()) -> c_103() :76
-->_1 #cklt^#(#EQ()) -> c_102() :75
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :73
-->_2 #compare^#(#s(@x), #0()) -> c_97() :72
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :71
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :70
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :69
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :68
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :67
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :66
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :65
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :64
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :63
-->_2 #compare^#(#0(), #0()) -> c_87() :62
75: #cklt^#(#EQ()) -> c_102()
76: #cklt^#(#GT()) -> c_103()
77: #cklt^#(#LT()) -> c_104()
78: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :87
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :86
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :84
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :83
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :85
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :82
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :81
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :80
-->_1 #mult^#(#0(), #0()) -> c_105() :79
79: #mult^#(#0(), #0()) -> c_105()
80: #mult^#(#0(), #neg(@y)) -> c_106()
81: #mult^#(#0(), #pos(@y)) -> c_107()
82: #mult^#(#neg(@x), #0()) -> c_108()
83: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
84: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
85: #mult^#(#pos(@x), #0()) -> c_111()
86: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
87: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
88: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :91
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :90
-->_1 #add^#(#0(), @y) -> c_114() :89
89: #add^#(#0(), @y) -> c_114()
90: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
91: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
92: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
93: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
94: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :97
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :96
-->_1 #sub^#(@x, #0()) -> c_119() :95
95: #sub^#(@x, #0()) -> c_119()
96: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :91
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :90
-->_1 #add^#(#0(), @y) -> c_114() :89
97: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :91
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :90
-->_1 #add^#(#0(), @y) -> c_114() :89
98: add'#1^#(nil(), @b2, @r) -> c_14()
99: add'#2^#(nil(), @r, @x, @xs) -> c_16()
100: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
101: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
102: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
103: compare#4^#(#false(), @r, @x, @y) -> c_29()
104: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :94
105: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
106: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :34
107: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :110
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :94
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :78
108: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
109: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :34
110: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :119
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :118
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :115
-->_1 #div^#(#pos(@x), #0()) -> c_128() :117
-->_1 #div^#(#neg(@x), #0()) -> c_125() :114
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :113
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :112
-->_1 #div^#(#0(), #0()) -> c_122() :111
111: #div^#(#0(), #0()) -> c_122()
112: #div^#(#0(), #neg(@y)) -> c_123()
113: #div^#(#0(), #pos(@y)) -> c_124()
114: #div^#(#neg(@x), #0()) -> c_125()
115: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
116: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: #div^#(#pos(@x), #0()) -> c_128()
118: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
119: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
120: mult#1^#(nil(), @b2) -> c_43()
121: mult#3^#(#false(), @b2, @zs) -> c_45()
122: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
123: sub'#1^#(nil(), @b2, @r) -> c_52()
124: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
125: sub'#5^#(#false(), @z, @zs) -> c_57()
126: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :32
127: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :32
-->_1 #abs^#(#0()) -> c_1() :32
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :34
-->_2 #abs^#(#0()) -> c_1() :32
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :34
-->_1 #abs^#(#pos(@x)) -> c_3() :34
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :34
-->_1 #abs^#(#0()) -> c_1() :32
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :93
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :92
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {29} and add Pre({29}) = {28} to the strict component.
- We remove {17} and add Pre({17}) = {27} to the strict component.
- We remove {16} and add Pre({16}) = {15} to the strict component.
- We remove {31} and add Pre({31}) = {30} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :28
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :94
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :95
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :126
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :27
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :30
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :96
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :74
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :74
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :97
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :12
12: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :98
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :13
13: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :14
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
14: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :15
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :99
15: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :101
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :100
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :70
16: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :70
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
17: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :18
-->_1 mult#1^#(nil(), @b2) -> c_43() :118
18: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :19
-->_2 #abs^#(#0()) -> c_1() :28
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :17
19: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :20
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :119
20: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
21: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :17
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :17
22: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :23
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :120
-->_3 #abs^#(#0()) -> c_1() :28
23: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :24
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :121
24: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :25
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :122
25: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :104
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :26
26: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :123
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :23
27: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
28: #abs^#(#0()) -> c_1()
29: #abs^#(#neg(@x)) -> c_2()
30: #abs^#(#pos(@x)) -> c_3()
31: #abs^#(#s(@x)) -> c_4()
32: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
33: #eq^#(#0(), #0()) -> c_66()
34: #eq^#(#0(), #neg(@y)) -> c_67()
35: #eq^#(#0(), #pos(@y)) -> c_68()
36: #eq^#(#0(), #s(@y)) -> c_69()
37: #eq^#(#neg(@x), #0()) -> c_70()
38: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
39: #eq^#(#neg(@x), #pos(@y)) -> c_72()
40: #eq^#(#pos(@x), #0()) -> c_73()
41: #eq^#(#pos(@x), #neg(@y)) -> c_74()
42: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
43: #eq^#(#s(@x), #0()) -> c_76()
44: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_1 #eq^#(nil(), nil()) -> c_82() :49
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :43
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_1 #eq^#(#0(), #0()) -> c_66() :33
45: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_3 #eq^#(nil(), nil()) -> c_82() :49
-->_2 #eq^#(nil(), nil()) -> c_82() :49
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_3 #eq^#(#s(@x), #0()) -> c_76() :43
-->_2 #eq^#(#s(@x), #0()) -> c_76() :43
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_3 #eq^#(#0(), #0()) -> c_66() :33
-->_2 #eq^#(#0(), #0()) -> c_66() :33
46: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
47: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
48: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
49: #eq^#(nil(), nil()) -> c_82()
50: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
51: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
52: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
53: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :53
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :52
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :51
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :50
-->_3 #eq^#(nil(), nil()) -> c_82() :49
-->_2 #eq^#(nil(), nil()) -> c_82() :49
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :48
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :47
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :46
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :45
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :44
-->_3 #eq^#(#s(@x), #0()) -> c_76() :43
-->_2 #eq^#(#s(@x), #0()) -> c_76() :43
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :41
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :40
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :39
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :37
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :36
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :35
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :34
-->_3 #eq^#(#0(), #0()) -> c_66() :33
-->_2 #eq^#(#0(), #0()) -> c_66() :33
54: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_2 #compare^#(#s(@x), #0()) -> c_97() :68
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_2 #compare^#(#0(), #0()) -> c_87() :58
-->_1 #ckgt^#(#LT()) -> c_101() :57
-->_1 #ckgt^#(#GT()) -> c_100() :56
-->_1 #ckgt^#(#EQ()) -> c_99() :55
55: #ckgt^#(#EQ()) -> c_99()
56: #ckgt^#(#GT()) -> c_100()
57: #ckgt^#(#LT()) -> c_101()
58: #compare^#(#0(), #0()) -> c_87()
59: #compare^#(#0(), #neg(@y)) -> c_88()
60: #compare^#(#0(), #pos(@y)) -> c_89()
61: #compare^#(#0(), #s(@y)) -> c_90()
62: #compare^#(#neg(@x), #0()) -> c_91()
63: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#s(@x), #0()) -> c_97() :68
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_1 #compare^#(#0(), #0()) -> c_87() :58
64: #compare^#(#neg(@x), #pos(@y)) -> c_93()
65: #compare^#(#pos(@x), #0()) -> c_94()
66: #compare^#(#pos(@x), #neg(@y)) -> c_95()
67: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_1 #compare^#(#s(@x), #0()) -> c_97() :68
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_1 #compare^#(#0(), #0()) -> c_87() :58
68: #compare^#(#s(@x), #0()) -> c_97()
69: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_1 #compare^#(#s(@x), #0()) -> c_97() :68
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_1 #compare^#(#0(), #0()) -> c_87() :58
70: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :73
-->_1 #cklt^#(#GT()) -> c_103() :72
-->_1 #cklt^#(#EQ()) -> c_102() :71
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :69
-->_2 #compare^#(#s(@x), #0()) -> c_97() :68
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :66
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :65
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :64
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :63
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :62
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :61
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :60
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :59
-->_2 #compare^#(#0(), #0()) -> c_87() :58
71: #cklt^#(#EQ()) -> c_102()
72: #cklt^#(#GT()) -> c_103()
73: #cklt^#(#LT()) -> c_104()
74: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :83
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :82
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :80
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :79
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :81
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :78
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :77
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :76
-->_1 #mult^#(#0(), #0()) -> c_105() :75
75: #mult^#(#0(), #0()) -> c_105()
76: #mult^#(#0(), #neg(@y)) -> c_106()
77: #mult^#(#0(), #pos(@y)) -> c_107()
78: #mult^#(#neg(@x), #0()) -> c_108()
79: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
80: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
81: #mult^#(#pos(@x), #0()) -> c_111()
82: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
83: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
84: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :86
-->_1 #add^#(#0(), @y) -> c_114() :85
85: #add^#(#0(), @y) -> c_114()
86: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
87: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
88: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
89: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
90: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :93
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :92
-->_1 #sub^#(@x, #0()) -> c_119() :91
91: #sub^#(@x, #0()) -> c_119()
92: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :86
-->_1 #add^#(#0(), @y) -> c_114() :85
93: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :86
-->_1 #add^#(#0(), @y) -> c_114() :85
94: add'#1^#(nil(), @b2, @r) -> c_14()
95: add'#2^#(nil(), @r, @x, @xs) -> c_16()
96: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
97: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
98: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
99: compare#4^#(#false(), @r, @x, @y) -> c_29()
100: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :103
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :102
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :54
101: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :90
102: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
103: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :30
104: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :107
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :106
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :105
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :90
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :90
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :84
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :70
105: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :108
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :90
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :74
106: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
107: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :30
108: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :117
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :114
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :113
-->_1 #div^#(#pos(@x), #0()) -> c_128() :115
-->_1 #div^#(#neg(@x), #0()) -> c_125() :112
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :111
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :110
-->_1 #div^#(#0(), #0()) -> c_122() :109
109: #div^#(#0(), #0()) -> c_122()
110: #div^#(#0(), #neg(@y)) -> c_123()
111: #div^#(#0(), #pos(@y)) -> c_124()
112: #div^#(#neg(@x), #0()) -> c_125()
113: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
114: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
115: #div^#(#pos(@x), #0()) -> c_128()
116: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
118: mult#1^#(nil(), @b2) -> c_43()
119: mult#3^#(#false(), @b2, @zs) -> c_45()
120: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
121: sub'#1^#(nil(), @b2, @r) -> c_52()
122: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
123: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :125
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :124
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
124: sub'#5^#(#false(), @z, @zs) -> c_57()
125: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :28
126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :28
-->_1 #abs^#(#0()) -> c_1() :28
127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :32
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :30
-->_2 #abs^#(#0()) -> c_1() :28
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :30
-->_1 #abs^#(#pos(@x)) -> c_3() :30
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :30
-->_1 #abs^#(#0()) -> c_1() :28
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :89
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :88
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {15} and add Pre({15}) = {14} to the strict component.
- We remove {27} and add Pre({27}) = {7} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :26
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :92
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :93
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :7
7: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :126
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :125
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
8: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
-->_2 #abs^#(#pos(@x)) -> c_3() :28
9: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :94
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :10
10: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :72
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :72
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :9
11: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :95
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :12
12: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :96
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :13
13: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :14
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
14: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :98
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :97
15: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :68
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :11
16: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :17
-->_1 mult#1^#(nil(), @b2) -> c_43() :117
17: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :18
-->_2 #abs^#(#0()) -> c_1() :26
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :16
18: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :19
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :118
19: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
20: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :16
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :16
21: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :22
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :119
-->_3 #abs^#(#0()) -> c_1() :26
22: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :23
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :120
23: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :24
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :121
24: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :103
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :25
25: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :122
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :22
26: #abs^#(#0()) -> c_1()
27: #abs^#(#neg(@x)) -> c_2()
28: #abs^#(#pos(@x)) -> c_3()
29: #abs^#(#s(@x)) -> c_4()
30: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
31: #eq^#(#0(), #0()) -> c_66()
32: #eq^#(#0(), #neg(@y)) -> c_67()
33: #eq^#(#0(), #pos(@y)) -> c_68()
34: #eq^#(#0(), #s(@y)) -> c_69()
35: #eq^#(#neg(@x), #0()) -> c_70()
36: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
37: #eq^#(#neg(@x), #pos(@y)) -> c_72()
38: #eq^#(#pos(@x), #0()) -> c_73()
39: #eq^#(#pos(@x), #neg(@y)) -> c_74()
40: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
41: #eq^#(#s(@x), #0()) -> c_76()
42: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_1 #eq^#(nil(), nil()) -> c_82() :47
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :41
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_1 #eq^#(#0(), #0()) -> c_66() :31
43: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_3 #eq^#(nil(), nil()) -> c_82() :47
-->_2 #eq^#(nil(), nil()) -> c_82() :47
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#s(@x), #0()) -> c_76() :41
-->_2 #eq^#(#s(@x), #0()) -> c_76() :41
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_3 #eq^#(#0(), #0()) -> c_66() :31
-->_2 #eq^#(#0(), #0()) -> c_66() :31
44: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
45: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
46: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
47: #eq^#(nil(), nil()) -> c_82()
48: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
49: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
50: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
51: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :51
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :50
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :49
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :48
-->_3 #eq^#(nil(), nil()) -> c_82() :47
-->_2 #eq^#(nil(), nil()) -> c_82() :47
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :46
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :45
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :44
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :43
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :42
-->_3 #eq^#(#s(@x), #0()) -> c_76() :41
-->_2 #eq^#(#s(@x), #0()) -> c_76() :41
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :39
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :38
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :37
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :36
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :35
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :34
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :33
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :32
-->_3 #eq^#(#0(), #0()) -> c_66() :31
-->_2 #eq^#(#0(), #0()) -> c_66() :31
52: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_2 #compare^#(#s(@x), #0()) -> c_97() :66
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_2 #compare^#(#0(), #0()) -> c_87() :56
-->_1 #ckgt^#(#LT()) -> c_101() :55
-->_1 #ckgt^#(#GT()) -> c_100() :54
-->_1 #ckgt^#(#EQ()) -> c_99() :53
53: #ckgt^#(#EQ()) -> c_99()
54: #ckgt^#(#GT()) -> c_100()
55: #ckgt^#(#LT()) -> c_101()
56: #compare^#(#0(), #0()) -> c_87()
57: #compare^#(#0(), #neg(@y)) -> c_88()
58: #compare^#(#0(), #pos(@y)) -> c_89()
59: #compare^#(#0(), #s(@y)) -> c_90()
60: #compare^#(#neg(@x), #0()) -> c_91()
61: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#s(@x), #0()) -> c_97() :66
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_1 #compare^#(#0(), #0()) -> c_87() :56
62: #compare^#(#neg(@x), #pos(@y)) -> c_93()
63: #compare^#(#pos(@x), #0()) -> c_94()
64: #compare^#(#pos(@x), #neg(@y)) -> c_95()
65: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#s(@x), #0()) -> c_97() :66
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_1 #compare^#(#0(), #0()) -> c_87() :56
66: #compare^#(#s(@x), #0()) -> c_97()
67: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_1 #compare^#(#s(@x), #0()) -> c_97() :66
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_1 #compare^#(#0(), #0()) -> c_87() :56
68: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :71
-->_1 #cklt^#(#GT()) -> c_103() :70
-->_1 #cklt^#(#EQ()) -> c_102() :69
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :67
-->_2 #compare^#(#s(@x), #0()) -> c_97() :66
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :64
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :63
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :62
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :61
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :60
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :59
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :58
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :57
-->_2 #compare^#(#0(), #0()) -> c_87() :56
69: #cklt^#(#EQ()) -> c_102()
70: #cklt^#(#GT()) -> c_103()
71: #cklt^#(#LT()) -> c_104()
72: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :81
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :80
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :78
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :77
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :79
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :76
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :75
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :74
-->_1 #mult^#(#0(), #0()) -> c_105() :73
73: #mult^#(#0(), #0()) -> c_105()
74: #mult^#(#0(), #neg(@y)) -> c_106()
75: #mult^#(#0(), #pos(@y)) -> c_107()
76: #mult^#(#neg(@x), #0()) -> c_108()
77: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
78: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
79: #mult^#(#pos(@x), #0()) -> c_111()
80: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
81: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
82: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :84
-->_1 #add^#(#0(), @y) -> c_114() :83
83: #add^#(#0(), @y) -> c_114()
84: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
85: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
86: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
87: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
88: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :91
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :90
-->_1 #sub^#(@x, #0()) -> c_119() :89
89: #sub^#(@x, #0()) -> c_119()
90: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :84
-->_1 #add^#(#0(), @y) -> c_114() :83
91: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :84
-->_1 #add^#(#0(), @y) -> c_114() :83
92: add'#1^#(nil(), @b2, @r) -> c_14()
93: add'#2^#(nil(), @r, @x, @xs) -> c_16()
94: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
95: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
96: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
97: compare#4^#(#false(), @r, @x, @y) -> c_29()
98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :100
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :99
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :68
99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :102
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :101
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :52
100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :88
101: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :28
103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :106
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :105
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :104
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :88
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :88
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :82
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :68
104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :107
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :88
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :72
105: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :28
107: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :115
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :113
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :112
-->_1 #div^#(#pos(@x), #0()) -> c_128() :114
-->_1 #div^#(#neg(@x), #0()) -> c_125() :111
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :110
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :109
-->_1 #div^#(#0(), #0()) -> c_122() :108
108: #div^#(#0(), #0()) -> c_122()
109: #div^#(#0(), #neg(@y)) -> c_123()
110: #div^#(#0(), #pos(@y)) -> c_124()
111: #div^#(#neg(@x), #0()) -> c_125()
112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
114: #div^#(#pos(@x), #0()) -> c_128()
115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: mult#1^#(nil(), @b2) -> c_43()
118: mult#3^#(#false(), @b2, @zs) -> c_45()
119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
120: sub'#1^#(nil(), @b2, @r) -> c_52()
121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :124
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :123
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
123: sub'#5^#(#false(), @z, @zs) -> c_57()
124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :26
125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :26
-->_1 #abs^#(#0()) -> c_1() :26
127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :30
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :28
-->_2 #abs^#(#0()) -> c_1() :26
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :28
-->_1 #abs^#(#pos(@x)) -> c_3() :28
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :28
-->_1 #abs^#(#0()) -> c_1() :26
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :87
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :86
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {14} and add Pre({14}) = {13} to the strict component.
- We remove {7} and add Pre({7}) = {6} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
-->_2 #abs^#(#0()) -> c_1() :24
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
-->_1 add'#1^#(nil(), @b2, @r) -> c_14() :90
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
-->_1 add'#2^#(nil(), @r, @x, @xs) -> c_16() :91
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_2 sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y)) :6
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
-->_1 sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0())) :92
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :80
7: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :8
-->_2 #abs^#(#pos(@x)) -> c_3() :26
8: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(nil(), @n) -> #abs^#(#0()) :93
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :9
9: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_1 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_4 *^#(@x, @y) -> #mult^#(@x, @y) :70
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :70
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :8
10: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(nil(), @b2) -> #abs^#(#0()) :94
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :11
11: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(nil(), @x, @xs) -> #abs^#(#0()) :95
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :12
12: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_1 compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y),
#equal^#(@r, #0())) :96
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :10
13: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_1 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :66
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :10
14: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :15
-->_1 mult#1^#(nil(), @b2) -> c_43() :117
15: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :16
-->_2 #abs^#(#0()) -> c_1() :24
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :14
16: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :17
-->_1 mult#3^#(#false(), @b2, @zs) -> c_45() :118
17: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
18: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :14
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :14
19: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :20
-->_1 sub#1^#(tuple#2(@b, @_@1)) -> c_50() :119
-->_3 #abs^#(#0()) -> c_1() :24
20: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :21
-->_1 sub'#1^#(nil(), @b2, @r) -> c_52() :120
21: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :22
-->_1 sub'#2^#(nil(), @r, @x, @xs) -> c_54() :121
22: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_2 diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y)) :103
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :23
23: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_1 sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0())))) :122
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :20
24: #abs^#(#0()) -> c_1()
25: #abs^#(#neg(@x)) -> c_2()
26: #abs^#(#pos(@x)) -> c_3()
27: #abs^#(#s(@x)) -> c_4()
28: #equal^#(@x, @y) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
29: #eq^#(#0(), #0()) -> c_66()
30: #eq^#(#0(), #neg(@y)) -> c_67()
31: #eq^#(#0(), #pos(@y)) -> c_68()
32: #eq^#(#0(), #s(@y)) -> c_69()
33: #eq^#(#neg(@x), #0()) -> c_70()
34: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
35: #eq^#(#neg(@x), #pos(@y)) -> c_72()
36: #eq^#(#pos(@x), #0()) -> c_73()
37: #eq^#(#pos(@x), #neg(@y)) -> c_74()
38: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
39: #eq^#(#s(@x), #0()) -> c_76()
40: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
-->_1 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_1 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_1 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_1 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_1 #eq^#(nil(), nil()) -> c_82() :45
-->_1 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_1 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_1 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_1 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_1 #eq^#(#s(@x), #0()) -> c_76() :39
-->_1 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_1 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_1 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_1 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_1 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_1 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_1 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_1 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_1 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_1 #eq^#(#0(), #0()) -> c_66() :29
41: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_3 #eq^#(nil(), nil()) -> c_82() :45
-->_2 #eq^#(nil(), nil()) -> c_82() :45
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#s(@x), #0()) -> c_76() :39
-->_2 #eq^#(#s(@x), #0()) -> c_76() :39
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_3 #eq^#(#0(), #0()) -> c_66() :29
-->_2 #eq^#(#0(), #0()) -> c_66() :29
42: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
43: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
44: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
45: #eq^#(nil(), nil()) -> c_82()
46: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
47: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
48: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
49: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
-->_1 #and^#(#true(), #true()) -> c_142() :134
-->_1 #and^#(#true(), #false()) -> c_141() :133
-->_1 #and^#(#false(), #true()) -> c_140() :132
-->_1 #and^#(#false(), #false()) -> c_139() :131
-->_3 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_2 #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :49
-->_3 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_2 #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85() :48
-->_3 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_2 #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84() :47
-->_3 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_2 #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83() :46
-->_3 #eq^#(nil(), nil()) -> c_82() :45
-->_2 #eq^#(nil(), nil()) -> c_82() :45
-->_3 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_2 #eq^#(nil(), ::(@y_1, @y_2)) -> c_81() :44
-->_3 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_2 #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80() :43
-->_3 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_2 #eq^#(::(@x_1, @x_2), nil()) -> c_79() :42
-->_3 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_2 #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2)) :41
-->_3 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_2 #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y) :40
-->_3 #eq^#(#s(@x), #0()) -> c_76() :39
-->_2 #eq^#(#s(@x), #0()) -> c_76() :39
-->_3 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_2 #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y) :38
-->_3 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_2 #eq^#(#pos(@x), #neg(@y)) -> c_74() :37
-->_3 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_2 #eq^#(#pos(@x), #0()) -> c_73() :36
-->_3 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_2 #eq^#(#neg(@x), #pos(@y)) -> c_72() :35
-->_3 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_2 #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y) :34
-->_3 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_2 #eq^#(#neg(@x), #0()) -> c_70() :33
-->_3 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_2 #eq^#(#0(), #s(@y)) -> c_69() :32
-->_3 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_2 #eq^#(#0(), #pos(@y)) -> c_68() :31
-->_3 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_2 #eq^#(#0(), #neg(@y)) -> c_67() :30
-->_3 #eq^#(#0(), #0()) -> c_66() :29
-->_2 #eq^#(#0(), #0()) -> c_66() :29
50: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_2 #compare^#(#s(@x), #0()) -> c_97() :64
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_2 #compare^#(#0(), #0()) -> c_87() :54
-->_1 #ckgt^#(#LT()) -> c_101() :53
-->_1 #ckgt^#(#GT()) -> c_100() :52
-->_1 #ckgt^#(#EQ()) -> c_99() :51
51: #ckgt^#(#EQ()) -> c_99()
52: #ckgt^#(#GT()) -> c_100()
53: #ckgt^#(#LT()) -> c_101()
54: #compare^#(#0(), #0()) -> c_87()
55: #compare^#(#0(), #neg(@y)) -> c_88()
56: #compare^#(#0(), #pos(@y)) -> c_89()
57: #compare^#(#0(), #s(@y)) -> c_90()
58: #compare^#(#neg(@x), #0()) -> c_91()
59: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_1 #compare^#(#s(@x), #0()) -> c_97() :64
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_1 #compare^#(#0(), #0()) -> c_87() :54
60: #compare^#(#neg(@x), #pos(@y)) -> c_93()
61: #compare^#(#pos(@x), #0()) -> c_94()
62: #compare^#(#pos(@x), #neg(@y)) -> c_95()
63: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#s(@x), #0()) -> c_97() :64
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_1 #compare^#(#0(), #0()) -> c_87() :54
64: #compare^#(#s(@x), #0()) -> c_97()
65: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
-->_1 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_1 #compare^#(#s(@x), #0()) -> c_97() :64
-->_1 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_1 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_1 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_1 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_1 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_1 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_1 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_1 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_1 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_1 #compare^#(#0(), #0()) -> c_87() :54
66: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
-->_1 #cklt^#(#LT()) -> c_104() :69
-->_1 #cklt^#(#GT()) -> c_103() :68
-->_1 #cklt^#(#EQ()) -> c_102() :67
-->_2 #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y) :65
-->_2 #compare^#(#s(@x), #0()) -> c_97() :64
-->_2 #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y) :63
-->_2 #compare^#(#pos(@x), #neg(@y)) -> c_95() :62
-->_2 #compare^#(#pos(@x), #0()) -> c_94() :61
-->_2 #compare^#(#neg(@x), #pos(@y)) -> c_93() :60
-->_2 #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x) :59
-->_2 #compare^#(#neg(@x), #0()) -> c_91() :58
-->_2 #compare^#(#0(), #s(@y)) -> c_90() :57
-->_2 #compare^#(#0(), #pos(@y)) -> c_89() :56
-->_2 #compare^#(#0(), #neg(@y)) -> c_88() :55
-->_2 #compare^#(#0(), #0()) -> c_87() :54
67: #cklt^#(#EQ()) -> c_102()
68: #cklt^#(#GT()) -> c_103()
69: #cklt^#(#LT()) -> c_104()
70: *^#(@x, @y) -> #mult^#(@x, @y)
-->_1 #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y) :79
-->_1 #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y) :78
-->_1 #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y) :76
-->_1 #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y) :75
-->_1 #mult^#(#pos(@x), #0()) -> c_111() :77
-->_1 #mult^#(#neg(@x), #0()) -> c_108() :74
-->_1 #mult^#(#0(), #pos(@y)) -> c_107() :73
-->_1 #mult^#(#0(), #neg(@y)) -> c_106() :72
-->_1 #mult^#(#0(), #0()) -> c_105() :71
71: #mult^#(#0(), #0()) -> c_105()
72: #mult^#(#0(), #neg(@y)) -> c_106()
73: #mult^#(#0(), #pos(@y)) -> c_107()
74: #mult^#(#neg(@x), #0()) -> c_108()
75: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
76: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
77: #mult^#(#pos(@x), #0()) -> c_111()
78: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
79: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
-->_1 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_1 #natmult^#(#0(), @y) -> c_145() :135
80: +^#(@x, @y) -> #add^#(@x, @y)
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :83
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :82
-->_1 #add^#(#0(), @y) -> c_114() :81
81: #add^#(#0(), @y) -> c_114()
82: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
83: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #pred^#(#pos(#s(#s(@x)))) -> c_134() :140
-->_1 #pred^#(#pos(#s(#0()))) -> c_133() :139
-->_1 #pred^#(#neg(#s(@x))) -> c_132() :138
-->_1 #pred^#(#0()) -> c_131() :137
84: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
85: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
-->_1 #succ^#(#pos(#s(@x))) -> c_138() :144
-->_1 #succ^#(#neg(#s(#s(@x)))) -> c_137() :143
-->_1 #succ^#(#neg(#s(#0()))) -> c_136() :142
-->_1 #succ^#(#0()) -> c_135() :141
-->_2 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_2 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
86: -^#(@x, @y) -> #sub^#(@x, @y)
-->_1 #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y)) :89
-->_1 #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y)) :88
-->_1 #sub^#(@x, #0()) -> c_119() :87
87: #sub^#(@x, #0()) -> c_119()
88: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :83
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :82
-->_1 #add^#(#0(), @y) -> c_114() :81
89: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
-->_1 #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :83
-->_1 #add^#(#neg(#s(#0())), @y) -> #pred^#(@y) :82
-->_1 #add^#(#0(), @y) -> c_114() :81
90: add'#1^#(nil(), @b2, @r) -> c_14()
91: add'#2^#(nil(), @r, @x, @xs) -> c_16()
92: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
-->_1 sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0())) :126
-->_1 sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0())))) :125
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
93: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
94: compare#1^#(nil(), @b2) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
95: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
96: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
-->_1 compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y)) :98
-->_1 compare#4^#(#false(), @r, @x, @y) -> c_29() :97
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
97: compare#4^#(#false(), @r, @x, @y) -> c_29()
98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
-->_1 compare#5^#(#true(), @x, @y) ->
-^#(#0(), #pos(#s(#0()))) :100
-->_1 compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y)) :99
-->_2 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :66
99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
-->_1 compare#6^#(#true()) -> #abs^#(#pos(#s(#0()))) :102
-->_1 compare#6^#(#false()) -> #abs^#(#0()) :101
-->_2 #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) :50
100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :86
101: compare#6^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :26
103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
-->_4 diff#1^#(#true()) -> #abs^#(#pos(#s(#0()))) :106
-->_4 diff#1^#(#false()) -> #abs^#(#0()) :105
-->_1 mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y)) :104
-->_7 -^#(@x, @y) -> #sub^#(@x, @y) :86
-->_6 -^#(@x, @y) -> #sub^#(@x, @y) :86
-->_3 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_2 +^#(@x, @y) -> #add^#(@x, @y) :80
-->_5 #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :66
104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
-->_3 div^#(@x, @y) -> #div^#(@x, @y) :107
-->_1 -^#(@x, @y) -> #sub^#(@x, @y) :86
-->_2 *^#(@x, @y) -> #mult^#(@x, @y) :70
105: diff#1^#(#false()) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
-->_1 #abs^#(#pos(@x)) -> c_3() :26
107: div^#(@x, @y) -> #div^#(@x, @y)
-->_1 #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y) :116
-->_1 #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y) :115
-->_1 #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y) :113
-->_1 #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y) :112
-->_1 #div^#(#pos(@x), #0()) -> c_128() :114
-->_1 #div^#(#neg(@x), #0()) -> c_125() :111
-->_1 #div^#(#0(), #pos(@y)) -> c_124() :110
-->_1 #div^#(#0(), #neg(@y)) -> c_123() :109
-->_1 #div^#(#0(), #0()) -> c_122() :108
108: #div^#(#0(), #0()) -> c_122()
109: #div^#(#0(), #neg(@y)) -> c_123()
110: #div^#(#0(), #pos(@y)) -> c_124()
111: #div^#(#neg(@x), #0()) -> c_125()
112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
114: #div^#(#pos(@x), #0()) -> c_128()
115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
-->_1 #natdiv^#(#0(), #0()) -> c_143() :145
117: mult#1^#(nil(), @b2) -> c_43()
118: mult#3^#(#false(), @b2, @zs) -> c_45()
119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
120: sub'#1^#(nil(), @b2, @r) -> c_52()
121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sub'#5^#(#true(), @z, @zs) -> #abs^#(#0()) :124
-->_1 sub'#5^#(#false(), @z, @zs) -> c_57() :123
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
123: sub'#5^#(#false(), @z, @zs) -> c_57()
124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
-->_1 #abs^#(#0()) -> c_1() :24
125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
-->_1 sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0())) :128
-->_1 sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0()))))) :127
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
-->_2 #abs^#(#0()) -> c_1() :24
-->_1 #abs^#(#0()) -> c_1() :24
127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
-->_1 sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0())))) :130
-->_1 sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0())))) :129
-->_2 #equal^#(@x, @y) -> #eq^#(@x, @y) :28
128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
-->_1 #abs^#(#pos(@x)) -> c_3() :26
-->_2 #abs^#(#0()) -> c_1() :24
129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :26
-->_1 #abs^#(#pos(@x)) -> c_3() :26
130: sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
-->_2 #abs^#(#pos(@x)) -> c_3() :26
-->_1 #abs^#(#0()) -> c_1() :24
131: #and^#(#false(), #false()) -> c_139()
132: #and^#(#false(), #true()) -> c_140()
133: #and^#(#true(), #false()) -> c_141()
134: #and^#(#true(), #true()) -> c_142()
135: #natmult^#(#0(), @y) -> c_145()
136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
-->_2 #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y)) :136
-->_2 #natmult^#(#0(), @y) -> c_145() :135
-->_1 #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)),
#add^#(#pos(#s(@x)), @y)) :85
-->_1 #add^#(#pos(#s(#0())), @y) -> #succ^#(@y) :84
137: #pred^#(#0()) -> c_131()
138: #pred^#(#neg(#s(@x))) -> c_132()
139: #pred^#(#pos(#s(#0()))) -> c_133()
140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
141: #succ^#(#0()) -> c_135()
142: #succ^#(#neg(#s(#0()))) -> c_136()
143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
144: #succ^#(#pos(#s(@x))) -> c_138()
145: #natdiv^#(#0(), #0()) -> c_143()
146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
-->_2 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_2 #natsub^#(@x, #0()) -> c_147() :147
-->_1 #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y)) :146
147: #natsub^#(@x, #0()) -> c_147()
148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
-->_1 #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) :148
-->_1 #natsub^#(@x, #0()) -> c_147() :147
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {6} and add Pre({6}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ #abs^#(#0()) -> c_1()
, #abs^#(#neg(@x)) -> c_2()
, #abs^#(#pos(@x)) -> c_3()
, #abs^#(#s(@x)) -> c_4()
, #equal^#(@x, @y) -> #eq^#(@x, @y)
, #eq^#(#0(), #0()) -> c_66()
, #eq^#(#0(), #neg(@y)) -> c_67()
, #eq^#(#0(), #pos(@y)) -> c_68()
, #eq^#(#0(), #s(@y)) -> c_69()
, #eq^#(#neg(@x), #0()) -> c_70()
, #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, #eq^#(#neg(@x), #pos(@y)) -> c_72()
, #eq^#(#pos(@x), #0()) -> c_73()
, #eq^#(#pos(@x), #neg(@y)) -> c_74()
, #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, #eq^#(#s(@x), #0()) -> c_76()
, #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, #eq^#(nil(), nil()) -> c_82()
, #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #ckgt^#(#EQ()) -> c_99()
, #ckgt^#(#GT()) -> c_100()
, #ckgt^#(#LT()) -> c_101()
, #compare^#(#0(), #0()) -> c_87()
, #compare^#(#0(), #neg(@y)) -> c_88()
, #compare^#(#0(), #pos(@y)) -> c_89()
, #compare^#(#0(), #s(@y)) -> c_90()
, #compare^#(#neg(@x), #0()) -> c_91()
, #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, #compare^#(#neg(@x), #pos(@y)) -> c_93()
, #compare^#(#pos(@x), #0()) -> c_94()
, #compare^#(#pos(@x), #neg(@y)) -> c_95()
, #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, #compare^#(#s(@x), #0()) -> c_97()
, #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, #cklt^#(#EQ()) -> c_102()
, #cklt^#(#GT()) -> c_103()
, #cklt^#(#LT()) -> c_104()
, *^#(@x, @y) -> #mult^#(@x, @y)
, #mult^#(#0(), #0()) -> c_105()
, #mult^#(#0(), #neg(@y)) -> c_106()
, #mult^#(#0(), #pos(@y)) -> c_107()
, #mult^#(#neg(@x), #0()) -> c_108()
, #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #0()) -> c_111()
, #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, +^#(@x, @y) -> #add^#(@x, @y)
, #add^#(#0(), @y) -> c_114()
, #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, -^#(@x, @y) -> #sub^#(@x, @y)
, #sub^#(@x, #0()) -> c_119()
, #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, add'#1^#(nil(), @b2, @r) -> c_14()
, add'#2^#(nil(), @r, @x, @xs) -> c_16()
, sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, compare#1^#(nil(), @b2) -> #abs^#(#0())
, compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, compare#4^#(#false(), @r, @x, @y) -> c_29()
, compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, compare#6^#(#false()) -> #abs^#(#0())
, compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, diff#1^#(#false()) -> #abs^#(#0())
, diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, div^#(@x, @y) -> #div^#(@x, @y)
, #div^#(#0(), #0()) -> c_122()
, #div^#(#0(), #neg(@y)) -> c_123()
, #div^#(#0(), #pos(@y)) -> c_124()
, #div^#(#neg(@x), #0()) -> c_125()
, #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #0()) -> c_128()
, #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, mult#1^#(nil(), @b2) -> c_43()
, mult#3^#(#false(), @b2, @zs) -> c_45()
, sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, sub'#1^#(nil(), @b2, @r) -> c_52()
, sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, sub'#5^#(#false(), @z, @zs) -> c_57()
, sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, sum#4^#(#true()) -> c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, #and^#(#false(), #false()) -> c_139()
, #and^#(#false(), #true()) -> c_140()
, #and^#(#true(), #false()) -> c_141()
, #and^#(#true(), #true()) -> c_142()
, #natmult^#(#0(), @y) -> c_145()
, #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, #pred^#(#0()) -> c_131()
, #pred^#(#neg(#s(@x))) -> c_132()
, #pred^#(#pos(#s(#0()))) -> c_133()
, #pred^#(#pos(#s(#s(@x)))) -> c_134()
, #succ^#(#0()) -> c_135()
, #succ^#(#neg(#s(#0()))) -> c_136()
, #succ^#(#neg(#s(#s(@x)))) -> c_137()
, #succ^#(#pos(#s(@x))) -> c_138()
, #natdiv^#(#0(), #0()) -> c_143()
, #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, #natsub^#(@x, #0()) -> c_147()
, #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the the dependency graph
->68:{6}
|
|->69:{7,8}
| |
| |->70:{69} Weak SCC
| | |
| | |->71:{70} Weak SCC
| | |
| | |->72:{71} Weak SCC
| | |
| | |->73:{72} Weak SCC
| | |
| | |->74:{73} Weak SCC
| | |
| | |->76:{74} Weak SCC
| | | |
| | | |->81:{135} Weak SCC
| | | |
| | | `->80:{136} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->81:{135} Weak SCC
| | |
| | |->77:{75} Weak SCC
| | | |
| | | |->81:{135} Weak SCC
| | | |
| | | `->80:{136} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->81:{135} Weak SCC
| | |
| | |->75:{76} Weak SCC
| | |
| | |->78:{77} Weak SCC
| | | |
| | | |->81:{135} Weak SCC
| | | |
| | | `->80:{136} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->81:{135} Weak SCC
| | |
| | `->79:{78} Weak SCC
| | |
| | |->81:{135} Weak SCC
| | |
| | `->80:{136} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->96:{84} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | `->81:{135} Weak SCC
| |
| |->88:{79} Weak SCC
| | |
| | |->89:{80} Weak SCC
| | |
| | |->90:{81} Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->91:{82} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | `->96:{84} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->98:{141} Weak SCC
| | |
| | |->99:{142} Weak SCC
| | |
| | |->100:{143} Weak SCC
| | |
| | `->101:{144} Weak SCC
| |
| `->82:{93} Weak SCC
| |
| `->132:{23} Weak SCC
|
`->130:{25} Weak SCC
->35:{12}
|
|->36:{9,11,10}
| |
| |->67:{94} Weak SCC
| | |
| | `->132:{23} Weak SCC
| |
| |->66:{95} Weak SCC
| | |
| | `->132:{23} Weak SCC
| |
| `->37:{96} Weak SCC
| |
| |->105:{27} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | `->106:{48,40,39,37,33} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | |->123:{131} Weak SCC
| | |
| | |->124:{132} Weak SCC
| | |
| | |->125:{133} Weak SCC
| | |
| | `->126:{134} Weak SCC
| |
| |->38:{97} Weak SCC
| |
| `->39:{98} Weak SCC
| |
| |->40:{65} Weak SCC
| | |
| | |->50:{53} Weak SCC
| | |
| | |->51:{54} Weak SCC
| | |
| | |->52:{55} Weak SCC
| | |
| | |->53:{56} Weak SCC
| | |
| | |->54:{57} Weak SCC
| | |
| | |->55:{59} Weak SCC
| | |
| | |->56:{60} Weak SCC
| | |
| | |->57:{61} Weak SCC
| | |
| | |->58:{63} Weak SCC
| | |
| | |->49:{64,62,58} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | `->58:{63} Weak SCC
| | |
| | |->41:{66} Weak SCC
| | |
| | |->42:{67} Weak SCC
| | |
| | `->43:{68} Weak SCC
| |
| |->44:{99} Weak SCC
| | |
| | |->45:{49} Weak SCC
| | | |
| | | |->46:{50} Weak SCC
| | | |
| | | |->47:{51} Weak SCC
| | | |
| | | |->48:{52} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | |->58:{63} Weak SCC
| | | |
| | | `->49:{64,62,58} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | `->58:{63} Weak SCC
| | |
| | |->59:{101} Weak SCC
| | | |
| | | `->132:{23} Weak SCC
| | |
| | `->60:{102} Weak SCC
| | |
| | `->130:{25} Weak SCC
| |
| `->61:{100} Weak SCC
| |
| `->62:{85} Weak SCC
| |
| |->63:{86} Weak SCC
| |
| |->64:{87} Weak SCC
| | |
| | |->89:{80} Weak SCC
| | |
| | |->90:{81} Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->91:{82} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | |->96:{84} Weak SCC
| | | | |
| | | | |->97:{83}
Weak SCC
| | | | | |
| | | | | |->98:{141}
Weak SCC
| | | | | |
| | | | | |->99:{142}
Weak SCC
| | | | | |
| | | | | |->100:{143}
Weak SCC
| | | | | |
| | | | | `->101:{144}
Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | |->92:{137} Weak SCC
| | | |
| | | |->93:{138} Weak SCC
| | | |
| | | |->94:{139} Weak SCC
| | | |
| | | `->95:{140} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | `->96:{84} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141}
Weak SCC
| | | |
| | | |->99:{142}
Weak SCC
| | | |
| | | |->100:{143}
Weak SCC
| | | |
| | | `->101:{144}
Weak SCC
| | |
| | |->98:{141} Weak SCC
| | |
| | |->99:{142} Weak SCC
| | |
| | |->100:{143} Weak SCC
| | |
| | `->101:{144} Weak SCC
| |
| `->65:{88} Weak SCC
| |
| |->89:{80} Weak SCC
| |
| |->90:{81} Weak SCC
| | |
| | |->92:{137} Weak SCC
| | |
| | |->93:{138} Weak SCC
| | |
| | |->94:{139} Weak SCC
| | |
| | `->95:{140} Weak SCC
| |
| |->91:{82} Weak SCC
| | |
| | |->97:{83} Weak SCC
| | | |
| | | |->98:{141}
Weak SCC
| | | |
| | | |->99:{142}
Weak SCC
| | | |
| | | |->100:{143}
Weak SCC
| | | |
| | | `->101:{144}
Weak SCC
| | |
| | |->96:{84} Weak SCC
| | | |
| | | |->97:{83}
Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | |->98:{141}
Weak SCC
| | | |
| | | |->99:{142}
Weak SCC
| | | |
| | | |->100:{143}
Weak SCC
| | | |
| | | `->101:{144}
Weak SCC
| | |
| | |->92:{137} Weak SCC
| | |
| | |->93:{138} Weak SCC
| | |
| | |->94:{139} Weak SCC
| | |
| | `->95:{140} Weak SCC
| |
| |->97:{83} Weak SCC
| | |
| | |->98:{141} Weak SCC
| | |
| | |->99:{142} Weak SCC
| | |
| | |->100:{143} Weak SCC
| | |
| | `->101:{144} Weak SCC
| |
| `->96:{84} Weak SCC
| |
| |->97:{83} Weak SCC
| | |
| | |->98:{141}
Weak SCC
| | |
| | |->99:{142}
Weak SCC
| | |
| | |->100:{143}
Weak SCC
| | |
| | `->101:{144}
Weak SCC
| |
| |->98:{141} Weak SCC
| |
| |->99:{142} Weak SCC
| |
| |->100:{143} Weak SCC
| |
| `->101:{144} Weak SCC
|
`->40:{65} Weak SCC
|
|->50:{53} Weak SCC
|
|->51:{54} Weak SCC
|
|->52:{55} Weak SCC
|
|->53:{56} Weak SCC
|
|->54:{57} Weak SCC
|
|->55:{59} Weak SCC
|
|->56:{60} Weak SCC
|
|->57:{61} Weak SCC
|
|->58:{63} Weak SCC
|
|->49:{64,62,58} Weak SCC
| |
| |->50:{53} Weak SCC
| |
| |->51:{54} Weak SCC
| |
| |->52:{55} Weak SCC
| |
| |->53:{56} Weak SCC
| |
| |->54:{57} Weak SCC
| |
| |->55:{59} Weak SCC
| |
| |->56:{60} Weak SCC
| |
| |->57:{61} Weak SCC
| |
| `->58:{63} Weak SCC
|
|->41:{66} Weak SCC
|
|->42:{67} Weak SCC
|
`->43:{68} Weak SCC
->29:{17}
|
`->30:{13,14}
|
|->32:{15}
| |
| |->34:{16}
| | |
| | `->83:{1}
| | |
| | |->84:{2,5,4,3}
| | | |
| | | |->85:{89} Weak SCC
| | | |
| | | |->86:{90} Weak SCC
| | | |
| | | `->87:{91} Weak SCC
| | | |
| | | |->88:{79} Weak SCC
| | | | |
| | | | |->89:{80} Weak SCC
| | | | |
| | | | |->90:{81} Weak SCC
| | | | | |
| | | | | |->92:{137}
Weak SCC
| | | | | |
| | | | | |->93:{138}
Weak SCC
| | | | | |
| | | | | |->94:{139}
Weak SCC
| | | | | |
| | | | | `->95:{140}
Weak SCC
| | | | |
| | | | |->91:{82} Weak SCC
| | | | | |
| | | | | |->97:{83}
Weak SCC
| | | | | | |
| | | | | | |->98:{141}
Weak SCC
| | | | | | |
| | | | | | |->99:{142}
Weak SCC
| | | | | | |
| | | | | | |->100:{143}
Weak SCC
| | | | | | |
| | | | | | `->101:{144}
Weak SCC
| | | | | |
| | | | | |->96:{84}
Weak SCC
| | | | | | |
| | | | | | |->97:{83}
Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141}
Weak SCC
| | | | | | |
| | | | | | |->99:{142}
Weak SCC
| | | | | | |
| | | | | | |->100:{143}
Weak SCC
| | | | | | |
| | | | | | `->101:{144}
Weak SCC
| | | | | |
| | | | | |->92:{137}
Weak SCC
| | | | | |
| | | | | |->93:{138}
Weak SCC
| | | | | |
| | | | | |->94:{139}
Weak SCC
| | | | | |
| | | | | `->95:{140}
Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141}
Weak SCC
| | | | | |
| | | | | |->99:{142}
Weak SCC
| | | | | |
| | | | | |->100:{143}
Weak SCC
| | | | | |
| | | | | `->101:{144}
Weak SCC
| | | | |
| | | | `->96:{84} Weak SCC
| | | | |
| | | | |->97:{83}
Weak SCC
| | | | | |
| | | | | |->98:{141}
Weak SCC
| | | | | |
| | | | | |->99:{142}
Weak SCC
| | | | | |
| | | | | |->100:{143}
Weak SCC
| | | | | |
| | | | | `->101:{144}
Weak SCC
| | | | |
| | | | |->98:{141}
Weak SCC
| | | | |
| | | | |->99:{142}
Weak SCC
| | | | |
| | | | |->100:{143}
Weak SCC
| | | | |
| | | | `->101:{144}
Weak SCC
| | | |
| | | `->102:{92} Weak SCC
| | | |
| | | |->105:{27} Weak SCC
| | | | |
| | | | |->107:{28}
Weak SCC
| | | | |
| | | | |->108:{29}
Weak SCC
| | | | |
| | | | |->109:{30}
Weak SCC
| | | | |
| | | | |->110:{31}
Weak SCC
| | | | |
| | | | |->111:{32}
Weak SCC
| | | | |
| | | | |->112:{34}
Weak SCC
| | | | |
| | | | |->113:{35}
Weak SCC
| | | | |
| | | | |->114:{36}
Weak SCC
| | | | |
| | | | |->115:{38}
Weak SCC
| | | | |
| | | | |->116:{41}
Weak SCC
| | | | |
| | | | |->117:{42}
Weak SCC
| | | | |
| | | | |->118:{43}
Weak SCC
| | | | |
| | | | |->119:{44}
Weak SCC
| | | | |
| | | | |->120:{45}
Weak SCC
| | | | |
| | | | |->121:{46}
Weak SCC
| | | | |
| | | | |->122:{47}
Weak SCC
| | | | |
| | | | `->106:{48,40,39,37,33}
Weak SCC
| | | | |
| | | | |->107:{28}
Weak SCC
| | | | |
| | | | |->108:{29}
Weak SCC
| | | | |
| | | | |->109:{30}
Weak SCC
| | | | |
| | | | |->110:{31}
Weak SCC
| | | | |
| | | | |->111:{32}
Weak SCC
| | | | |
| | | | |->112:{34}
Weak SCC
| | | | |
| | | | |->113:{35}
Weak SCC
| | | | |
| | | | |->114:{36}
Weak SCC
| | | | |
| | | | |->115:{38}
Weak SCC
| | | | |
| | | | |->116:{41}
Weak SCC
| | | | |
| | | | |->117:{42}
Weak SCC
| | | | |
| | | | |->118:{43}
Weak SCC
| | | | |
| | | | |->119:{44}
Weak SCC
| | | | |
| | | | |->120:{45}
Weak SCC
| | | | |
| | | | |->121:{46}
Weak SCC
| | | | |
| | | | |->122:{47}
Weak SCC
| | | | |
| | | | |->123:{131}
Weak SCC
| | | | |
| | | | |->124:{132}
Weak SCC
| | | | |
| | | | |->125:{133}
Weak SCC
| | | | |
| | | | `->126:{134}
Weak SCC
| | | |
| | | |->103:{125} Weak SCC
| | | | |
| | | | |->105:{27}
Weak SCC
| | | | | |
| | | | | |->107:{28}
Weak SCC
| | | | | |
| | | | | |->108:{29}
Weak SCC
| | | | | |
| | | | | |->109:{30}
Weak SCC
| | | | | |
| | | | | |->110:{31}
Weak SCC
| | | | | |
| | | | | |->111:{32}
Weak SCC
| | | | | |
| | | | | |->112:{34}
Weak SCC
| | | | | |
| | | | | |->113:{35}
Weak SCC
| | | | | |
| | | | | |->114:{36}
Weak SCC
| | | | | |
| | | | | |->115:{38}
Weak SCC
| | | | | |
| | | | | |->116:{41}
Weak SCC
| | | | | |
| | | | | |->117:{42}
Weak SCC
| | | | | |
| | | | | |->118:{43}
Weak SCC
| | | | | |
| | | | | |->119:{44}
Weak SCC
| | | | | |
| | | | | |->120:{45}
Weak SCC
| | | | | |
| | | | | |->121:{46}
Weak SCC
| | | | | |
| | | | | |->122:{47}
Weak SCC
| | | | | |
| | | | | `->106:{48,40,39,37,33}
Weak SCC
| | | | | |
| | | | | |->107:{28}
Weak SCC
| | | | | |
| | | | | |->108:{29}
Weak SCC
| | | | | |
| | | | | |->109:{30}
Weak SCC
| | | | | |
| | | | | |->110:{31}
Weak SCC
| | | | | |
| | | | | |->111:{32}
Weak SCC
| | | | | |
| | | | | |->112:{34}
Weak SCC
| | | | | |
| | | | | |->113:{35}
Weak SCC
| | | | | |
| | | | | |->114:{36}
Weak SCC
| | | | | |
| | | | | |->115:{38}
Weak SCC
| | | | | |
| | | | | |->116:{41}
Weak SCC
| | | | | |
| | | | | |->117:{42}
Weak SCC
| | | | | |
| | | | | |->118:{43}
Weak SCC
| | | | | |
| | | | | |->119:{44}
Weak SCC
| | | | | |
| | | | | |->120:{45}
Weak SCC
| | | | | |
| | | | | |->121:{46}
Weak SCC
| | | | | |
| | | | | |->122:{47}
Weak SCC
| | | | | |
| | | | | |->123:{131}
Weak SCC
| | | | | |
| | | | | |->124:{132}
Weak SCC
| | | | | |
| | | | | |->125:{133}
Weak SCC
| | | | | |
| | | | | `->126:{134}
Weak SCC
| | | | |
| | | | |->104:{127}
Weak SCC
| | | | | |
| | | | | |->105:{27}
Weak SCC
| | | | | | |
| | | | | | |->107:{28}
Weak SCC
| | | | | | |
| | | | | | |->108:{29}
Weak SCC
| | | | | | |
| | | | | | |->109:{30}
Weak SCC
| | | | | | |
| | | | | | |->110:{31}
Weak SCC
| | | | | | |
| | | | | | |->111:{32}
Weak SCC
| | | | | | |
| | | | | | |->112:{34}
Weak SCC
| | | | | | |
| | | | | | |->113:{35}
Weak SCC
| | | | | | |
| | | | | | |->114:{36}
Weak SCC
| | | | | | |
| | | | | | |->115:{38}
Weak SCC
| | | | | | |
| | | | | | |->116:{41}
Weak SCC
| | | | | | |
| | | | | | |->117:{42}
Weak SCC
| | | | | | |
| | | | | | |->118:{43}
Weak SCC
| | | | | | |
| | | | | | |->119:{44}
Weak SCC
| | | | | | |
| | | | | | |->120:{45}
Weak SCC
| | | | | | |
| | | | | | |->121:{46}
Weak SCC
| | | | | | |
| | | | | | |->122:{47}
Weak SCC
| | | | | | |
| | | | | | `->106:{48,40,39,37,33}
Weak SCC
| | | | | | |
| | | | | | |->107:{28}
Weak SCC
| | | | | | |
| | | | | | |->108:{29}
Weak SCC
| | | | | | |
| | | | | | |->109:{30}
Weak SCC
| | | | | | |
| | | | | | |->110:{31}
Weak SCC
| | | | | | |
| | | | | | |->111:{32}
Weak SCC
| | | | | | |
| | | | | | |->112:{34}
Weak SCC
| | | | | | |
| | | | | | |->113:{35}
Weak SCC
| | | | | | |
| | | | | | |->114:{36}
Weak SCC
| | | | | | |
| | | | | | |->115:{38}
Weak SCC
| | | | | | |
| | | | | | |->116:{41}
Weak SCC
| | | | | | |
| | | | | | |->117:{42}
Weak SCC
| | | | | | |
| | | | | | |->118:{43}
Weak SCC
| | | | | | |
| | | | | | |->119:{44}
Weak SCC
| | | | | | |
| | | | | | |->120:{45}
Weak SCC
| | | | | | |
| | | | | | |->121:{46}
Weak SCC
| | | | | | |
| | | | | | |->122:{47}
Weak SCC
| | | | | | |
| | | | | | |->123:{131}
Weak SCC
| | | | | | |
| | | | | | |->124:{132}
Weak SCC
| | | | | | |
| | | | | | |->125:{133}
Weak SCC
| | | | | | |
| | | | | | `->126:{134}
Weak SCC
| | | | | |
| | | | | |->127:{129}
Weak SCC
| | | | | | |
| | | | | | `->130:{25}
Weak SCC
| | | | | |
| | | | | `->128:{130}
Weak SCC
| | | | | |
| | | | | |->132:{23}
Weak SCC
| | | | | |
| | | | | `->130:{25}
Weak SCC
| | | | |
| | | | `->129:{128}
Weak SCC
| | | | |
| | | | |->132:{23}
Weak SCC
| | | | |
| | | | `->130:{25}
Weak SCC
| | | |
| | | `->131:{126} Weak SCC
| | | |
| | | `->132:{23}
Weak SCC
| | |
| | `->132:{23} Weak SCC
| |
| |->105:{27} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | `->106:{48,40,39,37,33} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | |->123:{131} Weak SCC
| | |
| | |->124:{132} Weak SCC
| | |
| | |->125:{133} Weak SCC
| | |
| | `->126:{134} Weak SCC
| |
| `->33:{118} Weak SCC
|
|->132:{23} Weak SCC
|
`->31:{117} Weak SCC
->3:{18}
|
|->5:{19,22,21,20}
| |
| |->11:{103} Weak SCC
| | |
| | |->40:{65} Weak SCC
| | | |
| | | |->50:{53} Weak SCC
| | | |
| | | |->51:{54} Weak SCC
| | | |
| | | |->52:{55} Weak SCC
| | | |
| | | |->53:{56} Weak SCC
| | | |
| | | |->54:{57} Weak SCC
| | | |
| | | |->55:{59} Weak SCC
| | | |
| | | |->56:{60} Weak SCC
| | | |
| | | |->57:{61} Weak SCC
| | | |
| | | |->58:{63} Weak SCC
| | | |
| | | |->49:{64,62,58} Weak SCC
| | | | |
| | | | |->50:{53} Weak SCC
| | | | |
| | | | |->51:{54} Weak SCC
| | | | |
| | | | |->52:{55} Weak SCC
| | | | |
| | | | |->53:{56} Weak SCC
| | | | |
| | | | |->54:{57} Weak SCC
| | | | |
| | | | |->55:{59} Weak SCC
| | | | |
| | | | |->56:{60} Weak SCC
| | | | |
| | | | |->57:{61} Weak SCC
| | | | |
| | | | `->58:{63} Weak SCC
| | | |
| | | |->41:{66} Weak SCC
| | | |
| | | |->42:{67} Weak SCC
| | | |
| | | `->43:{68} Weak SCC
| | |
| | |->88:{79} Weak SCC
| | | |
| | | |->89:{80} Weak SCC
| | | |
| | | |->90:{81} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->91:{82} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->96:{84} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->62:{85} Weak SCC
| | | |
| | | |->63:{86} Weak SCC
| | | |
| | | |->64:{87} Weak SCC
| | | | |
| | | | |->89:{80} Weak SCC
| | | | |
| | | | |->90:{81} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->91:{82} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141} Weak SCC
| | | | | | | |
| | | | | | | |->99:{142} Weak SCC
| | | | | | | |
| | | | | | | |->100:{143} Weak SCC
| | | | | | | |
| | | | | | | `->101:{144} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->65:{88} Weak SCC
| | | |
| | | |->89:{80} Weak SCC
| | | |
| | | |->90:{81} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->91:{82} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->92:{137} Weak SCC
| | | | |
| | | | |->93:{138} Weak SCC
| | | | |
| | | | |->94:{139} Weak SCC
| | | | |
| | | | `->95:{140} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->96:{84} Weak SCC
| | | |
| | | |->97:{83} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | |->98:{141} Weak SCC
| | | |
| | | |->99:{142} Weak SCC
| | | |
| | | |->100:{143} Weak SCC
| | | |
| | | `->101:{144} Weak SCC
| | |
| | |->12:{104} Weak SCC
| | | |
| | | |->70:{69} Weak SCC
| | | | |
| | | | |->71:{70} Weak SCC
| | | | |
| | | | |->72:{71} Weak SCC
| | | | |
| | | | |->73:{72} Weak SCC
| | | | |
| | | | |->74:{73} Weak SCC
| | | | |
| | | | |->76:{74} Weak SCC
| | | | | |
| | | | | |->81:{135} Weak SCC
| | | | | |
| | | | | `->80:{136} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->81:{135} Weak SCC
| | | | |
| | | | |->77:{75} Weak SCC
| | | | | |
| | | | | |->81:{135} Weak SCC
| | | | | |
| | | | | `->80:{136} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->81:{135} Weak SCC
| | | | |
| | | | |->75:{76} Weak SCC
| | | | |
| | | | |->78:{77} Weak SCC
| | | | | |
| | | | | |->81:{135} Weak SCC
| | | | | |
| | | | | `->80:{136} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->81:{135} Weak SCC
| | | | |
| | | | `->79:{78} Weak SCC
| | | | |
| | | | |->81:{135} Weak SCC
| | | | |
| | | | `->80:{136} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141}
Weak SCC
| | | | | | |
| | | | | | |->99:{142}
Weak SCC
| | | | | | |
| | | | | | |->100:{143}
Weak SCC
| | | | | | |
| | | | | | `->101:{144}
Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->81:{135} Weak SCC
| | | |
| | | |->62:{85} Weak SCC
| | | | |
| | | | |->63:{86} Weak SCC
| | | | |
| | | | |->64:{87} Weak SCC
| | | | | |
| | | | | |->89:{80} Weak SCC
| | | | | |
| | | | | |->90:{81} Weak SCC
| | | | | | |
| | | | | | |->92:{137} Weak SCC
| | | | | | |
| | | | | | |->93:{138} Weak SCC
| | | | | | |
| | | | | | |->94:{139} Weak SCC
| | | | | | |
| | | | | | `->95:{140} Weak SCC
| | | | | |
| | | | | |->91:{82} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141} Weak SCC
| | | | | | | |
| | | | | | | |->99:{142} Weak SCC
| | | | | | | |
| | | | | | | |->100:{143} Weak SCC
| | | | | | | |
| | | | | | | `->101:{144} Weak SCC
| | | | | | |
| | | | | | |->96:{84} Weak SCC
| | | | | | | |
| | | | | | | |->97:{83} Weak SCC
| | | | | | | | |
| | | | | | | | |->98:{141}
Weak SCC
| | | | | | | | |
| | | | | | | | |->99:{142}
Weak SCC
| | | | | | | | |
| | | | | | | | |->100:{143}
Weak SCC
| | | | | | | | |
| | | | | | | | `->101:{144}
Weak SCC
| | | | | | | |
| | | | | | | |->98:{141} Weak SCC
| | | | | | | |
| | | | | | | |->99:{142} Weak SCC
| | | | | | | |
| | | | | | | |->100:{143} Weak SCC
| | | | | | | |
| | | | | | | `->101:{144} Weak SCC
| | | | | | |
| | | | | | |->92:{137} Weak SCC
| | | | | | |
| | | | | | |->93:{138} Weak SCC
| | | | | | |
| | | | | | |->94:{139} Weak SCC
| | | | | | |
| | | | | | `->95:{140} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | `->96:{84} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->65:{88} Weak SCC
| | | | |
| | | | |->89:{80} Weak SCC
| | | | |
| | | | |->90:{81} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->91:{82} Weak SCC
| | | | | |
| | | | | |->97:{83} Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->96:{84} Weak SCC
| | | | | | |
| | | | | | |->97:{83} Weak SCC
| | | | | | | |
| | | | | | | |->98:{141}
Weak SCC
| | | | | | | |
| | | | | | | |->99:{142}
Weak SCC
| | | | | | | |
| | | | | | | |->100:{143}
Weak SCC
| | | | | | | |
| | | | | | | `->101:{144}
Weak SCC
| | | | | | |
| | | | | | |->98:{141} Weak SCC
| | | | | | |
| | | | | | |->99:{142} Weak SCC
| | | | | | |
| | | | | | |->100:{143} Weak SCC
| | | | | | |
| | | | | | `->101:{144} Weak SCC
| | | | | |
| | | | | |->92:{137} Weak SCC
| | | | | |
| | | | | |->93:{138} Weak SCC
| | | | | |
| | | | | |->94:{139} Weak SCC
| | | | | |
| | | | | `->95:{140} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | `->96:{84} Weak SCC
| | | | |
| | | | |->97:{83} Weak SCC
| | | | | |
| | | | | |->98:{141} Weak SCC
| | | | | |
| | | | | |->99:{142} Weak SCC
| | | | | |
| | | | | |->100:{143} Weak SCC
| | | | | |
| | | | | `->101:{144} Weak SCC
| | | | |
| | | | |->98:{141} Weak SCC
| | | | |
| | | | |->99:{142} Weak SCC
| | | | |
| | | | |->100:{143} Weak SCC
| | | | |
| | | | `->101:{144} Weak SCC
| | | |
| | | `->13:{107} Weak SCC
| | | |
| | | |->14:{108} Weak SCC
| | | |
| | | |->15:{109} Weak SCC
| | | |
| | | |->16:{110} Weak SCC
| | | |
| | | |->17:{111} Weak SCC
| | | |
| | | |->19:{112} Weak SCC
| | | | |
| | | | |->23:{145} Weak SCC
| | | | |
| | | | `->24:{146} Weak SCC
| | | | |
| | | | |->26:{147} Weak SCC
| | | | |
| | | | `->25:{148} Weak SCC
| | | | |
| | | | `->26:{147} Weak SCC
| | | |
| | | |->20:{113} Weak SCC
| | | | |
| | | | |->23:{145} Weak SCC
| | | | |
| | | | `->24:{146} Weak SCC
| | | | |
| | | | |->26:{147} Weak SCC
| | | | |
| | | | `->25:{148} Weak SCC
| | | | |
| | | | `->26:{147} Weak SCC
| | | |
| | | |->18:{114} Weak SCC
| | | |
| | | |->21:{115} Weak SCC
| | | | |
| | | | |->23:{145} Weak SCC
| | | | |
| | | | `->24:{146} Weak SCC
| | | | |
| | | | |->26:{147} Weak SCC
| | | | |
| | | | `->25:{148} Weak SCC
| | | | |
| | | | `->26:{147} Weak SCC
| | | |
| | | `->22:{116} Weak SCC
| | | |
| | | |->23:{145} Weak SCC
| | | |
| | | `->24:{146} Weak SCC
| | | |
| | | |->26:{147} Weak SCC
| | | |
| | | `->25:{148} Weak SCC
| | | |
| | | `->26:{147} Weak SCC
| | |
| | |->27:{105} Weak SCC
| | | |
| | | `->132:{23} Weak SCC
| | |
| | `->28:{106} Weak SCC
| | |
| | `->130:{25} Weak SCC
| |
| |->6:{120} Weak SCC
| |
| |->7:{121} Weak SCC
| |
| `->8:{122} Weak SCC
| |
| |->105:{27} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | `->106:{48,40,39,37,33} Weak SCC
| | |
| | |->107:{28} Weak SCC
| | |
| | |->108:{29} Weak SCC
| | |
| | |->109:{30} Weak SCC
| | |
| | |->110:{31} Weak SCC
| | |
| | |->111:{32} Weak SCC
| | |
| | |->112:{34} Weak SCC
| | |
| | |->113:{35} Weak SCC
| | |
| | |->114:{36} Weak SCC
| | |
| | |->115:{38} Weak SCC
| | |
| | |->116:{41} Weak SCC
| | |
| | |->117:{42} Weak SCC
| | |
| | |->118:{43} Weak SCC
| | |
| | |->119:{44} Weak SCC
| | |
| | |->120:{45} Weak SCC
| | |
| | |->121:{46} Weak SCC
| | |
| | |->122:{47} Weak SCC
| | |
| | |->123:{131} Weak SCC
| | |
| | |->124:{132} Weak SCC
| | |
| | |->125:{133} Weak SCC
| | |
| | `->126:{134} Weak SCC
| |
| |->9:{123} Weak SCC
| |
| `->10:{124} Weak SCC
| |
| `->132:{23} Weak SCC
|
|->132:{23} Weak SCC
|
`->4:{119} Weak SCC
->2:{24} Weak SCC
->1:{26} Weak SCC
Here dependency-pairs are as follows:
Strict DPs:
{ 1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, 7: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 8: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, 9: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 10: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 11: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, 12: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, 13: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 14: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, 15: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, 16: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 17: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, 18: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, 19: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 20: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, 21: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, 22: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak DPs:
{ 23: #abs^#(#0()) -> c_1()
, 24: #abs^#(#neg(@x)) -> c_2()
, 25: #abs^#(#pos(@x)) -> c_3()
, 26: #abs^#(#s(@x)) -> c_4()
, 27: #equal^#(@x, @y) -> #eq^#(@x, @y)
, 28: #eq^#(#0(), #0()) -> c_66()
, 29: #eq^#(#0(), #neg(@y)) -> c_67()
, 30: #eq^#(#0(), #pos(@y)) -> c_68()
, 31: #eq^#(#0(), #s(@y)) -> c_69()
, 32: #eq^#(#neg(@x), #0()) -> c_70()
, 33: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, 34: #eq^#(#neg(@x), #pos(@y)) -> c_72()
, 35: #eq^#(#pos(@x), #0()) -> c_73()
, 36: #eq^#(#pos(@x), #neg(@y)) -> c_74()
, 37: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, 38: #eq^#(#s(@x), #0()) -> c_76()
, 39: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, 40: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 41: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, 42: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, 43: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, 44: #eq^#(nil(), nil()) -> c_82()
, 45: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, 46: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, 47: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, 48: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 49: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 50: #ckgt^#(#EQ()) -> c_99()
, 51: #ckgt^#(#GT()) -> c_100()
, 52: #ckgt^#(#LT()) -> c_101()
, 53: #compare^#(#0(), #0()) -> c_87()
, 54: #compare^#(#0(), #neg(@y)) -> c_88()
, 55: #compare^#(#0(), #pos(@y)) -> c_89()
, 56: #compare^#(#0(), #s(@y)) -> c_90()
, 57: #compare^#(#neg(@x), #0()) -> c_91()
, 58: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, 59: #compare^#(#neg(@x), #pos(@y)) -> c_93()
, 60: #compare^#(#pos(@x), #0()) -> c_94()
, 61: #compare^#(#pos(@x), #neg(@y)) -> c_95()
, 62: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, 63: #compare^#(#s(@x), #0()) -> c_97()
, 64: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, 65: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 66: #cklt^#(#EQ()) -> c_102()
, 67: #cklt^#(#GT()) -> c_103()
, 68: #cklt^#(#LT()) -> c_104()
, 69: *^#(@x, @y) -> #mult^#(@x, @y)
, 70: #mult^#(#0(), #0()) -> c_105()
, 71: #mult^#(#0(), #neg(@y)) -> c_106()
, 72: #mult^#(#0(), #pos(@y)) -> c_107()
, 73: #mult^#(#neg(@x), #0()) -> c_108()
, 74: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 75: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 76: #mult^#(#pos(@x), #0()) -> c_111()
, 77: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 78: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 79: +^#(@x, @y) -> #add^#(@x, @y)
, 80: #add^#(#0(), @y) -> c_114()
, 81: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, 82: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 83: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, 84: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 85: -^#(@x, @y) -> #sub^#(@x, @y)
, 86: #sub^#(@x, #0()) -> c_119()
, 87: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, 88: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, 89: add'#1^#(nil(), @b2, @r) -> c_14()
, 90: add'#2^#(nil(), @r, @x, @xs) -> c_16()
, 91: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, 92: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, 93: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, 94: compare#1^#(nil(), @b2) -> #abs^#(#0())
, 95: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, 96: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, 97: compare#4^#(#false(), @r, @x, @y) -> c_29()
, 98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, 99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, 100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, 101: compare#6^#(#false()) -> #abs^#(#0())
, 102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, 103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, 104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, 105: diff#1^#(#false()) -> #abs^#(#0())
, 106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, 107: div^#(@x, @y) -> #div^#(@x, @y)
, 108: #div^#(#0(), #0()) -> c_122()
, 109: #div^#(#0(), #neg(@y)) -> c_123()
, 110: #div^#(#0(), #pos(@y)) -> c_124()
, 111: #div^#(#neg(@x), #0()) -> c_125()
, 112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 114: #div^#(#pos(@x), #0()) -> c_128()
, 115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 117: mult#1^#(nil(), @b2) -> c_43()
, 118: mult#3^#(#false(), @b2, @zs) -> c_45()
, 119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, 120: sub'#1^#(nil(), @b2, @r) -> c_52()
, 121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, 122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, 123: sub'#5^#(#false(), @z, @zs) -> c_57()
, 124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, 125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, 126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, 127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, 128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, 129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, 130: sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, 131: #and^#(#false(), #false()) -> c_139()
, 132: #and^#(#false(), #true()) -> c_140()
, 133: #and^#(#true(), #false()) -> c_141()
, 134: #and^#(#true(), #true()) -> c_142()
, 135: #natmult^#(#0(), @y) -> c_145()
, 136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, 137: #pred^#(#0()) -> c_131()
, 138: #pred^#(#neg(#s(@x))) -> c_132()
, 139: #pred^#(#pos(#s(#0()))) -> c_133()
, 140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
, 141: #succ^#(#0()) -> c_135()
, 142: #succ^#(#neg(#s(#0()))) -> c_136()
, 143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
, 144: #succ^#(#pos(#s(@x))) -> c_138()
, 145: #natdiv^#(#0(), #0()) -> c_143()
, 146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, 147: #natsub^#(@x, #0()) -> c_147()
, 148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 26: #abs^#(#s(@x)) -> c_4()
, 24: #abs^#(#neg(@x)) -> c_2()
, 119: sub#1^#(tuple#2(@b, @_@1)) -> c_50()
, 120: sub'#1^#(nil(), @b2, @r) -> c_52()
, 121: sub'#2^#(nil(), @r, @x, @xs) -> c_54()
, 122: sub'#4^#(tuple#2(@zs, @s), @z) ->
c_56(sub'#5^#(#equal(@s, #pos(#s(#0()))), @z, @zs),
#equal^#(@s, #pos(#s(#0()))))
, 123: sub'#5^#(#false(), @z, @zs) -> c_57()
, 124: sub'#5^#(#true(), @z, @zs) -> #abs^#(#0())
, 103: diff^#(@x, @y, @r) ->
c_35(mod^#(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
+^#(+(@x, @y), @r),
+^#(@x, @y),
diff#1^#(#less(-(-(@x, @y), @r), #0())),
#less^#(-(-(@x, @y), @r), #0()),
-^#(-(@x, @y), @r),
-^#(@x, @y))
, 104: mod^#(@x, @y) ->
c_36(-^#(@x, *(@x, div(@x, @y))),
*^#(@x, div(@x, @y)),
div^#(@x, @y))
, 107: div^#(@x, @y) -> #div^#(@x, @y)
, 108: #div^#(#0(), #0()) -> c_122()
, 109: #div^#(#0(), #neg(@y)) -> c_123()
, 110: #div^#(#0(), #pos(@y)) -> c_124()
, 111: #div^#(#neg(@x), #0()) -> c_125()
, 114: #div^#(#pos(@x), #0()) -> c_128()
, 112: #div^#(#neg(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 113: #div^#(#neg(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 115: #div^#(#pos(@x), #neg(@y)) -> #natdiv^#(@x, @y)
, 116: #div^#(#pos(@x), #pos(@y)) -> #natdiv^#(@x, @y)
, 145: #natdiv^#(#0(), #0()) -> c_143()
, 146: #natdiv^#(#s(@x), #s(@y)) ->
c_144(#natdiv^#(#natsub(@x, @y), #s(@y)), #natsub^#(@x, @y))
, 148: #natsub^#(#s(@x), #s(@y)) -> #natsub^#(@x, @y)
, 147: #natsub^#(@x, #0()) -> c_147()
, 105: diff#1^#(#false()) -> #abs^#(#0())
, 106: diff#1^#(#true()) -> #abs^#(#pos(#s(#0())))
, 117: mult#1^#(nil(), @b2) -> c_43()
, 118: mult#3^#(#false(), @b2, @zs) -> c_45()
, 96: compare#3^#(@r, @x, @y) ->
c_28(compare#4^#(#equal(@r, #0()), @r, @x, @y), #equal^#(@r, #0()))
, 97: compare#4^#(#false(), @r, @x, @y) -> c_29()
, 98: compare#4^#(#true(), @r, @x, @y) ->
c_30(compare#5^#(#less(@x, @y), @x, @y), #less^#(@x, @y))
, 65: #less^#(@x, @y) ->
c_7(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 66: #cklt^#(#EQ()) -> c_102()
, 67: #cklt^#(#GT()) -> c_103()
, 68: #cklt^#(#LT()) -> c_104()
, 99: compare#5^#(#false(), @x, @y) ->
c_31(compare#6^#(#greater(@x, @y)), #greater^#(@x, @y))
, 49: #greater^#(@x, @y) ->
c_6(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y))
, 50: #ckgt^#(#EQ()) -> c_99()
, 51: #ckgt^#(#GT()) -> c_100()
, 52: #ckgt^#(#LT()) -> c_101()
, 64: #compare^#(#s(@x), #s(@y)) -> #compare^#(@x, @y)
, 62: #compare^#(#pos(@x), #pos(@y)) -> #compare^#(@x, @y)
, 58: #compare^#(#neg(@x), #neg(@y)) -> #compare^#(@y, @x)
, 53: #compare^#(#0(), #0()) -> c_87()
, 54: #compare^#(#0(), #neg(@y)) -> c_88()
, 55: #compare^#(#0(), #pos(@y)) -> c_89()
, 56: #compare^#(#0(), #s(@y)) -> c_90()
, 57: #compare^#(#neg(@x), #0()) -> c_91()
, 59: #compare^#(#neg(@x), #pos(@y)) -> c_93()
, 60: #compare^#(#pos(@x), #0()) -> c_94()
, 61: #compare^#(#pos(@x), #neg(@y)) -> c_95()
, 63: #compare^#(#s(@x), #0()) -> c_97()
, 101: compare#6^#(#false()) -> #abs^#(#0())
, 102: compare#6^#(#true()) -> #abs^#(#pos(#s(#0())))
, 100: compare#5^#(#true(), @x, @y) -> -^#(#0(), #pos(#s(#0())))
, 85: -^#(@x, @y) -> #sub^#(@x, @y)
, 86: #sub^#(@x, #0()) -> c_119()
, 87: #sub^#(@x, #neg(@y)) -> #add^#(@x, #pos(@y))
, 88: #sub^#(@x, #pos(@y)) -> #add^#(@x, #neg(@y))
, 95: compare#2^#(nil(), @x, @xs) -> #abs^#(#0())
, 94: compare#1^#(nil(), @b2) -> #abs^#(#0())
, 69: *^#(@x, @y) -> #mult^#(@x, @y)
, 70: #mult^#(#0(), #0()) -> c_105()
, 71: #mult^#(#0(), #neg(@y)) -> c_106()
, 72: #mult^#(#0(), #pos(@y)) -> c_107()
, 73: #mult^#(#neg(@x), #0()) -> c_108()
, 76: #mult^#(#pos(@x), #0()) -> c_111()
, 74: #mult^#(#neg(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 75: #mult^#(#neg(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 77: #mult^#(#pos(@x), #neg(@y)) -> #natmult^#(@x, @y)
, 78: #mult^#(#pos(@x), #pos(@y)) -> #natmult^#(@x, @y)
, 136: #natmult^#(#s(@x), @y) ->
c_146(#add^#(#pos(@y), #natmult(@x, @y)), #natmult^#(@x, @y))
, 135: #natmult^#(#0(), @y) -> c_145()
, 93: bitToInt'#1^#(nil(), @n) -> #abs^#(#0())
, 89: add'#1^#(nil(), @b2, @r) -> c_14()
, 90: add'#2^#(nil(), @r, @x, @xs) -> c_16()
, 91: sum^#(@x, @y, @r) ->
c_17(sum#1^#(+(+(@x, @y), @r)), +^#(+(@x, @y), @r), +^#(@x, @y))
, 79: +^#(@x, @y) -> #add^#(@x, @y)
, 80: #add^#(#0(), @y) -> c_114()
, 81: #add^#(#neg(#s(#0())), @y) -> #pred^#(@y)
, 82: #add^#(#neg(#s(#s(@x))), @y) ->
c_116(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 137: #pred^#(#0()) -> c_131()
, 138: #pred^#(#neg(#s(@x))) -> c_132()
, 139: #pred^#(#pos(#s(#0()))) -> c_133()
, 140: #pred^#(#pos(#s(#s(@x)))) -> c_134()
, 84: #add^#(#pos(#s(#s(@x))), @y) ->
c_118(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y))
, 83: #add^#(#pos(#s(#0())), @y) -> #succ^#(@y)
, 141: #succ^#(#0()) -> c_135()
, 142: #succ^#(#neg(#s(#0()))) -> c_136()
, 143: #succ^#(#neg(#s(#s(@x)))) -> c_137()
, 144: #succ^#(#pos(#s(@x))) -> c_138()
, 92: sum#1^#(@s) ->
c_59(sum#2^#(#equal(@s, #0()), @s), #equal^#(@s, #0()))
, 125: sum#2^#(#false(), @s) ->
c_60(sum#3^#(#equal(@s, #pos(#s(#0()))), @s),
#equal^#(@s, #pos(#s(#0()))))
, 127: sum#3^#(#false(), @s) ->
c_62(sum#4^#(#equal(@s, #pos(#s(#s(#0()))))),
#equal^#(@s, #pos(#s(#s(#0())))))
, 27: #equal^#(@x, @y) -> #eq^#(@x, @y)
, 48: #eq^#(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
c_86(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 40: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
c_78(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)),
#eq^#(@x_1, @y_1),
#eq^#(@x_2, @y_2))
, 39: #eq^#(#s(@x), #s(@y)) -> #eq^#(@x, @y)
, 37: #eq^#(#pos(@x), #pos(@y)) -> #eq^#(@x, @y)
, 33: #eq^#(#neg(@x), #neg(@y)) -> #eq^#(@x, @y)
, 28: #eq^#(#0(), #0()) -> c_66()
, 29: #eq^#(#0(), #neg(@y)) -> c_67()
, 30: #eq^#(#0(), #pos(@y)) -> c_68()
, 31: #eq^#(#0(), #s(@y)) -> c_69()
, 32: #eq^#(#neg(@x), #0()) -> c_70()
, 34: #eq^#(#neg(@x), #pos(@y)) -> c_72()
, 35: #eq^#(#pos(@x), #0()) -> c_73()
, 36: #eq^#(#pos(@x), #neg(@y)) -> c_74()
, 38: #eq^#(#s(@x), #0()) -> c_76()
, 41: #eq^#(::(@x_1, @x_2), nil()) -> c_79()
, 42: #eq^#(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> c_80()
, 43: #eq^#(nil(), ::(@y_1, @y_2)) -> c_81()
, 44: #eq^#(nil(), nil()) -> c_82()
, 45: #eq^#(nil(), tuple#2(@y_1, @y_2)) -> c_83()
, 46: #eq^#(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> c_84()
, 47: #eq^#(tuple#2(@x_1, @x_2), nil()) -> c_85()
, 131: #and^#(#false(), #false()) -> c_139()
, 132: #and^#(#false(), #true()) -> c_140()
, 133: #and^#(#true(), #false()) -> c_141()
, 134: #and^#(#true(), #true()) -> c_142()
, 129: sum#4^#(#false()) ->
c_64(#abs^#(#pos(#s(#0()))), #abs^#(#pos(#s(#0()))))
, 130: sum#4^#(#true()) ->
c_65(#abs^#(#0()), #abs^#(#pos(#s(#0()))))
, 128: sum#3^#(#true(), @s) ->
c_63(#abs^#(#pos(#s(#0()))), #abs^#(#0()))
, 25: #abs^#(#pos(@x)) -> c_3()
, 126: sum#2^#(#true(), @s) -> c_61(#abs^#(#0()), #abs^#(#0()))
, 23: #abs^#(#0()) -> c_1() }
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We consider the following dependency-graph
1: add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r)) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :7
7: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0()))))) :8
8: bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
-->_3 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :7
9: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) ->
compare#2^#(@b2, @x, @xs) :10
10: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y),
compare^#(@xs, @ys)) :11
11: compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :9
12: leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
-->_2 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :9
13: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2)) :14
14: mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0())))) :15
-->_3 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :13
15: mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :16
16: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0())) :1
17: mult3^#(@b1, @b2, @b3) ->
c_47(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :13
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :13
18: sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :19
19: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :20
20: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r)) :21
21: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) :22
22: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r'))
-->_2 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :19
Due to missing edges in the dependency-graph, the right-hand sides
of following rules could be simplified:
{ add^#(@b1, @b2) ->
c_11(add'^#(@b1, @b2, #abs(#0())), #abs^#(#0()))
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_15(add'#3^#(sum(@x, @y, @r), @xs, @ys), sum^#(@x, @y, @r))
, bitToInt^#(@b) ->
c_19(bitToInt'^#(@b, #abs(#pos(#s(#0())))), #abs^#(#pos(#s(#0()))))
, bitToInt'#1^#(::(@x, @xs), @n) ->
c_21(+^#(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0())))))),
*^#(@x, @n),
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))),
*^#(@n, #pos(#s(#s(#0())))))
, compare#2^#(::(@y, @ys), @x, @xs) ->
c_26(compare#3^#(compare(@xs, @ys), @x, @y), compare^#(@xs, @ys))
, leq^#(@b1, @b2) ->
c_40(#less^#(compare(@b1, @b2), #pos(#s(#0()))),
compare^#(@b1, @b2))
, mult#1^#(::(@x, @xs), @b2) ->
c_42(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
#abs^#(#0()),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
c_44(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs),
#equal^#(@x, #pos(#s(#0()))))
, sub^#(@b1, @b2) ->
c_48(sub#1^#(sub'(@b1, @b2, #abs(#0()))),
sub'^#(@b1, @b2, #abs(#0())),
#abs^#(#0()))
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
c_53(sub'#3^#(diff(@x, @y, @r), @xs, @ys), diff^#(@x, @y, @r))
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
c_55(sub'#4^#(sub'(@xs, @ys, @r'), @z), sub'^#(@xs, @ys, @r')) }
We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
, compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^2))
We employ 'linear path analysis' using the following approximated
dependency graph:
->9:{6} [ ? ]
|
`->10:{7,8} [ YES(O(1),O(n^1)) ]
->7:{12} [ ? ]
|
`->8:{9,11,10} [ YES(O(1),O(n^1)) ]
->3:{17} [ ? ]
|
`->4:{13,14} [ ? ]
|
`->5:{15} [ ? ]
|
`->6:{16} [ ? ]
|
`->11:{1} [ ? ]
|
`->12:{2,5,4,3} [ YES(O(1),O(n^2)) ]
->1:{18} [ ? ]
|
`->2:{19,22,21,20} [ YES(O(1),O(n^1)) ]
Here dependency-pairs are as follows:
Strict DPs:
{ 1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 7: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 8: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
, 9: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 10: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 11: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 12: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
, 13: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 14: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, 15: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, 16: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 17: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, 18: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 19: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 20: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, 21: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, 22: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') }
* Path 9:{6}->10:{7,8}: YES(O(1),O(n^1))
--------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) :3
3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) }
Weak DPs:
{ bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) :3
3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {1} and add Pre({1}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) }
Weak DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We replace strict/weak-rules by the corresponding usable rules:
Weak Usable Rules:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) }
Weak DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
to orient following rules strictly.
DPs:
{ 3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Sub-proof:
----------
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(#0) = {}, safe(#abs) = {1}, safe(#neg) = {1},
safe(#pos) = {1}, safe(#s) = {1}, safe(*) = {}, safe(#mult) = {},
safe(#add) = {2}, safe(::) = {1, 2}, safe(nil) = {},
safe(tuple#2) = {1, 2}, safe(#false) = {}, safe(#true) = {},
safe(#pred) = {}, safe(#succ) = {}, safe(#EQ) = {}, safe(#GT) = {},
safe(#LT) = {}, safe(#divByZero) = {}, safe(#natmult) = {1, 2},
safe(#abs^#) = {}, safe(#equal^#) = {}, safe(#eq^#) = {},
safe(#greater^#) = {}, safe(#ckgt^#) = {}, safe(#compare^#) = {},
safe(#less^#) = {}, safe(#cklt^#) = {}, safe(*^#) = {},
safe(#mult^#) = {}, safe(+^#) = {}, safe(#add^#) = {},
safe(-^#) = {}, safe(#sub^#) = {}, safe(add^#) = {},
safe(add'^#) = {}, safe(add'#1^#) = {}, safe(add'#2^#) = {},
safe(add'#3^#) = {}, safe(sum^#) = {}, safe(sum#1^#) = {},
safe(bitToInt^#) = {1}, safe(bitToInt'^#) = {},
safe(bitToInt'#1^#) = {}, safe(compare^#) = {},
safe(compare#1^#) = {}, safe(compare#2^#) = {},
safe(compare#3^#) = {}, safe(compare#4^#) = {},
safe(compare#5^#) = {}, safe(compare#6^#) = {}, safe(diff^#) = {},
safe(mod^#) = {}, safe(diff#1^#) = {}, safe(div^#) = {},
safe(#div^#) = {}, safe(leq^#) = {}, safe(mult^#) = {},
safe(mult#1^#) = {}, safe(mult#2^#) = {}, safe(mult#3^#) = {},
safe(mult3^#) = {}, safe(sub^#) = {}, safe(sub#1^#) = {},
safe(sub'^#) = {}, safe(sub'#1^#) = {}, safe(sub'#2^#) = {},
safe(sub'#3^#) = {}, safe(sub'#4^#) = {}, safe(sub'#5^#) = {},
safe(sum#2^#) = {}, safe(sum#3^#) = {}, safe(sum#4^#) = {},
safe(#and^#) = {}, safe(#natmult^#) = {}, safe(#pred^#) = {},
safe(#succ^#) = {}, safe(#natdiv^#) = {}, safe(#natsub^#) = {}
and precedence
empty .
Following symbols are considered recursive:
{}
The recursion depth is 0.
Further, following argument filtering is employed:
pi(#0) = [], pi(#abs) = [1], pi(#neg) = [], pi(#pos) = [],
pi(#s) = 1, pi(*) = [], pi(#mult) = 2, pi(#add) = 2, pi(::) = [2],
pi(nil) = [], pi(tuple#2) = [], pi(#false) = [], pi(#true) = [],
pi(#pred) = [], pi(#succ) = [], pi(#EQ) = [], pi(#GT) = [],
pi(#LT) = [], pi(#divByZero) = [], pi(#natmult) = [1, 2],
pi(#abs^#) = [], pi(#equal^#) = [], pi(#eq^#) = [],
pi(#greater^#) = [], pi(#ckgt^#) = [], pi(#compare^#) = [],
pi(#less^#) = [], pi(#cklt^#) = [], pi(*^#) = [], pi(#mult^#) = [],
pi(+^#) = [], pi(#add^#) = [], pi(-^#) = [], pi(#sub^#) = [],
pi(add^#) = [], pi(add'^#) = [], pi(add'#1^#) = [],
pi(add'#2^#) = [], pi(add'#3^#) = [], pi(sum^#) = [],
pi(sum#1^#) = [], pi(bitToInt^#) = 1, pi(bitToInt'^#) = 1,
pi(bitToInt'#1^#) = 1, pi(compare^#) = [], pi(compare#1^#) = [],
pi(compare#2^#) = [], pi(compare#3^#) = [], pi(compare#4^#) = [],
pi(compare#5^#) = [], pi(compare#6^#) = [], pi(diff^#) = [],
pi(mod^#) = [], pi(diff#1^#) = [], pi(div^#) = [], pi(#div^#) = [],
pi(leq^#) = [], pi(mult^#) = [], pi(mult#1^#) = [],
pi(mult#2^#) = [], pi(mult#3^#) = [], pi(mult3^#) = [],
pi(sub^#) = [], pi(sub#1^#) = [], pi(sub'^#) = [],
pi(sub'#1^#) = [], pi(sub'#2^#) = [], pi(sub'#3^#) = [],
pi(sub'#4^#) = [], pi(sub'#5^#) = [], pi(sum#2^#) = [],
pi(sum#3^#) = [], pi(sum#4^#) = [], pi(#and^#) = [],
pi(#natmult^#) = [], pi(#pred^#) = [], pi(#succ^#) = [],
pi(#natdiv^#) = [], pi(#natsub^#) = []
Usable defined function symbols are a subset of:
{}
For your convenience, here are the satisfied ordering constraints:
pi(bitToInt^#(@b)) = @b
>= @b
= pi(bitToInt'^#(@b, #abs(#pos(#s(#0())))))
pi(bitToInt'^#(@b, @n)) = @b
>= @b
= pi(bitToInt'#1^#(@b, @n))
pi(bitToInt'#1^#(::(@x, @xs), @n)) = ::(; @xs)
> @xs
= pi(bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))))
Processor 'Small Polynomial Path Order (PS,1-bounded)' induces the
complexity certificate YES(?,O(n^1)) on application of rules {3}.
Here rules are labeled according to the (estimated) dependency
graph
1: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
-->_1 bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) :3
2: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :1
3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0())))))
-->_1 bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n) :1
- The rules {3} have known complexity. These cover all predecessors
of {2}, their complexity is equally bounded.
- The rules {2,3} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules {1,2,3}
is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{1} Weak SCC
|
`->2:{2,3} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 1: bitToInt^#(@b) -> bitToInt'^#(@b, #abs(#pos(#s(#0()))))
, 2: bitToInt'^#(@b, @n) -> bitToInt'#1^#(@b, @n)
, 3: bitToInt'#1^#(::(@x, @xs), @n) ->
bitToInt'^#(@xs, *(@n, #pos(#s(#s(#0()))))) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y)) }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
* Path 7:{12}->8:{9,11,10}: YES(O(1),O(n^1))
------------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :2
2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :3
3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
4: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak DPs:
{ compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :2
2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :4
3: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
4: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {2} and add Pre({2}) = {1} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak DPs:
{ compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :3
2: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
3: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :4
4: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {2} and add Pre({2}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) }
Weak DPs:
{ compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
No rule is usable.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) }
Weak DPs:
{ compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
to orient following rules strictly.
DPs:
{ 3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 4: leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
Sub-proof:
----------
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(#0) = {}, safe(#neg) = {1}, safe(#pos) = {1}, safe(#s) = {1},
safe(::) = {1, 2}, safe(nil) = {}, safe(tuple#2) = {1, 2},
safe(#false) = {}, safe(#true) = {}, safe(#EQ) = {},
safe(#GT) = {}, safe(#LT) = {}, safe(#divByZero) = {},
safe(#abs^#) = {}, safe(#equal^#) = {}, safe(#eq^#) = {},
safe(#greater^#) = {}, safe(#ckgt^#) = {}, safe(#compare^#) = {},
safe(#less^#) = {}, safe(#cklt^#) = {}, safe(*^#) = {},
safe(#mult^#) = {}, safe(+^#) = {}, safe(#add^#) = {},
safe(-^#) = {}, safe(#sub^#) = {}, safe(add^#) = {},
safe(add'^#) = {}, safe(add'#1^#) = {}, safe(add'#2^#) = {},
safe(add'#3^#) = {}, safe(sum^#) = {}, safe(sum#1^#) = {},
safe(bitToInt^#) = {}, safe(bitToInt'^#) = {},
safe(bitToInt'#1^#) = {}, safe(compare^#) = {2},
safe(compare#1^#) = {1, 2}, safe(compare#2^#) = {1, 2, 3},
safe(compare#3^#) = {}, safe(compare#4^#) = {},
safe(compare#5^#) = {}, safe(compare#6^#) = {}, safe(diff^#) = {},
safe(mod^#) = {}, safe(diff#1^#) = {}, safe(div^#) = {},
safe(#div^#) = {}, safe(leq^#) = {2}, safe(mult^#) = {},
safe(mult#1^#) = {}, safe(mult#2^#) = {}, safe(mult#3^#) = {},
safe(mult3^#) = {}, safe(sub^#) = {}, safe(sub#1^#) = {},
safe(sub'^#) = {}, safe(sub'#1^#) = {}, safe(sub'#2^#) = {},
safe(sub'#3^#) = {}, safe(sub'#4^#) = {}, safe(sub'#5^#) = {},
safe(sum#2^#) = {}, safe(sum#3^#) = {}, safe(sum#4^#) = {},
safe(#and^#) = {}, safe(#natmult^#) = {}, safe(#pred^#) = {},
safe(#succ^#) = {}, safe(#natdiv^#) = {}, safe(#natsub^#) = {}
and precedence
empty .
Following symbols are considered recursive:
{}
The recursion depth is 0.
Further, following argument filtering is employed:
pi(#0) = [], pi(#neg) = [], pi(#pos) = [], pi(#s) = [],
pi(::) = [2], pi(nil) = [], pi(tuple#2) = [], pi(#false) = [],
pi(#true) = [], pi(#EQ) = [], pi(#GT) = [], pi(#LT) = [],
pi(#divByZero) = [], pi(#abs^#) = [], pi(#equal^#) = [],
pi(#eq^#) = [], pi(#greater^#) = [], pi(#ckgt^#) = [],
pi(#compare^#) = [], pi(#less^#) = [], pi(#cklt^#) = [],
pi(*^#) = [], pi(#mult^#) = [], pi(+^#) = [], pi(#add^#) = [],
pi(-^#) = [], pi(#sub^#) = [], pi(add^#) = [], pi(add'^#) = [],
pi(add'#1^#) = [], pi(add'#2^#) = [], pi(add'#3^#) = [],
pi(sum^#) = [], pi(sum#1^#) = [], pi(bitToInt^#) = [],
pi(bitToInt'^#) = [], pi(bitToInt'#1^#) = [], pi(compare^#) = 2,
pi(compare#1^#) = 2, pi(compare#2^#) = 1, pi(compare#3^#) = [],
pi(compare#4^#) = [], pi(compare#5^#) = [], pi(compare#6^#) = [],
pi(diff^#) = [], pi(mod^#) = [], pi(diff#1^#) = [], pi(div^#) = [],
pi(#div^#) = [], pi(leq^#) = [1, 2], pi(mult^#) = [],
pi(mult#1^#) = [], pi(mult#2^#) = [], pi(mult#3^#) = [],
pi(mult3^#) = [], pi(sub^#) = [], pi(sub#1^#) = [],
pi(sub'^#) = [], pi(sub'#1^#) = [], pi(sub'#2^#) = [],
pi(sub'#3^#) = [], pi(sub'#4^#) = [], pi(sub'#5^#) = [],
pi(sum#2^#) = [], pi(sum#3^#) = [], pi(sum#4^#) = [],
pi(#and^#) = [], pi(#natmult^#) = [], pi(#pred^#) = [],
pi(#succ^#) = [], pi(#natdiv^#) = [], pi(#natsub^#) = []
Usable defined function symbols are a subset of:
{}
For your convenience, here are the satisfied ordering constraints:
pi(compare^#(@b1, @b2)) = @b2
>= @b2
= pi(compare#1^#(@b1, @b2))
pi(compare#1^#(::(@x, @xs), @b2)) = @b2
>= @b2
= pi(compare#2^#(@b2, @x, @xs))
pi(compare#2^#(::(@y, @ys), @x, @xs)) = ::(; @ys)
> @ys
= pi(compare^#(@xs, @ys))
pi(leq^#(@b1, @b2)) = leq^#(@b1; @b2)
> @b2
= pi(compare^#(@b1, @b2))
Processor 'Small Polynomial Path Order (PS,1-bounded)' induces the
complexity certificate YES(?,O(n^1)) on application of rules {3,4}.
Here rules are labeled according to the (estimated) dependency
graph
1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
-->_1 compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) :2
2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
-->_1 compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys) :3
3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
4: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
-->_1 compare^#(@b1, @b2) -> compare#1^#(@b1, @b2) :1
- The rules {3,4} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
- The rules {1,3,4} have known complexity. These cover all
predecessors of {2}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules
{1,2,3,4} is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{4} Weak SCC
|
`->2:{1,3,2} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs)
, 3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 4: leq^#(@b1, @b2) -> compare^#(@b1, @b2) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 4: leq^#(@b1, @b2) -> compare^#(@b1, @b2)
, 1: compare^#(@b1, @b2) -> compare#1^#(@b1, @b2)
, 3: compare#2^#(::(@y, @ys), @x, @xs) -> compare^#(@xs, @ys)
, 2: compare#1^#(::(@x, @xs), @b2) -> compare#2^#(@b2, @x, @xs) }
We apply the transformation 'usablerules' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
* Path 3:{17}->4:{13,14}->5:{15}->6:{16}->11:{1}->12:{2,5,4,3}: YES(O(1),O(n^2))
------------------------------------------------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :7
7: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :8
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
8: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :9
9: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
10: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {5} and add Pre({5}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
5: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :6
6: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :7
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :5
7: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :8
8: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
9: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :5
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :5
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {4} and add Pre({4}) = {3} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :9
4: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :5
5: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :6
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :4
6: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :7
7: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
8: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :4
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :4
9: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :8
3: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :4
4: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :5
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :3
5: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :6
6: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :1
7: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :3
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :3
8: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :9
9: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {1} and add Pre({1}) = {6} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :8
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :3
3: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :4
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :5
5: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :7
6: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
7: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
8: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :9
9: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :10
10: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {5} and add Pre({5}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :7
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :3
3: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :4
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
5: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
6: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
7: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :8
8: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :9
9: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :6
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {4} and add Pre({4}) = {3} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :6
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :3
3: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :9
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
5: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
6: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :7
7: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :8
8: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :5
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We consider the (estimated) dependency graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :5
2: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :8
3: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
4: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
5: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :6
6: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :7
7: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
8: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :9
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :2
9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :4
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We replace strict/weak-rules by the corresponding usable rules:
Weak Usable Rules:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We measure the number of applications of following selected rules
relative to the remaining rules.
Selected Rules (A):
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) }
Remaining Rules (B):
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
The length of a single A-subderivation is expressed by the
following problem.
Problem (A):
------------
Strict DPs: { add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
The number of B-applications is expressed by the following problem.
Problem (B):
------------
Strict DPs:
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) }
Weak DPs:
{ mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
TcT answers on problem (B) YES(O(1),O(n^1)).
Sub-proof:
----------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) }
Weak DPs:
{ mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :2
2: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
3: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {2} and add Pre({2}) = {1} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
, mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the following dependency-graph
1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) :2
2: mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
3: mult3^#(@b1, @b2, @b3) ->
c_2(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
Due to missing edges in the dependency-graph, the right-hand sides
of following rules could be simplified:
{ mult#1^#(::(@x, @xs), @b2) ->
c_1(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x),
mult^#(@xs, @b2)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) }
Weak DPs:
{ mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
DPs:
{ 2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) }
Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x)) }
Sub-proof:
----------
The following argument positions are usable:
Uargs(#abs) = {}, Uargs(#neg) = {}, Uargs(#pos) = {},
Uargs(#s) = {}, Uargs(#equal) = {}, Uargs(#eq) = {}, Uargs(+) = {},
Uargs(#add) = {}, Uargs(add) = {}, Uargs(add') = {},
Uargs(add'#1) = {}, Uargs(::) = {}, Uargs(add'#2) = {},
Uargs(sum) = {}, Uargs(add'#3) = {}, Uargs(tuple#2) = {},
Uargs(mult) = {}, Uargs(mult#1) = {}, Uargs(mult#2) = {},
Uargs(mult#3) = {}, Uargs(sum#1) = {}, Uargs(sum#2) = {},
Uargs(sum#3) = {}, Uargs(sum#4) = {}, Uargs(#pred) = {},
Uargs(#succ) = {}, Uargs(#and) = {}, Uargs(#abs^#) = {},
Uargs(#equal^#) = {}, Uargs(#eq^#) = {}, Uargs(#greater^#) = {},
Uargs(#ckgt^#) = {}, Uargs(#compare^#) = {}, Uargs(#less^#) = {},
Uargs(#cklt^#) = {}, Uargs(*^#) = {}, Uargs(#mult^#) = {},
Uargs(+^#) = {}, Uargs(#add^#) = {}, Uargs(-^#) = {},
Uargs(#sub^#) = {}, Uargs(add^#) = {}, Uargs(add'^#) = {},
Uargs(add'#1^#) = {}, Uargs(add'#2^#) = {}, Uargs(add'#3^#) = {},
Uargs(sum^#) = {}, Uargs(sum#1^#) = {}, Uargs(bitToInt^#) = {},
Uargs(bitToInt'^#) = {}, Uargs(bitToInt'#1^#) = {},
Uargs(compare^#) = {}, Uargs(compare#1^#) = {},
Uargs(compare#2^#) = {}, Uargs(compare#3^#) = {},
Uargs(compare#4^#) = {}, Uargs(compare#5^#) = {},
Uargs(compare#6^#) = {}, Uargs(diff^#) = {}, Uargs(mod^#) = {},
Uargs(diff#1^#) = {}, Uargs(div^#) = {}, Uargs(#div^#) = {},
Uargs(leq^#) = {}, Uargs(mult^#) = {}, Uargs(mult#1^#) = {},
Uargs(mult#2^#) = {}, Uargs(mult#3^#) = {}, Uargs(mult3^#) = {},
Uargs(sub^#) = {}, Uargs(sub#1^#) = {}, Uargs(sub'^#) = {},
Uargs(sub'#1^#) = {}, Uargs(sub'#2^#) = {}, Uargs(sub'#3^#) = {},
Uargs(sub'#4^#) = {}, Uargs(sub'#5^#) = {}, Uargs(sum#2^#) = {},
Uargs(sum#3^#) = {}, Uargs(sum#4^#) = {}, Uargs(#and^#) = {},
Uargs(#natmult^#) = {}, Uargs(#pred^#) = {}, Uargs(#succ^#) = {},
Uargs(#natdiv^#) = {}, Uargs(#natsub^#) = {}, Uargs(c_1) = {},
Uargs(c_2) = {}, Uargs(c_1) = {1, 2}
TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).
[#0] = [0]
[#abs](x1) = [1]
[#neg](x1) = [0]
[#pos](x1) = [0]
[#s](x1) = [0]
[#equal](x1, x2) = [0]
[#eq](x1, x2) = [0]
[+](x1, x2) = [1] x2 + [0]
[#add](x1, x2) = [1] x2 + [0]
[add](x1, x2) = [1] x2 + [0]
[add'](x1, x2, x3) = [1] x2 + [0]
[add'#1](x1, x2, x3) = [1] x2 + [0]
[::](x1, x2) = [1] x2 + [1]
[add'#2](x1, x2, x3, x4) = [1] x1 + [0]
[nil] = [0]
[sum](x1, x2, x3) = [1]
[add'#3](x1, x2, x3) = [1] x1 + [1] x3 + [0]
[tuple#2](x1, x2) = [1]
[#false] = [0]
[#true] = [0]
[mult](x1, x2) = [1] x1 + [0]
[mult#1](x1, x2) = [1] x1 + [0]
[mult#2](x1, x2, x3) = [1] x1 + [0]
[mult#3](x1, x2, x3) = [1] x3 + [0]
[sum#1](x1) = [1]
[sum#2](x1, x2) = [1]
[sum#3](x1, x2) = [1]
[sum#4](x1) = [1]
[#pred](x1) = [0]
[#succ](x1) = [0]
[#and](x1, x2) = [0]
[#EQ] = [0]
[#GT] = [0]
[#LT] = [0]
[#divByZero] = [0]
[#abs^#](x1) = [0]
[#equal^#](x1, x2) = [0]
[#eq^#](x1, x2) = [0]
[#greater^#](x1, x2) = [0]
[#ckgt^#](x1) = [0]
[#compare^#](x1, x2) = [0]
[#less^#](x1, x2) = [0]
[#cklt^#](x1) = [0]
[*^#](x1, x2) = [0]
[#mult^#](x1, x2) = [0]
[+^#](x1, x2) = [0]
[#add^#](x1, x2) = [0]
[-^#](x1, x2) = [0]
[#sub^#](x1, x2) = [0]
[add^#](x1, x2) = [0]
[add'^#](x1, x2, x3) = [0]
[add'#1^#](x1, x2, x3) = [0]
[add'#2^#](x1, x2, x3, x4) = [0]
[add'#3^#](x1, x2, x3) = [0]
[sum^#](x1, x2, x3) = [0]
[sum#1^#](x1) = [0]
[bitToInt^#](x1) = [0]
[bitToInt'^#](x1, x2) = [0]
[bitToInt'#1^#](x1, x2) = [0]
[compare^#](x1, x2) = [0]
[compare#1^#](x1, x2) = [0]
[compare#2^#](x1, x2, x3) = [0]
[compare#3^#](x1, x2, x3) = [0]
[compare#4^#](x1, x2, x3, x4) = [0]
[compare#5^#](x1, x2, x3) = [0]
[compare#6^#](x1) = [0]
[diff^#](x1, x2, x3) = [0]
[mod^#](x1, x2) = [0]
[diff#1^#](x1) = [0]
[div^#](x1, x2) = [0]
[#div^#](x1, x2) = [0]
[leq^#](x1, x2) = [0]
[mult^#](x1, x2) = [1] x1 + [1]
[mult#1^#](x1, x2) = [1] x1 + [1]
[mult#2^#](x1, x2, x3) = [0]
[mult#3^#](x1, x2, x3) = [0]
[mult3^#](x1, x2, x3) = [3] x1 + [3] x2 + [3]
[sub^#](x1, x2) = [0]
[sub#1^#](x1) = [0]
[sub'^#](x1, x2, x3) = [0]
[sub'#1^#](x1, x2, x3) = [0]
[sub'#2^#](x1, x2, x3, x4) = [0]
[sub'#3^#](x1, x2, x3) = [0]
[sub'#4^#](x1, x2) = [0]
[sub'#5^#](x1, x2, x3) = [0]
[sum#2^#](x1, x2) = [0]
[sum#3^#](x1, x2) = [0]
[sum#4^#](x1) = [0]
[#and^#](x1, x2) = [0]
[#natmult^#](x1, x2) = [0]
[#pred^#](x1) = [0]
[#succ^#](x1) = [0]
[#natdiv^#](x1, x2) = [0]
[#natsub^#](x1, x2) = [0]
[c_1](x1, x2) = [0]
[c_2](x1, x2) = [0]
[c] = [0]
[c_1](x1, x2) = [2] x1 + [1] x2 + [0]
This order satisfies following ordering constraints
[#abs(#0())] = [1]
> [0]
= [#0()]
[#abs(#neg(@x))] = [1]
> [0]
= [#pos(@x)]
[#abs(#pos(@x))] = [1]
> [0]
= [#pos(@x)]
[#abs(#s(@x))] = [1]
> [0]
= [#pos(#s(@x))]
[#equal(@x, @y)] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#0(), #0())] = [0]
>= [0]
= [#true()]
[#eq(#0(), #neg(@y))] = [0]
>= [0]
= [#false()]
[#eq(#0(), #pos(@y))] = [0]
>= [0]
= [#false()]
[#eq(#0(), #s(@y))] = [0]
>= [0]
= [#false()]
[#eq(#neg(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#neg(@x), #neg(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#neg(@x), #pos(@y))] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #neg(@y))] = [0]
>= [0]
= [#false()]
[#eq(#pos(@x), #pos(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(#s(@x), #0())] = [0]
>= [0]
= [#false()]
[#eq(#s(@x), #s(@y))] = [0]
>= [0]
= [#eq(@x, @y)]
[#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0]
>= [0]
= [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))]
[#eq(::(@x_1, @x_2), nil())] = [0]
>= [0]
= [#false()]
[#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(nil(), ::(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(nil(), nil())] = [0]
>= [0]
= [#true()]
[#eq(nil(), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2))] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), nil())] = [0]
>= [0]
= [#false()]
[#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2))] = [0]
>= [0]
= [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))]
[+(@x, @y)] = [1] @y + [0]
>= [1] @y + [0]
= [#add(@x, @y)]
[#add(#0(), @y)] = [1] @y + [0]
>= [1] @y + [0]
= [@y]
[#add(#neg(#s(#0())), @y)] = [1] @y + [0]
>= [0]
= [#pred(@y)]
[#add(#neg(#s(#s(@x))), @y)] = [1] @y + [0]
>= [0]
= [#pred(#add(#pos(#s(@x)), @y))]
[#add(#pos(#s(#0())), @y)] = [1] @y + [0]
>= [0]
= [#succ(@y)]
[#add(#pos(#s(#s(@x))), @y)] = [1] @y + [0]
>= [0]
= [#succ(#add(#pos(#s(@x)), @y))]
[add(@b1, @b2)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'(@b1, @b2, #abs(#0()))]
[add'(@b1, @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'#1(@b1, @b2, @r)]
[add'#1(::(@x, @xs), @b2, @r)] = [1] @b2 + [0]
>= [1] @b2 + [0]
= [add'#2(@b2, @r, @x, @xs)]
[add'#1(nil(), @b2, @r)] = [1] @b2 + [0]
>= [0]
= [nil()]
[add'#2(::(@y, @ys), @r, @x, @xs)] = [1] @ys + [1]
>= [1] @ys + [1]
= [add'#3(sum(@x, @y, @r), @xs, @ys)]
[add'#2(nil(), @r, @x, @xs)] = [0]
>= [0]
= [nil()]
[sum(@x, @y, @r)] = [1]
>= [1]
= [sum#1(+(+(@x, @y), @r))]
[add'#3(tuple#2(@z, @r'), @xs, @ys)] = [1] @ys + [1]
>= [1] @ys + [1]
= [::(@z, add'(@xs, @ys, @r'))]
[mult(@b1, @b2)] = [1] @b1 + [0]
>= [1] @b1 + [0]
= [mult#1(@b1, @b2)]
[mult#1(::(@x, @xs), @b2)] = [1] @xs + [1]
>= [1] @xs + [1]
= [mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)]
[mult#1(nil(), @b2)] = [0]
>= [0]
= [nil()]
[mult#2(@zs, @b2, @x)] = [1] @zs + [0]
>= [1] @zs + [0]
= [mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)]
[mult#3(#false(), @b2, @zs)] = [1] @zs + [0]
>= [1] @zs + [0]
= [@zs]
[mult#3(#true(), @b2, @zs)] = [1] @zs + [0]
>= [1] @zs + [0]
= [add(@b2, @zs)]
[sum#1(@s)] = [1]
>= [1]
= [sum#2(#equal(@s, #0()), @s)]
[sum#2(#false(), @s)] = [1]
>= [1]
= [sum#3(#equal(@s, #pos(#s(#0()))), @s)]
[sum#2(#true(), @s)] = [1]
>= [1]
= [tuple#2(#abs(#0()), #abs(#0()))]
[sum#3(#false(), @s)] = [1]
>= [1]
= [sum#4(#equal(@s, #pos(#s(#s(#0())))))]
[sum#3(#true(), @s)] = [1]
>= [1]
= [tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))]
[sum#4(#false())] = [1]
>= [1]
= [tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))]
[sum#4(#true())] = [1]
>= [1]
= [tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))]
[#pred(#0())] = [0]
>= [0]
= [#neg(#s(#0()))]
[#pred(#neg(#s(@x)))] = [0]
>= [0]
= [#neg(#s(#s(@x)))]
[#pred(#pos(#s(#0())))] = [0]
>= [0]
= [#0()]
[#pred(#pos(#s(#s(@x))))] = [0]
>= [0]
= [#pos(#s(@x))]
[#succ(#0())] = [0]
>= [0]
= [#pos(#s(#0()))]
[#succ(#neg(#s(#0())))] = [0]
>= [0]
= [#0()]
[#succ(#neg(#s(#s(@x))))] = [0]
>= [0]
= [#neg(#s(@x))]
[#succ(#pos(#s(@x)))] = [0]
>= [0]
= [#pos(#s(#s(@x)))]
[#and(#false(), #false())] = [0]
>= [0]
= [#false()]
[#and(#false(), #true())] = [0]
>= [0]
= [#false()]
[#and(#true(), #false())] = [0]
>= [0]
= [#false()]
[#and(#true(), #true())] = [0]
>= [0]
= [#true()]
[mult^#(@b1, @b2)] = [1] @b1 + [1]
>= [1] @b1 + [1]
= [mult#1^#(@b1, @b2)]
[mult#1^#(::(@x, @xs), @b2)] = [1] @xs + [2]
> [1] @xs + [1]
= [mult^#(@xs, @b2)]
[mult3^#(@b1, @b2, @b3)] = [3] @b1 + [3] @b2 + [3]
>= [3] @b1 + [3]
= [c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))]
Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of rules {2}.
Here rules are labeled according to the (estimated) dependency
graph
1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) :2
2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
3: mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
-->_2 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :1
- The rules {2} have known complexity. These cover all predecessors
of {3}, their complexity is equally bounded.
- The rules {2,3} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules {1,2,3}
is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{3} Weak SCC
|
`->2:{1,2} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, 3: mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2)) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 3: mult3^#(@b1, @b2, @b3) ->
c_1(mult^#(mult(@b1, @b2), @b2), mult^#(@b1, @b2))
, 1: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 2: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) }
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
to orient following rules strictly.
DPs:
{ 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) }
Sub-proof:
----------
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(#0) = {}, safe(#abs) = {}, safe(#neg) = {1}, safe(#pos) = {1},
safe(#s) = {1}, safe(#equal) = {}, safe(#eq) = {}, safe(+) = {},
safe(#add) = {1, 2}, safe(add) = {}, safe(add') = {1, 3},
safe(add'#1) = {}, safe(::) = {1, 2}, safe(add'#2) = {1, 2, 4},
safe(nil) = {}, safe(sum) = {1, 2, 3}, safe(add'#3) = {},
safe(tuple#2) = {1, 2}, safe(#false) = {}, safe(#true) = {},
safe(mult) = {}, safe(mult#1) = {}, safe(mult#2) = {1, 2},
safe(mult#3) = {}, safe(sum#1) = {}, safe(sum#2) = {1},
safe(sum#3) = {}, safe(sum#4) = {}, safe(#pred) = {},
safe(#succ) = {}, safe(#and) = {}, safe(#EQ) = {}, safe(#GT) = {},
safe(#LT) = {}, safe(#divByZero) = {}, safe(#abs^#) = {},
safe(#equal^#) = {}, safe(#eq^#) = {}, safe(#greater^#) = {},
safe(#ckgt^#) = {}, safe(#compare^#) = {}, safe(#less^#) = {},
safe(#cklt^#) = {}, safe(*^#) = {}, safe(#mult^#) = {},
safe(+^#) = {}, safe(#add^#) = {}, safe(-^#) = {},
safe(#sub^#) = {}, safe(add^#) = {}, safe(add'^#) = {1, 2},
safe(add'#1^#) = {}, safe(add'#2^#) = {}, safe(add'#3^#) = {2, 3},
safe(sum^#) = {}, safe(sum#1^#) = {}, safe(bitToInt^#) = {},
safe(bitToInt'^#) = {}, safe(bitToInt'#1^#) = {},
safe(compare^#) = {}, safe(compare#1^#) = {},
safe(compare#2^#) = {}, safe(compare#3^#) = {},
safe(compare#4^#) = {}, safe(compare#5^#) = {},
safe(compare#6^#) = {}, safe(diff^#) = {}, safe(mod^#) = {},
safe(diff#1^#) = {}, safe(div^#) = {}, safe(#div^#) = {},
safe(leq^#) = {}, safe(mult^#) = {2}, safe(mult#1^#) = {2},
safe(mult#2^#) = {2}, safe(mult#3^#) = {}, safe(mult3^#) = {2},
safe(sub^#) = {}, safe(sub#1^#) = {}, safe(sub'^#) = {},
safe(sub'#1^#) = {}, safe(sub'#2^#) = {}, safe(sub'#3^#) = {},
safe(sub'#4^#) = {}, safe(sub'#5^#) = {}, safe(sum#2^#) = {},
safe(sum#3^#) = {}, safe(sum#4^#) = {}, safe(#and^#) = {},
safe(#natmult^#) = {}, safe(#pred^#) = {}, safe(#succ^#) = {},
safe(#natdiv^#) = {}, safe(#natsub^#) = {}
and precedence
#eq > #and, add'#1^# ~ add'#2^#, add'#2^# ~ add'#3^#,
mult^# ~ mult#1^#, mult^# ~ mult3^# .
Following symbols are considered recursive:
{}
The recursion depth is 0.
Further, following argument filtering is employed:
pi(#0) = [], pi(#abs) = [], pi(#neg) = [], pi(#pos) = [],
pi(#s) = 1, pi(#equal) = 1, pi(#eq) = 2, pi(+) = [],
pi(#add) = [1], pi(add) = [], pi(add') = [1, 3], pi(add'#1) = 2,
pi(::) = [2], pi(add'#2) = [1, 2, 3, 4], pi(nil) = [],
pi(sum) = [1, 2, 3], pi(add'#3) = [1, 2, 3], pi(tuple#2) = 2,
pi(#false) = [], pi(#true) = [], pi(mult) = 2, pi(mult#1) = 2,
pi(mult#2) = [1, 2], pi(mult#3) = [], pi(sum#1) = [],
pi(sum#2) = [1], pi(sum#3) = 2, pi(sum#4) = [], pi(#pred) = [],
pi(#succ) = [], pi(#and) = [1], pi(#EQ) = [], pi(#GT) = [],
pi(#LT) = [], pi(#divByZero) = [], pi(#abs^#) = [],
pi(#equal^#) = [], pi(#eq^#) = [], pi(#greater^#) = [],
pi(#ckgt^#) = [], pi(#compare^#) = [], pi(#less^#) = [],
pi(#cklt^#) = [], pi(*^#) = [], pi(#mult^#) = [], pi(+^#) = [],
pi(#add^#) = [], pi(-^#) = [], pi(#sub^#) = [], pi(add^#) = 1,
pi(add'^#) = 1, pi(add'#1^#) = 1, pi(add'#2^#) = 4,
pi(add'#3^#) = 2, pi(sum^#) = [], pi(sum#1^#) = [],
pi(bitToInt^#) = [], pi(bitToInt'^#) = [], pi(bitToInt'#1^#) = [],
pi(compare^#) = [], pi(compare#1^#) = [], pi(compare#2^#) = [],
pi(compare#3^#) = [], pi(compare#4^#) = [], pi(compare#5^#) = [],
pi(compare#6^#) = [], pi(diff^#) = [], pi(mod^#) = [],
pi(diff#1^#) = [], pi(div^#) = [], pi(#div^#) = [], pi(leq^#) = [],
pi(mult^#) = [2], pi(mult#1^#) = [2], pi(mult#2^#) = 2,
pi(mult#3^#) = 2, pi(mult3^#) = [2], pi(sub^#) = [],
pi(sub#1^#) = [], pi(sub'^#) = [], pi(sub'#1^#) = [],
pi(sub'#2^#) = [], pi(sub'#3^#) = [], pi(sub'#4^#) = [],
pi(sub'#5^#) = [], pi(sum#2^#) = [], pi(sum#3^#) = [],
pi(sum#4^#) = [], pi(#and^#) = [], pi(#natmult^#) = [],
pi(#pred^#) = [], pi(#succ^#) = [], pi(#natdiv^#) = [],
pi(#natsub^#) = []
Usable defined function symbols are a subset of:
{}
For your convenience, here are the satisfied ordering constraints:
pi(add^#(@b1, @b2)) = @b1
>= @b1
= pi(add'^#(@b1, @b2, #abs(#0())))
pi(add'^#(@b1, @b2, @r)) = @b1
>= @b1
= pi(add'#1^#(@b1, @b2, @r))
pi(add'#1^#(::(@x, @xs), @b2, @r)) = ::(; @xs)
> @xs
= pi(add'#2^#(@b2, @r, @x, @xs))
pi(add'#2^#(::(@y, @ys), @r, @x, @xs)) = @xs
>= @xs
= pi(add'#3^#(sum(@x, @y, @r), @xs, @ys))
pi(add'#3^#(tuple#2(@z, @r'), @xs, @ys)) = @xs
>= @xs
= pi(add'^#(@xs, @ys, @r'))
pi(mult^#(@b1, @b2)) = mult^#(; @b2)
>= mult#1^#(; @b2)
= pi(mult#1^#(@b1, @b2))
pi(mult#1^#(::(@x, @xs), @b2)) = mult#1^#(; @b2)
>= mult^#(; @b2)
= pi(mult^#(@xs, @b2))
pi(mult#1^#(::(@x, @xs), @b2)) = mult#1^#(; @b2)
> @b2
= pi(mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x))
pi(mult#2^#(@zs, @b2, @x)) = @b2
>= @b2
= pi(mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs))
pi(mult#3^#(#true(), @b2, @zs)) = @b2
>= @b2
= pi(add^#(@b2, @zs))
pi(mult3^#(@b1, @b2, @b3)) = mult3^#(; @b2)
>= mult^#(; @b2)
= pi(mult^#(@b1, @b2))
pi(mult3^#(@b1, @b2, @b3)) = mult3^#(; @b2)
>= mult^#(; @b2)
= pi(mult^#(mult(@b1, @b2), @b2))
Processor 'Small Polynomial Path Order (PS,1-bounded)' induces the
complexity certificate YES(?,O(n^1)) on application of rules {3,8}.
Here rules are labeled according to the (estimated) dependency
graph
1: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
-->_1 add'#1^#(::(@x, @xs), @b2, @r) ->
add'#2^#(@b2, @r, @x, @xs) :3
2: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
-->_1 add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys) :4
4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
-->_1 add'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
add'^#(@xs, @ys, @r') :5
5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
-->_1 add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r) :1
6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
-->_1 mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x) :8
-->_1 mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2) :7
7: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
-->_1 mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs) :9
9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
-->_1 mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs) :10
10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
-->_1 add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0())) :2
11: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
12: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2)
-->_1 mult^#(@b1, @b2) -> mult#1^#(@b1, @b2) :6
- The rules {3,8} have known complexity. These cover all
predecessors of {4,9,11,12}, their complexity is equally bounded.
- The rules {3,4,8,9,11,12} have known complexity. These cover all
predecessors of {5,10}, their complexity is equally bounded.
- The rules {3,4,5,8,9,10,11,12} have known complexity. These cover
all predecessors of {2}, their complexity is equally bounded.
- The rules {2,3,4,5,8,9,10,11,12} have known complexity. These
cover all predecessors of {1}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules
{1,2,3,4,5,8,9,10,11,12} is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->2:{11} Weak SCC
|
`->3:{6,7} Weak SCC
|
`->4:{8} Weak SCC
|
`->5:{9} Weak SCC
|
`->6:{10} Weak SCC
|
`->7:{1} Weak SCC
|
`->8:{2,5,4,3} Weak SCC
->1:{12} Weak SCC
|
`->3:{6,7} Weak SCC
|
`->4:{8} Weak SCC
|
`->5:{9} Weak SCC
|
`->6:{10} Weak SCC
|
`->7:{1} Weak SCC
|
`->8:{2,5,4,3} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs)
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 7: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, 8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, 9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, 10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 11: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, 12: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2) }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 12: mult3^#(@b1, @b2, @b3) -> mult^#(mult(@b1, @b2), @b2)
, 11: mult3^#(@b1, @b2, @b3) -> mult^#(@b1, @b2)
, 6: mult^#(@b1, @b2) -> mult#1^#(@b1, @b2)
, 7: mult#1^#(::(@x, @xs), @b2) -> mult^#(@xs, @b2)
, 8: mult#1^#(::(@x, @xs), @b2) ->
mult#2^#(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, 9: mult#2^#(@zs, @b2, @x) ->
mult#3^#(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, 10: mult#3^#(#true(), @b2, @zs) -> add^#(@b2, @zs)
, 1: add^#(@b1, @b2) -> add'^#(@b1, @b2, #abs(#0()))
, 2: add'^#(@b1, @b2, @r) -> add'#1^#(@b1, @b2, @r)
, 5: add'#3^#(tuple#2(@z, @r'), @xs, @ys) -> add'^#(@xs, @ys, @r')
, 4: add'#2^#(::(@y, @ys), @r, @x, @xs) ->
add'#3^#(sum(@x, @y, @r), @xs, @ys)
, 3: add'#1^#(::(@x, @xs), @b2, @r) -> add'#2^#(@b2, @r, @x, @xs) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true() }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
* Path 1:{18}->2:{19,22,21,20}: YES(O(1),O(n^1))
----------------------------------------------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {5} and add Pre({5}) = {4} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) }
Weak DPs:
{ sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {4} and add Pre({4}) = {3} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs) }
Weak DPs:
{ sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {3} and add Pre({3}) = {2} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) }
Weak DPs:
{ sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We consider the (estimated) dependency graph
1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :2
We estimate the application of rules based on the application of
their predecessors as follows:
- We remove {1} and add Pre({1}) = {} to the strict component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) }
Weak DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #equal(@x, @y) -> #eq(@x, @y)
, #eq(#0(), #0()) -> #true()
, #eq(#0(), #neg(@y)) -> #false()
, #eq(#0(), #pos(@y)) -> #false()
, #eq(#0(), #s(@y)) -> #false()
, #eq(#neg(@x), #0()) -> #false()
, #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y)
, #eq(#neg(@x), #pos(@y)) -> #false()
, #eq(#pos(@x), #0()) -> #false()
, #eq(#pos(@x), #neg(@y)) -> #false()
, #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y)
, #eq(#s(@x), #0()) -> #false()
, #eq(#s(@x), #s(@y)) -> #eq(@x, @y)
, #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #eq(::(@x_1, @x_2), nil()) -> #false()
, #eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) -> #false()
, #eq(nil(), ::(@y_1, @y_2)) -> #false()
, #eq(nil(), nil()) -> #true()
, #eq(nil(), tuple#2(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) -> #false()
, #eq(tuple#2(@x_1, @x_2), nil()) -> #false()
, #eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) ->
#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
, #greater(@x, @y) -> #ckgt(#compare(@x, @y))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #ckgt(#EQ()) -> #false()
, #ckgt(#GT()) -> #true()
, #ckgt(#LT()) -> #false()
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, add(@b1, @b2) -> add'(@b1, @b2, #abs(#0()))
, add'(@b1, @b2, @r) -> add'#1(@b1, @b2, @r)
, add'#1(::(@x, @xs), @b2, @r) -> add'#2(@b2, @r, @x, @xs)
, add'#1(nil(), @b2, @r) -> nil()
, add'#2(::(@y, @ys), @r, @x, @xs) ->
add'#3(sum(@x, @y, @r), @xs, @ys)
, add'#2(nil(), @r, @x, @xs) -> nil()
, sum(@x, @y, @r) -> sum#1(+(+(@x, @y), @r))
, add'#3(tuple#2(@z, @r'), @xs, @ys) -> ::(@z, add'(@xs, @ys, @r'))
, bitToInt(@b) -> bitToInt'(@b, #abs(#pos(#s(#0()))))
, bitToInt'(@b, @n) -> bitToInt'#1(@b, @n)
, bitToInt'#1(::(@x, @xs), @n) ->
+(*(@x, @n), bitToInt'(@xs, *(@n, #pos(#s(#s(#0()))))))
, bitToInt'#1(nil(), @n) -> #abs(#0())
, compare(@b1, @b2) -> compare#1(@b1, @b2)
, compare#1(::(@x, @xs), @b2) -> compare#2(@b2, @x, @xs)
, compare#1(nil(), @b2) -> #abs(#0())
, compare#2(::(@y, @ys), @x, @xs) ->
compare#3(compare(@xs, @ys), @x, @y)
, compare#2(nil(), @x, @xs) -> #abs(#0())
, compare#3(@r, @x, @y) -> compare#4(#equal(@r, #0()), @r, @x, @y)
, compare#4(#false(), @r, @x, @y) -> @r
, compare#4(#true(), @r, @x, @y) ->
compare#5(#less(@x, @y), @x, @y)
, compare#5(#false(), @x, @y) -> compare#6(#greater(@x, @y))
, compare#5(#true(), @x, @y) -> -(#0(), #pos(#s(#0())))
, compare#6(#false()) -> #abs(#0())
, compare#6(#true()) -> #abs(#pos(#s(#0())))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, leq(@b1, @b2) -> #less(compare(@b1, @b2), #pos(#s(#0())))
, mult(@b1, @b2) -> mult#1(@b1, @b2)
, mult#1(::(@x, @xs), @b2) ->
mult#2(::(#abs(#0()), mult(@xs, @b2)), @b2, @x)
, mult#1(nil(), @b2) -> nil()
, mult#2(@zs, @b2, @x) ->
mult#3(#equal(@x, #pos(#s(#0()))), @b2, @zs)
, mult#3(#false(), @b2, @zs) -> @zs
, mult#3(#true(), @b2, @zs) -> add(@b2, @zs)
, mult3(@b1, @b2, @b3) -> mult(mult(@b1, @b2), @b2)
, sub(@b1, @b2) -> sub#1(sub'(@b1, @b2, #abs(#0())))
, sub'(@b1, @b2, @r) -> sub'#1(@b1, @b2, @r)
, sub#1(tuple#2(@b, @_@1)) -> @b
, sub'#1(::(@x, @xs), @b2, @r) -> sub'#2(@b2, @r, @x, @xs)
, sub'#1(nil(), @b2, @r) -> tuple#2(nil(), @r)
, sub'#2(::(@y, @ys), @r, @x, @xs) ->
sub'#3(diff(@x, @y, @r), @xs, @ys)
, sub'#2(nil(), @r, @x, @xs) -> tuple#2(nil(), @r)
, sub'#3(tuple#2(@z, @r'), @xs, @ys) ->
sub'#4(sub'(@xs, @ys, @r'), @z)
, sub'#4(tuple#2(@zs, @s), @z) ->
tuple#2(sub'#5(#equal(@s, #pos(#s(#0()))), @z, @zs), @s)
, sub'#5(#false(), @z, @zs) -> ::(@z, @zs)
, sub'#5(#true(), @z, @zs) -> ::(#abs(#0()), @zs)
, sum#1(@s) -> sum#2(#equal(@s, #0()), @s)
, sum#2(#false(), @s) -> sum#3(#equal(@s, #pos(#s(#0()))), @s)
, sum#2(#true(), @s) -> tuple#2(#abs(#0()), #abs(#0()))
, sum#3(#false(), @s) -> sum#4(#equal(@s, #pos(#s(#s(#0())))))
, sum#3(#true(), @s) -> tuple#2(#abs(#pos(#s(#0()))), #abs(#0()))
, sum#4(#false()) ->
tuple#2(#abs(#pos(#s(#0()))), #abs(#pos(#s(#0()))))
, sum#4(#true()) -> tuple#2(#abs(#0()), #abs(#pos(#s(#0()))))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #and(#false(), #false()) -> #false()
, #and(#false(), #true()) -> #false()
, #and(#true(), #false()) -> #false()
, #and(#true(), #true()) -> #true()
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We replace strict/weak-rules by the corresponding usable rules:
Weak Usable Rules:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs: { sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) }
Weak DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
to orient following rules strictly.
DPs:
{ 3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs) }
Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x)) }
Sub-proof:
----------
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(#0) = {}, safe(#abs) = {}, safe(#neg) = {1}, safe(#pos) = {1},
safe(#s) = {1}, safe(#compare) = {}, safe(#less) = {1, 2},
safe(#cklt) = {}, safe(*) = {}, safe(#mult) = {}, safe(+) = {},
safe(#add) = {1, 2}, safe(-) = {}, safe(#sub) = {},
safe(::) = {1, 2}, safe(nil) = {}, safe(tuple#2) = {1, 2},
safe(#false) = {}, safe(#true) = {}, safe(diff) = {},
safe(mod) = {}, safe(diff#1) = {}, safe(div) = {}, safe(#div) = {},
safe(#pred) = {}, safe(#succ) = {}, safe(#EQ) = {}, safe(#GT) = {},
safe(#LT) = {}, safe(#divByZero) = {}, safe(#natdiv) = {1, 2},
safe(#natmult) = {1, 2}, safe(#natsub) = {}, safe(#abs^#) = {},
safe(#equal^#) = {}, safe(#eq^#) = {}, safe(#greater^#) = {},
safe(#ckgt^#) = {}, safe(#compare^#) = {}, safe(#less^#) = {},
safe(#cklt^#) = {}, safe(*^#) = {}, safe(#mult^#) = {},
safe(+^#) = {}, safe(#add^#) = {}, safe(-^#) = {},
safe(#sub^#) = {}, safe(add^#) = {}, safe(add'^#) = {},
safe(add'#1^#) = {}, safe(add'#2^#) = {}, safe(add'#3^#) = {},
safe(sum^#) = {}, safe(sum#1^#) = {}, safe(bitToInt^#) = {},
safe(bitToInt'^#) = {}, safe(bitToInt'#1^#) = {},
safe(compare^#) = {}, safe(compare#1^#) = {},
safe(compare#2^#) = {}, safe(compare#3^#) = {},
safe(compare#4^#) = {}, safe(compare#5^#) = {},
safe(compare#6^#) = {}, safe(diff^#) = {}, safe(mod^#) = {},
safe(diff#1^#) = {}, safe(div^#) = {}, safe(#div^#) = {},
safe(leq^#) = {}, safe(mult^#) = {}, safe(mult#1^#) = {},
safe(mult#2^#) = {}, safe(mult#3^#) = {}, safe(mult3^#) = {},
safe(sub^#) = {}, safe(sub#1^#) = {}, safe(sub'^#) = {2, 3},
safe(sub'#1^#) = {}, safe(sub'#2^#) = {}, safe(sub'#3^#) = {1, 2},
safe(sub'#4^#) = {}, safe(sub'#5^#) = {}, safe(sum#2^#) = {},
safe(sum#3^#) = {}, safe(sum#4^#) = {}, safe(#and^#) = {},
safe(#natmult^#) = {}, safe(#pred^#) = {}, safe(#succ^#) = {},
safe(#natdiv^#) = {}, safe(#natsub^#) = {}
and precedence
#less > #compare .
Following symbols are considered recursive:
{}
The recursion depth is 0.
Further, following argument filtering is employed:
pi(#0) = [], pi(#abs) = [], pi(#neg) = [], pi(#pos) = [],
pi(#s) = [], pi(#compare) = [1, 2], pi(#less) = [2],
pi(#cklt) = [], pi(*) = [], pi(#mult) = 1, pi(+) = 2,
pi(#add) = [1], pi(-) = 1, pi(#sub) = 1, pi(::) = [1, 2],
pi(nil) = [], pi(tuple#2) = [1, 2], pi(#false) = [],
pi(#true) = [], pi(diff) = 3, pi(mod) = 1, pi(diff#1) = [],
pi(div) = 2, pi(#div) = 2, pi(#pred) = [], pi(#succ) = [],
pi(#EQ) = [], pi(#GT) = [], pi(#LT) = [], pi(#divByZero) = [],
pi(#natdiv) = [1, 2], pi(#natmult) = [1, 2], pi(#natsub) = 2,
pi(#abs^#) = [], pi(#equal^#) = [], pi(#eq^#) = [],
pi(#greater^#) = [], pi(#ckgt^#) = [], pi(#compare^#) = [],
pi(#less^#) = [], pi(#cklt^#) = [], pi(*^#) = [], pi(#mult^#) = [],
pi(+^#) = [], pi(#add^#) = [], pi(-^#) = [], pi(#sub^#) = [],
pi(add^#) = [], pi(add'^#) = [], pi(add'#1^#) = [],
pi(add'#2^#) = [], pi(add'#3^#) = [], pi(sum^#) = [],
pi(sum#1^#) = [], pi(bitToInt^#) = [], pi(bitToInt'^#) = [],
pi(bitToInt'#1^#) = [], pi(compare^#) = [], pi(compare#1^#) = [],
pi(compare#2^#) = [], pi(compare#3^#) = [], pi(compare#4^#) = [],
pi(compare#5^#) = [], pi(compare#6^#) = [], pi(diff^#) = [],
pi(mod^#) = [], pi(diff#1^#) = [], pi(div^#) = [], pi(#div^#) = [],
pi(leq^#) = [], pi(mult^#) = [], pi(mult#1^#) = [],
pi(mult#2^#) = [], pi(mult#3^#) = [], pi(mult3^#) = [],
pi(sub^#) = 1, pi(sub#1^#) = [], pi(sub'^#) = 1, pi(sub'#1^#) = 1,
pi(sub'#2^#) = 4, pi(sub'#3^#) = 2, pi(sub'#4^#) = [],
pi(sub'#5^#) = [], pi(sum#2^#) = [], pi(sum#3^#) = [],
pi(sum#4^#) = [], pi(#and^#) = [], pi(#natmult^#) = [],
pi(#pred^#) = [], pi(#succ^#) = [], pi(#natdiv^#) = [],
pi(#natsub^#) = []
Usable defined function symbols are a subset of:
{#abs}
For your convenience, here are the satisfied ordering constraints:
pi(sub^#(@b1, @b2)) = @b1
>= @b1
= pi(sub'^#(@b1, @b2, #abs(#0())))
pi(sub'^#(@b1, @b2, @r)) = @b1
>= @b1
= pi(sub'#1^#(@b1, @b2, @r))
pi(sub'#1^#(::(@x, @xs), @b2, @r)) = ::(; @x, @xs)
> @xs
= pi(sub'#2^#(@b2, @r, @x, @xs))
pi(sub'#2^#(::(@y, @ys), @r, @x, @xs)) = @xs
>= @xs
= pi(sub'#3^#(diff(@x, @y, @r), @xs, @ys))
pi(sub'#3^#(tuple#2(@z, @r'), @xs, @ys)) = @xs
>= @xs
= pi(sub'^#(@xs, @ys, @r'))
pi(#abs(#0())) = #abs()
> #0()
= pi(#0())
pi(#abs(#neg(@x))) = #abs()
> #pos()
= pi(#pos(@x))
pi(#abs(#pos(@x))) = #abs()
> #pos()
= pi(#pos(@x))
pi(#abs(#s(@x))) = #abs()
> #pos()
= pi(#pos(#s(@x)))
Processor 'Small Polynomial Path Order (PS,1-bounded)' induces the
complexity certificate YES(?,O(n^1)) on application of rules {3}.
Here rules are labeled according to the (estimated) dependency
graph
1: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
-->_1 sub'#1^#(::(@x, @xs), @b2, @r) ->
sub'#2^#(@b2, @r, @x, @xs) :3
2: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :1
3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
-->_1 sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys) :4
4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
-->_1 sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') :5
5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
-->_1 sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r) :1
- The rules {3} have known complexity. These cover all predecessors
of {2,4}, their complexity is equally bounded.
- The rules {2,3,4} have known complexity. These cover all
predecessors of {5}, their complexity is equally bounded.
- The rules {2,3,4,5} have known complexity. These cover all
predecessors of {1}, their complexity is equally bounded.
Overall, we obtain that the number of applications of rules
{1,2,3,4,5} is given by YES(?,O(n^1)).
We apply the transformation 'removetails' on the sub-problem:
Weak DPs:
{ sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r') }
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
StartTerms: basic terms
Strategy: innermost
We consider the the dependency graph
->1:{1} Weak SCC
|
`->2:{2,5,4,3} Weak SCC
Here dependency-pairs are as follows:
Weak DPs:
{ 1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs)
, 4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, 5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) ->
sub'^#(@xs, @ys, @r') }
The following rules are part of trailing weak paths, and thus they
can be removed:
{ 1: sub^#(@b1, @b2) -> sub'^#(@b1, @b2, #abs(#0()))
, 2: sub'^#(@b1, @b2, @r) -> sub'#1^#(@b1, @b2, @r)
, 5: sub'#3^#(tuple#2(@z, @r'), @xs, @ys) -> sub'^#(@xs, @ys, @r')
, 4: sub'#2^#(::(@y, @ys), @r, @x, @xs) ->
sub'#3^#(diff(@x, @y, @r), @xs, @ys)
, 3: sub'#1^#(::(@x, @xs), @b2, @r) -> sub'#2^#(@b2, @r, @x, @xs) }
We apply the transformation 'usablerules' on the sub-problem:
Weak Trs:
{ #abs(#0()) -> #0()
, #abs(#neg(@x)) -> #pos(@x)
, #abs(#pos(@x)) -> #pos(@x)
, #abs(#s(@x)) -> #pos(#s(@x))
, #compare(#0(), #0()) -> #EQ()
, #compare(#0(), #neg(@y)) -> #GT()
, #compare(#0(), #pos(@y)) -> #LT()
, #compare(#0(), #s(@y)) -> #LT()
, #compare(#neg(@x), #0()) -> #LT()
, #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x)
, #compare(#neg(@x), #pos(@y)) -> #LT()
, #compare(#pos(@x), #0()) -> #GT()
, #compare(#pos(@x), #neg(@y)) -> #GT()
, #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y)
, #compare(#s(@x), #0()) -> #GT()
, #compare(#s(@x), #s(@y)) -> #compare(@x, @y)
, #less(@x, @y) -> #cklt(#compare(@x, @y))
, #cklt(#EQ()) -> #false()
, #cklt(#GT()) -> #false()
, #cklt(#LT()) -> #true()
, *(@x, @y) -> #mult(@x, @y)
, #mult(#0(), #0()) -> #0()
, #mult(#0(), #neg(@y)) -> #0()
, #mult(#0(), #pos(@y)) -> #0()
, #mult(#neg(@x), #0()) -> #0()
, #mult(#neg(@x), #neg(@y)) -> #pos(#natmult(@x, @y))
, #mult(#neg(@x), #pos(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #0()) -> #0()
, #mult(#pos(@x), #neg(@y)) -> #neg(#natmult(@x, @y))
, #mult(#pos(@x), #pos(@y)) -> #pos(#natmult(@x, @y))
, +(@x, @y) -> #add(@x, @y)
, #add(#0(), @y) -> @y
, #add(#neg(#s(#0())), @y) -> #pred(@y)
, #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y))
, #add(#pos(#s(#0())), @y) -> #succ(@y)
, #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y))
, -(@x, @y) -> #sub(@x, @y)
, #sub(@x, #0()) -> @x
, #sub(@x, #neg(@y)) -> #add(@x, #pos(@y))
, #sub(@x, #pos(@y)) -> #add(@x, #neg(@y))
, diff(@x, @y, @r) ->
tuple#2(mod(+(+(@x, @y), @r), #pos(#s(#s(#0())))),
diff#1(#less(-(-(@x, @y), @r), #0())))
, mod(@x, @y) -> -(@x, *(@x, div(@x, @y)))
, diff#1(#false()) -> #abs(#0())
, diff#1(#true()) -> #abs(#pos(#s(#0())))
, div(@x, @y) -> #div(@x, @y)
, #div(#0(), #0()) -> #divByZero()
, #div(#0(), #neg(@y)) -> #0()
, #div(#0(), #pos(@y)) -> #0()
, #div(#neg(@x), #0()) -> #divByZero()
, #div(#neg(@x), #neg(@y)) -> #pos(#natdiv(@x, @y))
, #div(#neg(@x), #pos(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #0()) -> #divByZero()
, #div(#pos(@x), #neg(@y)) -> #neg(#natdiv(@x, @y))
, #div(#pos(@x), #pos(@y)) -> #pos(#natdiv(@x, @y))
, #pred(#0()) -> #neg(#s(#0()))
, #pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
, #pred(#pos(#s(#0()))) -> #0()
, #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
, #succ(#0()) -> #pos(#s(#0()))
, #succ(#neg(#s(#0()))) -> #0()
, #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
, #succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
, #natdiv(#0(), #0()) -> #divByZero()
, #natdiv(#s(@x), #s(@y)) -> #s(#natdiv(#natsub(@x, @y), #s(@y)))
, #natmult(#0(), @y) -> #0()
, #natmult(#s(@x), @y) -> #add(#pos(@y), #natmult(@x, @y))
, #natsub(@x, #0()) -> @x
, #natsub(#s(@x), #s(@y)) -> #natsub(@x, @y) }
StartTerms: basic terms
Strategy: innermost
No rule is usable.
We apply the transformation 'trivial' on the sub-problem:
Rules: Empty
StartTerms: basic terms
Strategy: innermost
We consider the dependency graph
empty
All SCCs are trivial and dependency pairs can be removed.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
Hurray, we answered YES(?,O(n^2))