YES(O(1),O(n^2)) 582.18/149.66 YES(O(1),O(n^2)) 582.18/149.66 582.18/149.66 We are left with following problem, upon which TcT provides the 582.18/149.66 certificate YES(O(1),O(n^2)). 582.18/149.66 582.18/149.66 Strict Trs: 582.18/149.66 { firstline#1(nil()) -> nil() 582.18/149.66 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.18/149.66 , #equal(@x, @y) -> #eq(@x, @y) 582.18/149.66 , lcs#3(nil()) -> #abs(#0()) 582.18/149.66 , lcs#3(::(@len, @_@1)) -> @len 582.18/149.66 , lcs#1(@m) -> lcs#2(@m) 582.18/149.66 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.18/149.66 , lcstable#3(nil(), @l2, @x) -> nil() 582.18/149.66 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.18/149.66 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.18/149.66 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 +(@diagVal, #pos(#s(#0()))) 582.18/149.66 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 max(@belowVal, @rightVal) 582.18/149.66 , lcs#2(nil()) -> #abs(#0()) 582.18/149.66 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.18/149.66 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.18/149.66 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.66 newline#6(newline#7(#equal(@x, @y), 582.18/149.66 @belowVal, 582.18/149.66 @diagVal, 582.18/149.66 @rightVal), 582.18/149.66 @nl) 582.18/149.66 , right#1(nil()) -> #abs(#0()) 582.18/149.66 , right#1(::(@x, @xs)) -> @x 582.18/149.66 , newline#2(nil(), @x, @xs, @y) -> nil() 582.18/149.66 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.66 newline#3(newline(@y, @lastline', @xs), 582.18/149.66 @belowVal, 582.18/149.66 @lastline', 582.18/149.66 @x, 582.18/149.66 @y) 582.18/149.66 , firstline(@l) -> firstline#1(@l) 582.18/149.66 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.18/149.66 , lcstable#1(::(@x, @xs), @l2) -> 582.18/149.66 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.18/149.66 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.18/149.66 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.18/149.66 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.66 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.18/149.66 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.18/149.66 , right(@l) -> right#1(@l) 582.18/149.66 , max#1(#true(), @a, @b) -> @a 582.18/149.66 , max#1(#false(), @a, @b) -> @b 582.18/149.66 , +(@x, @y) -> #add(@x, @y) 582.18/149.66 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.66 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.18/149.66 , #abs(#pos(@x)) -> #pos(@x) 582.18/149.66 , #abs(#0()) -> #0() 582.18/149.66 , #abs(#neg(@x)) -> #pos(@x) 582.18/149.66 , #abs(#s(@x)) -> #pos(#s(@x)) 582.18/149.66 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.18/149.66 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.18/149.66 , newline#1(nil(), @lastline, @y) -> nil() 582.18/149.66 , newline#1(::(@x, @xs), @lastline, @y) -> 582.18/149.66 newline#2(@lastline, @x, @xs, @y) } 582.18/149.66 Weak Trs: 582.18/149.66 { #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.18/149.66 , #eq(#pos(@x), #0()) -> #false() 582.18/149.66 , #eq(#pos(@x), #neg(@y)) -> #false() 582.18/149.66 , #eq(nil(), nil()) -> #true() 582.18/149.66 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.18/149.66 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.18/149.66 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.66 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.18/149.66 , #eq(#0(), #pos(@y)) -> #false() 582.18/149.66 , #eq(#0(), #0()) -> #true() 582.18/149.66 , #eq(#0(), #neg(@y)) -> #false() 582.18/149.66 , #eq(#0(), #s(@y)) -> #false() 582.18/149.66 , #eq(#neg(@x), #pos(@y)) -> #false() 582.18/149.66 , #eq(#neg(@x), #0()) -> #false() 582.18/149.66 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.18/149.66 , #eq(#s(@x), #0()) -> #false() 582.18/149.66 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.18/149.66 , #ckgt(#EQ()) -> #false() 582.18/149.66 , #ckgt(#LT()) -> #false() 582.18/149.66 , #ckgt(#GT()) -> #true() 582.18/149.66 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.18/149.66 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.18/149.66 , #add(#0(), @y) -> @y 582.18/149.66 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.18/149.66 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.18/149.66 , #and(#true(), #true()) -> #true() 582.18/149.66 , #and(#true(), #false()) -> #false() 582.18/149.66 , #and(#false(), #true()) -> #false() 582.18/149.66 , #and(#false(), #false()) -> #false() 582.18/149.66 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.18/149.66 , #compare(#pos(@x), #0()) -> #GT() 582.18/149.66 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.18/149.66 , #compare(#0(), #pos(@y)) -> #LT() 582.18/149.66 , #compare(#0(), #0()) -> #EQ() 582.18/149.66 , #compare(#0(), #neg(@y)) -> #GT() 582.18/149.66 , #compare(#0(), #s(@y)) -> #LT() 582.18/149.66 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.18/149.66 , #compare(#neg(@x), #0()) -> #LT() 582.18/149.66 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.18/149.66 , #compare(#s(@x), #0()) -> #GT() 582.18/149.66 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.18/149.66 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.18/149.66 , #succ(#0()) -> #pos(#s(#0())) 582.18/149.66 , #succ(#neg(#s(#0()))) -> #0() 582.18/149.66 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.18/149.66 , #pred(#pos(#s(#0()))) -> #0() 582.18/149.66 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.18/149.66 , #pred(#0()) -> #neg(#s(#0())) 582.18/149.66 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) } 582.18/149.66 Obligation: 582.18/149.66 innermost runtime complexity 582.18/149.66 Answer: 582.18/149.66 YES(O(1),O(n^2)) 582.18/149.66 582.18/149.66 We add the following dependency tuples: 582.18/149.66 582.18/149.66 Strict DPs: 582.18/149.66 { firstline#1^#(nil()) -> c_1() 582.18/149.66 , firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.66 , #abs^#(#pos(@x)) -> c_32() 582.18/149.66 , #abs^#(#0()) -> c_33() 582.18/149.66 , #abs^#(#neg(@x)) -> c_34() 582.18/149.66 , #abs^#(#s(@x)) -> c_35() 582.18/149.66 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.66 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.66 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.66 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.66 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.66 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.66 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.66 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.66 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.66 , lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.66 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.66 lcstable^#(@xs, @l2)) 582.18/149.66 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.66 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.18/149.66 , newline^#(@y, @lastline, @l) -> 582.18/149.66 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.66 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.66 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 c_11(max^#(@belowVal, @rightVal)) 582.18/149.66 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.66 , max^#(@a, @b) -> 582.18/149.66 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.66 , lcs^#(@l1, @l2) -> 582.18/149.66 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.66 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.66 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.66 @belowVal, 582.18/149.66 @diagVal, 582.18/149.66 @rightVal), 582.18/149.66 @nl), 582.18/149.66 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.66 #equal^#(@x, @y)) 582.18/149.66 , newline#6^#(@elem, @nl) -> c_37() 582.18/149.66 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.66 , right#1^#(::(@x, @xs)) -> c_17() 582.18/149.66 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.66 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.66 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.66 @belowVal, 582.18/149.66 @lastline', 582.18/149.66 @x, 582.18/149.66 @y), 582.18/149.66 newline^#(@y, @lastline', @xs)) 582.18/149.66 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.66 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.66 right^#(@nl)) 582.18/149.66 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.66 , #greater^#(@x, @y) -> 582.18/149.66 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.66 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.66 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.66 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.66 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.66 c_25(newline#5^#(right(@lastline'), 582.18/149.66 @belowVal, 582.18/149.66 @nl, 582.18/149.66 @rightVal, 582.18/149.66 @x, 582.18/149.66 @y), 582.18/149.66 right^#(@lastline')) 582.18/149.66 , right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.66 , max#1^#(#true(), @a, @b) -> c_28() 582.18/149.66 , max#1^#(#false(), @a, @b) -> c_29() } 582.18/149.66 Weak DPs: 582.18/149.66 { #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.66 , #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.66 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.66 , #eq^#(nil(), nil()) -> c_43() 582.18/149.66 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.66 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.66 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.66 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.66 #eq^#(@x_1, @y_1), 582.18/149.66 #eq^#(@x_2, @y_2)) 582.18/149.66 , #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.66 , #eq^#(#0(), #0()) -> c_48() 582.18/149.66 , #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.66 , #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.66 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.66 , #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.66 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.66 , #eq^#(#s(@x), #0()) -> c_54() 582.18/149.66 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.66 , #ckgt^#(#EQ()) -> c_56() 582.18/149.66 , #ckgt^#(#LT()) -> c_57() 582.18/149.66 , #ckgt^#(#GT()) -> c_58() 582.18/149.66 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.66 , #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.66 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.66 , #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.66 , #compare^#(#0(), #0()) -> c_72() 582.18/149.66 , #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.66 , #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.66 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.66 , #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.66 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.66 , #compare^#(#s(@x), #0()) -> c_78() 582.18/149.66 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.66 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.66 , #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.66 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.66 , #add^#(#0(), @y) -> c_61() 582.18/149.66 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.66 , #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.66 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.66 , #and^#(#true(), #true()) -> c_64() 582.18/149.66 , #and^#(#true(), #false()) -> c_65() 582.18/149.66 , #and^#(#false(), #true()) -> c_66() 582.18/149.66 , #and^#(#false(), #false()) -> c_67() 582.18/149.66 , #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.66 , #succ^#(#0()) -> c_81() 582.18/149.66 , #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.66 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.66 , #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.66 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.66 , #pred^#(#0()) -> c_86() 582.18/149.66 , #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.66 582.18/149.66 and mark the set of starting terms. 582.18/149.66 582.18/149.66 We are left with following problem, upon which TcT provides the 582.18/149.66 certificate YES(O(1),O(n^2)). 582.18/149.66 582.18/149.66 Strict DPs: 582.18/149.66 { firstline#1^#(nil()) -> c_1() 582.18/149.66 , firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.66 , #abs^#(#pos(@x)) -> c_32() 582.18/149.66 , #abs^#(#0()) -> c_33() 582.18/149.66 , #abs^#(#neg(@x)) -> c_34() 582.18/149.66 , #abs^#(#s(@x)) -> c_35() 582.18/149.66 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.66 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.66 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.66 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.66 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.66 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.66 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.66 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.66 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.66 , lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.66 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.66 lcstable^#(@xs, @l2)) 582.18/149.66 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.66 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.18/149.66 , newline^#(@y, @lastline, @l) -> 582.18/149.66 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.66 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.66 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 c_11(max^#(@belowVal, @rightVal)) 582.18/149.66 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.66 , max^#(@a, @b) -> 582.18/149.66 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.66 , lcs^#(@l1, @l2) -> 582.18/149.66 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.66 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.66 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.66 @belowVal, 582.18/149.66 @diagVal, 582.18/149.66 @rightVal), 582.18/149.66 @nl), 582.18/149.66 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.66 #equal^#(@x, @y)) 582.18/149.66 , newline#6^#(@elem, @nl) -> c_37() 582.18/149.66 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.66 , right#1^#(::(@x, @xs)) -> c_17() 582.18/149.66 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.66 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.66 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.66 @belowVal, 582.18/149.66 @lastline', 582.18/149.66 @x, 582.18/149.66 @y), 582.18/149.66 newline^#(@y, @lastline', @xs)) 582.18/149.66 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.66 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.66 right^#(@nl)) 582.18/149.66 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.66 , #greater^#(@x, @y) -> 582.18/149.66 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.66 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.66 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.66 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.66 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.66 c_25(newline#5^#(right(@lastline'), 582.18/149.66 @belowVal, 582.18/149.66 @nl, 582.18/149.66 @rightVal, 582.18/149.66 @x, 582.18/149.66 @y), 582.18/149.66 right^#(@lastline')) 582.18/149.66 , right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.66 , max#1^#(#true(), @a, @b) -> c_28() 582.18/149.66 , max#1^#(#false(), @a, @b) -> c_29() } 582.18/149.66 Weak DPs: 582.18/149.66 { #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.66 , #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.66 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.66 , #eq^#(nil(), nil()) -> c_43() 582.18/149.66 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.66 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.66 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.66 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.66 #eq^#(@x_1, @y_1), 582.18/149.66 #eq^#(@x_2, @y_2)) 582.18/149.66 , #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.66 , #eq^#(#0(), #0()) -> c_48() 582.18/149.66 , #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.66 , #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.66 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.66 , #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.66 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.66 , #eq^#(#s(@x), #0()) -> c_54() 582.18/149.66 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.66 , #ckgt^#(#EQ()) -> c_56() 582.18/149.66 , #ckgt^#(#LT()) -> c_57() 582.18/149.66 , #ckgt^#(#GT()) -> c_58() 582.18/149.66 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.66 , #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.66 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.66 , #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.66 , #compare^#(#0(), #0()) -> c_72() 582.18/149.66 , #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.66 , #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.66 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.66 , #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.66 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.66 , #compare^#(#s(@x), #0()) -> c_78() 582.18/149.66 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.66 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.66 , #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.66 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.66 , #add^#(#0(), @y) -> c_61() 582.18/149.66 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.66 , #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.66 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.66 , #and^#(#true(), #true()) -> c_64() 582.18/149.66 , #and^#(#true(), #false()) -> c_65() 582.18/149.66 , #and^#(#false(), #true()) -> c_66() 582.18/149.66 , #and^#(#false(), #false()) -> c_67() 582.18/149.66 , #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.66 , #succ^#(#0()) -> c_81() 582.18/149.66 , #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.66 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.66 , #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.66 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.66 , #pred^#(#0()) -> c_86() 582.18/149.66 , #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.66 Weak Trs: 582.18/149.66 { firstline#1(nil()) -> nil() 582.18/149.66 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.18/149.66 , #equal(@x, @y) -> #eq(@x, @y) 582.18/149.66 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.18/149.66 , #eq(#pos(@x), #0()) -> #false() 582.18/149.66 , #eq(#pos(@x), #neg(@y)) -> #false() 582.18/149.66 , #eq(nil(), nil()) -> #true() 582.18/149.66 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.18/149.66 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.18/149.66 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.66 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.18/149.66 , #eq(#0(), #pos(@y)) -> #false() 582.18/149.66 , #eq(#0(), #0()) -> #true() 582.18/149.66 , #eq(#0(), #neg(@y)) -> #false() 582.18/149.66 , #eq(#0(), #s(@y)) -> #false() 582.18/149.66 , #eq(#neg(@x), #pos(@y)) -> #false() 582.18/149.66 , #eq(#neg(@x), #0()) -> #false() 582.18/149.66 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.18/149.66 , #eq(#s(@x), #0()) -> #false() 582.18/149.66 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.18/149.66 , lcs#3(nil()) -> #abs(#0()) 582.18/149.66 , lcs#3(::(@len, @_@1)) -> @len 582.18/149.66 , lcs#1(@m) -> lcs#2(@m) 582.18/149.66 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.18/149.66 , lcstable#3(nil(), @l2, @x) -> nil() 582.18/149.66 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.18/149.66 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.18/149.66 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 +(@diagVal, #pos(#s(#0()))) 582.18/149.66 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 max(@belowVal, @rightVal) 582.18/149.66 , lcs#2(nil()) -> #abs(#0()) 582.18/149.66 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.18/149.66 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.18/149.66 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.66 newline#6(newline#7(#equal(@x, @y), 582.18/149.66 @belowVal, 582.18/149.66 @diagVal, 582.18/149.66 @rightVal), 582.18/149.66 @nl) 582.18/149.66 , right#1(nil()) -> #abs(#0()) 582.18/149.66 , right#1(::(@x, @xs)) -> @x 582.18/149.66 , newline#2(nil(), @x, @xs, @y) -> nil() 582.18/149.66 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.66 newline#3(newline(@y, @lastline', @xs), 582.18/149.66 @belowVal, 582.18/149.66 @lastline', 582.18/149.66 @x, 582.18/149.66 @y) 582.18/149.66 , firstline(@l) -> firstline#1(@l) 582.18/149.66 , #ckgt(#EQ()) -> #false() 582.18/149.66 , #ckgt(#LT()) -> #false() 582.18/149.66 , #ckgt(#GT()) -> #true() 582.18/149.66 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.18/149.66 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.18/149.66 , #add(#0(), @y) -> @y 582.18/149.66 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.18/149.66 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.18/149.66 , #and(#true(), #true()) -> #true() 582.18/149.66 , #and(#true(), #false()) -> #false() 582.18/149.66 , #and(#false(), #true()) -> #false() 582.18/149.66 , #and(#false(), #false()) -> #false() 582.18/149.66 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.18/149.66 , #compare(#pos(@x), #0()) -> #GT() 582.18/149.66 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.18/149.66 , #compare(#0(), #pos(@y)) -> #LT() 582.18/149.66 , #compare(#0(), #0()) -> #EQ() 582.18/149.66 , #compare(#0(), #neg(@y)) -> #GT() 582.18/149.66 , #compare(#0(), #s(@y)) -> #LT() 582.18/149.66 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.18/149.66 , #compare(#neg(@x), #0()) -> #LT() 582.18/149.66 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.18/149.66 , #compare(#s(@x), #0()) -> #GT() 582.18/149.66 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.18/149.66 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.18/149.66 , lcstable#1(::(@x, @xs), @l2) -> 582.18/149.66 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.18/149.66 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.18/149.66 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.18/149.66 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.66 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.18/149.66 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.18/149.66 , right(@l) -> right#1(@l) 582.18/149.66 , max#1(#true(), @a, @b) -> @a 582.18/149.66 , max#1(#false(), @a, @b) -> @b 582.18/149.66 , +(@x, @y) -> #add(@x, @y) 582.18/149.66 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.18/149.66 , #succ(#0()) -> #pos(#s(#0())) 582.18/149.66 , #succ(#neg(#s(#0()))) -> #0() 582.18/149.66 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.18/149.66 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.66 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.18/149.66 , #abs(#pos(@x)) -> #pos(@x) 582.18/149.66 , #abs(#0()) -> #0() 582.18/149.66 , #abs(#neg(@x)) -> #pos(@x) 582.18/149.66 , #abs(#s(@x)) -> #pos(#s(@x)) 582.18/149.66 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.18/149.66 , #pred(#pos(#s(#0()))) -> #0() 582.18/149.66 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.18/149.66 , #pred(#0()) -> #neg(#s(#0())) 582.18/149.66 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.18/149.66 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.18/149.66 , newline#1(nil(), @lastline, @y) -> nil() 582.18/149.66 , newline#1(::(@x, @xs), @lastline, @y) -> 582.18/149.66 newline#2(@lastline, @x, @xs, @y) } 582.18/149.66 Obligation: 582.18/149.66 innermost runtime complexity 582.18/149.66 Answer: 582.18/149.66 YES(O(1),O(n^2)) 582.18/149.66 582.18/149.66 We estimate the number of application of 582.18/149.66 {1,3,4,5,6,8,10,17,22,26,28,29,33,34,38,39} by applications of 582.18/149.66 Pre({1,3,4,5,6,8,10,17,22,26,28,29,33,34,38,39}) = 582.18/149.66 {2,7,9,12,13,19,20,23,25,27,32,35,37}. Here rules are labeled as 582.18/149.66 follows: 582.18/149.66 582.18/149.66 DPs: 582.18/149.66 { 1: firstline#1^#(nil()) -> c_1() 582.18/149.66 , 2: firstline#1^#(::(@x, @xs)) -> 582.18/149.66 c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.66 , 3: #abs^#(#pos(@x)) -> c_32() 582.18/149.66 , 4: #abs^#(#0()) -> c_33() 582.18/149.66 , 5: #abs^#(#neg(@x)) -> c_34() 582.18/149.66 , 6: #abs^#(#s(@x)) -> c_35() 582.18/149.66 , 7: firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.66 , 8: #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.66 , 9: lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.66 , 10: lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.66 , 11: lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.66 , 12: lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.66 , 13: lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.66 , 14: lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.66 , 15: lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.66 , 16: lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.66 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.66 lcstable^#(@xs, @l2)) 582.18/149.66 , 17: lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.66 , 18: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.18/149.66 c_9(newline^#(@x, @l, @l2)) 582.18/149.66 , 19: newline^#(@y, @lastline, @l) -> 582.18/149.66 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.66 , 20: newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.66 , 21: newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.66 c_11(max^#(@belowVal, @rightVal)) 582.18/149.66 , 22: +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.66 , 23: max^#(@a, @b) -> 582.18/149.66 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.66 , 24: lcs^#(@l1, @l2) -> 582.18/149.66 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.66 , 25: newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.66 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.66 @belowVal, 582.18/149.66 @diagVal, 582.18/149.66 @rightVal), 582.18/149.66 @nl), 582.18/149.66 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.67 #equal^#(@x, @y)) 582.18/149.67 , 26: newline#6^#(@elem, @nl) -> c_37() 582.18/149.67 , 27: right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.67 , 28: right#1^#(::(@x, @xs)) -> c_17() 582.18/149.67 , 29: newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.67 , 30: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.67 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.67 @belowVal, 582.18/149.67 @lastline', 582.18/149.67 @x, 582.18/149.67 @y), 582.18/149.67 newline^#(@y, @lastline', @xs)) 582.18/149.67 , 31: newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.67 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.67 right^#(@nl)) 582.18/149.67 , 32: lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.67 , 33: #greater^#(@x, @y) -> 582.18/149.67 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.67 , 34: newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.67 , 35: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.67 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.67 , 36: newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.67 c_25(newline#5^#(right(@lastline'), 582.18/149.67 @belowVal, 582.18/149.67 @nl, 582.18/149.67 @rightVal, 582.18/149.67 @x, 582.18/149.67 @y), 582.18/149.67 right^#(@lastline')) 582.18/149.67 , 37: right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.67 , 38: max#1^#(#true(), @a, @b) -> c_28() 582.18/149.67 , 39: max#1^#(#false(), @a, @b) -> c_29() 582.18/149.67 , 40: #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.67 , 41: #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.67 , 42: #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.67 , 43: #eq^#(nil(), nil()) -> c_43() 582.18/149.67 , 44: #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.67 , 45: #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.67 , 46: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.67 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.67 #eq^#(@x_1, @y_1), 582.18/149.67 #eq^#(@x_2, @y_2)) 582.18/149.67 , 47: #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.67 , 48: #eq^#(#0(), #0()) -> c_48() 582.18/149.67 , 49: #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.67 , 50: #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.67 , 51: #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.67 , 52: #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.67 , 53: #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.67 , 54: #eq^#(#s(@x), #0()) -> c_54() 582.18/149.67 , 55: #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.67 , 56: #ckgt^#(#EQ()) -> c_56() 582.18/149.67 , 57: #ckgt^#(#LT()) -> c_57() 582.18/149.67 , 58: #ckgt^#(#GT()) -> c_58() 582.18/149.67 , 59: #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.67 , 60: #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.67 , 61: #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.67 , 62: #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.67 , 63: #compare^#(#0(), #0()) -> c_72() 582.18/149.67 , 64: #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.67 , 65: #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.67 , 66: #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.67 , 67: #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.67 , 68: #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.67 , 69: #compare^#(#s(@x), #0()) -> c_78() 582.18/149.67 , 70: #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.67 , 71: #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.67 , 72: #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.67 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.67 , 73: #add^#(#0(), @y) -> c_61() 582.18/149.67 , 74: #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.67 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.67 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.67 , 76: #and^#(#true(), #true()) -> c_64() 582.18/149.67 , 77: #and^#(#true(), #false()) -> c_65() 582.18/149.67 , 78: #and^#(#false(), #true()) -> c_66() 582.18/149.67 , 79: #and^#(#false(), #false()) -> c_67() 582.18/149.67 , 80: #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.67 , 81: #succ^#(#0()) -> c_81() 582.18/149.67 , 82: #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.67 , 83: #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.67 , 84: #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.67 , 85: #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.67 , 86: #pred^#(#0()) -> c_86() 582.18/149.67 , 87: #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.67 582.18/149.67 We are left with following problem, upon which TcT provides the 582.18/149.67 certificate YES(O(1),O(n^2)). 582.18/149.67 582.18/149.67 Strict DPs: 582.18/149.67 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.67 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.67 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.67 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.67 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.67 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.67 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.67 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.67 , lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.67 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.67 lcstable^#(@xs, @l2)) 582.18/149.67 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.18/149.67 , newline^#(@y, @lastline, @l) -> 582.18/149.67 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.67 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.67 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.67 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.67 c_11(max^#(@belowVal, @rightVal)) 582.18/149.67 , max^#(@a, @b) -> 582.18/149.67 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.67 , lcs^#(@l1, @l2) -> 582.18/149.67 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.67 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.67 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.67 @belowVal, 582.18/149.67 @diagVal, 582.18/149.67 @rightVal), 582.18/149.67 @nl), 582.18/149.67 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.67 #equal^#(@x, @y)) 582.18/149.67 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.67 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.67 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.67 @belowVal, 582.18/149.67 @lastline', 582.18/149.67 @x, 582.18/149.67 @y), 582.18/149.67 newline^#(@y, @lastline', @xs)) 582.18/149.67 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.67 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.67 right^#(@nl)) 582.18/149.67 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.67 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.67 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.67 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.67 c_25(newline#5^#(right(@lastline'), 582.18/149.67 @belowVal, 582.18/149.67 @nl, 582.18/149.67 @rightVal, 582.18/149.67 @x, 582.18/149.67 @y), 582.18/149.67 right^#(@lastline')) 582.18/149.67 , right^#(@l) -> c_27(right#1^#(@l)) } 582.18/149.67 Weak DPs: 582.18/149.67 { firstline#1^#(nil()) -> c_1() 582.18/149.67 , #abs^#(#pos(@x)) -> c_32() 582.18/149.67 , #abs^#(#0()) -> c_33() 582.18/149.67 , #abs^#(#neg(@x)) -> c_34() 582.18/149.67 , #abs^#(#s(@x)) -> c_35() 582.18/149.67 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.67 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.67 , #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.67 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.67 , #eq^#(nil(), nil()) -> c_43() 582.18/149.67 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.67 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.67 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.67 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.67 #eq^#(@x_1, @y_1), 582.18/149.67 #eq^#(@x_2, @y_2)) 582.18/149.67 , #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.67 , #eq^#(#0(), #0()) -> c_48() 582.18/149.67 , #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.67 , #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.67 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.67 , #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.67 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.67 , #eq^#(#s(@x), #0()) -> c_54() 582.18/149.67 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.67 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.67 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.67 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.67 , newline#6^#(@elem, @nl) -> c_37() 582.18/149.67 , right#1^#(::(@x, @xs)) -> c_17() 582.18/149.67 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.67 , #greater^#(@x, @y) -> 582.18/149.67 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.67 , #ckgt^#(#EQ()) -> c_56() 582.18/149.67 , #ckgt^#(#LT()) -> c_57() 582.18/149.67 , #ckgt^#(#GT()) -> c_58() 582.18/149.67 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.67 , #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.67 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.67 , #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.67 , #compare^#(#0(), #0()) -> c_72() 582.18/149.67 , #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.67 , #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.67 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.67 , #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.67 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.67 , #compare^#(#s(@x), #0()) -> c_78() 582.18/149.67 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.67 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.67 , max#1^#(#true(), @a, @b) -> c_28() 582.18/149.67 , max#1^#(#false(), @a, @b) -> c_29() 582.18/149.67 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.67 , #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.67 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.67 , #add^#(#0(), @y) -> c_61() 582.18/149.67 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.67 , #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.67 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.67 , #and^#(#true(), #true()) -> c_64() 582.18/149.67 , #and^#(#true(), #false()) -> c_65() 582.18/149.67 , #and^#(#false(), #true()) -> c_66() 582.18/149.67 , #and^#(#false(), #false()) -> c_67() 582.18/149.67 , #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.67 , #succ^#(#0()) -> c_81() 582.18/149.67 , #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.67 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.67 , #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.67 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.67 , #pred^#(#0()) -> c_86() 582.18/149.67 , #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.67 Weak Trs: 582.18/149.67 { firstline#1(nil()) -> nil() 582.18/149.67 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.18/149.67 , #equal(@x, @y) -> #eq(@x, @y) 582.18/149.67 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.18/149.67 , #eq(#pos(@x), #0()) -> #false() 582.18/149.67 , #eq(#pos(@x), #neg(@y)) -> #false() 582.18/149.67 , #eq(nil(), nil()) -> #true() 582.18/149.67 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.18/149.67 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.18/149.67 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.67 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.18/149.67 , #eq(#0(), #pos(@y)) -> #false() 582.18/149.67 , #eq(#0(), #0()) -> #true() 582.18/149.67 , #eq(#0(), #neg(@y)) -> #false() 582.18/149.67 , #eq(#0(), #s(@y)) -> #false() 582.18/149.67 , #eq(#neg(@x), #pos(@y)) -> #false() 582.18/149.67 , #eq(#neg(@x), #0()) -> #false() 582.18/149.67 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.18/149.67 , #eq(#s(@x), #0()) -> #false() 582.18/149.67 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.18/149.67 , lcs#3(nil()) -> #abs(#0()) 582.18/149.67 , lcs#3(::(@len, @_@1)) -> @len 582.18/149.67 , lcs#1(@m) -> lcs#2(@m) 582.18/149.67 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.18/149.67 , lcstable#3(nil(), @l2, @x) -> nil() 582.18/149.67 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.18/149.67 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.18/149.67 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.67 +(@diagVal, #pos(#s(#0()))) 582.18/149.67 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.67 max(@belowVal, @rightVal) 582.18/149.67 , lcs#2(nil()) -> #abs(#0()) 582.18/149.67 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.18/149.67 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.18/149.67 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.67 newline#6(newline#7(#equal(@x, @y), 582.18/149.67 @belowVal, 582.18/149.67 @diagVal, 582.18/149.67 @rightVal), 582.18/149.67 @nl) 582.18/149.67 , right#1(nil()) -> #abs(#0()) 582.18/149.67 , right#1(::(@x, @xs)) -> @x 582.18/149.67 , newline#2(nil(), @x, @xs, @y) -> nil() 582.18/149.67 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.67 newline#3(newline(@y, @lastline', @xs), 582.18/149.67 @belowVal, 582.18/149.67 @lastline', 582.18/149.67 @x, 582.18/149.67 @y) 582.18/149.67 , firstline(@l) -> firstline#1(@l) 582.18/149.67 , #ckgt(#EQ()) -> #false() 582.18/149.67 , #ckgt(#LT()) -> #false() 582.18/149.67 , #ckgt(#GT()) -> #true() 582.18/149.67 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.18/149.67 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.18/149.67 , #add(#0(), @y) -> @y 582.18/149.67 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.18/149.67 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.18/149.67 , #and(#true(), #true()) -> #true() 582.18/149.67 , #and(#true(), #false()) -> #false() 582.18/149.67 , #and(#false(), #true()) -> #false() 582.18/149.67 , #and(#false(), #false()) -> #false() 582.18/149.67 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.18/149.67 , #compare(#pos(@x), #0()) -> #GT() 582.18/149.67 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.18/149.67 , #compare(#0(), #pos(@y)) -> #LT() 582.18/149.67 , #compare(#0(), #0()) -> #EQ() 582.18/149.67 , #compare(#0(), #neg(@y)) -> #GT() 582.18/149.67 , #compare(#0(), #s(@y)) -> #LT() 582.18/149.67 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.18/149.67 , #compare(#neg(@x), #0()) -> #LT() 582.18/149.67 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.18/149.67 , #compare(#s(@x), #0()) -> #GT() 582.18/149.67 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.18/149.67 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.18/149.67 , lcstable#1(::(@x, @xs), @l2) -> 582.18/149.67 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.18/149.67 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.18/149.67 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.18/149.67 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.67 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.18/149.67 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.18/149.67 , right(@l) -> right#1(@l) 582.18/149.67 , max#1(#true(), @a, @b) -> @a 582.18/149.67 , max#1(#false(), @a, @b) -> @b 582.18/149.67 , +(@x, @y) -> #add(@x, @y) 582.18/149.67 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.18/149.67 , #succ(#0()) -> #pos(#s(#0())) 582.18/149.67 , #succ(#neg(#s(#0()))) -> #0() 582.18/149.67 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.18/149.67 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.67 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.18/149.67 , #abs(#pos(@x)) -> #pos(@x) 582.18/149.67 , #abs(#0()) -> #0() 582.18/149.67 , #abs(#neg(@x)) -> #pos(@x) 582.18/149.67 , #abs(#s(@x)) -> #pos(#s(@x)) 582.18/149.67 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.18/149.67 , #pred(#pos(#s(#0()))) -> #0() 582.18/149.67 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.18/149.67 , #pred(#0()) -> #neg(#s(#0())) 582.18/149.67 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.18/149.67 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.18/149.67 , newline#1(nil(), @lastline, @y) -> nil() 582.18/149.67 , newline#1(::(@x, @xs), @lastline, @y) -> 582.18/149.67 newline#2(@lastline, @x, @xs, @y) } 582.18/149.67 Obligation: 582.18/149.67 innermost runtime complexity 582.18/149.67 Answer: 582.18/149.67 YES(O(1),O(n^2)) 582.18/149.67 582.18/149.67 We estimate the number of application of {3,5,12,14,17} by 582.18/149.67 applications of Pre({3,5,12,14,17}) = {4,6,13,16,23}. Here rules 582.18/149.67 are labeled as follows: 582.18/149.67 582.18/149.67 DPs: 582.18/149.67 { 1: firstline#1^#(::(@x, @xs)) -> 582.18/149.67 c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.67 , 2: firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.67 , 3: lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.67 , 4: lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.67 , 5: lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.67 , 6: lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.67 , 7: lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.67 , 8: lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.67 , 9: lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.67 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.67 lcstable^#(@xs, @l2)) 582.18/149.67 , 10: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.18/149.67 c_9(newline^#(@x, @l, @l2)) 582.18/149.67 , 11: newline^#(@y, @lastline, @l) -> 582.18/149.67 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.67 , 12: newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.67 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.67 , 13: newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.67 c_11(max^#(@belowVal, @rightVal)) 582.18/149.67 , 14: max^#(@a, @b) -> 582.18/149.67 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.67 , 15: lcs^#(@l1, @l2) -> 582.18/149.67 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.67 , 16: newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.67 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.67 @belowVal, 582.18/149.67 @diagVal, 582.18/149.67 @rightVal), 582.18/149.67 @nl), 582.18/149.67 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.67 #equal^#(@x, @y)) 582.18/149.67 , 17: right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.67 , 18: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.67 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.67 @belowVal, 582.18/149.67 @lastline', 582.18/149.67 @x, 582.18/149.67 @y), 582.18/149.67 newline^#(@y, @lastline', @xs)) 582.18/149.67 , 19: newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.67 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.67 right^#(@nl)) 582.18/149.67 , 20: lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.67 , 21: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.67 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.67 , 22: newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.67 c_25(newline#5^#(right(@lastline'), 582.18/149.67 @belowVal, 582.18/149.67 @nl, 582.18/149.67 @rightVal, 582.18/149.67 @x, 582.18/149.67 @y), 582.18/149.67 right^#(@lastline')) 582.18/149.67 , 23: right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.67 , 24: firstline#1^#(nil()) -> c_1() 582.18/149.67 , 25: #abs^#(#pos(@x)) -> c_32() 582.18/149.67 , 26: #abs^#(#0()) -> c_33() 582.18/149.67 , 27: #abs^#(#neg(@x)) -> c_34() 582.18/149.67 , 28: #abs^#(#s(@x)) -> c_35() 582.18/149.67 , 29: #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.67 , 30: #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.67 , 31: #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.67 , 32: #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.67 , 33: #eq^#(nil(), nil()) -> c_43() 582.18/149.67 , 34: #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.67 , 35: #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.67 , 36: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.67 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.67 #eq^#(@x_1, @y_1), 582.18/149.67 #eq^#(@x_2, @y_2)) 582.18/149.67 , 37: #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.67 , 38: #eq^#(#0(), #0()) -> c_48() 582.18/149.67 , 39: #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.67 , 40: #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.67 , 41: #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.67 , 42: #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.67 , 43: #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.67 , 44: #eq^#(#s(@x), #0()) -> c_54() 582.18/149.67 , 45: #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.67 , 46: lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.67 , 47: lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.67 , 48: +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.67 , 49: newline#6^#(@elem, @nl) -> c_37() 582.18/149.67 , 50: right#1^#(::(@x, @xs)) -> c_17() 582.18/149.67 , 51: newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.67 , 52: #greater^#(@x, @y) -> 582.18/149.67 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.67 , 53: #ckgt^#(#EQ()) -> c_56() 582.18/149.67 , 54: #ckgt^#(#LT()) -> c_57() 582.18/149.67 , 55: #ckgt^#(#GT()) -> c_58() 582.18/149.67 , 56: #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.67 , 57: #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.67 , 58: #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.67 , 59: #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.67 , 60: #compare^#(#0(), #0()) -> c_72() 582.18/149.67 , 61: #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.67 , 62: #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.67 , 63: #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.67 , 64: #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.67 , 65: #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.67 , 66: #compare^#(#s(@x), #0()) -> c_78() 582.18/149.67 , 67: #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.67 , 68: newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.67 , 69: max#1^#(#true(), @a, @b) -> c_28() 582.18/149.67 , 70: max#1^#(#false(), @a, @b) -> c_29() 582.18/149.67 , 71: #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.67 , 72: #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.67 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.67 , 73: #add^#(#0(), @y) -> c_61() 582.18/149.67 , 74: #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.67 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.67 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.67 , 76: #and^#(#true(), #true()) -> c_64() 582.18/149.67 , 77: #and^#(#true(), #false()) -> c_65() 582.18/149.68 , 78: #and^#(#false(), #true()) -> c_66() 582.18/149.68 , 79: #and^#(#false(), #false()) -> c_67() 582.18/149.68 , 80: #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.68 , 81: #succ^#(#0()) -> c_81() 582.18/149.68 , 82: #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.68 , 83: #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.68 , 84: #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.68 , 85: #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.68 , 86: #pred^#(#0()) -> c_86() 582.18/149.68 , 87: #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.68 582.18/149.68 We are left with following problem, upon which TcT provides the 582.18/149.68 certificate YES(O(1),O(n^2)). 582.18/149.68 582.18/149.68 Strict DPs: 582.18/149.68 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.68 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.68 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.68 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.68 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.68 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.68 , lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.68 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.68 lcstable^#(@xs, @l2)) 582.18/149.68 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.18/149.68 , newline^#(@y, @lastline, @l) -> 582.18/149.68 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.68 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.68 c_11(max^#(@belowVal, @rightVal)) 582.18/149.68 , lcs^#(@l1, @l2) -> 582.18/149.68 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.68 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.68 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.68 @belowVal, 582.18/149.68 @diagVal, 582.18/149.68 @rightVal), 582.18/149.68 @nl), 582.18/149.68 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.68 #equal^#(@x, @y)) 582.18/149.68 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.68 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.68 @belowVal, 582.18/149.68 @lastline', 582.18/149.68 @x, 582.18/149.68 @y), 582.18/149.68 newline^#(@y, @lastline', @xs)) 582.18/149.68 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.68 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.68 right^#(@nl)) 582.18/149.68 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.68 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.68 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.68 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.68 c_25(newline#5^#(right(@lastline'), 582.18/149.68 @belowVal, 582.18/149.68 @nl, 582.18/149.68 @rightVal, 582.18/149.68 @x, 582.18/149.68 @y), 582.18/149.68 right^#(@lastline')) 582.18/149.68 , right^#(@l) -> c_27(right#1^#(@l)) } 582.18/149.68 Weak DPs: 582.18/149.68 { firstline#1^#(nil()) -> c_1() 582.18/149.68 , #abs^#(#pos(@x)) -> c_32() 582.18/149.68 , #abs^#(#0()) -> c_33() 582.18/149.68 , #abs^#(#neg(@x)) -> c_34() 582.18/149.68 , #abs^#(#s(@x)) -> c_35() 582.18/149.68 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.68 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.68 , #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.68 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.68 , #eq^#(nil(), nil()) -> c_43() 582.18/149.68 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.68 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.68 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.68 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.68 #eq^#(@x_1, @y_1), 582.18/149.68 #eq^#(@x_2, @y_2)) 582.18/149.68 , #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.68 , #eq^#(#0(), #0()) -> c_48() 582.18/149.68 , #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.68 , #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.68 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.68 , #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.68 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.68 , #eq^#(#s(@x), #0()) -> c_54() 582.18/149.68 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.68 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.68 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.68 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.68 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.68 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.68 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.68 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.68 , max^#(@a, @b) -> 582.18/149.68 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.68 , newline#6^#(@elem, @nl) -> c_37() 582.18/149.68 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.68 , right#1^#(::(@x, @xs)) -> c_17() 582.18/149.68 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.68 , #greater^#(@x, @y) -> 582.18/149.68 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.68 , #ckgt^#(#EQ()) -> c_56() 582.18/149.68 , #ckgt^#(#LT()) -> c_57() 582.18/149.68 , #ckgt^#(#GT()) -> c_58() 582.18/149.68 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.68 , #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.68 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.68 , #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.68 , #compare^#(#0(), #0()) -> c_72() 582.18/149.68 , #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.68 , #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.68 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.68 , #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.68 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.68 , #compare^#(#s(@x), #0()) -> c_78() 582.18/149.68 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.68 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.68 , max#1^#(#true(), @a, @b) -> c_28() 582.18/149.68 , max#1^#(#false(), @a, @b) -> c_29() 582.18/149.68 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.68 , #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.68 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.68 , #add^#(#0(), @y) -> c_61() 582.18/149.68 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.68 , #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.68 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.68 , #and^#(#true(), #true()) -> c_64() 582.18/149.68 , #and^#(#true(), #false()) -> c_65() 582.18/149.68 , #and^#(#false(), #true()) -> c_66() 582.18/149.68 , #and^#(#false(), #false()) -> c_67() 582.18/149.68 , #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.68 , #succ^#(#0()) -> c_81() 582.18/149.68 , #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.68 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.68 , #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.68 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.68 , #pred^#(#0()) -> c_86() 582.18/149.68 , #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.68 Weak Trs: 582.18/149.68 { firstline#1(nil()) -> nil() 582.18/149.68 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.18/149.68 , #equal(@x, @y) -> #eq(@x, @y) 582.18/149.68 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.18/149.68 , #eq(#pos(@x), #0()) -> #false() 582.18/149.68 , #eq(#pos(@x), #neg(@y)) -> #false() 582.18/149.68 , #eq(nil(), nil()) -> #true() 582.18/149.68 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.18/149.68 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.18/149.68 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.68 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.18/149.68 , #eq(#0(), #pos(@y)) -> #false() 582.18/149.68 , #eq(#0(), #0()) -> #true() 582.18/149.68 , #eq(#0(), #neg(@y)) -> #false() 582.18/149.68 , #eq(#0(), #s(@y)) -> #false() 582.18/149.68 , #eq(#neg(@x), #pos(@y)) -> #false() 582.18/149.68 , #eq(#neg(@x), #0()) -> #false() 582.18/149.68 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.18/149.68 , #eq(#s(@x), #0()) -> #false() 582.18/149.68 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.18/149.68 , lcs#3(nil()) -> #abs(#0()) 582.18/149.68 , lcs#3(::(@len, @_@1)) -> @len 582.18/149.68 , lcs#1(@m) -> lcs#2(@m) 582.18/149.68 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.18/149.68 , lcstable#3(nil(), @l2, @x) -> nil() 582.18/149.68 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.18/149.68 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.18/149.68 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.68 +(@diagVal, #pos(#s(#0()))) 582.18/149.68 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.68 max(@belowVal, @rightVal) 582.18/149.68 , lcs#2(nil()) -> #abs(#0()) 582.18/149.68 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.18/149.68 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.18/149.68 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.68 newline#6(newline#7(#equal(@x, @y), 582.18/149.68 @belowVal, 582.18/149.68 @diagVal, 582.18/149.68 @rightVal), 582.18/149.68 @nl) 582.18/149.68 , right#1(nil()) -> #abs(#0()) 582.18/149.68 , right#1(::(@x, @xs)) -> @x 582.18/149.68 , newline#2(nil(), @x, @xs, @y) -> nil() 582.18/149.68 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.68 newline#3(newline(@y, @lastline', @xs), 582.18/149.68 @belowVal, 582.18/149.68 @lastline', 582.18/149.68 @x, 582.18/149.68 @y) 582.18/149.68 , firstline(@l) -> firstline#1(@l) 582.18/149.68 , #ckgt(#EQ()) -> #false() 582.18/149.68 , #ckgt(#LT()) -> #false() 582.18/149.68 , #ckgt(#GT()) -> #true() 582.18/149.68 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.18/149.68 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.18/149.68 , #add(#0(), @y) -> @y 582.18/149.68 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.18/149.68 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.18/149.68 , #and(#true(), #true()) -> #true() 582.18/149.68 , #and(#true(), #false()) -> #false() 582.18/149.68 , #and(#false(), #true()) -> #false() 582.18/149.68 , #and(#false(), #false()) -> #false() 582.18/149.68 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.18/149.68 , #compare(#pos(@x), #0()) -> #GT() 582.18/149.68 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.18/149.68 , #compare(#0(), #pos(@y)) -> #LT() 582.18/149.68 , #compare(#0(), #0()) -> #EQ() 582.18/149.68 , #compare(#0(), #neg(@y)) -> #GT() 582.18/149.68 , #compare(#0(), #s(@y)) -> #LT() 582.18/149.68 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.18/149.68 , #compare(#neg(@x), #0()) -> #LT() 582.18/149.68 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.18/149.68 , #compare(#s(@x), #0()) -> #GT() 582.18/149.68 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.18/149.68 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.18/149.68 , lcstable#1(::(@x, @xs), @l2) -> 582.18/149.68 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.18/149.68 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.18/149.68 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.18/149.68 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.68 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.18/149.68 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.18/149.68 , right(@l) -> right#1(@l) 582.18/149.68 , max#1(#true(), @a, @b) -> @a 582.18/149.68 , max#1(#false(), @a, @b) -> @b 582.18/149.68 , +(@x, @y) -> #add(@x, @y) 582.18/149.68 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.18/149.68 , #succ(#0()) -> #pos(#s(#0())) 582.18/149.68 , #succ(#neg(#s(#0()))) -> #0() 582.18/149.68 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.18/149.68 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.68 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.18/149.68 , #abs(#pos(@x)) -> #pos(@x) 582.18/149.68 , #abs(#0()) -> #0() 582.18/149.68 , #abs(#neg(@x)) -> #pos(@x) 582.18/149.68 , #abs(#s(@x)) -> #pos(#s(@x)) 582.18/149.68 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.18/149.68 , #pred(#pos(#s(#0()))) -> #0() 582.18/149.68 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.18/149.68 , #pred(#0()) -> #neg(#s(#0())) 582.18/149.68 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.18/149.68 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.18/149.68 , newline#1(nil(), @lastline, @y) -> nil() 582.18/149.68 , newline#1(::(@x, @xs), @lastline, @y) -> 582.18/149.68 newline#2(@lastline, @x, @xs, @y) } 582.18/149.68 Obligation: 582.18/149.68 innermost runtime complexity 582.18/149.68 Answer: 582.18/149.68 YES(O(1),O(n^2)) 582.18/149.68 582.18/149.68 We estimate the number of application of {4,10,18} by applications 582.18/149.68 of Pre({4,10,18}) = {3,12,14,17}. Here rules are labeled as 582.18/149.68 follows: 582.18/149.68 582.18/149.68 DPs: 582.18/149.68 { 1: firstline#1^#(::(@x, @xs)) -> 582.18/149.68 c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.68 , 2: firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.68 , 3: lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.68 , 4: lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.68 , 5: lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.68 , 6: lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.68 , 7: lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.68 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.68 lcstable^#(@xs, @l2)) 582.18/149.68 , 8: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.18/149.68 c_9(newline^#(@x, @l, @l2)) 582.18/149.68 , 9: newline^#(@y, @lastline, @l) -> 582.18/149.68 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.68 , 10: newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.68 c_11(max^#(@belowVal, @rightVal)) 582.18/149.68 , 11: lcs^#(@l1, @l2) -> 582.18/149.68 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.68 , 12: newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.68 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.68 @belowVal, 582.18/149.68 @diagVal, 582.18/149.68 @rightVal), 582.18/149.68 @nl), 582.18/149.68 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.68 #equal^#(@x, @y)) 582.18/149.68 , 13: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.68 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.68 @belowVal, 582.18/149.68 @lastline', 582.18/149.68 @x, 582.18/149.68 @y), 582.18/149.68 newline^#(@y, @lastline', @xs)) 582.18/149.68 , 14: newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.68 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.68 right^#(@nl)) 582.18/149.68 , 15: lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.68 , 16: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.68 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.68 , 17: newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.68 c_25(newline#5^#(right(@lastline'), 582.18/149.68 @belowVal, 582.18/149.68 @nl, 582.18/149.68 @rightVal, 582.18/149.68 @x, 582.18/149.68 @y), 582.18/149.68 right^#(@lastline')) 582.18/149.68 , 18: right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.68 , 19: firstline#1^#(nil()) -> c_1() 582.18/149.68 , 20: #abs^#(#pos(@x)) -> c_32() 582.18/149.68 , 21: #abs^#(#0()) -> c_33() 582.18/149.68 , 22: #abs^#(#neg(@x)) -> c_34() 582.18/149.68 , 23: #abs^#(#s(@x)) -> c_35() 582.18/149.68 , 24: #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.68 , 25: #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.68 , 26: #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.68 , 27: #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.68 , 28: #eq^#(nil(), nil()) -> c_43() 582.18/149.68 , 29: #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.68 , 30: #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.68 , 31: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.68 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.68 #eq^#(@x_1, @y_1), 582.18/149.68 #eq^#(@x_2, @y_2)) 582.18/149.68 , 32: #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.68 , 33: #eq^#(#0(), #0()) -> c_48() 582.18/149.68 , 34: #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.68 , 35: #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.68 , 36: #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.68 , 37: #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.68 , 38: #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.68 , 39: #eq^#(#s(@x), #0()) -> c_54() 582.18/149.68 , 40: #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.68 , 41: lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.68 , 42: lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.68 , 43: lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.68 , 44: lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.68 , 45: newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.68 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.68 , 46: +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.68 , 47: max^#(@a, @b) -> 582.18/149.68 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.68 , 48: newline#6^#(@elem, @nl) -> c_37() 582.18/149.68 , 49: right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.68 , 50: right#1^#(::(@x, @xs)) -> c_17() 582.18/149.68 , 51: newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.68 , 52: #greater^#(@x, @y) -> 582.18/149.68 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.68 , 53: #ckgt^#(#EQ()) -> c_56() 582.18/149.68 , 54: #ckgt^#(#LT()) -> c_57() 582.18/149.68 , 55: #ckgt^#(#GT()) -> c_58() 582.18/149.68 , 56: #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.68 , 57: #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.68 , 58: #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.68 , 59: #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.68 , 60: #compare^#(#0(), #0()) -> c_72() 582.18/149.68 , 61: #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.68 , 62: #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.68 , 63: #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.68 , 64: #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.68 , 65: #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.68 , 66: #compare^#(#s(@x), #0()) -> c_78() 582.18/149.68 , 67: #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.68 , 68: newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.68 , 69: max#1^#(#true(), @a, @b) -> c_28() 582.18/149.68 , 70: max#1^#(#false(), @a, @b) -> c_29() 582.18/149.68 , 71: #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.68 , 72: #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.68 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.68 , 73: #add^#(#0(), @y) -> c_61() 582.18/149.68 , 74: #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.68 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.68 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.68 , 76: #and^#(#true(), #true()) -> c_64() 582.18/149.68 , 77: #and^#(#true(), #false()) -> c_65() 582.18/149.68 , 78: #and^#(#false(), #true()) -> c_66() 582.18/149.68 , 79: #and^#(#false(), #false()) -> c_67() 582.18/149.68 , 80: #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.68 , 81: #succ^#(#0()) -> c_81() 582.18/149.68 , 82: #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.68 , 83: #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.68 , 84: #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.68 , 85: #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.68 , 86: #pred^#(#0()) -> c_86() 582.18/149.68 , 87: #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.68 582.18/149.68 We are left with following problem, upon which TcT provides the 582.18/149.68 certificate YES(O(1),O(n^2)). 582.18/149.68 582.18/149.68 Strict DPs: 582.18/149.68 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.68 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.68 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.68 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.68 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.68 , lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.68 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.68 lcstable^#(@xs, @l2)) 582.18/149.68 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.18/149.68 , newline^#(@y, @lastline, @l) -> 582.18/149.68 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.68 , lcs^#(@l1, @l2) -> 582.18/149.68 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.68 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.68 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.68 @belowVal, 582.18/149.68 @diagVal, 582.18/149.68 @rightVal), 582.18/149.68 @nl), 582.18/149.68 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.68 #equal^#(@x, @y)) 582.18/149.68 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.68 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.69 @belowVal, 582.18/149.69 @lastline', 582.18/149.69 @x, 582.18/149.69 @y), 582.18/149.69 newline^#(@y, @lastline', @xs)) 582.18/149.69 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.69 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.69 right^#(@nl)) 582.18/149.69 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.69 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.69 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.69 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.69 c_25(newline#5^#(right(@lastline'), 582.18/149.69 @belowVal, 582.18/149.69 @nl, 582.18/149.69 @rightVal, 582.18/149.69 @x, 582.18/149.69 @y), 582.18/149.69 right^#(@lastline')) } 582.18/149.69 Weak DPs: 582.18/149.69 { firstline#1^#(nil()) -> c_1() 582.18/149.69 , #abs^#(#pos(@x)) -> c_32() 582.18/149.69 , #abs^#(#0()) -> c_33() 582.18/149.69 , #abs^#(#neg(@x)) -> c_34() 582.18/149.69 , #abs^#(#s(@x)) -> c_35() 582.18/149.69 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.69 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.69 , #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.69 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.69 , #eq^#(nil(), nil()) -> c_43() 582.18/149.69 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.69 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.69 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.69 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.69 #eq^#(@x_1, @y_1), 582.18/149.69 #eq^#(@x_2, @y_2)) 582.18/149.69 , #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.69 , #eq^#(#0(), #0()) -> c_48() 582.18/149.69 , #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.69 , #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.69 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.69 , #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.69 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.69 , #eq^#(#s(@x), #0()) -> c_54() 582.18/149.69 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.69 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.69 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.69 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.69 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.69 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.69 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.69 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 c_11(max^#(@belowVal, @rightVal)) 582.18/149.69 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.69 , max^#(@a, @b) -> 582.18/149.69 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.69 , newline#6^#(@elem, @nl) -> c_37() 582.18/149.69 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.69 , right#1^#(::(@x, @xs)) -> c_17() 582.18/149.69 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.69 , #greater^#(@x, @y) -> 582.18/149.69 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.69 , #ckgt^#(#EQ()) -> c_56() 582.18/149.69 , #ckgt^#(#LT()) -> c_57() 582.18/149.69 , #ckgt^#(#GT()) -> c_58() 582.18/149.69 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.69 , #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.69 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.69 , #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.69 , #compare^#(#0(), #0()) -> c_72() 582.18/149.69 , #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.69 , #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.69 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.69 , #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.69 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.69 , #compare^#(#s(@x), #0()) -> c_78() 582.18/149.69 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.69 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.69 , right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.69 , max#1^#(#true(), @a, @b) -> c_28() 582.18/149.69 , max#1^#(#false(), @a, @b) -> c_29() 582.18/149.69 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.69 , #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.69 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.69 , #add^#(#0(), @y) -> c_61() 582.18/149.69 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.69 , #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.69 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.69 , #and^#(#true(), #true()) -> c_64() 582.18/149.69 , #and^#(#true(), #false()) -> c_65() 582.18/149.69 , #and^#(#false(), #true()) -> c_66() 582.18/149.69 , #and^#(#false(), #false()) -> c_67() 582.18/149.69 , #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.69 , #succ^#(#0()) -> c_81() 582.18/149.69 , #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.69 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.69 , #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.69 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.69 , #pred^#(#0()) -> c_86() 582.18/149.69 , #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.69 Weak Trs: 582.18/149.69 { firstline#1(nil()) -> nil() 582.18/149.69 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.18/149.69 , #equal(@x, @y) -> #eq(@x, @y) 582.18/149.69 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.18/149.69 , #eq(#pos(@x), #0()) -> #false() 582.18/149.69 , #eq(#pos(@x), #neg(@y)) -> #false() 582.18/149.69 , #eq(nil(), nil()) -> #true() 582.18/149.69 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.18/149.69 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.18/149.69 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.69 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.18/149.69 , #eq(#0(), #pos(@y)) -> #false() 582.18/149.69 , #eq(#0(), #0()) -> #true() 582.18/149.69 , #eq(#0(), #neg(@y)) -> #false() 582.18/149.69 , #eq(#0(), #s(@y)) -> #false() 582.18/149.69 , #eq(#neg(@x), #pos(@y)) -> #false() 582.18/149.69 , #eq(#neg(@x), #0()) -> #false() 582.18/149.69 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.18/149.69 , #eq(#s(@x), #0()) -> #false() 582.18/149.69 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.18/149.69 , lcs#3(nil()) -> #abs(#0()) 582.18/149.69 , lcs#3(::(@len, @_@1)) -> @len 582.18/149.69 , lcs#1(@m) -> lcs#2(@m) 582.18/149.69 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.18/149.69 , lcstable#3(nil(), @l2, @x) -> nil() 582.18/149.69 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.18/149.69 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.18/149.69 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 +(@diagVal, #pos(#s(#0()))) 582.18/149.69 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 max(@belowVal, @rightVal) 582.18/149.69 , lcs#2(nil()) -> #abs(#0()) 582.18/149.69 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.18/149.69 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.18/149.69 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.69 newline#6(newline#7(#equal(@x, @y), 582.18/149.69 @belowVal, 582.18/149.69 @diagVal, 582.18/149.69 @rightVal), 582.18/149.69 @nl) 582.18/149.69 , right#1(nil()) -> #abs(#0()) 582.18/149.69 , right#1(::(@x, @xs)) -> @x 582.18/149.69 , newline#2(nil(), @x, @xs, @y) -> nil() 582.18/149.69 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.69 newline#3(newline(@y, @lastline', @xs), 582.18/149.69 @belowVal, 582.18/149.69 @lastline', 582.18/149.69 @x, 582.18/149.69 @y) 582.18/149.69 , firstline(@l) -> firstline#1(@l) 582.18/149.69 , #ckgt(#EQ()) -> #false() 582.18/149.69 , #ckgt(#LT()) -> #false() 582.18/149.69 , #ckgt(#GT()) -> #true() 582.18/149.69 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.18/149.69 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.18/149.69 , #add(#0(), @y) -> @y 582.18/149.69 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.18/149.69 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.18/149.69 , #and(#true(), #true()) -> #true() 582.18/149.69 , #and(#true(), #false()) -> #false() 582.18/149.69 , #and(#false(), #true()) -> #false() 582.18/149.69 , #and(#false(), #false()) -> #false() 582.18/149.69 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.18/149.69 , #compare(#pos(@x), #0()) -> #GT() 582.18/149.69 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.18/149.69 , #compare(#0(), #pos(@y)) -> #LT() 582.18/149.69 , #compare(#0(), #0()) -> #EQ() 582.18/149.69 , #compare(#0(), #neg(@y)) -> #GT() 582.18/149.69 , #compare(#0(), #s(@y)) -> #LT() 582.18/149.69 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.18/149.69 , #compare(#neg(@x), #0()) -> #LT() 582.18/149.69 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.18/149.69 , #compare(#s(@x), #0()) -> #GT() 582.18/149.69 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.18/149.69 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.18/149.69 , lcstable#1(::(@x, @xs), @l2) -> 582.18/149.69 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.18/149.69 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.18/149.69 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.18/149.69 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.69 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.18/149.69 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.18/149.69 , right(@l) -> right#1(@l) 582.18/149.69 , max#1(#true(), @a, @b) -> @a 582.18/149.69 , max#1(#false(), @a, @b) -> @b 582.18/149.69 , +(@x, @y) -> #add(@x, @y) 582.18/149.69 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.18/149.69 , #succ(#0()) -> #pos(#s(#0())) 582.18/149.69 , #succ(#neg(#s(#0()))) -> #0() 582.18/149.69 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.18/149.69 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.69 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.18/149.69 , #abs(#pos(@x)) -> #pos(@x) 582.18/149.69 , #abs(#0()) -> #0() 582.18/149.69 , #abs(#neg(@x)) -> #pos(@x) 582.18/149.69 , #abs(#s(@x)) -> #pos(#s(@x)) 582.18/149.69 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.18/149.69 , #pred(#pos(#s(#0()))) -> #0() 582.18/149.69 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.18/149.69 , #pred(#0()) -> #neg(#s(#0())) 582.18/149.69 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.18/149.69 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.18/149.69 , newline#1(nil(), @lastline, @y) -> nil() 582.18/149.69 , newline#1(::(@x, @xs), @lastline, @y) -> 582.18/149.69 newline#2(@lastline, @x, @xs, @y) } 582.18/149.69 Obligation: 582.18/149.69 innermost runtime complexity 582.18/149.69 Answer: 582.18/149.69 YES(O(1),O(n^2)) 582.18/149.69 582.18/149.69 We estimate the number of application of {3,10} by applications of 582.18/149.69 Pre({3,10}) = {9,15}. Here rules are labeled as follows: 582.18/149.69 582.18/149.69 DPs: 582.18/149.69 { 1: firstline#1^#(::(@x, @xs)) -> 582.18/149.69 c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.69 , 2: firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.69 , 3: lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.69 , 4: lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.69 , 5: lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.69 , 6: lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.69 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.69 lcstable^#(@xs, @l2)) 582.18/149.69 , 7: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.18/149.69 c_9(newline^#(@x, @l, @l2)) 582.18/149.69 , 8: newline^#(@y, @lastline, @l) -> 582.18/149.69 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.69 , 9: lcs^#(@l1, @l2) -> 582.18/149.69 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.69 , 10: newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.69 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.69 @belowVal, 582.18/149.69 @diagVal, 582.18/149.69 @rightVal), 582.18/149.69 @nl), 582.18/149.69 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.69 #equal^#(@x, @y)) 582.18/149.69 , 11: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.69 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.69 @belowVal, 582.18/149.69 @lastline', 582.18/149.69 @x, 582.18/149.69 @y), 582.18/149.69 newline^#(@y, @lastline', @xs)) 582.18/149.69 , 12: newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.69 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.69 right^#(@nl)) 582.18/149.69 , 13: lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.69 , 14: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.69 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.69 , 15: newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.69 c_25(newline#5^#(right(@lastline'), 582.18/149.69 @belowVal, 582.18/149.69 @nl, 582.18/149.69 @rightVal, 582.18/149.69 @x, 582.18/149.69 @y), 582.18/149.69 right^#(@lastline')) 582.18/149.69 , 16: firstline#1^#(nil()) -> c_1() 582.18/149.69 , 17: #abs^#(#pos(@x)) -> c_32() 582.18/149.69 , 18: #abs^#(#0()) -> c_33() 582.18/149.69 , 19: #abs^#(#neg(@x)) -> c_34() 582.18/149.69 , 20: #abs^#(#s(@x)) -> c_35() 582.18/149.69 , 21: #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.69 , 22: #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.69 , 23: #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.69 , 24: #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.69 , 25: #eq^#(nil(), nil()) -> c_43() 582.18/149.69 , 26: #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.69 , 27: #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.69 , 28: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.69 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.69 #eq^#(@x_1, @y_1), 582.18/149.69 #eq^#(@x_2, @y_2)) 582.18/149.69 , 29: #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.69 , 30: #eq^#(#0(), #0()) -> c_48() 582.18/149.69 , 31: #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.69 , 32: #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.69 , 33: #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.69 , 34: #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.69 , 35: #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.69 , 36: #eq^#(#s(@x), #0()) -> c_54() 582.18/149.69 , 37: #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.69 , 38: lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.69 , 39: lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.69 , 40: lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.69 , 41: lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.69 , 42: lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.69 , 43: newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.69 , 44: newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 c_11(max^#(@belowVal, @rightVal)) 582.18/149.69 , 45: +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.69 , 46: max^#(@a, @b) -> 582.18/149.69 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.69 , 47: newline#6^#(@elem, @nl) -> c_37() 582.18/149.69 , 48: right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.69 , 49: right#1^#(::(@x, @xs)) -> c_17() 582.18/149.69 , 50: newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.69 , 51: #greater^#(@x, @y) -> 582.18/149.69 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.69 , 52: #ckgt^#(#EQ()) -> c_56() 582.18/149.69 , 53: #ckgt^#(#LT()) -> c_57() 582.18/149.69 , 54: #ckgt^#(#GT()) -> c_58() 582.18/149.69 , 55: #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.69 , 56: #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.69 , 57: #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.69 , 58: #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.69 , 59: #compare^#(#0(), #0()) -> c_72() 582.18/149.69 , 60: #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.69 , 61: #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.69 , 62: #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.69 , 63: #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.69 , 64: #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.69 , 65: #compare^#(#s(@x), #0()) -> c_78() 582.18/149.69 , 66: #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.69 , 67: newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.69 , 68: right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.69 , 69: max#1^#(#true(), @a, @b) -> c_28() 582.18/149.69 , 70: max#1^#(#false(), @a, @b) -> c_29() 582.18/149.69 , 71: #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.69 , 72: #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.69 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.69 , 73: #add^#(#0(), @y) -> c_61() 582.18/149.69 , 74: #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.69 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.69 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.69 , 76: #and^#(#true(), #true()) -> c_64() 582.18/149.69 , 77: #and^#(#true(), #false()) -> c_65() 582.18/149.69 , 78: #and^#(#false(), #true()) -> c_66() 582.18/149.69 , 79: #and^#(#false(), #false()) -> c_67() 582.18/149.69 , 80: #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.69 , 81: #succ^#(#0()) -> c_81() 582.18/149.69 , 82: #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.69 , 83: #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.69 , 84: #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.69 , 85: #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.69 , 86: #pred^#(#0()) -> c_86() 582.18/149.69 , 87: #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.69 582.18/149.69 We are left with following problem, upon which TcT provides the 582.18/149.69 certificate YES(O(1),O(n^2)). 582.18/149.69 582.18/149.69 Strict DPs: 582.18/149.69 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.18/149.69 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.18/149.69 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.18/149.69 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.18/149.69 , lcstable#1^#(::(@x, @xs), @l2) -> 582.18/149.69 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.18/149.69 lcstable^#(@xs, @l2)) 582.18/149.69 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.18/149.69 , newline^#(@y, @lastline, @l) -> 582.18/149.69 c_24(newline#1^#(@l, @lastline, @y)) 582.18/149.69 , lcs^#(@l1, @l2) -> 582.18/149.69 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.18/149.69 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.69 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.18/149.69 @belowVal, 582.18/149.69 @lastline', 582.18/149.69 @x, 582.18/149.69 @y), 582.18/149.69 newline^#(@y, @lastline', @xs)) 582.18/149.69 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.18/149.69 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.18/149.69 right^#(@nl)) 582.18/149.69 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.18/149.69 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.18/149.69 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.18/149.69 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.69 c_25(newline#5^#(right(@lastline'), 582.18/149.69 @belowVal, 582.18/149.69 @nl, 582.18/149.69 @rightVal, 582.18/149.69 @x, 582.18/149.69 @y), 582.18/149.69 right^#(@lastline')) } 582.18/149.69 Weak DPs: 582.18/149.69 { firstline#1^#(nil()) -> c_1() 582.18/149.69 , #abs^#(#pos(@x)) -> c_32() 582.18/149.69 , #abs^#(#0()) -> c_33() 582.18/149.69 , #abs^#(#neg(@x)) -> c_34() 582.18/149.69 , #abs^#(#s(@x)) -> c_35() 582.18/149.69 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.18/149.69 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.18/149.69 , #eq^#(#pos(@x), #0()) -> c_41() 582.18/149.69 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.18/149.69 , #eq^#(nil(), nil()) -> c_43() 582.18/149.69 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.18/149.69 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.18/149.69 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.69 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.18/149.69 #eq^#(@x_1, @y_1), 582.18/149.69 #eq^#(@x_2, @y_2)) 582.18/149.69 , #eq^#(#0(), #pos(@y)) -> c_47() 582.18/149.69 , #eq^#(#0(), #0()) -> c_48() 582.18/149.69 , #eq^#(#0(), #neg(@y)) -> c_49() 582.18/149.69 , #eq^#(#0(), #s(@y)) -> c_50() 582.18/149.69 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.18/149.69 , #eq^#(#neg(@x), #0()) -> c_52() 582.18/149.69 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.18/149.69 , #eq^#(#s(@x), #0()) -> c_54() 582.18/149.69 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.18/149.69 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.18/149.69 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.18/149.69 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.18/149.69 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.18/149.69 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.18/149.69 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.18/149.69 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.18/149.69 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 c_11(max^#(@belowVal, @rightVal)) 582.18/149.69 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.18/149.69 , max^#(@a, @b) -> 582.18/149.69 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.18/149.69 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.69 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.18/149.69 @belowVal, 582.18/149.69 @diagVal, 582.18/149.69 @rightVal), 582.18/149.69 @nl), 582.18/149.69 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.18/149.69 #equal^#(@x, @y)) 582.18/149.69 , newline#6^#(@elem, @nl) -> c_37() 582.18/149.69 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.18/149.69 , right#1^#(::(@x, @xs)) -> c_17() 582.18/149.69 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.18/149.69 , #greater^#(@x, @y) -> 582.18/149.69 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.18/149.69 , #ckgt^#(#EQ()) -> c_56() 582.18/149.69 , #ckgt^#(#LT()) -> c_57() 582.18/149.69 , #ckgt^#(#GT()) -> c_58() 582.18/149.69 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.18/149.69 , #compare^#(#pos(@x), #0()) -> c_69() 582.18/149.69 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.18/149.69 , #compare^#(#0(), #pos(@y)) -> c_71() 582.18/149.69 , #compare^#(#0(), #0()) -> c_72() 582.18/149.69 , #compare^#(#0(), #neg(@y)) -> c_73() 582.18/149.69 , #compare^#(#0(), #s(@y)) -> c_74() 582.18/149.69 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.18/149.69 , #compare^#(#neg(@x), #0()) -> c_76() 582.18/149.69 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.18/149.69 , #compare^#(#s(@x), #0()) -> c_78() 582.18/149.69 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.18/149.69 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.18/149.69 , right^#(@l) -> c_27(right#1^#(@l)) 582.18/149.69 , max#1^#(#true(), @a, @b) -> c_28() 582.18/149.69 , max#1^#(#false(), @a, @b) -> c_29() 582.18/149.69 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.18/149.69 , #add^#(#pos(#s(#s(@x))), @y) -> 582.18/149.69 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.69 , #add^#(#0(), @y) -> c_61() 582.18/149.69 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.18/149.69 , #add^#(#neg(#s(#s(@x))), @y) -> 582.18/149.69 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.18/149.69 , #and^#(#true(), #true()) -> c_64() 582.18/149.69 , #and^#(#true(), #false()) -> c_65() 582.18/149.69 , #and^#(#false(), #true()) -> c_66() 582.18/149.69 , #and^#(#false(), #false()) -> c_67() 582.18/149.69 , #succ^#(#pos(#s(@x))) -> c_80() 582.18/149.69 , #succ^#(#0()) -> c_81() 582.18/149.69 , #succ^#(#neg(#s(#0()))) -> c_82() 582.18/149.69 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.18/149.69 , #pred^#(#pos(#s(#0()))) -> c_84() 582.18/149.69 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.18/149.69 , #pred^#(#0()) -> c_86() 582.18/149.69 , #pred^#(#neg(#s(@x))) -> c_87() } 582.18/149.69 Weak Trs: 582.18/149.69 { firstline#1(nil()) -> nil() 582.18/149.69 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.18/149.69 , #equal(@x, @y) -> #eq(@x, @y) 582.18/149.69 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.18/149.69 , #eq(#pos(@x), #0()) -> #false() 582.18/149.69 , #eq(#pos(@x), #neg(@y)) -> #false() 582.18/149.69 , #eq(nil(), nil()) -> #true() 582.18/149.69 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.18/149.69 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.18/149.69 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.18/149.69 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.18/149.69 , #eq(#0(), #pos(@y)) -> #false() 582.18/149.69 , #eq(#0(), #0()) -> #true() 582.18/149.69 , #eq(#0(), #neg(@y)) -> #false() 582.18/149.69 , #eq(#0(), #s(@y)) -> #false() 582.18/149.69 , #eq(#neg(@x), #pos(@y)) -> #false() 582.18/149.69 , #eq(#neg(@x), #0()) -> #false() 582.18/149.69 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.18/149.69 , #eq(#s(@x), #0()) -> #false() 582.18/149.69 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.18/149.69 , lcs#3(nil()) -> #abs(#0()) 582.18/149.69 , lcs#3(::(@len, @_@1)) -> @len 582.18/149.69 , lcs#1(@m) -> lcs#2(@m) 582.18/149.69 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.18/149.69 , lcstable#3(nil(), @l2, @x) -> nil() 582.18/149.69 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.18/149.69 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.18/149.69 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 +(@diagVal, #pos(#s(#0()))) 582.18/149.69 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.18/149.69 max(@belowVal, @rightVal) 582.18/149.69 , lcs#2(nil()) -> #abs(#0()) 582.18/149.69 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.18/149.69 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.18/149.69 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.18/149.69 newline#6(newline#7(#equal(@x, @y), 582.18/149.69 @belowVal, 582.18/149.69 @diagVal, 582.18/149.69 @rightVal), 582.18/149.69 @nl) 582.18/149.69 , right#1(nil()) -> #abs(#0()) 582.18/149.69 , right#1(::(@x, @xs)) -> @x 582.18/149.69 , newline#2(nil(), @x, @xs, @y) -> nil() 582.18/149.69 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.18/149.69 newline#3(newline(@y, @lastline', @xs), 582.18/149.69 @belowVal, 582.18/149.69 @lastline', 582.18/149.69 @x, 582.18/149.69 @y) 582.18/149.69 , firstline(@l) -> firstline#1(@l) 582.18/149.69 , #ckgt(#EQ()) -> #false() 582.18/149.69 , #ckgt(#LT()) -> #false() 582.18/149.69 , #ckgt(#GT()) -> #true() 582.18/149.69 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.18/149.69 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.18/149.69 , #add(#0(), @y) -> @y 582.18/149.69 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.18/149.69 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.18/149.69 , #and(#true(), #true()) -> #true() 582.18/149.69 , #and(#true(), #false()) -> #false() 582.18/149.69 , #and(#false(), #true()) -> #false() 582.18/149.69 , #and(#false(), #false()) -> #false() 582.18/149.69 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.18/149.69 , #compare(#pos(@x), #0()) -> #GT() 582.18/149.69 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.18/149.69 , #compare(#0(), #pos(@y)) -> #LT() 582.18/149.69 , #compare(#0(), #0()) -> #EQ() 582.18/149.69 , #compare(#0(), #neg(@y)) -> #GT() 582.18/149.69 , #compare(#0(), #s(@y)) -> #LT() 582.18/149.69 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.18/149.69 , #compare(#neg(@x), #0()) -> #LT() 582.18/149.69 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.18/149.69 , #compare(#s(@x), #0()) -> #GT() 582.18/149.69 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.18/149.69 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.18/149.69 , lcstable#1(::(@x, @xs), @l2) -> 582.18/149.69 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.18/149.69 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.18/149.69 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.18/149.69 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.18/149.69 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.18/149.69 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.18/149.69 , right(@l) -> right#1(@l) 582.18/149.69 , max#1(#true(), @a, @b) -> @a 582.18/149.69 , max#1(#false(), @a, @b) -> @b 582.18/149.69 , +(@x, @y) -> #add(@x, @y) 582.18/149.69 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.18/149.69 , #succ(#0()) -> #pos(#s(#0())) 582.18/149.69 , #succ(#neg(#s(#0()))) -> #0() 582.18/149.69 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.70 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.70 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.70 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.70 , #abs(#0()) -> #0() 582.47/149.70 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.70 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.70 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.70 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.70 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.70 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.70 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.70 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.70 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.70 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.70 newline#2(@lastline, @x, @xs, @y) } 582.47/149.70 Obligation: 582.47/149.70 innermost runtime complexity 582.47/149.70 Answer: 582.47/149.70 YES(O(1),O(n^2)) 582.47/149.70 582.47/149.70 We estimate the number of application of {13} by applications of 582.47/149.70 Pre({13}) = {10}. Here rules are labeled as follows: 582.47/149.70 582.47/149.70 DPs: 582.47/149.70 { 1: firstline#1^#(::(@x, @xs)) -> 582.47/149.70 c_2(#abs^#(#0()), firstline^#(@xs)) 582.47/149.70 , 2: firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.47/149.70 , 3: lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.47/149.70 , 4: lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.47/149.70 , 5: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.70 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.70 lcstable^#(@xs, @l2)) 582.47/149.70 , 6: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.47/149.70 c_9(newline^#(@x, @l, @l2)) 582.47/149.70 , 7: newline^#(@y, @lastline, @l) -> 582.47/149.70 c_24(newline#1^#(@l, @lastline, @y)) 582.47/149.70 , 8: lcs^#(@l1, @l2) -> 582.47/149.70 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.47/149.70 , 9: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.70 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.47/149.70 @belowVal, 582.47/149.70 @lastline', 582.47/149.70 @x, 582.47/149.70 @y), 582.47/149.70 newline^#(@y, @lastline', @xs)) 582.47/149.70 , 10: newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.70 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.47/149.70 right^#(@nl)) 582.47/149.70 , 11: lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.47/149.70 , 12: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.70 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.47/149.70 , 13: newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.70 c_25(newline#5^#(right(@lastline'), 582.47/149.70 @belowVal, 582.47/149.70 @nl, 582.47/149.70 @rightVal, 582.47/149.70 @x, 582.47/149.70 @y), 582.47/149.70 right^#(@lastline')) 582.47/149.70 , 14: firstline#1^#(nil()) -> c_1() 582.47/149.70 , 15: #abs^#(#pos(@x)) -> c_32() 582.47/149.70 , 16: #abs^#(#0()) -> c_33() 582.47/149.70 , 17: #abs^#(#neg(@x)) -> c_34() 582.47/149.70 , 18: #abs^#(#s(@x)) -> c_35() 582.47/149.70 , 19: #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.47/149.70 , 20: #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.47/149.70 , 21: #eq^#(#pos(@x), #0()) -> c_41() 582.47/149.70 , 22: #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.47/149.70 , 23: #eq^#(nil(), nil()) -> c_43() 582.47/149.70 , 24: #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.47/149.70 , 25: #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.47/149.70 , 26: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.70 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.47/149.70 #eq^#(@x_1, @y_1), 582.47/149.70 #eq^#(@x_2, @y_2)) 582.47/149.70 , 27: #eq^#(#0(), #pos(@y)) -> c_47() 582.47/149.70 , 28: #eq^#(#0(), #0()) -> c_48() 582.47/149.70 , 29: #eq^#(#0(), #neg(@y)) -> c_49() 582.47/149.70 , 30: #eq^#(#0(), #s(@y)) -> c_50() 582.47/149.70 , 31: #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.47/149.70 , 32: #eq^#(#neg(@x), #0()) -> c_52() 582.47/149.70 , 33: #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.47/149.70 , 34: #eq^#(#s(@x), #0()) -> c_54() 582.47/149.70 , 35: #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.47/149.70 , 36: lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.47/149.70 , 37: lcs#3^#(::(@len, @_@1)) -> c_5() 582.47/149.70 , 38: lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.47/149.70 , 39: lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.47/149.70 , 40: lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.47/149.70 , 41: lcstable#3^#(nil(), @l2, @x) -> c_8() 582.47/149.70 , 42: newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.70 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.47/149.70 , 43: newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.70 c_11(max^#(@belowVal, @rightVal)) 582.47/149.70 , 44: +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.47/149.70 , 45: max^#(@a, @b) -> 582.47/149.70 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.47/149.70 , 46: newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.70 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.47/149.70 @belowVal, 582.47/149.70 @diagVal, 582.47/149.70 @rightVal), 582.47/149.70 @nl), 582.47/149.70 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.47/149.70 #equal^#(@x, @y)) 582.47/149.70 , 47: newline#6^#(@elem, @nl) -> c_37() 582.47/149.70 , 48: right#1^#(nil()) -> c_16(#abs^#(#0())) 582.47/149.70 , 49: right#1^#(::(@x, @xs)) -> c_17() 582.47/149.70 , 50: newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.47/149.70 , 51: #greater^#(@x, @y) -> 582.47/149.70 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.47/149.70 , 52: #ckgt^#(#EQ()) -> c_56() 582.47/149.70 , 53: #ckgt^#(#LT()) -> c_57() 582.47/149.70 , 54: #ckgt^#(#GT()) -> c_58() 582.47/149.70 , 55: #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.47/149.70 , 56: #compare^#(#pos(@x), #0()) -> c_69() 582.47/149.70 , 57: #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.47/149.70 , 58: #compare^#(#0(), #pos(@y)) -> c_71() 582.47/149.70 , 59: #compare^#(#0(), #0()) -> c_72() 582.47/149.70 , 60: #compare^#(#0(), #neg(@y)) -> c_73() 582.47/149.70 , 61: #compare^#(#0(), #s(@y)) -> c_74() 582.47/149.70 , 62: #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.47/149.70 , 63: #compare^#(#neg(@x), #0()) -> c_76() 582.47/149.70 , 64: #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.47/149.70 , 65: #compare^#(#s(@x), #0()) -> c_78() 582.47/149.70 , 66: #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.47/149.70 , 67: newline#1^#(nil(), @lastline, @y) -> c_38() 582.47/149.70 , 68: right^#(@l) -> c_27(right#1^#(@l)) 582.47/149.70 , 69: max#1^#(#true(), @a, @b) -> c_28() 582.47/149.70 , 70: max#1^#(#false(), @a, @b) -> c_29() 582.47/149.70 , 71: #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.47/149.70 , 72: #add^#(#pos(#s(#s(@x))), @y) -> 582.47/149.70 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.70 , 73: #add^#(#0(), @y) -> c_61() 582.47/149.70 , 74: #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.47/149.70 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 582.47/149.70 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.70 , 76: #and^#(#true(), #true()) -> c_64() 582.47/149.70 , 77: #and^#(#true(), #false()) -> c_65() 582.47/149.70 , 78: #and^#(#false(), #true()) -> c_66() 582.47/149.70 , 79: #and^#(#false(), #false()) -> c_67() 582.47/149.70 , 80: #succ^#(#pos(#s(@x))) -> c_80() 582.47/149.70 , 81: #succ^#(#0()) -> c_81() 582.47/149.70 , 82: #succ^#(#neg(#s(#0()))) -> c_82() 582.47/149.70 , 83: #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.47/149.70 , 84: #pred^#(#pos(#s(#0()))) -> c_84() 582.47/149.70 , 85: #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.47/149.70 , 86: #pred^#(#0()) -> c_86() 582.47/149.70 , 87: #pred^#(#neg(#s(@x))) -> c_87() } 582.47/149.70 582.47/149.70 We are left with following problem, upon which TcT provides the 582.47/149.70 certificate YES(O(1),O(n^2)). 582.47/149.70 582.47/149.70 Strict DPs: 582.47/149.70 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.47/149.70 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.47/149.70 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.47/149.70 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.47/149.70 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.70 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.70 lcstable^#(@xs, @l2)) 582.47/149.70 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.47/149.70 , newline^#(@y, @lastline, @l) -> 582.47/149.70 c_24(newline#1^#(@l, @lastline, @y)) 582.47/149.70 , lcs^#(@l1, @l2) -> 582.47/149.70 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.47/149.70 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.70 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.47/149.70 @belowVal, 582.47/149.70 @lastline', 582.47/149.70 @x, 582.47/149.70 @y), 582.47/149.70 newline^#(@y, @lastline', @xs)) 582.47/149.70 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.70 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.47/149.70 right^#(@nl)) 582.47/149.70 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.47/149.70 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.70 c_39(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.70 Weak DPs: 582.47/149.70 { firstline#1^#(nil()) -> c_1() 582.47/149.70 , #abs^#(#pos(@x)) -> c_32() 582.47/149.70 , #abs^#(#0()) -> c_33() 582.47/149.70 , #abs^#(#neg(@x)) -> c_34() 582.47/149.70 , #abs^#(#s(@x)) -> c_35() 582.47/149.70 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.47/149.70 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.47/149.70 , #eq^#(#pos(@x), #0()) -> c_41() 582.47/149.70 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.47/149.70 , #eq^#(nil(), nil()) -> c_43() 582.47/149.70 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.47/149.70 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.47/149.70 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.70 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.47/149.70 #eq^#(@x_1, @y_1), 582.47/149.70 #eq^#(@x_2, @y_2)) 582.47/149.70 , #eq^#(#0(), #pos(@y)) -> c_47() 582.47/149.70 , #eq^#(#0(), #0()) -> c_48() 582.47/149.70 , #eq^#(#0(), #neg(@y)) -> c_49() 582.47/149.70 , #eq^#(#0(), #s(@y)) -> c_50() 582.47/149.70 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.47/149.70 , #eq^#(#neg(@x), #0()) -> c_52() 582.47/149.70 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.47/149.70 , #eq^#(#s(@x), #0()) -> c_54() 582.47/149.70 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.47/149.70 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.47/149.70 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.47/149.70 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.47/149.70 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.47/149.70 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.47/149.70 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.47/149.70 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.70 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.47/149.70 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.70 c_11(max^#(@belowVal, @rightVal)) 582.47/149.70 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.47/149.70 , max^#(@a, @b) -> 582.47/149.70 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.47/149.70 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.70 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.47/149.70 @belowVal, 582.47/149.70 @diagVal, 582.47/149.70 @rightVal), 582.47/149.70 @nl), 582.47/149.70 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.47/149.70 #equal^#(@x, @y)) 582.47/149.70 , newline#6^#(@elem, @nl) -> c_37() 582.47/149.70 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.47/149.70 , right#1^#(::(@x, @xs)) -> c_17() 582.47/149.70 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.47/149.70 , #greater^#(@x, @y) -> 582.47/149.70 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.47/149.70 , #ckgt^#(#EQ()) -> c_56() 582.47/149.70 , #ckgt^#(#LT()) -> c_57() 582.47/149.70 , #ckgt^#(#GT()) -> c_58() 582.47/149.70 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.47/149.70 , #compare^#(#pos(@x), #0()) -> c_69() 582.47/149.70 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.47/149.70 , #compare^#(#0(), #pos(@y)) -> c_71() 582.47/149.70 , #compare^#(#0(), #0()) -> c_72() 582.47/149.70 , #compare^#(#0(), #neg(@y)) -> c_73() 582.47/149.70 , #compare^#(#0(), #s(@y)) -> c_74() 582.47/149.70 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.47/149.70 , #compare^#(#neg(@x), #0()) -> c_76() 582.47/149.70 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.47/149.70 , #compare^#(#s(@x), #0()) -> c_78() 582.47/149.70 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.47/149.70 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.47/149.70 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.70 c_25(newline#5^#(right(@lastline'), 582.47/149.70 @belowVal, 582.47/149.70 @nl, 582.47/149.70 @rightVal, 582.47/149.70 @x, 582.47/149.70 @y), 582.47/149.70 right^#(@lastline')) 582.47/149.70 , right^#(@l) -> c_27(right#1^#(@l)) 582.47/149.70 , max#1^#(#true(), @a, @b) -> c_28() 582.47/149.70 , max#1^#(#false(), @a, @b) -> c_29() 582.47/149.70 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.47/149.70 , #add^#(#pos(#s(#s(@x))), @y) -> 582.47/149.70 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.70 , #add^#(#0(), @y) -> c_61() 582.47/149.70 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.47/149.70 , #add^#(#neg(#s(#s(@x))), @y) -> 582.47/149.70 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.70 , #and^#(#true(), #true()) -> c_64() 582.47/149.70 , #and^#(#true(), #false()) -> c_65() 582.47/149.70 , #and^#(#false(), #true()) -> c_66() 582.47/149.70 , #and^#(#false(), #false()) -> c_67() 582.47/149.70 , #succ^#(#pos(#s(@x))) -> c_80() 582.47/149.70 , #succ^#(#0()) -> c_81() 582.47/149.70 , #succ^#(#neg(#s(#0()))) -> c_82() 582.47/149.70 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.47/149.70 , #pred^#(#pos(#s(#0()))) -> c_84() 582.47/149.70 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.47/149.70 , #pred^#(#0()) -> c_86() 582.47/149.70 , #pred^#(#neg(#s(@x))) -> c_87() } 582.47/149.70 Weak Trs: 582.47/149.70 { firstline#1(nil()) -> nil() 582.47/149.70 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.70 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.70 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.70 , #eq(#pos(@x), #0()) -> #false() 582.47/149.70 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.70 , #eq(nil(), nil()) -> #true() 582.47/149.70 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.70 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.70 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.70 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.70 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.70 , #eq(#0(), #0()) -> #true() 582.47/149.70 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.70 , #eq(#0(), #s(@y)) -> #false() 582.47/149.70 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.70 , #eq(#neg(@x), #0()) -> #false() 582.47/149.70 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.70 , #eq(#s(@x), #0()) -> #false() 582.47/149.70 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.70 , lcs#3(nil()) -> #abs(#0()) 582.47/149.70 , lcs#3(::(@len, @_@1)) -> @len 582.47/149.70 , lcs#1(@m) -> lcs#2(@m) 582.47/149.70 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.70 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.70 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.70 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.70 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.70 +(@diagVal, #pos(#s(#0()))) 582.47/149.70 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.70 max(@belowVal, @rightVal) 582.47/149.70 , lcs#2(nil()) -> #abs(#0()) 582.47/149.70 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.47/149.70 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.47/149.70 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.70 newline#6(newline#7(#equal(@x, @y), 582.47/149.70 @belowVal, 582.47/149.70 @diagVal, 582.47/149.70 @rightVal), 582.47/149.70 @nl) 582.47/149.70 , right#1(nil()) -> #abs(#0()) 582.47/149.70 , right#1(::(@x, @xs)) -> @x 582.47/149.70 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.70 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.70 newline#3(newline(@y, @lastline', @xs), 582.47/149.70 @belowVal, 582.47/149.70 @lastline', 582.47/149.70 @x, 582.47/149.70 @y) 582.47/149.70 , firstline(@l) -> firstline#1(@l) 582.47/149.70 , #ckgt(#EQ()) -> #false() 582.47/149.70 , #ckgt(#LT()) -> #false() 582.47/149.70 , #ckgt(#GT()) -> #true() 582.47/149.70 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.70 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.70 , #add(#0(), @y) -> @y 582.47/149.70 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.70 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.70 , #and(#true(), #true()) -> #true() 582.47/149.70 , #and(#true(), #false()) -> #false() 582.47/149.70 , #and(#false(), #true()) -> #false() 582.47/149.70 , #and(#false(), #false()) -> #false() 582.47/149.70 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.70 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.70 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.70 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.70 , #compare(#0(), #0()) -> #EQ() 582.47/149.70 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.70 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.70 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.70 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.70 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.70 , #compare(#s(@x), #0()) -> #GT() 582.47/149.70 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.70 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.70 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.70 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.70 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.70 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.70 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.70 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.70 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.70 , right(@l) -> right#1(@l) 582.47/149.70 , max#1(#true(), @a, @b) -> @a 582.47/149.70 , max#1(#false(), @a, @b) -> @b 582.47/149.70 , +(@x, @y) -> #add(@x, @y) 582.47/149.70 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.70 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.70 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.70 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.70 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.70 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.70 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.70 , #abs(#0()) -> #0() 582.47/149.70 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.70 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.70 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.70 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.70 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.70 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.70 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.70 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.70 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.70 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.70 newline#2(@lastline, @x, @xs, @y) } 582.47/149.70 Obligation: 582.47/149.70 innermost runtime complexity 582.47/149.70 Answer: 582.47/149.70 YES(O(1),O(n^2)) 582.47/149.70 582.47/149.70 We estimate the number of application of {10} by applications of 582.47/149.70 Pre({10}) = {9}. Here rules are labeled as follows: 582.47/149.70 582.47/149.70 DPs: 582.47/149.70 { 1: firstline#1^#(::(@x, @xs)) -> 582.47/149.70 c_2(#abs^#(#0()), firstline^#(@xs)) 582.47/149.70 , 2: firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.47/149.70 , 3: lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.47/149.70 , 4: lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.47/149.70 , 5: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.70 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.70 lcstable^#(@xs, @l2)) 582.47/149.70 , 6: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.47/149.70 c_9(newline^#(@x, @l, @l2)) 582.47/149.70 , 7: newline^#(@y, @lastline, @l) -> 582.47/149.70 c_24(newline#1^#(@l, @lastline, @y)) 582.47/149.70 , 8: lcs^#(@l1, @l2) -> 582.47/149.70 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.47/149.70 , 9: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.70 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.47/149.70 @belowVal, 582.47/149.70 @lastline', 582.47/149.71 @x, 582.47/149.71 @y), 582.47/149.71 newline^#(@y, @lastline', @xs)) 582.47/149.71 , 10: newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.71 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.47/149.71 right^#(@nl)) 582.47/149.71 , 11: lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.47/149.71 , 12: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.71 c_39(newline#2^#(@lastline, @x, @xs, @y)) 582.47/149.71 , 13: firstline#1^#(nil()) -> c_1() 582.47/149.71 , 14: #abs^#(#pos(@x)) -> c_32() 582.47/149.71 , 15: #abs^#(#0()) -> c_33() 582.47/149.71 , 16: #abs^#(#neg(@x)) -> c_34() 582.47/149.71 , 17: #abs^#(#s(@x)) -> c_35() 582.47/149.71 , 18: #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.47/149.71 , 19: #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.47/149.71 , 20: #eq^#(#pos(@x), #0()) -> c_41() 582.47/149.71 , 21: #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.47/149.71 , 22: #eq^#(nil(), nil()) -> c_43() 582.47/149.71 , 23: #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.47/149.71 , 24: #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.47/149.71 , 25: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.71 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.47/149.71 #eq^#(@x_1, @y_1), 582.47/149.71 #eq^#(@x_2, @y_2)) 582.47/149.71 , 26: #eq^#(#0(), #pos(@y)) -> c_47() 582.47/149.71 , 27: #eq^#(#0(), #0()) -> c_48() 582.47/149.71 , 28: #eq^#(#0(), #neg(@y)) -> c_49() 582.47/149.71 , 29: #eq^#(#0(), #s(@y)) -> c_50() 582.47/149.71 , 30: #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.47/149.71 , 31: #eq^#(#neg(@x), #0()) -> c_52() 582.47/149.71 , 32: #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.47/149.71 , 33: #eq^#(#s(@x), #0()) -> c_54() 582.47/149.71 , 34: #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.47/149.71 , 35: lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.47/149.71 , 36: lcs#3^#(::(@len, @_@1)) -> c_5() 582.47/149.71 , 37: lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.47/149.71 , 38: lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.47/149.71 , 39: lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.47/149.71 , 40: lcstable#3^#(nil(), @l2, @x) -> c_8() 582.47/149.71 , 41: newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.47/149.71 , 42: newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 c_11(max^#(@belowVal, @rightVal)) 582.47/149.71 , 43: +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.47/149.71 , 44: max^#(@a, @b) -> 582.47/149.71 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.47/149.71 , 45: newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.71 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.47/149.71 @belowVal, 582.47/149.71 @diagVal, 582.47/149.71 @rightVal), 582.47/149.71 @nl), 582.47/149.71 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.47/149.71 #equal^#(@x, @y)) 582.47/149.71 , 46: newline#6^#(@elem, @nl) -> c_37() 582.47/149.71 , 47: right#1^#(nil()) -> c_16(#abs^#(#0())) 582.47/149.71 , 48: right#1^#(::(@x, @xs)) -> c_17() 582.47/149.71 , 49: newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.47/149.71 , 50: #greater^#(@x, @y) -> 582.47/149.71 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.47/149.71 , 51: #ckgt^#(#EQ()) -> c_56() 582.47/149.71 , 52: #ckgt^#(#LT()) -> c_57() 582.47/149.71 , 53: #ckgt^#(#GT()) -> c_58() 582.47/149.71 , 54: #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.47/149.71 , 55: #compare^#(#pos(@x), #0()) -> c_69() 582.47/149.71 , 56: #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.47/149.71 , 57: #compare^#(#0(), #pos(@y)) -> c_71() 582.47/149.71 , 58: #compare^#(#0(), #0()) -> c_72() 582.47/149.71 , 59: #compare^#(#0(), #neg(@y)) -> c_73() 582.47/149.71 , 60: #compare^#(#0(), #s(@y)) -> c_74() 582.47/149.71 , 61: #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.47/149.71 , 62: #compare^#(#neg(@x), #0()) -> c_76() 582.47/149.71 , 63: #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.47/149.71 , 64: #compare^#(#s(@x), #0()) -> c_78() 582.47/149.71 , 65: #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.47/149.71 , 66: newline#1^#(nil(), @lastline, @y) -> c_38() 582.47/149.71 , 67: newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.71 c_25(newline#5^#(right(@lastline'), 582.47/149.71 @belowVal, 582.47/149.71 @nl, 582.47/149.71 @rightVal, 582.47/149.71 @x, 582.47/149.71 @y), 582.47/149.71 right^#(@lastline')) 582.47/149.71 , 68: right^#(@l) -> c_27(right#1^#(@l)) 582.47/149.71 , 69: max#1^#(#true(), @a, @b) -> c_28() 582.47/149.71 , 70: max#1^#(#false(), @a, @b) -> c_29() 582.47/149.71 , 71: #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.47/149.71 , 72: #add^#(#pos(#s(#s(@x))), @y) -> 582.47/149.71 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.71 , 73: #add^#(#0(), @y) -> c_61() 582.47/149.71 , 74: #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.47/149.71 , 75: #add^#(#neg(#s(#s(@x))), @y) -> 582.47/149.71 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.71 , 76: #and^#(#true(), #true()) -> c_64() 582.47/149.71 , 77: #and^#(#true(), #false()) -> c_65() 582.47/149.71 , 78: #and^#(#false(), #true()) -> c_66() 582.47/149.71 , 79: #and^#(#false(), #false()) -> c_67() 582.47/149.71 , 80: #succ^#(#pos(#s(@x))) -> c_80() 582.47/149.71 , 81: #succ^#(#0()) -> c_81() 582.47/149.71 , 82: #succ^#(#neg(#s(#0()))) -> c_82() 582.47/149.71 , 83: #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.47/149.71 , 84: #pred^#(#pos(#s(#0()))) -> c_84() 582.47/149.71 , 85: #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.47/149.71 , 86: #pred^#(#0()) -> c_86() 582.47/149.71 , 87: #pred^#(#neg(#s(@x))) -> c_87() } 582.47/149.71 582.47/149.71 We are left with following problem, upon which TcT provides the 582.47/149.71 certificate YES(O(1),O(n^2)). 582.47/149.71 582.47/149.71 Strict DPs: 582.47/149.71 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.47/149.71 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.47/149.71 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.47/149.71 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.47/149.71 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.71 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.71 lcstable^#(@xs, @l2)) 582.47/149.71 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.47/149.71 , newline^#(@y, @lastline, @l) -> 582.47/149.71 c_24(newline#1^#(@l, @lastline, @y)) 582.47/149.71 , lcs^#(@l1, @l2) -> 582.47/149.71 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.47/149.71 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.71 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.47/149.71 @belowVal, 582.47/149.71 @lastline', 582.47/149.71 @x, 582.47/149.71 @y), 582.47/149.71 newline^#(@y, @lastline', @xs)) 582.47/149.71 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.47/149.71 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.71 c_39(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.71 Weak DPs: 582.47/149.71 { firstline#1^#(nil()) -> c_1() 582.47/149.71 , #abs^#(#pos(@x)) -> c_32() 582.47/149.71 , #abs^#(#0()) -> c_33() 582.47/149.71 , #abs^#(#neg(@x)) -> c_34() 582.47/149.71 , #abs^#(#s(@x)) -> c_35() 582.47/149.71 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.47/149.71 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.47/149.71 , #eq^#(#pos(@x), #0()) -> c_41() 582.47/149.71 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.47/149.71 , #eq^#(nil(), nil()) -> c_43() 582.47/149.71 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.47/149.71 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.47/149.71 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.71 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.47/149.71 #eq^#(@x_1, @y_1), 582.47/149.71 #eq^#(@x_2, @y_2)) 582.47/149.71 , #eq^#(#0(), #pos(@y)) -> c_47() 582.47/149.71 , #eq^#(#0(), #0()) -> c_48() 582.47/149.71 , #eq^#(#0(), #neg(@y)) -> c_49() 582.47/149.71 , #eq^#(#0(), #s(@y)) -> c_50() 582.47/149.71 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.47/149.71 , #eq^#(#neg(@x), #0()) -> c_52() 582.47/149.71 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.47/149.71 , #eq^#(#s(@x), #0()) -> c_54() 582.47/149.71 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.47/149.71 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.47/149.71 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.47/149.71 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.47/149.71 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.47/149.71 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.47/149.71 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.47/149.71 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.47/149.71 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 c_11(max^#(@belowVal, @rightVal)) 582.47/149.71 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.47/149.71 , max^#(@a, @b) -> 582.47/149.71 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.47/149.71 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.71 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.47/149.71 @belowVal, 582.47/149.71 @diagVal, 582.47/149.71 @rightVal), 582.47/149.71 @nl), 582.47/149.71 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.47/149.71 #equal^#(@x, @y)) 582.47/149.71 , newline#6^#(@elem, @nl) -> c_37() 582.47/149.71 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.47/149.71 , right#1^#(::(@x, @xs)) -> c_17() 582.47/149.71 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.47/149.71 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.71 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.47/149.71 right^#(@nl)) 582.47/149.71 , #greater^#(@x, @y) -> 582.47/149.71 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.47/149.71 , #ckgt^#(#EQ()) -> c_56() 582.47/149.71 , #ckgt^#(#LT()) -> c_57() 582.47/149.71 , #ckgt^#(#GT()) -> c_58() 582.47/149.71 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.47/149.71 , #compare^#(#pos(@x), #0()) -> c_69() 582.47/149.71 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.47/149.71 , #compare^#(#0(), #pos(@y)) -> c_71() 582.47/149.71 , #compare^#(#0(), #0()) -> c_72() 582.47/149.71 , #compare^#(#0(), #neg(@y)) -> c_73() 582.47/149.71 , #compare^#(#0(), #s(@y)) -> c_74() 582.47/149.71 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.47/149.71 , #compare^#(#neg(@x), #0()) -> c_76() 582.47/149.71 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.47/149.71 , #compare^#(#s(@x), #0()) -> c_78() 582.47/149.71 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.47/149.71 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.47/149.71 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.71 c_25(newline#5^#(right(@lastline'), 582.47/149.71 @belowVal, 582.47/149.71 @nl, 582.47/149.71 @rightVal, 582.47/149.71 @x, 582.47/149.71 @y), 582.47/149.71 right^#(@lastline')) 582.47/149.71 , right^#(@l) -> c_27(right#1^#(@l)) 582.47/149.71 , max#1^#(#true(), @a, @b) -> c_28() 582.47/149.71 , max#1^#(#false(), @a, @b) -> c_29() 582.47/149.71 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.47/149.71 , #add^#(#pos(#s(#s(@x))), @y) -> 582.47/149.71 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.71 , #add^#(#0(), @y) -> c_61() 582.47/149.71 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.47/149.71 , #add^#(#neg(#s(#s(@x))), @y) -> 582.47/149.71 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.71 , #and^#(#true(), #true()) -> c_64() 582.47/149.71 , #and^#(#true(), #false()) -> c_65() 582.47/149.71 , #and^#(#false(), #true()) -> c_66() 582.47/149.71 , #and^#(#false(), #false()) -> c_67() 582.47/149.71 , #succ^#(#pos(#s(@x))) -> c_80() 582.47/149.71 , #succ^#(#0()) -> c_81() 582.47/149.71 , #succ^#(#neg(#s(#0()))) -> c_82() 582.47/149.71 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.47/149.71 , #pred^#(#pos(#s(#0()))) -> c_84() 582.47/149.71 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.47/149.71 , #pred^#(#0()) -> c_86() 582.47/149.71 , #pred^#(#neg(#s(@x))) -> c_87() } 582.47/149.71 Weak Trs: 582.47/149.71 { firstline#1(nil()) -> nil() 582.47/149.71 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.71 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.71 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.71 , #eq(#pos(@x), #0()) -> #false() 582.47/149.71 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.71 , #eq(nil(), nil()) -> #true() 582.47/149.71 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.71 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.71 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.71 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.71 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.71 , #eq(#0(), #0()) -> #true() 582.47/149.71 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.71 , #eq(#0(), #s(@y)) -> #false() 582.47/149.71 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.71 , #eq(#neg(@x), #0()) -> #false() 582.47/149.71 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.71 , #eq(#s(@x), #0()) -> #false() 582.47/149.71 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.71 , lcs#3(nil()) -> #abs(#0()) 582.47/149.71 , lcs#3(::(@len, @_@1)) -> @len 582.47/149.71 , lcs#1(@m) -> lcs#2(@m) 582.47/149.71 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.71 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.71 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.71 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.71 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 +(@diagVal, #pos(#s(#0()))) 582.47/149.71 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 max(@belowVal, @rightVal) 582.47/149.71 , lcs#2(nil()) -> #abs(#0()) 582.47/149.71 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.47/149.71 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.47/149.71 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.71 newline#6(newline#7(#equal(@x, @y), 582.47/149.71 @belowVal, 582.47/149.71 @diagVal, 582.47/149.71 @rightVal), 582.47/149.71 @nl) 582.47/149.71 , right#1(nil()) -> #abs(#0()) 582.47/149.71 , right#1(::(@x, @xs)) -> @x 582.47/149.71 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.71 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.71 newline#3(newline(@y, @lastline', @xs), 582.47/149.71 @belowVal, 582.47/149.71 @lastline', 582.47/149.71 @x, 582.47/149.71 @y) 582.47/149.71 , firstline(@l) -> firstline#1(@l) 582.47/149.71 , #ckgt(#EQ()) -> #false() 582.47/149.71 , #ckgt(#LT()) -> #false() 582.47/149.71 , #ckgt(#GT()) -> #true() 582.47/149.71 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.71 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.71 , #add(#0(), @y) -> @y 582.47/149.71 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.71 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.71 , #and(#true(), #true()) -> #true() 582.47/149.71 , #and(#true(), #false()) -> #false() 582.47/149.71 , #and(#false(), #true()) -> #false() 582.47/149.71 , #and(#false(), #false()) -> #false() 582.47/149.71 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.71 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.71 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.71 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.71 , #compare(#0(), #0()) -> #EQ() 582.47/149.71 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.71 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.71 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.71 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.71 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.71 , #compare(#s(@x), #0()) -> #GT() 582.47/149.71 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.71 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.71 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.71 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.71 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.71 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.71 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.71 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.71 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.71 , right(@l) -> right#1(@l) 582.47/149.71 , max#1(#true(), @a, @b) -> @a 582.47/149.71 , max#1(#false(), @a, @b) -> @b 582.47/149.71 , +(@x, @y) -> #add(@x, @y) 582.47/149.71 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.71 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.71 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.71 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.71 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.71 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.71 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.71 , #abs(#0()) -> #0() 582.47/149.71 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.71 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.71 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.71 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.71 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.71 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.71 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.71 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.71 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.71 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.71 newline#2(@lastline, @x, @xs, @y) } 582.47/149.71 Obligation: 582.47/149.71 innermost runtime complexity 582.47/149.71 Answer: 582.47/149.71 YES(O(1),O(n^2)) 582.47/149.71 582.47/149.71 The following weak DPs constitute a sub-graph of the DG that is 582.47/149.71 closed under successors. The DPs are removed. 582.47/149.71 582.47/149.71 { firstline#1^#(nil()) -> c_1() 582.47/149.71 , #abs^#(#pos(@x)) -> c_32() 582.47/149.71 , #abs^#(#0()) -> c_33() 582.47/149.71 , #abs^#(#neg(@x)) -> c_34() 582.47/149.71 , #abs^#(#s(@x)) -> c_35() 582.47/149.71 , #equal^#(@x, @y) -> c_3(#eq^#(@x, @y)) 582.47/149.71 , #eq^#(#pos(@x), #pos(@y)) -> c_40(#eq^#(@x, @y)) 582.47/149.71 , #eq^#(#pos(@x), #0()) -> c_41() 582.47/149.71 , #eq^#(#pos(@x), #neg(@y)) -> c_42() 582.47/149.71 , #eq^#(nil(), nil()) -> c_43() 582.47/149.71 , #eq^#(nil(), ::(@y_1, @y_2)) -> c_44() 582.47/149.71 , #eq^#(::(@x_1, @x_2), nil()) -> c_45() 582.47/149.71 , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.71 c_46(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), 582.47/149.71 #eq^#(@x_1, @y_1), 582.47/149.71 #eq^#(@x_2, @y_2)) 582.47/149.71 , #eq^#(#0(), #pos(@y)) -> c_47() 582.47/149.71 , #eq^#(#0(), #0()) -> c_48() 582.47/149.71 , #eq^#(#0(), #neg(@y)) -> c_49() 582.47/149.71 , #eq^#(#0(), #s(@y)) -> c_50() 582.47/149.71 , #eq^#(#neg(@x), #pos(@y)) -> c_51() 582.47/149.71 , #eq^#(#neg(@x), #0()) -> c_52() 582.47/149.71 , #eq^#(#neg(@x), #neg(@y)) -> c_53(#eq^#(@x, @y)) 582.47/149.71 , #eq^#(#s(@x), #0()) -> c_54() 582.47/149.71 , #eq^#(#s(@x), #s(@y)) -> c_55(#eq^#(@x, @y)) 582.47/149.71 , lcs#3^#(nil()) -> c_4(#abs^#(#0())) 582.47/149.71 , lcs#3^#(::(@len, @_@1)) -> c_5() 582.47/149.71 , lcs#1^#(@m) -> c_6(lcs#2^#(@m)) 582.47/149.71 , lcs#2^#(nil()) -> c_12(#abs^#(#0())) 582.47/149.71 , lcs#2^#(::(@l1, @_@2)) -> c_13(lcs#3^#(@l1)) 582.47/149.71 , lcstable#3^#(nil(), @l2, @x) -> c_8() 582.47/149.71 , newline#7^#(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 c_10(+^#(@diagVal, #pos(#s(#0())))) 582.47/149.71 , newline#7^#(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 c_11(max^#(@belowVal, @rightVal)) 582.47/149.71 , +^#(@x, @y) -> c_30(#add^#(@x, @y)) 582.47/149.71 , max^#(@a, @b) -> 582.47/149.71 c_26(max#1^#(#greater(@a, @b), @a, @b), #greater^#(@a, @b)) 582.47/149.71 , newline#5^#(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.71 c_15(newline#6^#(newline#7(#equal(@x, @y), 582.47/149.71 @belowVal, 582.47/149.71 @diagVal, 582.47/149.71 @rightVal), 582.47/149.71 @nl), 582.47/149.71 newline#7^#(#equal(@x, @y), @belowVal, @diagVal, @rightVal), 582.47/149.71 #equal^#(@x, @y)) 582.47/149.71 , newline#6^#(@elem, @nl) -> c_37() 582.47/149.71 , right#1^#(nil()) -> c_16(#abs^#(#0())) 582.47/149.71 , right#1^#(::(@x, @xs)) -> c_17() 582.47/149.71 , newline#2^#(nil(), @x, @xs, @y) -> c_18() 582.47/149.71 , newline#3^#(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.71 c_31(newline#4^#(right(@nl), @belowVal, @lastline', @nl, @x, @y), 582.47/149.71 right^#(@nl)) 582.47/149.71 , #greater^#(@x, @y) -> 582.47/149.71 c_23(#ckgt^#(#compare(@x, @y)), #compare^#(@x, @y)) 582.47/149.71 , #ckgt^#(#EQ()) -> c_56() 582.47/149.71 , #ckgt^#(#LT()) -> c_57() 582.47/149.71 , #ckgt^#(#GT()) -> c_58() 582.47/149.71 , #compare^#(#pos(@x), #pos(@y)) -> c_68(#compare^#(@x, @y)) 582.47/149.71 , #compare^#(#pos(@x), #0()) -> c_69() 582.47/149.71 , #compare^#(#pos(@x), #neg(@y)) -> c_70() 582.47/149.71 , #compare^#(#0(), #pos(@y)) -> c_71() 582.47/149.71 , #compare^#(#0(), #0()) -> c_72() 582.47/149.71 , #compare^#(#0(), #neg(@y)) -> c_73() 582.47/149.71 , #compare^#(#0(), #s(@y)) -> c_74() 582.47/149.71 , #compare^#(#neg(@x), #pos(@y)) -> c_75() 582.47/149.71 , #compare^#(#neg(@x), #0()) -> c_76() 582.47/149.71 , #compare^#(#neg(@x), #neg(@y)) -> c_77(#compare^#(@y, @x)) 582.47/149.71 , #compare^#(#s(@x), #0()) -> c_78() 582.47/149.71 , #compare^#(#s(@x), #s(@y)) -> c_79(#compare^#(@x, @y)) 582.47/149.71 , newline#1^#(nil(), @lastline, @y) -> c_38() 582.47/149.71 , newline#4^#(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.71 c_25(newline#5^#(right(@lastline'), 582.47/149.71 @belowVal, 582.47/149.71 @nl, 582.47/149.71 @rightVal, 582.47/149.71 @x, 582.47/149.71 @y), 582.47/149.71 right^#(@lastline')) 582.47/149.71 , right^#(@l) -> c_27(right#1^#(@l)) 582.47/149.71 , max#1^#(#true(), @a, @b) -> c_28() 582.47/149.71 , max#1^#(#false(), @a, @b) -> c_29() 582.47/149.71 , #add^#(#pos(#s(#0())), @y) -> c_59(#succ^#(@y)) 582.47/149.71 , #add^#(#pos(#s(#s(@x))), @y) -> 582.47/149.71 c_60(#succ^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.71 , #add^#(#0(), @y) -> c_61() 582.47/149.71 , #add^#(#neg(#s(#0())), @y) -> c_62(#pred^#(@y)) 582.47/149.71 , #add^#(#neg(#s(#s(@x))), @y) -> 582.47/149.71 c_63(#pred^#(#add(#pos(#s(@x)), @y)), #add^#(#pos(#s(@x)), @y)) 582.47/149.71 , #and^#(#true(), #true()) -> c_64() 582.47/149.71 , #and^#(#true(), #false()) -> c_65() 582.47/149.71 , #and^#(#false(), #true()) -> c_66() 582.47/149.71 , #and^#(#false(), #false()) -> c_67() 582.47/149.71 , #succ^#(#pos(#s(@x))) -> c_80() 582.47/149.71 , #succ^#(#0()) -> c_81() 582.47/149.71 , #succ^#(#neg(#s(#0()))) -> c_82() 582.47/149.71 , #succ^#(#neg(#s(#s(@x)))) -> c_83() 582.47/149.71 , #pred^#(#pos(#s(#0()))) -> c_84() 582.47/149.71 , #pred^#(#pos(#s(#s(@x)))) -> c_85() 582.47/149.71 , #pred^#(#0()) -> c_86() 582.47/149.71 , #pred^#(#neg(#s(@x))) -> c_87() } 582.47/149.71 582.47/149.71 We are left with following problem, upon which TcT provides the 582.47/149.71 certificate YES(O(1),O(n^2)). 582.47/149.71 582.47/149.71 Strict DPs: 582.47/149.71 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.47/149.71 , firstline^#(@l) -> c_20(firstline#1^#(@l)) 582.47/149.71 , lcstable^#(@l1, @l2) -> c_7(lcstable#1^#(@l1, @l2)) 582.47/149.71 , lcstable#1^#(nil(), @l2) -> c_21(firstline^#(@l2)) 582.47/149.71 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.71 c_22(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.71 lcstable^#(@xs, @l2)) 582.47/149.71 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_9(newline^#(@x, @l, @l2)) 582.47/149.71 , newline^#(@y, @lastline, @l) -> 582.47/149.71 c_24(newline#1^#(@l, @lastline, @y)) 582.47/149.71 , lcs^#(@l1, @l2) -> 582.47/149.71 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.47/149.71 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.71 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.47/149.71 @belowVal, 582.47/149.71 @lastline', 582.47/149.71 @x, 582.47/149.71 @y), 582.47/149.71 newline^#(@y, @lastline', @xs)) 582.47/149.71 , lcstable#2^#(@m, @l2, @x) -> c_36(lcstable#3^#(@m, @l2, @x)) 582.47/149.71 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.71 c_39(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.71 Weak Trs: 582.47/149.71 { firstline#1(nil()) -> nil() 582.47/149.71 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.71 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.71 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.71 , #eq(#pos(@x), #0()) -> #false() 582.47/149.71 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.71 , #eq(nil(), nil()) -> #true() 582.47/149.71 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.71 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.71 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.71 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.71 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.71 , #eq(#0(), #0()) -> #true() 582.47/149.71 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.71 , #eq(#0(), #s(@y)) -> #false() 582.47/149.71 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.71 , #eq(#neg(@x), #0()) -> #false() 582.47/149.71 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.71 , #eq(#s(@x), #0()) -> #false() 582.47/149.71 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.71 , lcs#3(nil()) -> #abs(#0()) 582.47/149.71 , lcs#3(::(@len, @_@1)) -> @len 582.47/149.71 , lcs#1(@m) -> lcs#2(@m) 582.47/149.71 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.71 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.71 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.71 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.71 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 +(@diagVal, #pos(#s(#0()))) 582.47/149.71 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.71 max(@belowVal, @rightVal) 582.47/149.71 , lcs#2(nil()) -> #abs(#0()) 582.47/149.71 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.47/149.71 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.47/149.71 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.71 newline#6(newline#7(#equal(@x, @y), 582.47/149.71 @belowVal, 582.47/149.71 @diagVal, 582.47/149.71 @rightVal), 582.47/149.71 @nl) 582.47/149.71 , right#1(nil()) -> #abs(#0()) 582.47/149.71 , right#1(::(@x, @xs)) -> @x 582.47/149.71 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.71 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.71 newline#3(newline(@y, @lastline', @xs), 582.47/149.71 @belowVal, 582.47/149.71 @lastline', 582.47/149.71 @x, 582.47/149.71 @y) 582.47/149.71 , firstline(@l) -> firstline#1(@l) 582.47/149.71 , #ckgt(#EQ()) -> #false() 582.47/149.71 , #ckgt(#LT()) -> #false() 582.47/149.71 , #ckgt(#GT()) -> #true() 582.47/149.71 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.71 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.71 , #add(#0(), @y) -> @y 582.47/149.71 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.71 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.71 , #and(#true(), #true()) -> #true() 582.47/149.71 , #and(#true(), #false()) -> #false() 582.47/149.71 , #and(#false(), #true()) -> #false() 582.47/149.71 , #and(#false(), #false()) -> #false() 582.47/149.71 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.71 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.71 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.71 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.71 , #compare(#0(), #0()) -> #EQ() 582.47/149.71 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.71 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.71 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.71 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.71 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.71 , #compare(#s(@x), #0()) -> #GT() 582.47/149.71 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.71 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.71 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.71 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.71 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.71 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.71 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.71 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.71 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.71 , right(@l) -> right#1(@l) 582.47/149.71 , max#1(#true(), @a, @b) -> @a 582.47/149.71 , max#1(#false(), @a, @b) -> @b 582.47/149.71 , +(@x, @y) -> #add(@x, @y) 582.47/149.71 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.72 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.72 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.72 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.72 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.72 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.72 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.72 , #abs(#0()) -> #0() 582.47/149.72 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.72 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.72 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.72 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.72 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.72 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.72 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.72 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.72 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.72 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.72 newline#2(@lastline, @x, @xs, @y) } 582.47/149.72 Obligation: 582.47/149.72 innermost runtime complexity 582.47/149.72 Answer: 582.47/149.72 YES(O(1),O(n^2)) 582.47/149.72 582.47/149.72 Due to missing edges in the dependency-graph, the right-hand sides 582.47/149.72 of following rules could be simplified: 582.47/149.72 582.47/149.72 { firstline#1^#(::(@x, @xs)) -> c_2(#abs^#(#0()), firstline^#(@xs)) 582.47/149.72 , lcs^#(@l1, @l2) -> 582.47/149.72 c_14(lcs#1^#(lcstable(@l1, @l2)), lcstable^#(@l1, @l2)) 582.47/149.72 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 c_19(newline#3^#(newline(@y, @lastline', @xs), 582.47/149.72 @belowVal, 582.47/149.72 @lastline', 582.47/149.72 @x, 582.47/149.72 @y), 582.47/149.72 newline^#(@y, @lastline', @xs)) } 582.47/149.72 582.47/149.72 We are left with following problem, upon which TcT provides the 582.47/149.72 certificate YES(O(1),O(n^2)). 582.47/149.72 582.47/149.72 Strict DPs: 582.47/149.72 { firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.72 , firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.72 , lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.72 , lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.72 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.72 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.72 lcstable^#(@xs, @l2)) 582.47/149.72 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.72 , newline^#(@y, @lastline, @l) -> 582.47/149.72 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.72 , lcs^#(@l1, @l2) -> c_8(lcstable^#(@l1, @l2)) 582.47/149.72 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.72 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.72 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.72 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.72 Weak Trs: 582.47/149.72 { firstline#1(nil()) -> nil() 582.47/149.72 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.72 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #0()) -> #false() 582.47/149.72 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.72 , #eq(nil(), nil()) -> #true() 582.47/149.72 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.72 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.72 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.72 , #eq(#0(), #0()) -> #true() 582.47/149.72 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.72 , #eq(#0(), #s(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #0()) -> #false() 582.47/149.72 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#s(@x), #0()) -> #false() 582.47/149.72 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.72 , lcs#3(nil()) -> #abs(#0()) 582.47/149.72 , lcs#3(::(@len, @_@1)) -> @len 582.47/149.72 , lcs#1(@m) -> lcs#2(@m) 582.47/149.72 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.72 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.72 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.72 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.72 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 +(@diagVal, #pos(#s(#0()))) 582.47/149.72 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 max(@belowVal, @rightVal) 582.47/149.72 , lcs#2(nil()) -> #abs(#0()) 582.47/149.72 , lcs#2(::(@l1, @_@2)) -> lcs#3(@l1) 582.47/149.72 , lcs(@l1, @l2) -> lcs#1(lcstable(@l1, @l2)) 582.47/149.72 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.72 newline#6(newline#7(#equal(@x, @y), 582.47/149.72 @belowVal, 582.47/149.72 @diagVal, 582.47/149.72 @rightVal), 582.47/149.72 @nl) 582.47/149.72 , right#1(nil()) -> #abs(#0()) 582.47/149.72 , right#1(::(@x, @xs)) -> @x 582.47/149.72 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.72 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 newline#3(newline(@y, @lastline', @xs), 582.47/149.72 @belowVal, 582.47/149.72 @lastline', 582.47/149.72 @x, 582.47/149.72 @y) 582.47/149.72 , firstline(@l) -> firstline#1(@l) 582.47/149.72 , #ckgt(#EQ()) -> #false() 582.47/149.72 , #ckgt(#LT()) -> #false() 582.47/149.72 , #ckgt(#GT()) -> #true() 582.47/149.72 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.72 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #add(#0(), @y) -> @y 582.47/149.72 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.72 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #and(#true(), #true()) -> #true() 582.47/149.72 , #and(#true(), #false()) -> #false() 582.47/149.72 , #and(#false(), #true()) -> #false() 582.47/149.72 , #and(#false(), #false()) -> #false() 582.47/149.72 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.72 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.72 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#0(), #0()) -> #EQ() 582.47/149.72 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.72 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.72 , #compare(#s(@x), #0()) -> #GT() 582.47/149.72 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.72 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.72 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.72 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.72 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.72 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.72 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.72 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.72 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.72 , right(@l) -> right#1(@l) 582.47/149.72 , max#1(#true(), @a, @b) -> @a 582.47/149.72 , max#1(#false(), @a, @b) -> @b 582.47/149.72 , +(@x, @y) -> #add(@x, @y) 582.47/149.72 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.72 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.72 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.72 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.72 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.72 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.72 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.72 , #abs(#0()) -> #0() 582.47/149.72 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.72 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.72 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.72 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.72 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.72 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.72 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.72 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.72 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.72 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.72 newline#2(@lastline, @x, @xs, @y) } 582.47/149.72 Obligation: 582.47/149.72 innermost runtime complexity 582.47/149.72 Answer: 582.47/149.72 YES(O(1),O(n^2)) 582.47/149.72 582.47/149.72 We replace rewrite rules by usable rules: 582.47/149.72 582.47/149.72 Weak Usable Rules: 582.47/149.72 { firstline#1(nil()) -> nil() 582.47/149.72 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.72 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #0()) -> #false() 582.47/149.72 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.72 , #eq(nil(), nil()) -> #true() 582.47/149.72 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.72 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.72 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.72 , #eq(#0(), #0()) -> #true() 582.47/149.72 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.72 , #eq(#0(), #s(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #0()) -> #false() 582.47/149.72 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#s(@x), #0()) -> #false() 582.47/149.72 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.72 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.72 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.72 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.72 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.72 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 +(@diagVal, #pos(#s(#0()))) 582.47/149.72 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 max(@belowVal, @rightVal) 582.47/149.72 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.72 newline#6(newline#7(#equal(@x, @y), 582.47/149.72 @belowVal, 582.47/149.72 @diagVal, 582.47/149.72 @rightVal), 582.47/149.72 @nl) 582.47/149.72 , right#1(nil()) -> #abs(#0()) 582.47/149.72 , right#1(::(@x, @xs)) -> @x 582.47/149.72 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.72 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 newline#3(newline(@y, @lastline', @xs), 582.47/149.72 @belowVal, 582.47/149.72 @lastline', 582.47/149.72 @x, 582.47/149.72 @y) 582.47/149.72 , firstline(@l) -> firstline#1(@l) 582.47/149.72 , #ckgt(#EQ()) -> #false() 582.47/149.72 , #ckgt(#LT()) -> #false() 582.47/149.72 , #ckgt(#GT()) -> #true() 582.47/149.72 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.72 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #add(#0(), @y) -> @y 582.47/149.72 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.72 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #and(#true(), #true()) -> #true() 582.47/149.72 , #and(#true(), #false()) -> #false() 582.47/149.72 , #and(#false(), #true()) -> #false() 582.47/149.72 , #and(#false(), #false()) -> #false() 582.47/149.72 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.72 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.72 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#0(), #0()) -> #EQ() 582.47/149.72 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.72 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.72 , #compare(#s(@x), #0()) -> #GT() 582.47/149.72 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.72 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.72 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.72 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.72 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.72 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.72 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.72 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.72 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.72 , right(@l) -> right#1(@l) 582.47/149.72 , max#1(#true(), @a, @b) -> @a 582.47/149.72 , max#1(#false(), @a, @b) -> @b 582.47/149.72 , +(@x, @y) -> #add(@x, @y) 582.47/149.72 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.72 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.72 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.72 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.72 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.72 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.72 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.72 , #abs(#0()) -> #0() 582.47/149.72 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.72 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.72 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.72 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.72 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.72 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.72 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.72 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.72 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.72 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.72 newline#2(@lastline, @x, @xs, @y) } 582.47/149.72 582.47/149.72 We are left with following problem, upon which TcT provides the 582.47/149.72 certificate YES(O(1),O(n^2)). 582.47/149.72 582.47/149.72 Strict DPs: 582.47/149.72 { firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.72 , firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.72 , lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.72 , lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.72 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.72 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.72 lcstable^#(@xs, @l2)) 582.47/149.72 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.72 , newline^#(@y, @lastline, @l) -> 582.47/149.72 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.72 , lcs^#(@l1, @l2) -> c_8(lcstable^#(@l1, @l2)) 582.47/149.72 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.72 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.72 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.72 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.72 Weak Trs: 582.47/149.72 { firstline#1(nil()) -> nil() 582.47/149.72 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.72 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #0()) -> #false() 582.47/149.72 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.72 , #eq(nil(), nil()) -> #true() 582.47/149.72 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.72 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.72 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.72 , #eq(#0(), #0()) -> #true() 582.47/149.72 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.72 , #eq(#0(), #s(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #0()) -> #false() 582.47/149.72 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#s(@x), #0()) -> #false() 582.47/149.72 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.72 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.72 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.72 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.72 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.72 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 +(@diagVal, #pos(#s(#0()))) 582.47/149.72 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 max(@belowVal, @rightVal) 582.47/149.72 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.72 newline#6(newline#7(#equal(@x, @y), 582.47/149.72 @belowVal, 582.47/149.72 @diagVal, 582.47/149.72 @rightVal), 582.47/149.72 @nl) 582.47/149.72 , right#1(nil()) -> #abs(#0()) 582.47/149.72 , right#1(::(@x, @xs)) -> @x 582.47/149.72 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.72 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 newline#3(newline(@y, @lastline', @xs), 582.47/149.72 @belowVal, 582.47/149.72 @lastline', 582.47/149.72 @x, 582.47/149.72 @y) 582.47/149.72 , firstline(@l) -> firstline#1(@l) 582.47/149.72 , #ckgt(#EQ()) -> #false() 582.47/149.72 , #ckgt(#LT()) -> #false() 582.47/149.72 , #ckgt(#GT()) -> #true() 582.47/149.72 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.72 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #add(#0(), @y) -> @y 582.47/149.72 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.72 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #and(#true(), #true()) -> #true() 582.47/149.72 , #and(#true(), #false()) -> #false() 582.47/149.72 , #and(#false(), #true()) -> #false() 582.47/149.72 , #and(#false(), #false()) -> #false() 582.47/149.72 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.72 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.72 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#0(), #0()) -> #EQ() 582.47/149.72 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.72 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.72 , #compare(#s(@x), #0()) -> #GT() 582.47/149.72 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.72 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.72 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.72 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.72 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.72 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.72 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.72 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.72 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.72 , right(@l) -> right#1(@l) 582.47/149.72 , max#1(#true(), @a, @b) -> @a 582.47/149.72 , max#1(#false(), @a, @b) -> @b 582.47/149.72 , +(@x, @y) -> #add(@x, @y) 582.47/149.72 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.72 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.72 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.72 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.72 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.72 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.72 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.72 , #abs(#0()) -> #0() 582.47/149.72 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.72 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.72 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.72 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.72 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.72 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.72 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.72 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.72 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.72 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.72 newline#2(@lastline, @x, @xs, @y) } 582.47/149.72 Obligation: 582.47/149.72 innermost runtime complexity 582.47/149.72 Answer: 582.47/149.72 YES(O(1),O(n^2)) 582.47/149.72 582.47/149.72 Consider the dependency graph 582.47/149.72 582.47/149.72 1: firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.72 -->_1 firstline^#(@l) -> c_2(firstline#1^#(@l)) :2 582.47/149.72 582.47/149.72 2: firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.72 -->_1 firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) :1 582.47/149.72 582.47/149.72 3: lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.72 -->_1 lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.72 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.72 lcstable^#(@xs, @l2)) :5 582.47/149.72 -->_1 lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) :4 582.47/149.72 582.47/149.72 4: lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.72 -->_1 firstline^#(@l) -> c_2(firstline#1^#(@l)) :2 582.47/149.72 582.47/149.72 5: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.72 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.72 lcstable^#(@xs, @l2)) 582.47/149.72 -->_1 lcstable#2^#(@m, @l2, @x) -> 582.47/149.72 c_10(lcstable#3^#(@m, @l2, @x)) :10 582.47/149.72 -->_2 lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) :3 582.47/149.72 582.47/149.72 6: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.47/149.72 c_6(newline^#(@x, @l, @l2)) 582.47/149.72 -->_1 newline^#(@y, @lastline, @l) -> 582.47/149.72 c_7(newline#1^#(@l, @lastline, @y)) :7 582.47/149.72 582.47/149.72 7: newline^#(@y, @lastline, @l) -> 582.47/149.72 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.72 -->_1 newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.72 c_11(newline#2^#(@lastline, @x, @xs, @y)) :11 582.47/149.72 582.47/149.72 8: lcs^#(@l1, @l2) -> c_8(lcstable^#(@l1, @l2)) 582.47/149.72 -->_1 lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) :3 582.47/149.72 582.47/149.72 9: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.72 -->_1 newline^#(@y, @lastline, @l) -> 582.47/149.72 c_7(newline#1^#(@l, @lastline, @y)) :7 582.47/149.72 582.47/149.72 10: lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.72 -->_1 lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.47/149.72 c_6(newline^#(@x, @l, @l2)) :6 582.47/149.72 582.47/149.72 11: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.72 c_11(newline#2^#(@lastline, @x, @xs, @y)) 582.47/149.72 -->_1 newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 c_9(newline^#(@y, @lastline', @xs)) :9 582.47/149.72 582.47/149.72 582.47/149.72 Following roots of the dependency graph are removed, as the 582.47/149.72 considered set of starting terms is closed under reduction with 582.47/149.72 respect to these rules (modulo compound contexts). 582.47/149.72 582.47/149.72 { lcs^#(@l1, @l2) -> c_8(lcstable^#(@l1, @l2)) } 582.47/149.72 582.47/149.72 582.47/149.72 We are left with following problem, upon which TcT provides the 582.47/149.72 certificate YES(O(1),O(n^2)). 582.47/149.72 582.47/149.72 Strict DPs: 582.47/149.72 { firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.72 , firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.72 , lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.72 , lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.72 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.72 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.72 lcstable^#(@xs, @l2)) 582.47/149.72 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.72 , newline^#(@y, @lastline, @l) -> 582.47/149.72 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.72 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.72 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.72 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.72 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.72 Weak Trs: 582.47/149.72 { firstline#1(nil()) -> nil() 582.47/149.72 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.72 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#pos(@x), #0()) -> #false() 582.47/149.72 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.72 , #eq(nil(), nil()) -> #true() 582.47/149.72 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.72 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.72 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.72 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.72 , #eq(#0(), #0()) -> #true() 582.47/149.72 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.72 , #eq(#0(), #s(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.72 , #eq(#neg(@x), #0()) -> #false() 582.47/149.72 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.72 , #eq(#s(@x), #0()) -> #false() 582.47/149.72 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.72 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.72 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.72 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.72 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.72 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 +(@diagVal, #pos(#s(#0()))) 582.47/149.72 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.72 max(@belowVal, @rightVal) 582.47/149.72 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.72 newline#6(newline#7(#equal(@x, @y), 582.47/149.72 @belowVal, 582.47/149.72 @diagVal, 582.47/149.72 @rightVal), 582.47/149.72 @nl) 582.47/149.72 , right#1(nil()) -> #abs(#0()) 582.47/149.72 , right#1(::(@x, @xs)) -> @x 582.47/149.72 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.72 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.72 newline#3(newline(@y, @lastline', @xs), 582.47/149.72 @belowVal, 582.47/149.72 @lastline', 582.47/149.72 @x, 582.47/149.72 @y) 582.47/149.72 , firstline(@l) -> firstline#1(@l) 582.47/149.72 , #ckgt(#EQ()) -> #false() 582.47/149.72 , #ckgt(#LT()) -> #false() 582.47/149.72 , #ckgt(#GT()) -> #true() 582.47/149.72 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.72 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #add(#0(), @y) -> @y 582.47/149.72 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.72 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.72 , #and(#true(), #true()) -> #true() 582.47/149.72 , #and(#true(), #false()) -> #false() 582.47/149.72 , #and(#false(), #true()) -> #false() 582.47/149.72 , #and(#false(), #false()) -> #false() 582.47/149.72 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.72 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.72 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#0(), #0()) -> #EQ() 582.47/149.72 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.72 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.72 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.72 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.72 , #compare(#s(@x), #0()) -> #GT() 582.47/149.72 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.72 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.72 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.72 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.72 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.72 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.72 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.72 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.72 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.72 , right(@l) -> right#1(@l) 582.47/149.72 , max#1(#true(), @a, @b) -> @a 582.47/149.72 , max#1(#false(), @a, @b) -> @b 582.47/149.72 , +(@x, @y) -> #add(@x, @y) 582.47/149.72 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.72 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.72 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.72 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.72 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.72 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.72 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.72 , #abs(#0()) -> #0() 582.47/149.72 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.72 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.72 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.72 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.72 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.72 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.72 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.72 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.72 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.72 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.72 newline#2(@lastline, @x, @xs, @y) } 582.47/149.72 Obligation: 582.47/149.72 innermost runtime complexity 582.47/149.72 Answer: 582.47/149.72 YES(O(1),O(n^2)) 582.47/149.72 582.47/149.72 We use the processor 'matrix interpretation of dimension 1' to 582.47/149.72 orient following rules strictly. 582.47/149.72 582.47/149.72 DPs: 582.47/149.72 { 1: firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.72 , 4: lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.72 , 5: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.72 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.72 lcstable^#(@xs, @l2)) } 582.47/149.72 Trs: 582.47/149.72 { firstline(@l) -> firstline#1(@l) 582.47/149.72 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) } 582.47/149.72 582.47/149.72 Sub-proof: 582.47/149.72 ---------- 582.47/149.72 The following argument positions are usable: 582.47/149.72 Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1}, 582.47/149.72 Uargs(c_4) = {1}, Uargs(c_5) = {1, 2}, Uargs(c_6) = {1}, 582.47/149.72 Uargs(c_7) = {1}, Uargs(c_9) = {1}, Uargs(c_10) = {1}, 582.47/149.72 Uargs(c_11) = {1} 582.47/149.72 582.47/149.72 TcT has computed the following constructor-based matrix 582.47/149.72 interpretation satisfying not(EDA). 582.47/149.72 582.47/149.72 [firstline#1](x1) = [0] 582.47/149.72 582.47/149.72 [#equal](x1, x2) = [0] 582.47/149.72 582.47/149.72 [#eq](x1, x2) = [0] 582.47/149.72 582.47/149.72 [lcstable](x1, x2) = [0] 582.47/149.72 582.47/149.72 [lcstable#3](x1, x2, x3) = [4] x2 + [4] x3 + [0] 582.47/149.72 582.47/149.72 [newline#7](x1, x2, x3, x4) = [0] 582.47/149.72 582.47/149.72 [#true] = [0] 582.47/149.72 582.47/149.72 [newline#5](x1, x2, x3, x4, x5, x6) = [4] x2 + [5] x3 + [7] x4 + [4] x5 + [3] x6 + [0] 582.47/149.72 582.47/149.72 [right#1](x1) = [0] 582.47/149.72 582.47/149.72 [newline#2](x1, x2, x3, x4) = [4] x2 + [7] x3 + [4] x4 + [0] 582.47/149.72 582.47/149.72 [firstline](x1) = [7] x1 + [4] 582.47/149.72 582.47/149.72 [#ckgt](x1) = [0] 582.47/149.72 582.47/149.72 [#add](x1, x2) = [4] x2 + [0] 582.47/149.72 582.47/149.72 [#pos](x1) = [0] 582.47/149.72 582.47/149.72 [#EQ] = [0] 582.47/149.72 582.47/149.72 [#and](x1, x2) = [0] 582.47/149.72 582.47/149.72 [#compare](x1, x2) = [0] 582.47/149.72 582.47/149.72 [lcstable#1](x1, x2) = [2] x2 + [0] 582.47/149.72 582.47/149.72 [nil] = [4] 582.47/149.72 582.47/149.72 [#greater](x1, x2) = [0] 582.47/149.72 582.47/149.72 [newline](x1, x2, x3) = [0] 582.47/149.72 582.47/149.72 [newline#4](x1, x2, x3, x4, x5, x6) = [4] x2 + [7] x3 + [1] x4 + [4] x5 + [7] x6 + [0] 582.47/149.72 582.47/149.72 [max](x1, x2) = [7] x1 + [7] x2 + [3] 582.47/149.72 582.47/149.72 [right](x1) = [0] 582.47/149.72 582.47/149.72 [#false] = [0] 582.47/149.72 582.47/149.72 [::](x1, x2) = [1] x1 + [1] x2 + [4] 582.47/149.72 582.47/149.72 [#LT] = [0] 582.47/149.72 582.47/149.72 [max#1](x1, x2, x3) = [1] x2 + [1] x3 + [0] 582.47/149.72 582.47/149.72 [+](x1, x2) = [4] x1 + [0] 582.47/149.72 582.47/149.72 [#succ](x1) = [0] 582.47/149.72 582.47/149.72 [newline#3](x1, x2, x3, x4, x5) = [4] x2 + [4] x4 + [0] 582.47/149.72 582.47/149.72 [#0] = [0] 582.47/149.72 582.47/149.72 [#neg](x1) = [0] 582.47/149.72 582.47/149.72 [#abs](x1) = [0] 582.47/149.72 582.47/149.72 [lcstable#2](x1, x2, x3) = [4] x3 + [0] 582.47/149.72 582.47/149.72 [#pred](x1) = [0] 582.47/149.72 582.47/149.72 [newline#6](x1, x2) = [5] x2 + [0] 582.47/149.72 582.47/149.72 [newline#1](x1, x2, x3) = [4] x2 + [4] x3 + [0] 582.47/149.72 582.47/149.72 [#s](x1) = [0] 582.47/149.72 582.47/149.72 [#GT] = [0] 582.47/149.72 582.47/149.72 [firstline#1^#](x1) = [2] x1 + [0] 582.47/149.72 582.47/149.72 [firstline^#](x1) = [2] x1 + [1] 582.47/149.72 582.47/149.72 [lcstable^#](x1, x2) = [1] x1 + [2] x2 + [0] 582.47/149.72 582.47/149.72 [lcstable#1^#](x1, x2) = [1] x1 + [2] x2 + [0] 582.47/149.72 582.47/149.72 [lcstable#3^#](x1, x2, x3) = [0] 582.47/149.72 582.47/149.72 [newline^#](x1, x2, x3) = [0] 582.47/149.72 582.47/149.72 [newline#2^#](x1, x2, x3, x4) = [0] 582.47/149.72 582.47/149.72 [lcstable#2^#](x1, x2, x3) = [0] 582.47/149.72 582.47/149.73 [newline#1^#](x1, x2, x3) = [0] 582.47/149.73 582.47/149.73 [c_1](x1) = [1] x1 + [1] 582.47/149.73 582.47/149.73 [c_2](x1) = [1] x1 + [1] 582.47/149.73 582.47/149.73 [c_3](x1) = [1] x1 + [0] 582.47/149.73 582.47/149.73 [c_4](x1) = [1] x1 + [1] 582.47/149.73 582.47/149.73 [c_5](x1, x2) = [1] x1 + [1] x2 + [3] 582.47/149.73 582.47/149.73 [c_6](x1) = [1] x1 + [0] 582.47/149.73 582.47/149.73 [c_7](x1) = [4] x1 + [0] 582.47/149.73 582.47/149.73 [c_9](x1) = [2] x1 + [0] 582.47/149.73 582.47/149.73 [c_10](x1) = [2] x1 + [0] 582.47/149.73 582.47/149.73 [c_11](x1) = [2] x1 + [0] 582.47/149.73 582.47/149.73 The order satisfies the following ordering constraints: 582.47/149.73 582.47/149.73 [firstline#1(nil())] = [0] 582.47/149.73 ? [4] 582.47/149.73 = [nil()] 582.47/149.73 582.47/149.73 [firstline#1(::(@x, @xs))] = [0] 582.47/149.73 ? [7] @xs + [8] 582.47/149.73 = [::(#abs(#0()), firstline(@xs))] 582.47/149.73 582.47/149.73 [#equal(@x, @y)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#eq(@x, @y)] 582.47/149.73 582.47/149.73 [#eq(#pos(@x), #pos(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#eq(@x, @y)] 582.47/149.73 582.47/149.73 [#eq(#pos(@x), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#pos(@x), #neg(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(nil(), nil())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#true()] 582.47/149.73 582.47/149.73 [#eq(nil(), ::(@y_1, @y_2))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(::(@x_1, @x_2), nil())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 582.47/149.73 582.47/149.73 [#eq(#0(), #pos(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#0(), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#true()] 582.47/149.73 582.47/149.73 [#eq(#0(), #neg(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#0(), #s(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#neg(@x), #pos(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#neg(@x), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#neg(@x), #neg(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#eq(@x, @y)] 582.47/149.73 582.47/149.73 [#eq(#s(@x), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#eq(#s(@x), #s(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#eq(@x, @y)] 582.47/149.73 582.47/149.73 [lcstable(@l1, @l2)] = [0] 582.47/149.73 ? [2] @l2 + [0] 582.47/149.73 = [lcstable#1(@l1, @l2)] 582.47/149.73 582.47/149.73 [lcstable#3(nil(), @l2, @x)] = [4] @x + [4] @l2 + [0] 582.47/149.73 ? [4] 582.47/149.73 = [nil()] 582.47/149.73 582.47/149.73 [lcstable#3(::(@l, @ls), @l2, @x)] = [4] @x + [4] @l2 + [0] 582.47/149.73 ? [1] @l + [1] @ls + [8] 582.47/149.73 = [::(newline(@x, @l, @l2), ::(@l, @ls))] 582.47/149.73 582.47/149.73 [newline#7(#true(), @belowVal, @diagVal, @rightVal)] = [0] 582.47/149.73 ? [4] @diagVal + [0] 582.47/149.73 = [+(@diagVal, #pos(#s(#0())))] 582.47/149.73 582.47/149.73 [newline#7(#false(), @belowVal, @diagVal, @rightVal)] = [0] 582.47/149.73 ? [7] @belowVal + [7] @rightVal + [3] 582.47/149.73 = [max(@belowVal, @rightVal)] 582.47/149.73 582.47/149.73 [newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y)] = [4] @x + [3] @y + [4] @belowVal + [5] @nl + [7] @rightVal + [0] 582.47/149.73 >= [5] @nl + [0] 582.47/149.73 = [newline#6(newline#7(#equal(@x, @y), 582.47/149.73 @belowVal, 582.47/149.73 @diagVal, 582.47/149.73 @rightVal), 582.47/149.73 @nl)] 582.47/149.73 582.47/149.73 [right#1(nil())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#abs(#0())] 582.47/149.73 582.47/149.73 [right#1(::(@x, @xs))] = [0] 582.47/149.73 ? [1] @x + [0] 582.47/149.73 = [@x] 582.47/149.73 582.47/149.73 [newline#2(nil(), @x, @xs, @y)] = [4] @x + [4] @y + [7] @xs + [0] 582.47/149.73 ? [4] 582.47/149.73 = [nil()] 582.47/149.73 582.47/149.73 [newline#2(::(@belowVal, @lastline'), @x, @xs, @y)] = [4] @x + [4] @y + [7] @xs + [0] 582.47/149.73 ? [4] @x + [4] @belowVal + [0] 582.47/149.73 = [newline#3(newline(@y, @lastline', @xs), 582.47/149.73 @belowVal, 582.47/149.73 @lastline', 582.47/149.73 @x, 582.47/149.73 @y)] 582.47/149.73 582.47/149.73 [firstline(@l)] = [7] @l + [4] 582.47/149.73 > [0] 582.47/149.73 = [firstline#1(@l)] 582.47/149.73 582.47/149.73 [#ckgt(#EQ())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#ckgt(#LT())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#ckgt(#GT())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#true()] 582.47/149.73 582.47/149.73 [#add(#pos(#s(#0())), @y)] = [4] @y + [0] 582.47/149.73 >= [0] 582.47/149.73 = [#succ(@y)] 582.47/149.73 582.47/149.73 [#add(#pos(#s(#s(@x))), @y)] = [4] @y + [0] 582.47/149.73 >= [0] 582.47/149.73 = [#succ(#add(#pos(#s(@x)), @y))] 582.47/149.73 582.47/149.73 [#add(#0(), @y)] = [4] @y + [0] 582.47/149.73 >= [1] @y + [0] 582.47/149.73 = [@y] 582.47/149.73 582.47/149.73 [#add(#neg(#s(#0())), @y)] = [4] @y + [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pred(@y)] 582.47/149.73 582.47/149.73 [#add(#neg(#s(#s(@x))), @y)] = [4] @y + [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pred(#add(#pos(#s(@x)), @y))] 582.47/149.73 582.47/149.73 [#and(#true(), #true())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#true()] 582.47/149.73 582.47/149.73 [#and(#true(), #false())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#and(#false(), #true())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#and(#false(), #false())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#false()] 582.47/149.73 582.47/149.73 [#compare(#pos(@x), #pos(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#compare(@x, @y)] 582.47/149.73 582.47/149.73 [#compare(#pos(@x), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#GT()] 582.47/149.73 582.47/149.73 [#compare(#pos(@x), #neg(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#GT()] 582.47/149.73 582.47/149.73 [#compare(#0(), #pos(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#LT()] 582.47/149.73 582.47/149.73 [#compare(#0(), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#EQ()] 582.47/149.73 582.47/149.73 [#compare(#0(), #neg(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#GT()] 582.47/149.73 582.47/149.73 [#compare(#0(), #s(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#LT()] 582.47/149.73 582.47/149.73 [#compare(#neg(@x), #pos(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#LT()] 582.47/149.73 582.47/149.73 [#compare(#neg(@x), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#LT()] 582.47/149.73 582.47/149.73 [#compare(#neg(@x), #neg(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#compare(@y, @x)] 582.47/149.73 582.47/149.73 [#compare(#s(@x), #0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#GT()] 582.47/149.73 582.47/149.73 [#compare(#s(@x), #s(@y))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#compare(@x, @y)] 582.47/149.73 582.47/149.73 [lcstable#1(nil(), @l2)] = [2] @l2 + [0] 582.47/149.73 ? [7] @l2 + [12] 582.47/149.73 = [::(firstline(@l2), nil())] 582.47/149.73 582.47/149.73 [lcstable#1(::(@x, @xs), @l2)] = [2] @l2 + [0] 582.47/149.73 ? [4] @x + [0] 582.47/149.73 = [lcstable#2(lcstable(@xs, @l2), @l2, @x)] 582.47/149.73 582.47/149.73 [#greater(@x, @y)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#ckgt(#compare(@x, @y))] 582.47/149.73 582.47/149.73 [newline(@y, @lastline, @l)] = [0] 582.47/149.73 ? [4] @y + [4] @lastline + [0] 582.47/149.73 = [newline#1(@l, @lastline, @y)] 582.47/149.73 582.47/149.73 [newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y)] = [4] @x + [7] @y + [4] @belowVal + [7] @lastline' + [1] @nl + [0] 582.47/149.73 ? [4] @x + [3] @y + [4] @belowVal + [5] @nl + [7] @rightVal + [0] 582.47/149.73 = [newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y)] 582.47/149.73 582.47/149.73 [max(@a, @b)] = [7] @a + [7] @b + [3] 582.47/149.73 > [1] @a + [1] @b + [0] 582.47/149.73 = [max#1(#greater(@a, @b), @a, @b)] 582.47/149.73 582.47/149.73 [right(@l)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [right#1(@l)] 582.47/149.73 582.47/149.73 [max#1(#true(), @a, @b)] = [1] @a + [1] @b + [0] 582.47/149.73 >= [1] @a + [0] 582.47/149.73 = [@a] 582.47/149.73 582.47/149.73 [max#1(#false(), @a, @b)] = [1] @a + [1] @b + [0] 582.47/149.73 >= [1] @b + [0] 582.47/149.73 = [@b] 582.47/149.73 582.47/149.73 [+(@x, @y)] = [4] @x + [0] 582.47/149.73 ? [4] @y + [0] 582.47/149.73 = [#add(@x, @y)] 582.47/149.73 582.47/149.73 [#succ(#pos(#s(@x)))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pos(#s(#s(@x)))] 582.47/149.73 582.47/149.73 [#succ(#0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pos(#s(#0()))] 582.47/149.73 582.47/149.73 [#succ(#neg(#s(#0())))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#0()] 582.47/149.73 582.47/149.73 [#succ(#neg(#s(#s(@x))))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#neg(#s(@x))] 582.47/149.73 582.47/149.73 [newline#3(@nl, @belowVal, @lastline', @x, @y)] = [4] @x + [4] @belowVal + [0] 582.47/149.73 ? [4] @x + [7] @y + [4] @belowVal + [7] @lastline' + [1] @nl + [0] 582.47/149.73 = [newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y)] 582.47/149.73 582.47/149.73 [#abs(#pos(@x))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pos(@x)] 582.47/149.73 582.47/149.73 [#abs(#0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#0()] 582.47/149.73 582.47/149.73 [#abs(#neg(@x))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pos(@x)] 582.47/149.73 582.47/149.73 [#abs(#s(@x))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pos(#s(@x))] 582.47/149.73 582.47/149.73 [lcstable#2(@m, @l2, @x)] = [4] @x + [0] 582.47/149.73 ? [4] @x + [4] @l2 + [0] 582.47/149.73 = [lcstable#3(@m, @l2, @x)] 582.47/149.73 582.47/149.73 [#pred(#pos(#s(#0())))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#0()] 582.47/149.73 582.47/149.73 [#pred(#pos(#s(#s(@x))))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#pos(#s(@x))] 582.47/149.73 582.47/149.73 [#pred(#0())] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#neg(#s(#0()))] 582.47/149.73 582.47/149.73 [#pred(#neg(#s(@x)))] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [#neg(#s(#s(@x)))] 582.47/149.73 582.47/149.73 [newline#6(@elem, @nl)] = [5] @nl + [0] 582.47/149.73 ? [1] @nl + [1] @elem + [4] 582.47/149.73 = [::(@elem, @nl)] 582.47/149.73 582.47/149.73 [newline#1(nil(), @lastline, @y)] = [4] @y + [4] @lastline + [0] 582.47/149.73 ? [4] 582.47/149.73 = [nil()] 582.47/149.73 582.47/149.73 [newline#1(::(@x, @xs), @lastline, @y)] = [4] @y + [4] @lastline + [0] 582.47/149.73 ? [4] @x + [4] @y + [7] @xs + [0] 582.47/149.73 = [newline#2(@lastline, @x, @xs, @y)] 582.47/149.73 582.47/149.73 [firstline#1^#(::(@x, @xs))] = [2] @x + [2] @xs + [8] 582.47/149.73 > [2] @xs + [2] 582.47/149.73 = [c_1(firstline^#(@xs))] 582.47/149.73 582.47/149.73 [firstline^#(@l)] = [2] @l + [1] 582.47/149.73 >= [2] @l + [1] 582.47/149.73 = [c_2(firstline#1^#(@l))] 582.47/149.73 582.47/149.73 [lcstable^#(@l1, @l2)] = [1] @l1 + [2] @l2 + [0] 582.47/149.73 >= [1] @l1 + [2] @l2 + [0] 582.47/149.73 = [c_3(lcstable#1^#(@l1, @l2))] 582.47/149.73 582.47/149.73 [lcstable#1^#(nil(), @l2)] = [2] @l2 + [4] 582.47/149.73 > [2] @l2 + [2] 582.47/149.73 = [c_4(firstline^#(@l2))] 582.47/149.73 582.47/149.73 [lcstable#1^#(::(@x, @xs), @l2)] = [1] @x + [1] @xs + [2] @l2 + [4] 582.47/149.73 > [1] @xs + [2] @l2 + [3] 582.47/149.73 = [c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.73 lcstable^#(@xs, @l2))] 582.47/149.73 582.47/149.73 [lcstable#3^#(::(@l, @ls), @l2, @x)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [c_6(newline^#(@x, @l, @l2))] 582.47/149.73 582.47/149.73 [newline^#(@y, @lastline, @l)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [c_7(newline#1^#(@l, @lastline, @y))] 582.47/149.73 582.47/149.73 [newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [c_9(newline^#(@y, @lastline', @xs))] 582.47/149.73 582.47/149.73 [lcstable#2^#(@m, @l2, @x)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [c_10(lcstable#3^#(@m, @l2, @x))] 582.47/149.73 582.47/149.73 [newline#1^#(::(@x, @xs), @lastline, @y)] = [0] 582.47/149.73 >= [0] 582.47/149.73 = [c_11(newline#2^#(@lastline, @x, @xs, @y))] 582.47/149.73 582.47/149.73 582.47/149.73 We return to the main proof. Consider the set of all dependency 582.47/149.73 pairs 582.47/149.73 582.47/149.73 : 582.47/149.73 { 1: firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.73 , 2: firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.73 , 3: lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.73 , 4: lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.73 , 5: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.73 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.73 lcstable^#(@xs, @l2)) 582.47/149.73 , 6: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.47/149.73 c_6(newline^#(@x, @l, @l2)) 582.47/149.73 , 7: newline^#(@y, @lastline, @l) -> 582.47/149.73 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.73 , 8: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.73 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.73 , 9: lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.73 , 10: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.73 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.73 582.47/149.73 Processor 'matrix interpretation of dimension 1' induces the 582.47/149.73 complexity certificate YES(?,O(n^1)) on application of dependency 582.47/149.73 pairs {1,4,5}. These cover all (indirect) predecessors of 582.47/149.73 dependency pairs {1,2,3,4,5,6,9}, their number of application is 582.47/149.73 equally bounded. The dependency pairs are shifted into the weak 582.47/149.73 component. 582.47/149.73 582.47/149.73 We are left with following problem, upon which TcT provides the 582.47/149.73 certificate YES(O(1),O(n^2)). 582.47/149.73 582.47/149.73 Strict DPs: 582.47/149.73 { newline^#(@y, @lastline, @l) -> 582.47/149.73 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.73 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.73 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.73 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.73 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.73 Weak DPs: 582.47/149.73 { firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.73 , firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.73 , lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.73 , lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) 582.47/149.73 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.73 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.73 lcstable^#(@xs, @l2)) 582.47/149.73 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.73 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) } 582.47/149.73 Weak Trs: 582.47/149.73 { firstline#1(nil()) -> nil() 582.47/149.73 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.73 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.73 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.73 , #eq(#pos(@x), #0()) -> #false() 582.47/149.73 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.73 , #eq(nil(), nil()) -> #true() 582.47/149.73 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.73 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.73 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.73 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.73 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.73 , #eq(#0(), #0()) -> #true() 582.47/149.73 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.73 , #eq(#0(), #s(@y)) -> #false() 582.47/149.73 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.73 , #eq(#neg(@x), #0()) -> #false() 582.47/149.73 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.73 , #eq(#s(@x), #0()) -> #false() 582.47/149.73 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.73 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.73 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.73 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.73 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.73 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.73 +(@diagVal, #pos(#s(#0()))) 582.47/149.73 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.73 max(@belowVal, @rightVal) 582.47/149.73 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.73 newline#6(newline#7(#equal(@x, @y), 582.47/149.73 @belowVal, 582.47/149.73 @diagVal, 582.47/149.73 @rightVal), 582.47/149.73 @nl) 582.47/149.73 , right#1(nil()) -> #abs(#0()) 582.47/149.73 , right#1(::(@x, @xs)) -> @x 582.47/149.73 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.73 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.73 newline#3(newline(@y, @lastline', @xs), 582.47/149.73 @belowVal, 582.47/149.73 @lastline', 582.47/149.73 @x, 582.47/149.73 @y) 582.47/149.73 , firstline(@l) -> firstline#1(@l) 582.47/149.73 , #ckgt(#EQ()) -> #false() 582.47/149.73 , #ckgt(#LT()) -> #false() 582.47/149.73 , #ckgt(#GT()) -> #true() 582.47/149.73 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.73 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.73 , #add(#0(), @y) -> @y 582.47/149.73 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.73 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.73 , #and(#true(), #true()) -> #true() 582.47/149.73 , #and(#true(), #false()) -> #false() 582.47/149.73 , #and(#false(), #true()) -> #false() 582.47/149.73 , #and(#false(), #false()) -> #false() 582.47/149.73 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.73 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.73 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.73 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.73 , #compare(#0(), #0()) -> #EQ() 582.47/149.73 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.73 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.73 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.73 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.73 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.73 , #compare(#s(@x), #0()) -> #GT() 582.47/149.73 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.73 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.73 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.73 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.73 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.73 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.73 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.73 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.73 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.73 , right(@l) -> right#1(@l) 582.47/149.73 , max#1(#true(), @a, @b) -> @a 582.47/149.73 , max#1(#false(), @a, @b) -> @b 582.47/149.73 , +(@x, @y) -> #add(@x, @y) 582.47/149.73 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.73 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.73 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.73 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.74 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.74 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.74 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.74 , #abs(#0()) -> #0() 582.47/149.74 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.74 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.74 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.74 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.74 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.74 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.74 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.74 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.74 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.74 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.74 newline#2(@lastline, @x, @xs, @y) } 582.47/149.74 Obligation: 582.47/149.74 innermost runtime complexity 582.47/149.74 Answer: 582.47/149.74 YES(O(1),O(n^2)) 582.47/149.74 582.47/149.74 The following weak DPs constitute a sub-graph of the DG that is 582.47/149.74 closed under successors. The DPs are removed. 582.47/149.74 582.47/149.74 { firstline#1^#(::(@x, @xs)) -> c_1(firstline^#(@xs)) 582.47/149.74 , firstline^#(@l) -> c_2(firstline#1^#(@l)) 582.47/149.74 , lcstable#1^#(nil(), @l2) -> c_4(firstline^#(@l2)) } 582.47/149.74 582.47/149.74 We are left with following problem, upon which TcT provides the 582.47/149.74 certificate YES(O(1),O(n^2)). 582.47/149.74 582.47/149.74 Strict DPs: 582.47/149.74 { newline^#(@y, @lastline, @l) -> 582.47/149.74 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.74 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.74 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.74 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.74 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.74 Weak DPs: 582.47/149.74 { lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.74 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.74 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.74 lcstable^#(@xs, @l2)) 582.47/149.74 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.74 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) } 582.47/149.74 Weak Trs: 582.47/149.74 { firstline#1(nil()) -> nil() 582.47/149.74 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.74 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.74 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.74 , #eq(#pos(@x), #0()) -> #false() 582.47/149.74 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.74 , #eq(nil(), nil()) -> #true() 582.47/149.74 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.74 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.74 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.74 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.74 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.74 , #eq(#0(), #0()) -> #true() 582.47/149.74 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.74 , #eq(#0(), #s(@y)) -> #false() 582.47/149.74 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.74 , #eq(#neg(@x), #0()) -> #false() 582.47/149.74 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.74 , #eq(#s(@x), #0()) -> #false() 582.47/149.74 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.74 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.74 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.74 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.74 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.74 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.74 +(@diagVal, #pos(#s(#0()))) 582.47/149.74 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.74 max(@belowVal, @rightVal) 582.47/149.74 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.74 newline#6(newline#7(#equal(@x, @y), 582.47/149.74 @belowVal, 582.47/149.74 @diagVal, 582.47/149.74 @rightVal), 582.47/149.74 @nl) 582.47/149.74 , right#1(nil()) -> #abs(#0()) 582.47/149.74 , right#1(::(@x, @xs)) -> @x 582.47/149.74 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.74 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.74 newline#3(newline(@y, @lastline', @xs), 582.47/149.74 @belowVal, 582.47/149.74 @lastline', 582.47/149.74 @x, 582.47/149.74 @y) 582.47/149.74 , firstline(@l) -> firstline#1(@l) 582.47/149.74 , #ckgt(#EQ()) -> #false() 582.47/149.74 , #ckgt(#LT()) -> #false() 582.47/149.74 , #ckgt(#GT()) -> #true() 582.47/149.74 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.74 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.74 , #add(#0(), @y) -> @y 582.47/149.74 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.74 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.74 , #and(#true(), #true()) -> #true() 582.47/149.74 , #and(#true(), #false()) -> #false() 582.47/149.74 , #and(#false(), #true()) -> #false() 582.47/149.74 , #and(#false(), #false()) -> #false() 582.47/149.74 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.74 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.74 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.74 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.74 , #compare(#0(), #0()) -> #EQ() 582.47/149.74 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.74 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.74 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.74 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.74 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.74 , #compare(#s(@x), #0()) -> #GT() 582.47/149.74 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.74 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.74 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.74 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.74 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.74 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.74 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.74 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.74 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.74 , right(@l) -> right#1(@l) 582.47/149.74 , max#1(#true(), @a, @b) -> @a 582.47/149.74 , max#1(#false(), @a, @b) -> @b 582.47/149.74 , +(@x, @y) -> #add(@x, @y) 582.47/149.74 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.74 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.74 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.74 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.74 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.74 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.74 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.74 , #abs(#0()) -> #0() 582.47/149.74 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.74 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.74 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.74 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.74 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.74 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.74 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.74 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.74 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.74 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.74 newline#2(@lastline, @x, @xs, @y) } 582.47/149.74 Obligation: 582.47/149.74 innermost runtime complexity 582.47/149.74 Answer: 582.47/149.74 YES(O(1),O(n^2)) 582.47/149.74 582.47/149.74 We decompose the input problem according to the dependency graph 582.47/149.74 into the upper component 582.47/149.74 582.47/149.74 { lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.74 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.74 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.74 lcstable^#(@xs, @l2)) } 582.47/149.74 582.47/149.74 and lower component 582.47/149.74 582.47/149.74 { lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.74 , newline^#(@y, @lastline, @l) -> 582.47/149.74 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.74 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.74 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.74 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.74 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.74 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.74 582.47/149.74 Further, following extension rules are added to the lower 582.47/149.74 component. 582.47/149.74 582.47/149.74 { lcstable^#(@l1, @l2) -> lcstable#1^#(@l1, @l2) 582.47/149.74 , lcstable#1^#(::(@x, @xs), @l2) -> lcstable^#(@xs, @l2) 582.47/149.74 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.74 lcstable#2^#(lcstable(@xs, @l2), @l2, @x) } 582.47/149.74 582.47/149.74 TcT solves the upper component with certificate YES(O(1),O(n^1)). 582.47/149.74 582.47/149.74 Sub-proof: 582.47/149.74 ---------- 582.47/149.74 We are left with following problem, upon which TcT provides the 582.47/149.74 certificate YES(O(1),O(n^1)). 582.47/149.74 582.47/149.74 Strict DPs: 582.47/149.74 { lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.74 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.74 lcstable^#(@xs, @l2)) } 582.47/149.74 Weak DPs: { lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) } 582.47/149.74 Weak Trs: 582.47/149.74 { firstline#1(nil()) -> nil() 582.47/149.74 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.74 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.74 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.74 , #eq(#pos(@x), #0()) -> #false() 582.47/149.74 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.74 , #eq(nil(), nil()) -> #true() 582.47/149.74 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.74 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.74 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.74 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.74 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.74 , #eq(#0(), #0()) -> #true() 582.47/149.74 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.74 , #eq(#0(), #s(@y)) -> #false() 582.47/149.74 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.74 , #eq(#neg(@x), #0()) -> #false() 582.47/149.74 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.74 , #eq(#s(@x), #0()) -> #false() 582.47/149.74 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.74 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.74 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.74 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.74 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.74 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.74 +(@diagVal, #pos(#s(#0()))) 582.47/149.74 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.74 max(@belowVal, @rightVal) 582.47/149.74 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.74 newline#6(newline#7(#equal(@x, @y), 582.47/149.74 @belowVal, 582.47/149.74 @diagVal, 582.47/149.74 @rightVal), 582.47/149.74 @nl) 582.47/149.74 , right#1(nil()) -> #abs(#0()) 582.47/149.74 , right#1(::(@x, @xs)) -> @x 582.47/149.74 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.74 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.74 newline#3(newline(@y, @lastline', @xs), 582.47/149.74 @belowVal, 582.47/149.74 @lastline', 582.47/149.74 @x, 582.47/149.74 @y) 582.47/149.74 , firstline(@l) -> firstline#1(@l) 582.47/149.74 , #ckgt(#EQ()) -> #false() 582.47/149.74 , #ckgt(#LT()) -> #false() 582.47/149.74 , #ckgt(#GT()) -> #true() 582.47/149.74 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.74 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.74 , #add(#0(), @y) -> @y 582.47/149.74 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.74 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.74 , #and(#true(), #true()) -> #true() 582.47/149.74 , #and(#true(), #false()) -> #false() 582.47/149.74 , #and(#false(), #true()) -> #false() 582.47/149.74 , #and(#false(), #false()) -> #false() 582.47/149.74 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.74 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.74 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.74 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.74 , #compare(#0(), #0()) -> #EQ() 582.47/149.74 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.74 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.74 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.74 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.74 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.74 , #compare(#s(@x), #0()) -> #GT() 582.47/149.74 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.74 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.74 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.74 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.74 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.74 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.74 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.74 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.74 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.74 , right(@l) -> right#1(@l) 582.47/149.74 , max#1(#true(), @a, @b) -> @a 582.47/149.74 , max#1(#false(), @a, @b) -> @b 582.47/149.74 , +(@x, @y) -> #add(@x, @y) 582.47/149.74 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.74 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.74 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.74 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.74 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.74 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.74 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.74 , #abs(#0()) -> #0() 582.47/149.74 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.74 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.74 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.74 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.74 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.74 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.74 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.74 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.74 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.74 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.74 newline#2(@lastline, @x, @xs, @y) } 582.47/149.74 Obligation: 582.47/149.74 innermost runtime complexity 582.47/149.74 Answer: 582.47/149.74 YES(O(1),O(n^1)) 582.47/149.74 582.47/149.74 We use the processor 'matrix interpretation of dimension 1' to 582.47/149.74 orient following rules strictly. 582.47/149.74 582.47/149.74 DPs: 582.47/149.74 { 1: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.74 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.74 lcstable^#(@xs, @l2)) 582.47/149.74 , 2: lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) } 582.47/149.74 Trs: { max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) } 582.47/149.74 582.47/149.74 Sub-proof: 582.47/149.74 ---------- 582.47/149.74 The following argument positions are usable: 582.47/149.74 Uargs(c_3) = {1}, Uargs(c_5) = {1, 2} 582.47/149.74 582.47/149.74 TcT has computed the following constructor-based matrix 582.47/149.74 interpretation satisfying not(EDA). 582.47/149.74 582.47/149.74 [firstline#1](x1) = [0] 582.47/149.74 582.47/149.74 [#equal](x1, x2) = [0] 582.47/149.74 582.47/149.74 [#eq](x1, x2) = [0] 582.47/149.74 582.47/149.74 [lcstable](x1, x2) = [0] 582.47/149.74 582.47/149.74 [lcstable#3](x1, x2, x3) = [4] x2 + [4] x3 + [0] 582.47/149.74 582.47/149.74 [newline#7](x1, x2, x3, x4) = [0] 582.47/149.74 582.47/149.74 [#true] = [0] 582.47/149.74 582.47/149.74 [newline#5](x1, x2, x3, x4, x5, x6) = [4] x2 + [1] x3 + [7] x4 + [4] x5 + [7] x6 + [0] 582.47/149.74 582.47/149.74 [right#1](x1) = [0] 582.47/149.74 582.47/149.74 [newline#2](x1, x2, x3, x4) = [4] x2 + [7] x3 + [0] 582.47/149.74 582.47/149.74 [firstline](x1) = [7] x1 + [0] 582.47/149.74 582.47/149.74 [#ckgt](x1) = [0] 582.47/149.74 582.47/149.74 [#add](x1, x2) = [4] x2 + [0] 582.47/149.74 582.47/149.74 [#pos](x1) = [0] 582.47/149.74 582.47/149.74 [#EQ] = [0] 582.47/149.74 582.47/149.74 [#and](x1, x2) = [0] 582.47/149.74 582.47/149.74 [#compare](x1, x2) = [0] 582.47/149.74 582.47/149.74 [lcstable#1](x1, x2) = [3] x2 + [0] 582.47/149.74 582.47/149.74 [nil] = [0] 582.47/149.74 582.47/149.74 [#greater](x1, x2) = [0] 582.47/149.74 582.47/149.74 [newline](x1, x2, x3) = [0] 582.47/149.74 582.47/149.74 [newline#4](x1, x2, x3, x4, x5, x6) = [4] x2 + [7] x3 + [1] x4 + [4] x5 + [3] x6 + [0] 582.47/149.74 582.47/149.74 [max](x1, x2) = [7] x1 + [7] x2 + [3] 582.47/149.74 582.47/149.74 [right](x1) = [0] 582.47/149.74 582.47/149.74 [#false] = [0] 582.47/149.74 582.47/149.74 [::](x1, x2) = [1] x2 + [4] 582.47/149.74 582.47/149.74 [#LT] = [0] 582.47/149.74 582.47/149.74 [max#1](x1, x2, x3) = [1] x2 + [1] x3 + [0] 582.47/149.74 582.47/149.74 [+](x1, x2) = [4] x1 + [0] 582.47/149.74 582.47/149.74 [#succ](x1) = [0] 582.47/149.74 582.47/149.74 [newline#3](x1, x2, x3, x4, x5) = [4] x2 + [4] x4 + [0] 582.47/149.74 582.47/149.74 [#0] = [0] 582.47/149.74 582.47/149.74 [#neg](x1) = [0] 582.47/149.74 582.47/149.74 [#abs](x1) = [0] 582.47/149.74 582.47/149.74 [lcstable#2](x1, x2, x3) = [4] x3 + [0] 582.47/149.74 582.47/149.74 [#pred](x1) = [0] 582.47/149.74 582.47/149.74 [newline#6](x1, x2) = [1] x2 + [0] 582.47/149.74 582.47/149.74 [newline#1](x1, x2, x3) = [4] x2 + [4] x3 + [0] 582.47/149.74 582.47/149.74 [#s](x1) = [0] 582.47/149.74 582.47/149.74 [#GT] = [0] 582.47/149.74 582.47/149.74 [lcstable^#](x1, x2) = [2] x1 + [1] 582.47/149.74 582.47/149.74 [lcstable#1^#](x1, x2) = [2] x1 + [0] 582.47/149.74 582.47/149.74 [lcstable#2^#](x1, x2, x3) = [0] 582.47/149.74 582.47/149.74 [c_3](x1) = [1] x1 + [0] 582.47/149.74 582.47/149.74 [c_5](x1, x2) = [4] x1 + [1] x2 + [5] 582.47/149.74 582.47/149.74 The order satisfies the following ordering constraints: 582.47/149.74 582.47/149.74 [firstline#1(nil())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [nil()] 582.47/149.74 582.47/149.74 [firstline#1(::(@x, @xs))] = [0] 582.47/149.74 ? [7] @xs + [4] 582.47/149.74 = [::(#abs(#0()), firstline(@xs))] 582.47/149.74 582.47/149.74 [#equal(@x, @y)] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#eq(@x, @y)] 582.47/149.74 582.47/149.74 [#eq(#pos(@x), #pos(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#eq(@x, @y)] 582.47/149.74 582.47/149.74 [#eq(#pos(@x), #0())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#pos(@x), #neg(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(nil(), nil())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#true()] 582.47/149.74 582.47/149.74 [#eq(nil(), ::(@y_1, @y_2))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(::(@x_1, @x_2), nil())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 582.47/149.74 582.47/149.74 [#eq(#0(), #pos(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#0(), #0())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#true()] 582.47/149.74 582.47/149.74 [#eq(#0(), #neg(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#0(), #s(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#neg(@x), #pos(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#neg(@x), #0())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#neg(@x), #neg(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#eq(@x, @y)] 582.47/149.74 582.47/149.74 [#eq(#s(@x), #0())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#eq(#s(@x), #s(@y))] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#eq(@x, @y)] 582.47/149.74 582.47/149.74 [lcstable(@l1, @l2)] = [0] 582.47/149.74 ? [3] @l2 + [0] 582.47/149.74 = [lcstable#1(@l1, @l2)] 582.47/149.74 582.47/149.74 [lcstable#3(nil(), @l2, @x)] = [4] @x + [4] @l2 + [0] 582.47/149.74 >= [0] 582.47/149.74 = [nil()] 582.47/149.74 582.47/149.74 [lcstable#3(::(@l, @ls), @l2, @x)] = [4] @x + [4] @l2 + [0] 582.47/149.74 ? [1] @ls + [8] 582.47/149.74 = [::(newline(@x, @l, @l2), ::(@l, @ls))] 582.47/149.74 582.47/149.74 [newline#7(#true(), @belowVal, @diagVal, @rightVal)] = [0] 582.47/149.74 ? [4] @diagVal + [0] 582.47/149.74 = [+(@diagVal, #pos(#s(#0())))] 582.47/149.74 582.47/149.74 [newline#7(#false(), @belowVal, @diagVal, @rightVal)] = [0] 582.47/149.74 ? [7] @belowVal + [7] @rightVal + [3] 582.47/149.74 = [max(@belowVal, @rightVal)] 582.47/149.74 582.47/149.74 [newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y)] = [4] @x + [7] @y + [4] @belowVal + [1] @nl + [7] @rightVal + [0] 582.47/149.74 >= [1] @nl + [0] 582.47/149.74 = [newline#6(newline#7(#equal(@x, @y), 582.47/149.74 @belowVal, 582.47/149.74 @diagVal, 582.47/149.74 @rightVal), 582.47/149.74 @nl)] 582.47/149.74 582.47/149.74 [right#1(nil())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#abs(#0())] 582.47/149.74 582.47/149.74 [right#1(::(@x, @xs))] = [0] 582.47/149.74 ? [1] @x + [0] 582.47/149.74 = [@x] 582.47/149.74 582.47/149.74 [newline#2(nil(), @x, @xs, @y)] = [4] @x + [7] @xs + [0] 582.47/149.74 >= [0] 582.47/149.74 = [nil()] 582.47/149.74 582.47/149.74 [newline#2(::(@belowVal, @lastline'), @x, @xs, @y)] = [4] @x + [7] @xs + [0] 582.47/149.74 ? [4] @x + [4] @belowVal + [0] 582.47/149.74 = [newline#3(newline(@y, @lastline', @xs), 582.47/149.74 @belowVal, 582.47/149.74 @lastline', 582.47/149.74 @x, 582.47/149.74 @y)] 582.47/149.74 582.47/149.74 [firstline(@l)] = [7] @l + [0] 582.47/149.74 >= [0] 582.47/149.74 = [firstline#1(@l)] 582.47/149.74 582.47/149.74 [#ckgt(#EQ())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#ckgt(#LT())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#false()] 582.47/149.74 582.47/149.74 [#ckgt(#GT())] = [0] 582.47/149.74 >= [0] 582.47/149.74 = [#true()] 582.47/149.74 582.47/149.74 [#add(#pos(#s(#0())), @y)] = [4] @y + [0] 582.47/149.74 >= [0] 582.47/149.74 = [#succ(@y)] 582.47/149.74 582.47/149.74 [#add(#pos(#s(#s(@x))), @y)] = [4] @y + [0] 582.47/149.74 >= [0] 582.47/149.74 = [#succ(#add(#pos(#s(@x)), @y))] 582.47/149.74 582.47/149.74 [#add(#0(), @y)] = [4] @y + [0] 582.47/149.74 >= [1] @y + [0] 582.47/149.74 = [@y] 582.47/149.75 582.47/149.75 [#add(#neg(#s(#0())), @y)] = [4] @y + [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pred(@y)] 582.47/149.75 582.47/149.75 [#add(#neg(#s(#s(@x))), @y)] = [4] @y + [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pred(#add(#pos(#s(@x)), @y))] 582.47/149.75 582.47/149.75 [#and(#true(), #true())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#true()] 582.47/149.75 582.47/149.75 [#and(#true(), #false())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#false()] 582.47/149.75 582.47/149.75 [#and(#false(), #true())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#false()] 582.47/149.75 582.47/149.75 [#and(#false(), #false())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#false()] 582.47/149.75 582.47/149.75 [#compare(#pos(@x), #pos(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#compare(@x, @y)] 582.47/149.75 582.47/149.75 [#compare(#pos(@x), #0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#GT()] 582.47/149.75 582.47/149.75 [#compare(#pos(@x), #neg(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#GT()] 582.47/149.75 582.47/149.75 [#compare(#0(), #pos(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#LT()] 582.47/149.75 582.47/149.75 [#compare(#0(), #0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#EQ()] 582.47/149.75 582.47/149.75 [#compare(#0(), #neg(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#GT()] 582.47/149.75 582.47/149.75 [#compare(#0(), #s(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#LT()] 582.47/149.75 582.47/149.75 [#compare(#neg(@x), #pos(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#LT()] 582.47/149.75 582.47/149.75 [#compare(#neg(@x), #0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#LT()] 582.47/149.75 582.47/149.75 [#compare(#neg(@x), #neg(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#compare(@y, @x)] 582.47/149.75 582.47/149.75 [#compare(#s(@x), #0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#GT()] 582.47/149.75 582.47/149.75 [#compare(#s(@x), #s(@y))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#compare(@x, @y)] 582.47/149.75 582.47/149.75 [lcstable#1(nil(), @l2)] = [3] @l2 + [0] 582.47/149.75 ? [4] 582.47/149.75 = [::(firstline(@l2), nil())] 582.47/149.75 582.47/149.75 [lcstable#1(::(@x, @xs), @l2)] = [3] @l2 + [0] 582.47/149.75 ? [4] @x + [0] 582.47/149.75 = [lcstable#2(lcstable(@xs, @l2), @l2, @x)] 582.47/149.75 582.47/149.75 [#greater(@x, @y)] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#ckgt(#compare(@x, @y))] 582.47/149.75 582.47/149.75 [newline(@y, @lastline, @l)] = [0] 582.47/149.75 ? [4] @y + [4] @lastline + [0] 582.47/149.75 = [newline#1(@l, @lastline, @y)] 582.47/149.75 582.47/149.75 [newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y)] = [4] @x + [3] @y + [4] @belowVal + [7] @lastline' + [1] @nl + [0] 582.47/149.75 ? [4] @x + [7] @y + [4] @belowVal + [1] @nl + [7] @rightVal + [0] 582.47/149.75 = [newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y)] 582.47/149.75 582.47/149.75 [max(@a, @b)] = [7] @a + [7] @b + [3] 582.47/149.75 > [1] @a + [1] @b + [0] 582.47/149.75 = [max#1(#greater(@a, @b), @a, @b)] 582.47/149.75 582.47/149.75 [right(@l)] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [right#1(@l)] 582.47/149.75 582.47/149.75 [max#1(#true(), @a, @b)] = [1] @a + [1] @b + [0] 582.47/149.75 >= [1] @a + [0] 582.47/149.75 = [@a] 582.47/149.75 582.47/149.75 [max#1(#false(), @a, @b)] = [1] @a + [1] @b + [0] 582.47/149.75 >= [1] @b + [0] 582.47/149.75 = [@b] 582.47/149.75 582.47/149.75 [+(@x, @y)] = [4] @x + [0] 582.47/149.75 ? [4] @y + [0] 582.47/149.75 = [#add(@x, @y)] 582.47/149.75 582.47/149.75 [#succ(#pos(#s(@x)))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pos(#s(#s(@x)))] 582.47/149.75 582.47/149.75 [#succ(#0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pos(#s(#0()))] 582.47/149.75 582.47/149.75 [#succ(#neg(#s(#0())))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#0()] 582.47/149.75 582.47/149.75 [#succ(#neg(#s(#s(@x))))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#neg(#s(@x))] 582.47/149.75 582.47/149.75 [newline#3(@nl, @belowVal, @lastline', @x, @y)] = [4] @x + [4] @belowVal + [0] 582.47/149.75 ? [4] @x + [3] @y + [4] @belowVal + [7] @lastline' + [1] @nl + [0] 582.47/149.75 = [newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y)] 582.47/149.75 582.47/149.75 [#abs(#pos(@x))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pos(@x)] 582.47/149.75 582.47/149.75 [#abs(#0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#0()] 582.47/149.75 582.47/149.75 [#abs(#neg(@x))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pos(@x)] 582.47/149.75 582.47/149.75 [#abs(#s(@x))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pos(#s(@x))] 582.47/149.75 582.47/149.75 [lcstable#2(@m, @l2, @x)] = [4] @x + [0] 582.47/149.75 ? [4] @x + [4] @l2 + [0] 582.47/149.75 = [lcstable#3(@m, @l2, @x)] 582.47/149.75 582.47/149.75 [#pred(#pos(#s(#0())))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#0()] 582.47/149.75 582.47/149.75 [#pred(#pos(#s(#s(@x))))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#pos(#s(@x))] 582.47/149.75 582.47/149.75 [#pred(#0())] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#neg(#s(#0()))] 582.47/149.75 582.47/149.75 [#pred(#neg(#s(@x)))] = [0] 582.47/149.75 >= [0] 582.47/149.75 = [#neg(#s(#s(@x)))] 582.47/149.75 582.47/149.75 [newline#6(@elem, @nl)] = [1] @nl + [0] 582.47/149.75 ? [1] @nl + [4] 582.47/149.75 = [::(@elem, @nl)] 582.47/149.75 582.47/149.75 [newline#1(nil(), @lastline, @y)] = [4] @y + [4] @lastline + [0] 582.47/149.75 >= [0] 582.47/149.75 = [nil()] 582.47/149.75 582.47/149.75 [newline#1(::(@x, @xs), @lastline, @y)] = [4] @y + [4] @lastline + [0] 582.47/149.75 ? [4] @x + [7] @xs + [0] 582.47/149.75 = [newline#2(@lastline, @x, @xs, @y)] 582.47/149.75 582.47/149.75 [lcstable^#(@l1, @l2)] = [2] @l1 + [1] 582.47/149.75 > [2] @l1 + [0] 582.47/149.75 = [c_3(lcstable#1^#(@l1, @l2))] 582.47/149.75 582.47/149.75 [lcstable#1^#(::(@x, @xs), @l2)] = [2] @xs + [8] 582.47/149.75 > [2] @xs + [6] 582.47/149.75 = [c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.75 lcstable^#(@xs, @l2))] 582.47/149.75 582.47/149.75 582.47/149.75 The strictly oriented rules are moved into the weak component. 582.47/149.75 582.47/149.75 We are left with following problem, upon which TcT provides the 582.47/149.75 certificate YES(O(1),O(1)). 582.47/149.75 582.47/149.75 Weak DPs: 582.47/149.75 { lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.75 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.75 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.75 lcstable^#(@xs, @l2)) } 582.47/149.75 Weak Trs: 582.47/149.75 { firstline#1(nil()) -> nil() 582.47/149.75 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.75 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.75 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.75 , #eq(#pos(@x), #0()) -> #false() 582.47/149.75 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.75 , #eq(nil(), nil()) -> #true() 582.47/149.75 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.75 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.75 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.75 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.75 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.75 , #eq(#0(), #0()) -> #true() 582.47/149.75 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.75 , #eq(#0(), #s(@y)) -> #false() 582.47/149.75 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.75 , #eq(#neg(@x), #0()) -> #false() 582.47/149.75 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.75 , #eq(#s(@x), #0()) -> #false() 582.47/149.75 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.75 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.75 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.75 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.75 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.75 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.75 +(@diagVal, #pos(#s(#0()))) 582.47/149.75 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.75 max(@belowVal, @rightVal) 582.47/149.75 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.75 newline#6(newline#7(#equal(@x, @y), 582.47/149.75 @belowVal, 582.47/149.75 @diagVal, 582.47/149.75 @rightVal), 582.47/149.75 @nl) 582.47/149.75 , right#1(nil()) -> #abs(#0()) 582.47/149.75 , right#1(::(@x, @xs)) -> @x 582.47/149.75 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.75 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.75 newline#3(newline(@y, @lastline', @xs), 582.47/149.75 @belowVal, 582.47/149.75 @lastline', 582.47/149.75 @x, 582.47/149.75 @y) 582.47/149.75 , firstline(@l) -> firstline#1(@l) 582.47/149.75 , #ckgt(#EQ()) -> #false() 582.47/149.75 , #ckgt(#LT()) -> #false() 582.47/149.75 , #ckgt(#GT()) -> #true() 582.47/149.75 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.75 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.75 , #add(#0(), @y) -> @y 582.47/149.75 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.75 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.75 , #and(#true(), #true()) -> #true() 582.47/149.75 , #and(#true(), #false()) -> #false() 582.47/149.75 , #and(#false(), #true()) -> #false() 582.47/149.75 , #and(#false(), #false()) -> #false() 582.47/149.75 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.75 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.75 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.75 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.75 , #compare(#0(), #0()) -> #EQ() 582.47/149.75 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.75 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.75 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.75 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.75 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.75 , #compare(#s(@x), #0()) -> #GT() 582.47/149.75 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.75 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.75 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.75 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.75 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.75 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.75 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.75 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.75 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.75 , right(@l) -> right#1(@l) 582.47/149.75 , max#1(#true(), @a, @b) -> @a 582.47/149.75 , max#1(#false(), @a, @b) -> @b 582.47/149.75 , +(@x, @y) -> #add(@x, @y) 582.47/149.75 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.75 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.75 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.75 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.75 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.75 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.75 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.75 , #abs(#0()) -> #0() 582.47/149.75 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.75 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.75 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.75 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.75 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.75 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.75 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.75 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.75 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.75 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.75 newline#2(@lastline, @x, @xs, @y) } 582.47/149.75 Obligation: 582.47/149.75 innermost runtime complexity 582.47/149.75 Answer: 582.47/149.75 YES(O(1),O(1)) 582.47/149.75 582.47/149.75 The following weak DPs constitute a sub-graph of the DG that is 582.47/149.75 closed under successors. The DPs are removed. 582.47/149.75 582.47/149.75 { lcstable^#(@l1, @l2) -> c_3(lcstable#1^#(@l1, @l2)) 582.47/149.75 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.75 c_5(lcstable#2^#(lcstable(@xs, @l2), @l2, @x), 582.47/149.75 lcstable^#(@xs, @l2)) } 582.47/149.75 582.47/149.75 We are left with following problem, upon which TcT provides the 582.47/149.75 certificate YES(O(1),O(1)). 582.47/149.75 582.47/149.75 Weak Trs: 582.47/149.75 { firstline#1(nil()) -> nil() 582.47/149.75 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.75 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.75 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.75 , #eq(#pos(@x), #0()) -> #false() 582.47/149.75 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.75 , #eq(nil(), nil()) -> #true() 582.47/149.75 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.75 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.75 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.75 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.75 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.75 , #eq(#0(), #0()) -> #true() 582.47/149.75 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.75 , #eq(#0(), #s(@y)) -> #false() 582.47/149.75 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.75 , #eq(#neg(@x), #0()) -> #false() 582.47/149.75 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.75 , #eq(#s(@x), #0()) -> #false() 582.47/149.75 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.75 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.75 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.75 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.75 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.75 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.75 +(@diagVal, #pos(#s(#0()))) 582.47/149.75 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.75 max(@belowVal, @rightVal) 582.47/149.75 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.75 newline#6(newline#7(#equal(@x, @y), 582.47/149.75 @belowVal, 582.47/149.75 @diagVal, 582.47/149.75 @rightVal), 582.47/149.75 @nl) 582.47/149.75 , right#1(nil()) -> #abs(#0()) 582.47/149.75 , right#1(::(@x, @xs)) -> @x 582.47/149.75 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.75 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.75 newline#3(newline(@y, @lastline', @xs), 582.47/149.75 @belowVal, 582.47/149.75 @lastline', 582.47/149.75 @x, 582.47/149.75 @y) 582.47/149.75 , firstline(@l) -> firstline#1(@l) 582.47/149.76 , #ckgt(#EQ()) -> #false() 582.47/149.76 , #ckgt(#LT()) -> #false() 582.47/149.76 , #ckgt(#GT()) -> #true() 582.47/149.76 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.76 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.76 , #add(#0(), @y) -> @y 582.47/149.76 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.76 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.76 , #and(#true(), #true()) -> #true() 582.47/149.76 , #and(#true(), #false()) -> #false() 582.47/149.76 , #and(#false(), #true()) -> #false() 582.47/149.76 , #and(#false(), #false()) -> #false() 582.47/149.76 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.76 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.76 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.76 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.76 , #compare(#0(), #0()) -> #EQ() 582.47/149.76 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.76 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.76 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.76 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.76 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.76 , #compare(#s(@x), #0()) -> #GT() 582.47/149.76 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.76 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.76 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.76 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.76 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.76 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.76 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.76 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.76 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.76 , right(@l) -> right#1(@l) 582.47/149.76 , max#1(#true(), @a, @b) -> @a 582.47/149.76 , max#1(#false(), @a, @b) -> @b 582.47/149.76 , +(@x, @y) -> #add(@x, @y) 582.47/149.76 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.76 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.76 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.76 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.76 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.76 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.76 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.76 , #abs(#0()) -> #0() 582.47/149.76 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.76 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.76 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.76 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.76 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.76 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.76 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.76 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.76 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.76 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.76 newline#2(@lastline, @x, @xs, @y) } 582.47/149.76 Obligation: 582.47/149.76 innermost runtime complexity 582.47/149.76 Answer: 582.47/149.76 YES(O(1),O(1)) 582.47/149.76 582.47/149.76 No rule is usable, rules are removed from the input problem. 582.47/149.76 582.47/149.76 We are left with following problem, upon which TcT provides the 582.47/149.76 certificate YES(O(1),O(1)). 582.47/149.76 582.47/149.76 Rules: Empty 582.47/149.76 Obligation: 582.47/149.76 innermost runtime complexity 582.47/149.76 Answer: 582.47/149.76 YES(O(1),O(1)) 582.47/149.76 582.47/149.76 Empty rules are trivially bounded 582.47/149.76 582.47/149.76 We return to the main proof. 582.47/149.76 582.47/149.76 We are left with following problem, upon which TcT provides the 582.47/149.76 certificate YES(O(1),O(n^1)). 582.47/149.76 582.47/149.76 Strict DPs: 582.47/149.76 { newline^#(@y, @lastline, @l) -> 582.47/149.76 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.76 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.76 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.76 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.76 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.76 Weak DPs: 582.47/149.76 { lcstable^#(@l1, @l2) -> lcstable#1^#(@l1, @l2) 582.47/149.76 , lcstable#1^#(::(@x, @xs), @l2) -> lcstable^#(@xs, @l2) 582.47/149.76 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.76 lcstable#2^#(lcstable(@xs, @l2), @l2, @x) 582.47/149.76 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.76 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) } 582.47/149.76 Weak Trs: 582.47/149.76 { firstline#1(nil()) -> nil() 582.47/149.76 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.76 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.76 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.76 , #eq(#pos(@x), #0()) -> #false() 582.47/149.76 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.76 , #eq(nil(), nil()) -> #true() 582.47/149.76 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.76 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.76 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.76 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.76 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.76 , #eq(#0(), #0()) -> #true() 582.47/149.76 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.76 , #eq(#0(), #s(@y)) -> #false() 582.47/149.76 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.76 , #eq(#neg(@x), #0()) -> #false() 582.47/149.76 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.76 , #eq(#s(@x), #0()) -> #false() 582.47/149.76 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.76 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.76 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.76 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.76 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.76 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.76 +(@diagVal, #pos(#s(#0()))) 582.47/149.76 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.76 max(@belowVal, @rightVal) 582.47/149.76 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.76 newline#6(newline#7(#equal(@x, @y), 582.47/149.76 @belowVal, 582.47/149.76 @diagVal, 582.47/149.76 @rightVal), 582.47/149.76 @nl) 582.47/149.76 , right#1(nil()) -> #abs(#0()) 582.47/149.76 , right#1(::(@x, @xs)) -> @x 582.47/149.76 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.76 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.76 newline#3(newline(@y, @lastline', @xs), 582.47/149.76 @belowVal, 582.47/149.76 @lastline', 582.47/149.76 @x, 582.47/149.76 @y) 582.47/149.76 , firstline(@l) -> firstline#1(@l) 582.47/149.76 , #ckgt(#EQ()) -> #false() 582.47/149.76 , #ckgt(#LT()) -> #false() 582.47/149.76 , #ckgt(#GT()) -> #true() 582.47/149.76 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.76 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.76 , #add(#0(), @y) -> @y 582.47/149.76 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.76 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.76 , #and(#true(), #true()) -> #true() 582.47/149.76 , #and(#true(), #false()) -> #false() 582.47/149.76 , #and(#false(), #true()) -> #false() 582.47/149.76 , #and(#false(), #false()) -> #false() 582.47/149.76 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.76 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.76 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.76 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.76 , #compare(#0(), #0()) -> #EQ() 582.47/149.76 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.76 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.76 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.76 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.76 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.76 , #compare(#s(@x), #0()) -> #GT() 582.47/149.76 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.76 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.76 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.76 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.76 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.76 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.76 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.76 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.76 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.76 , right(@l) -> right#1(@l) 582.47/149.76 , max#1(#true(), @a, @b) -> @a 582.47/149.76 , max#1(#false(), @a, @b) -> @b 582.47/149.76 , +(@x, @y) -> #add(@x, @y) 582.47/149.76 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.76 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.76 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.76 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.76 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.76 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.76 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.76 , #abs(#0()) -> #0() 582.47/149.76 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.76 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.76 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.76 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.76 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.76 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.76 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.76 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.76 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.76 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.76 newline#2(@lastline, @x, @xs, @y) } 582.47/149.76 Obligation: 582.47/149.76 innermost runtime complexity 582.47/149.76 Answer: 582.47/149.76 YES(O(1),O(n^1)) 582.47/149.76 582.47/149.76 We use the processor 'matrix interpretation of dimension 1' to 582.47/149.76 orient following rules strictly. 582.47/149.76 582.47/149.76 DPs: 582.47/149.76 { 2: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.76 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.76 , 3: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.76 c_11(newline#2^#(@lastline, @x, @xs, @y)) 582.47/149.76 , 4: lcstable^#(@l1, @l2) -> lcstable#1^#(@l1, @l2) 582.47/149.76 , 5: lcstable#1^#(::(@x, @xs), @l2) -> lcstable^#(@xs, @l2) 582.47/149.76 , 6: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.76 lcstable#2^#(lcstable(@xs, @l2), @l2, @x) } 582.47/149.76 Trs: 582.47/149.76 { firstline(@l) -> firstline#1(@l) 582.47/149.76 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) } 582.47/149.76 582.47/149.76 Sub-proof: 582.47/149.76 ---------- 582.47/149.76 The following argument positions are usable: 582.47/149.76 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(c_9) = {1}, 582.47/149.76 Uargs(c_10) = {1}, Uargs(c_11) = {1} 582.47/149.76 582.47/149.76 TcT has computed the following constructor-based matrix 582.47/149.76 interpretation satisfying not(EDA). 582.47/149.76 582.47/149.76 [firstline#1](x1) = [0] 582.47/149.76 582.47/149.76 [#equal](x1, x2) = [0] 582.47/149.76 582.47/149.76 [#eq](x1, x2) = [0] 582.47/149.76 582.47/149.76 [lcstable](x1, x2) = [0] 582.47/149.76 582.47/149.76 [lcstable#3](x1, x2, x3) = [4] x2 + [4] x3 + [0] 582.47/149.76 582.47/149.76 [newline#7](x1, x2, x3, x4) = [0] 582.47/149.76 582.47/149.76 [#true] = [0] 582.47/149.76 582.47/149.76 [newline#5](x1, x2, x3, x4, x5, x6) = [4] x2 + [1] x3 + [7] x4 + [4] x5 + [3] x6 + [0] 582.47/149.76 582.47/149.76 [right#1](x1) = [0] 582.47/149.76 582.47/149.76 [newline#2](x1, x2, x3, x4) = [4] x2 + [7] x3 + [0] 582.47/149.76 582.47/149.76 [firstline](x1) = [7] x1 + [2] 582.47/149.76 582.47/149.76 [#ckgt](x1) = [0] 582.47/149.76 582.47/149.76 [#add](x1, x2) = [4] x2 + [0] 582.47/149.76 582.47/149.76 [#pos](x1) = [0] 582.47/149.76 582.47/149.76 [#EQ] = [0] 582.47/149.76 582.47/149.76 [#and](x1, x2) = [0] 582.47/149.76 582.47/149.76 [#compare](x1, x2) = [0] 582.47/149.76 582.47/149.76 [lcstable#1](x1, x2) = [3] x2 + [0] 582.47/149.76 582.47/149.76 [nil] = [0] 582.47/149.76 582.47/149.76 [#greater](x1, x2) = [0] 582.47/149.76 582.47/149.76 [newline](x1, x2, x3) = [0] 582.47/149.76 582.47/149.76 [newline#4](x1, x2, x3, x4, x5, x6) = [4] x2 + [7] x3 + [1] x4 + [4] x5 + [7] x6 + [0] 582.47/149.76 582.47/149.76 [max](x1, x2) = [7] x1 + [7] x2 + [1] 582.47/149.76 582.47/149.76 [right](x1) = [0] 582.47/149.76 582.47/149.76 [#false] = [0] 582.47/149.76 582.47/149.76 [::](x1, x2) = [1] x1 + [1] x2 + [6] 582.47/149.76 582.47/149.76 [#LT] = [0] 582.47/149.76 582.47/149.76 [max#1](x1, x2, x3) = [1] x2 + [1] x3 + [0] 582.47/149.76 582.47/149.76 [+](x1, x2) = [4] x1 + [0] 582.47/149.76 582.47/149.76 [#succ](x1) = [0] 582.47/149.76 582.47/149.76 [newline#3](x1, x2, x3, x4, x5) = [4] x2 + [4] x4 + [0] 582.47/149.76 582.47/149.76 [#0] = [0] 582.47/149.76 582.47/149.76 [#neg](x1) = [0] 582.47/149.76 582.47/149.76 [#abs](x1) = [0] 582.47/149.76 582.47/149.76 [lcstable#2](x1, x2, x3) = [4] x3 + [0] 582.47/149.76 582.47/149.76 [#pred](x1) = [0] 582.47/149.76 582.47/149.76 [newline#6](x1, x2) = [1] x2 + [0] 582.47/149.76 582.47/149.76 [newline#1](x1, x2, x3) = [4] x2 + [4] x3 + [0] 582.47/149.76 582.47/149.76 [#s](x1) = [0] 582.47/149.76 582.47/149.76 [#GT] = [0] 582.47/149.76 582.47/149.76 [lcstable^#](x1, x2) = [2] x1 + [7] x2 + [7] 582.47/149.76 582.47/149.76 [lcstable#1^#](x1, x2) = [2] x1 + [7] x2 + [1] 582.47/149.76 582.47/149.76 [lcstable#3^#](x1, x2, x3) = [2] x2 + [4] 582.47/149.76 582.47/149.76 [newline^#](x1, x2, x3) = [1] x3 + [2] 582.47/149.76 582.47/149.76 [newline#2^#](x1, x2, x3, x4) = [1] x2 + [1] x3 + [4] 582.47/149.76 582.47/149.76 [lcstable#2^#](x1, x2, x3) = [7] x2 + [2] x3 + [4] 582.47/149.76 582.47/149.76 [newline#1^#](x1, x2, x3) = [1] x1 + [2] 582.47/149.76 582.47/149.76 [c_6](x1) = [2] x1 + [0] 582.47/149.76 582.47/149.76 [c_7](x1) = [1] x1 + [0] 582.47/149.76 582.47/149.76 [c_9](x1) = [1] x1 + [0] 582.47/149.76 582.47/149.76 [c_10](x1) = [1] x1 + [0] 582.47/149.76 582.47/149.76 [c_11](x1) = [1] x1 + [3] 582.47/149.76 582.47/149.76 The order satisfies the following ordering constraints: 582.47/149.76 582.47/149.76 [firstline#1(nil())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [nil()] 582.47/149.76 582.47/149.76 [firstline#1(::(@x, @xs))] = [0] 582.47/149.76 ? [7] @xs + [8] 582.47/149.76 = [::(#abs(#0()), firstline(@xs))] 582.47/149.76 582.47/149.76 [#equal(@x, @y)] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#eq(@x, @y)] 582.47/149.76 582.47/149.76 [#eq(#pos(@x), #pos(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#eq(@x, @y)] 582.47/149.76 582.47/149.76 [#eq(#pos(@x), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#pos(@x), #neg(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(nil(), nil())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#true()] 582.47/149.76 582.47/149.76 [#eq(nil(), ::(@y_1, @y_2))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(::(@x_1, @x_2), nil())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] 582.47/149.76 582.47/149.76 [#eq(#0(), #pos(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#0(), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#true()] 582.47/149.76 582.47/149.76 [#eq(#0(), #neg(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#0(), #s(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#neg(@x), #pos(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#neg(@x), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#neg(@x), #neg(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#eq(@x, @y)] 582.47/149.76 582.47/149.76 [#eq(#s(@x), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#eq(#s(@x), #s(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#eq(@x, @y)] 582.47/149.76 582.47/149.76 [lcstable(@l1, @l2)] = [0] 582.47/149.76 ? [3] @l2 + [0] 582.47/149.76 = [lcstable#1(@l1, @l2)] 582.47/149.76 582.47/149.76 [lcstable#3(nil(), @l2, @x)] = [4] @x + [4] @l2 + [0] 582.47/149.76 >= [0] 582.47/149.76 = [nil()] 582.47/149.76 582.47/149.76 [lcstable#3(::(@l, @ls), @l2, @x)] = [4] @x + [4] @l2 + [0] 582.47/149.76 ? [1] @l + [1] @ls + [12] 582.47/149.76 = [::(newline(@x, @l, @l2), ::(@l, @ls))] 582.47/149.76 582.47/149.76 [newline#7(#true(), @belowVal, @diagVal, @rightVal)] = [0] 582.47/149.76 ? [4] @diagVal + [0] 582.47/149.76 = [+(@diagVal, #pos(#s(#0())))] 582.47/149.76 582.47/149.76 [newline#7(#false(), @belowVal, @diagVal, @rightVal)] = [0] 582.47/149.76 ? [7] @belowVal + [7] @rightVal + [1] 582.47/149.76 = [max(@belowVal, @rightVal)] 582.47/149.76 582.47/149.76 [newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y)] = [4] @x + [3] @y + [4] @belowVal + [1] @nl + [7] @rightVal + [0] 582.47/149.76 >= [1] @nl + [0] 582.47/149.76 = [newline#6(newline#7(#equal(@x, @y), 582.47/149.76 @belowVal, 582.47/149.76 @diagVal, 582.47/149.76 @rightVal), 582.47/149.76 @nl)] 582.47/149.76 582.47/149.76 [right#1(nil())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#abs(#0())] 582.47/149.76 582.47/149.76 [right#1(::(@x, @xs))] = [0] 582.47/149.76 ? [1] @x + [0] 582.47/149.76 = [@x] 582.47/149.76 582.47/149.76 [newline#2(nil(), @x, @xs, @y)] = [4] @x + [7] @xs + [0] 582.47/149.76 >= [0] 582.47/149.76 = [nil()] 582.47/149.76 582.47/149.76 [newline#2(::(@belowVal, @lastline'), @x, @xs, @y)] = [4] @x + [7] @xs + [0] 582.47/149.76 ? [4] @x + [4] @belowVal + [0] 582.47/149.76 = [newline#3(newline(@y, @lastline', @xs), 582.47/149.76 @belowVal, 582.47/149.76 @lastline', 582.47/149.76 @x, 582.47/149.76 @y)] 582.47/149.76 582.47/149.76 [firstline(@l)] = [7] @l + [2] 582.47/149.76 > [0] 582.47/149.76 = [firstline#1(@l)] 582.47/149.76 582.47/149.76 [#ckgt(#EQ())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#ckgt(#LT())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#ckgt(#GT())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#true()] 582.47/149.76 582.47/149.76 [#add(#pos(#s(#0())), @y)] = [4] @y + [0] 582.47/149.76 >= [0] 582.47/149.76 = [#succ(@y)] 582.47/149.76 582.47/149.76 [#add(#pos(#s(#s(@x))), @y)] = [4] @y + [0] 582.47/149.76 >= [0] 582.47/149.76 = [#succ(#add(#pos(#s(@x)), @y))] 582.47/149.76 582.47/149.76 [#add(#0(), @y)] = [4] @y + [0] 582.47/149.76 >= [1] @y + [0] 582.47/149.76 = [@y] 582.47/149.76 582.47/149.76 [#add(#neg(#s(#0())), @y)] = [4] @y + [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pred(@y)] 582.47/149.76 582.47/149.76 [#add(#neg(#s(#s(@x))), @y)] = [4] @y + [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pred(#add(#pos(#s(@x)), @y))] 582.47/149.76 582.47/149.76 [#and(#true(), #true())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#true()] 582.47/149.76 582.47/149.76 [#and(#true(), #false())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#and(#false(), #true())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#and(#false(), #false())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#false()] 582.47/149.76 582.47/149.76 [#compare(#pos(@x), #pos(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#compare(@x, @y)] 582.47/149.76 582.47/149.76 [#compare(#pos(@x), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#GT()] 582.47/149.76 582.47/149.76 [#compare(#pos(@x), #neg(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#GT()] 582.47/149.76 582.47/149.76 [#compare(#0(), #pos(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#LT()] 582.47/149.76 582.47/149.76 [#compare(#0(), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#EQ()] 582.47/149.76 582.47/149.76 [#compare(#0(), #neg(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#GT()] 582.47/149.76 582.47/149.76 [#compare(#0(), #s(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#LT()] 582.47/149.76 582.47/149.76 [#compare(#neg(@x), #pos(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#LT()] 582.47/149.76 582.47/149.76 [#compare(#neg(@x), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#LT()] 582.47/149.76 582.47/149.76 [#compare(#neg(@x), #neg(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#compare(@y, @x)] 582.47/149.76 582.47/149.76 [#compare(#s(@x), #0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#GT()] 582.47/149.76 582.47/149.76 [#compare(#s(@x), #s(@y))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#compare(@x, @y)] 582.47/149.76 582.47/149.76 [lcstable#1(nil(), @l2)] = [3] @l2 + [0] 582.47/149.76 ? [7] @l2 + [8] 582.47/149.76 = [::(firstline(@l2), nil())] 582.47/149.76 582.47/149.76 [lcstable#1(::(@x, @xs), @l2)] = [3] @l2 + [0] 582.47/149.76 ? [4] @x + [0] 582.47/149.76 = [lcstable#2(lcstable(@xs, @l2), @l2, @x)] 582.47/149.76 582.47/149.76 [#greater(@x, @y)] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#ckgt(#compare(@x, @y))] 582.47/149.76 582.47/149.76 [newline(@y, @lastline, @l)] = [0] 582.47/149.76 ? [4] @y + [4] @lastline + [0] 582.47/149.76 = [newline#1(@l, @lastline, @y)] 582.47/149.76 582.47/149.76 [newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y)] = [4] @x + [7] @y + [4] @belowVal + [7] @lastline' + [1] @nl + [0] 582.47/149.76 ? [4] @x + [3] @y + [4] @belowVal + [1] @nl + [7] @rightVal + [0] 582.47/149.76 = [newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y)] 582.47/149.76 582.47/149.76 [max(@a, @b)] = [7] @a + [7] @b + [1] 582.47/149.76 > [1] @a + [1] @b + [0] 582.47/149.76 = [max#1(#greater(@a, @b), @a, @b)] 582.47/149.76 582.47/149.76 [right(@l)] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [right#1(@l)] 582.47/149.76 582.47/149.76 [max#1(#true(), @a, @b)] = [1] @a + [1] @b + [0] 582.47/149.76 >= [1] @a + [0] 582.47/149.76 = [@a] 582.47/149.76 582.47/149.76 [max#1(#false(), @a, @b)] = [1] @a + [1] @b + [0] 582.47/149.76 >= [1] @b + [0] 582.47/149.76 = [@b] 582.47/149.76 582.47/149.76 [+(@x, @y)] = [4] @x + [0] 582.47/149.76 ? [4] @y + [0] 582.47/149.76 = [#add(@x, @y)] 582.47/149.76 582.47/149.76 [#succ(#pos(#s(@x)))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pos(#s(#s(@x)))] 582.47/149.76 582.47/149.76 [#succ(#0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pos(#s(#0()))] 582.47/149.76 582.47/149.76 [#succ(#neg(#s(#0())))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#0()] 582.47/149.76 582.47/149.76 [#succ(#neg(#s(#s(@x))))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#neg(#s(@x))] 582.47/149.76 582.47/149.76 [newline#3(@nl, @belowVal, @lastline', @x, @y)] = [4] @x + [4] @belowVal + [0] 582.47/149.76 ? [4] @x + [7] @y + [4] @belowVal + [7] @lastline' + [1] @nl + [0] 582.47/149.76 = [newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y)] 582.47/149.76 582.47/149.76 [#abs(#pos(@x))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pos(@x)] 582.47/149.76 582.47/149.76 [#abs(#0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#0()] 582.47/149.76 582.47/149.76 [#abs(#neg(@x))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pos(@x)] 582.47/149.76 582.47/149.76 [#abs(#s(@x))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pos(#s(@x))] 582.47/149.76 582.47/149.76 [lcstable#2(@m, @l2, @x)] = [4] @x + [0] 582.47/149.76 ? [4] @x + [4] @l2 + [0] 582.47/149.76 = [lcstable#3(@m, @l2, @x)] 582.47/149.76 582.47/149.76 [#pred(#pos(#s(#0())))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#0()] 582.47/149.76 582.47/149.76 [#pred(#pos(#s(#s(@x))))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#pos(#s(@x))] 582.47/149.76 582.47/149.76 [#pred(#0())] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#neg(#s(#0()))] 582.47/149.76 582.47/149.76 [#pred(#neg(#s(@x)))] = [0] 582.47/149.76 >= [0] 582.47/149.76 = [#neg(#s(#s(@x)))] 582.47/149.76 582.47/149.76 [newline#6(@elem, @nl)] = [1] @nl + [0] 582.47/149.76 ? [1] @nl + [1] @elem + [6] 582.47/149.76 = [::(@elem, @nl)] 582.47/149.76 582.47/149.76 [newline#1(nil(), @lastline, @y)] = [4] @y + [4] @lastline + [0] 582.47/149.76 >= [0] 582.47/149.76 = [nil()] 582.47/149.76 582.47/149.76 [newline#1(::(@x, @xs), @lastline, @y)] = [4] @y + [4] @lastline + [0] 582.47/149.76 ? [4] @x + [7] @xs + [0] 582.47/149.76 = [newline#2(@lastline, @x, @xs, @y)] 582.47/149.76 582.47/149.76 [lcstable^#(@l1, @l2)] = [2] @l1 + [7] @l2 + [7] 582.47/149.76 > [2] @l1 + [7] @l2 + [1] 582.47/149.76 = [lcstable#1^#(@l1, @l2)] 582.47/149.76 582.47/149.76 [lcstable#1^#(::(@x, @xs), @l2)] = [2] @x + [2] @xs + [7] @l2 + [13] 582.47/149.76 > [2] @xs + [7] @l2 + [7] 582.47/149.76 = [lcstable^#(@xs, @l2)] 582.47/149.76 582.47/149.76 [lcstable#1^#(::(@x, @xs), @l2)] = [2] @x + [2] @xs + [7] @l2 + [13] 582.47/149.76 > [2] @x + [7] @l2 + [4] 582.47/149.76 = [lcstable#2^#(lcstable(@xs, @l2), @l2, @x)] 582.47/149.76 582.47/149.76 [lcstable#3^#(::(@l, @ls), @l2, @x)] = [2] @l2 + [4] 582.47/149.76 >= [2] @l2 + [4] 582.47/149.76 = [c_6(newline^#(@x, @l, @l2))] 582.47/149.76 582.47/149.76 [newline^#(@y, @lastline, @l)] = [1] @l + [2] 582.47/149.76 >= [1] @l + [2] 582.47/149.76 = [c_7(newline#1^#(@l, @lastline, @y))] 582.47/149.76 582.47/149.76 [newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y)] = [1] @x + [1] @xs + [4] 582.47/149.76 > [1] @xs + [2] 582.47/149.76 = [c_9(newline^#(@y, @lastline', @xs))] 582.47/149.77 582.47/149.77 [lcstable#2^#(@m, @l2, @x)] = [2] @x + [7] @l2 + [4] 582.47/149.77 >= [2] @l2 + [4] 582.47/149.77 = [c_10(lcstable#3^#(@m, @l2, @x))] 582.47/149.77 582.47/149.77 [newline#1^#(::(@x, @xs), @lastline, @y)] = [1] @x + [1] @xs + [8] 582.47/149.77 > [1] @x + [1] @xs + [7] 582.47/149.77 = [c_11(newline#2^#(@lastline, @x, @xs, @y))] 582.47/149.77 582.47/149.77 582.47/149.77 We return to the main proof. Consider the set of all dependency 582.47/149.77 pairs 582.47/149.77 582.47/149.77 : 582.47/149.77 { 1: newline^#(@y, @lastline, @l) -> 582.47/149.77 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.77 , 2: newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.77 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.77 , 3: newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.77 c_11(newline#2^#(@lastline, @x, @xs, @y)) 582.47/149.77 , 4: lcstable^#(@l1, @l2) -> lcstable#1^#(@l1, @l2) 582.47/149.77 , 5: lcstable#1^#(::(@x, @xs), @l2) -> lcstable^#(@xs, @l2) 582.47/149.77 , 6: lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.77 lcstable#2^#(lcstable(@xs, @l2), @l2, @x) 582.47/149.77 , 7: lcstable#3^#(::(@l, @ls), @l2, @x) -> 582.47/149.77 c_6(newline^#(@x, @l, @l2)) 582.47/149.77 , 8: lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) } 582.47/149.77 582.47/149.77 Processor 'matrix interpretation of dimension 1' induces the 582.47/149.77 complexity certificate YES(?,O(n^1)) on application of dependency 582.47/149.77 pairs {2,3,4,5,6}. These cover all (indirect) predecessors of 582.47/149.77 dependency pairs {1,2,3,4,5,6,7,8}, their number of application is 582.47/149.77 equally bounded. The dependency pairs are shifted into the weak 582.47/149.77 component. 582.47/149.77 582.47/149.77 We are left with following problem, upon which TcT provides the 582.47/149.77 certificate YES(O(1),O(1)). 582.47/149.77 582.47/149.77 Weak DPs: 582.47/149.77 { lcstable^#(@l1, @l2) -> lcstable#1^#(@l1, @l2) 582.47/149.77 , lcstable#1^#(::(@x, @xs), @l2) -> lcstable^#(@xs, @l2) 582.47/149.77 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.77 lcstable#2^#(lcstable(@xs, @l2), @l2, @x) 582.47/149.77 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.77 , newline^#(@y, @lastline, @l) -> 582.47/149.77 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.77 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.77 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.77 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.77 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.77 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.77 Weak Trs: 582.47/149.77 { firstline#1(nil()) -> nil() 582.47/149.77 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.77 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.77 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.77 , #eq(#pos(@x), #0()) -> #false() 582.47/149.77 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.77 , #eq(nil(), nil()) -> #true() 582.47/149.77 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.77 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.77 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.77 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.77 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.77 , #eq(#0(), #0()) -> #true() 582.47/149.77 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.77 , #eq(#0(), #s(@y)) -> #false() 582.47/149.77 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.77 , #eq(#neg(@x), #0()) -> #false() 582.47/149.77 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.77 , #eq(#s(@x), #0()) -> #false() 582.47/149.77 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.77 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.77 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.77 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.77 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.77 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.77 +(@diagVal, #pos(#s(#0()))) 582.47/149.77 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.77 max(@belowVal, @rightVal) 582.47/149.77 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.77 newline#6(newline#7(#equal(@x, @y), 582.47/149.77 @belowVal, 582.47/149.77 @diagVal, 582.47/149.77 @rightVal), 582.47/149.77 @nl) 582.47/149.77 , right#1(nil()) -> #abs(#0()) 582.47/149.77 , right#1(::(@x, @xs)) -> @x 582.47/149.77 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.77 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.77 newline#3(newline(@y, @lastline', @xs), 582.47/149.77 @belowVal, 582.47/149.77 @lastline', 582.47/149.77 @x, 582.47/149.77 @y) 582.47/149.77 , firstline(@l) -> firstline#1(@l) 582.47/149.77 , #ckgt(#EQ()) -> #false() 582.47/149.77 , #ckgt(#LT()) -> #false() 582.47/149.77 , #ckgt(#GT()) -> #true() 582.47/149.77 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.77 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.77 , #add(#0(), @y) -> @y 582.47/149.77 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.77 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.77 , #and(#true(), #true()) -> #true() 582.47/149.77 , #and(#true(), #false()) -> #false() 582.47/149.77 , #and(#false(), #true()) -> #false() 582.47/149.77 , #and(#false(), #false()) -> #false() 582.47/149.77 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.77 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.77 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.77 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.77 , #compare(#0(), #0()) -> #EQ() 582.47/149.77 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.77 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.77 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.77 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.77 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.77 , #compare(#s(@x), #0()) -> #GT() 582.47/149.77 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.77 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.77 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.77 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.77 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.77 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.77 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.77 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.77 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.77 , right(@l) -> right#1(@l) 582.47/149.77 , max#1(#true(), @a, @b) -> @a 582.47/149.77 , max#1(#false(), @a, @b) -> @b 582.47/149.77 , +(@x, @y) -> #add(@x, @y) 582.47/149.77 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.77 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.77 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.77 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.77 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.77 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.77 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.77 , #abs(#0()) -> #0() 582.47/149.77 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.77 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.77 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.77 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.77 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.77 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.77 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.77 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.77 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.77 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.77 newline#2(@lastline, @x, @xs, @y) } 582.47/149.77 Obligation: 582.47/149.77 innermost runtime complexity 582.47/149.77 Answer: 582.47/149.77 YES(O(1),O(1)) 582.47/149.77 582.47/149.77 The following weak DPs constitute a sub-graph of the DG that is 582.47/149.77 closed under successors. The DPs are removed. 582.47/149.77 582.47/149.77 { lcstable^#(@l1, @l2) -> lcstable#1^#(@l1, @l2) 582.47/149.77 , lcstable#1^#(::(@x, @xs), @l2) -> lcstable^#(@xs, @l2) 582.47/149.77 , lcstable#1^#(::(@x, @xs), @l2) -> 582.47/149.77 lcstable#2^#(lcstable(@xs, @l2), @l2, @x) 582.47/149.77 , lcstable#3^#(::(@l, @ls), @l2, @x) -> c_6(newline^#(@x, @l, @l2)) 582.47/149.77 , newline^#(@y, @lastline, @l) -> 582.47/149.77 c_7(newline#1^#(@l, @lastline, @y)) 582.47/149.77 , newline#2^#(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.77 c_9(newline^#(@y, @lastline', @xs)) 582.47/149.77 , lcstable#2^#(@m, @l2, @x) -> c_10(lcstable#3^#(@m, @l2, @x)) 582.47/149.77 , newline#1^#(::(@x, @xs), @lastline, @y) -> 582.47/149.77 c_11(newline#2^#(@lastline, @x, @xs, @y)) } 582.47/149.77 582.47/149.77 We are left with following problem, upon which TcT provides the 582.47/149.77 certificate YES(O(1),O(1)). 582.47/149.77 582.47/149.77 Weak Trs: 582.47/149.77 { firstline#1(nil()) -> nil() 582.47/149.77 , firstline#1(::(@x, @xs)) -> ::(#abs(#0()), firstline(@xs)) 582.47/149.77 , #equal(@x, @y) -> #eq(@x, @y) 582.47/149.77 , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) 582.47/149.77 , #eq(#pos(@x), #0()) -> #false() 582.47/149.77 , #eq(#pos(@x), #neg(@y)) -> #false() 582.47/149.77 , #eq(nil(), nil()) -> #true() 582.47/149.77 , #eq(nil(), ::(@y_1, @y_2)) -> #false() 582.47/149.77 , #eq(::(@x_1, @x_2), nil()) -> #false() 582.47/149.77 , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> 582.47/149.77 #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) 582.47/149.77 , #eq(#0(), #pos(@y)) -> #false() 582.47/149.77 , #eq(#0(), #0()) -> #true() 582.47/149.77 , #eq(#0(), #neg(@y)) -> #false() 582.47/149.77 , #eq(#0(), #s(@y)) -> #false() 582.47/149.77 , #eq(#neg(@x), #pos(@y)) -> #false() 582.47/149.77 , #eq(#neg(@x), #0()) -> #false() 582.47/149.77 , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) 582.47/149.77 , #eq(#s(@x), #0()) -> #false() 582.47/149.77 , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) 582.47/149.77 , lcstable(@l1, @l2) -> lcstable#1(@l1, @l2) 582.47/149.77 , lcstable#3(nil(), @l2, @x) -> nil() 582.47/149.77 , lcstable#3(::(@l, @ls), @l2, @x) -> 582.47/149.77 ::(newline(@x, @l, @l2), ::(@l, @ls)) 582.47/149.77 , newline#7(#true(), @belowVal, @diagVal, @rightVal) -> 582.47/149.77 +(@diagVal, #pos(#s(#0()))) 582.47/149.77 , newline#7(#false(), @belowVal, @diagVal, @rightVal) -> 582.47/149.77 max(@belowVal, @rightVal) 582.47/149.77 , newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) -> 582.47/149.77 newline#6(newline#7(#equal(@x, @y), 582.47/149.77 @belowVal, 582.47/149.77 @diagVal, 582.47/149.77 @rightVal), 582.47/149.77 @nl) 582.47/149.77 , right#1(nil()) -> #abs(#0()) 582.47/149.77 , right#1(::(@x, @xs)) -> @x 582.47/149.77 , newline#2(nil(), @x, @xs, @y) -> nil() 582.47/149.77 , newline#2(::(@belowVal, @lastline'), @x, @xs, @y) -> 582.47/149.77 newline#3(newline(@y, @lastline', @xs), 582.47/149.77 @belowVal, 582.47/149.77 @lastline', 582.47/149.77 @x, 582.47/149.77 @y) 582.47/149.77 , firstline(@l) -> firstline#1(@l) 582.47/149.77 , #ckgt(#EQ()) -> #false() 582.47/149.77 , #ckgt(#LT()) -> #false() 582.47/149.77 , #ckgt(#GT()) -> #true() 582.47/149.77 , #add(#pos(#s(#0())), @y) -> #succ(@y) 582.47/149.77 , #add(#pos(#s(#s(@x))), @y) -> #succ(#add(#pos(#s(@x)), @y)) 582.47/149.77 , #add(#0(), @y) -> @y 582.47/149.77 , #add(#neg(#s(#0())), @y) -> #pred(@y) 582.47/149.77 , #add(#neg(#s(#s(@x))), @y) -> #pred(#add(#pos(#s(@x)), @y)) 582.47/149.77 , #and(#true(), #true()) -> #true() 582.47/149.77 , #and(#true(), #false()) -> #false() 582.47/149.77 , #and(#false(), #true()) -> #false() 582.47/149.77 , #and(#false(), #false()) -> #false() 582.47/149.77 , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) 582.47/149.77 , #compare(#pos(@x), #0()) -> #GT() 582.47/149.77 , #compare(#pos(@x), #neg(@y)) -> #GT() 582.47/149.77 , #compare(#0(), #pos(@y)) -> #LT() 582.47/149.77 , #compare(#0(), #0()) -> #EQ() 582.47/149.77 , #compare(#0(), #neg(@y)) -> #GT() 582.47/149.77 , #compare(#0(), #s(@y)) -> #LT() 582.47/149.77 , #compare(#neg(@x), #pos(@y)) -> #LT() 582.47/149.77 , #compare(#neg(@x), #0()) -> #LT() 582.47/149.77 , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) 582.47/149.77 , #compare(#s(@x), #0()) -> #GT() 582.47/149.77 , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) 582.47/149.77 , lcstable#1(nil(), @l2) -> ::(firstline(@l2), nil()) 582.47/149.77 , lcstable#1(::(@x, @xs), @l2) -> 582.47/149.77 lcstable#2(lcstable(@xs, @l2), @l2, @x) 582.47/149.77 , #greater(@x, @y) -> #ckgt(#compare(@x, @y)) 582.47/149.77 , newline(@y, @lastline, @l) -> newline#1(@l, @lastline, @y) 582.47/149.77 , newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) -> 582.47/149.77 newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) 582.47/149.77 , max(@a, @b) -> max#1(#greater(@a, @b), @a, @b) 582.47/149.77 , right(@l) -> right#1(@l) 582.47/149.77 , max#1(#true(), @a, @b) -> @a 582.47/149.77 , max#1(#false(), @a, @b) -> @b 582.47/149.77 , +(@x, @y) -> #add(@x, @y) 582.47/149.77 , #succ(#pos(#s(@x))) -> #pos(#s(#s(@x))) 582.47/149.77 , #succ(#0()) -> #pos(#s(#0())) 582.47/149.77 , #succ(#neg(#s(#0()))) -> #0() 582.47/149.77 , #succ(#neg(#s(#s(@x)))) -> #neg(#s(@x)) 582.47/149.77 , newline#3(@nl, @belowVal, @lastline', @x, @y) -> 582.47/149.77 newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) 582.47/149.77 , #abs(#pos(@x)) -> #pos(@x) 582.47/149.77 , #abs(#0()) -> #0() 582.47/149.77 , #abs(#neg(@x)) -> #pos(@x) 582.47/149.77 , #abs(#s(@x)) -> #pos(#s(@x)) 582.47/149.77 , lcstable#2(@m, @l2, @x) -> lcstable#3(@m, @l2, @x) 582.47/149.77 , #pred(#pos(#s(#0()))) -> #0() 582.47/149.77 , #pred(#pos(#s(#s(@x)))) -> #pos(#s(@x)) 582.47/149.77 , #pred(#0()) -> #neg(#s(#0())) 582.47/149.77 , #pred(#neg(#s(@x))) -> #neg(#s(#s(@x))) 582.47/149.77 , newline#6(@elem, @nl) -> ::(@elem, @nl) 582.47/149.77 , newline#1(nil(), @lastline, @y) -> nil() 582.47/149.77 , newline#1(::(@x, @xs), @lastline, @y) -> 582.47/149.77 newline#2(@lastline, @x, @xs, @y) } 582.47/149.77 Obligation: 582.47/149.77 innermost runtime complexity 582.47/149.77 Answer: 582.47/149.77 YES(O(1),O(1)) 582.47/149.77 582.47/149.77 No rule is usable, rules are removed from the input problem. 582.47/149.77 582.47/149.77 We are left with following problem, upon which TcT provides the 582.47/149.77 certificate YES(O(1),O(1)). 582.47/149.77 582.47/149.77 Rules: Empty 582.47/149.77 Obligation: 582.47/149.77 innermost runtime complexity 582.47/149.77 Answer: 582.47/149.77 YES(O(1),O(1)) 582.47/149.77 582.47/149.77 Empty rules are trivially bounded 582.47/149.77 582.47/149.77 Hurray, we answered YES(O(1),O(n^2)) 583.27/150.41 EOF