YES Input TRS: 1: isEmpty(nil()) -> true() 2: isEmpty(cons(x,xs)) -> false() 3: last(cons(x,nil())) -> x 4: last(cons(x,cons(y,ys))) -> last(cons(y,ys)) 5: dropLast(nil()) -> nil() 6: dropLast(cons(x,nil())) -> nil() 7: dropLast(cons(x,cons(y,ys))) -> cons(x,dropLast(cons(y,ys))) 8: append(nil(),ys) -> ys 9: append(cons(x,xs),ys) -> cons(x,append(xs,ys)) 10: reverse(xs) -> rev(xs,nil()) 11: rev(xs,ys) -> if(isEmpty(xs),dropLast(xs),append(ys,last(xs)),ys) 12: if(true(),xs,ys,zs) -> zs 13: if(false(),xs,ys,zs) -> rev(xs,ys) Number of strict rules: 13 Direct POLO(bPol) ... failed. Uncurrying last dropLast 1: isEmpty(nil()) -> true() 2: isEmpty(cons(x,xs)) -> false() 3: last^1_cons(x,nil()) -> x 4: last^1_cons(x,cons(y,ys)) -> last^1_cons(y,ys) 5: dropLast^1_nil() -> nil() 6: dropLast^1_cons(x,nil()) -> nil() 7: dropLast^1_cons(x,cons(y,ys)) -> cons(x,dropLast^1_cons(y,ys)) 8: append(nil(),ys) -> ys 9: append(cons(x,xs),ys) -> cons(x,append(xs,ys)) 10: reverse(xs) -> rev(xs,nil()) 11: rev(xs,ys) -> if(isEmpty(xs),dropLast(xs),append(ys,last(xs)),ys) 12: if(true(),xs,ys,zs) -> zs 13: if(false(),xs,ys,zs) -> rev(xs,ys) 14: dropLast(cons(_1,_2)) ->= dropLast^1_cons(_1,_2) 15: dropLast(nil()) ->= dropLast^1_nil() 16: last(cons(_1,_2)) ->= last^1_cons(_1,_2) Number of strict rules: 13 Direct POLO(bPol) ... failed. Dependency Pairs: #1: #if(false(),xs,ys,zs) -> #rev(xs,ys) #2: #append(cons(x,xs),ys) -> #append(xs,ys) #3: #rev(xs,ys) -> #if(isEmpty(xs),dropLast(xs),append(ys,last(xs)),ys) #4: #rev(xs,ys) -> #isEmpty(xs) #5: #rev(xs,ys) -> #dropLast(xs) #6: #rev(xs,ys) -> #append(ys,last(xs)) #7: #rev(xs,ys) -> #last(xs) #8: #dropLast(cons(_1,_2)) ->? #dropLast^1_cons(_1,_2) #9: #dropLast^1_cons(x,cons(y,ys)) -> #dropLast^1_cons(y,ys) #10: #reverse(xs) -> #rev(xs,nil()) #11: #last(cons(_1,_2)) ->? #last^1_cons(_1,_2) #12: #dropLast(nil()) ->? #dropLast^1_nil() #13: #last^1_cons(x,cons(y,ys)) -> #last^1_cons(y,ys) Number of SCCs: 4, DPs: 5 SCC { #9 } POLO(Sum)... succeeded. #rev w: 0 #append w: 0 #reverse w: 0 #isEmpty w: 0 false w: 0 isEmpty w: 0 reverse w: 0 true w: 0 #last w: 0 append w: 0 if w: 0 #dropLast w: 0 dropLast w: 0 #last^1_cons w: 0 last w: 0 nil w: 0 #dropLast^1_cons w: x2 rev w: 0 #dropLast^1_nil w: 0 last^1_cons w: 0 cons w: x2 + 1 #if w: 0 dropLast^1_cons w: 0 dropLast^1_nil w: 0 USABLE RULES: { } Removed DPs: #9 Number of SCCs: 3, DPs: 4 SCC { #13 } POLO(Sum)... succeeded. #rev w: 0 #append w: 0 #reverse w: 0 #isEmpty w: 0 false w: 0 isEmpty w: 0 reverse w: 0 true w: 0 #last w: 0 append w: 0 if w: 0 #dropLast w: 0 dropLast w: 0 #last^1_cons w: x2 last w: 0 nil w: 0 #dropLast^1_cons w: 0 rev w: 0 #dropLast^1_nil w: 0 last^1_cons w: 0 cons w: x2 + 1 #if w: 0 dropLast^1_cons w: 0 dropLast^1_nil w: 0 USABLE RULES: { } Removed DPs: #13 Number of SCCs: 2, DPs: 3 SCC { #2 } POLO(Sum)... succeeded. #rev w: 0 #append w: x1 #reverse w: 0 #isEmpty w: 0 false w: 0 isEmpty w: 0 reverse w: 0 true w: 0 #last w: 0 append w: 0 if w: 0 #dropLast w: 0 dropLast w: 0 #last^1_cons w: 0 last w: 0 nil w: 0 #dropLast^1_cons w: 0 rev w: 0 #dropLast^1_nil w: 0 last^1_cons w: 0 cons w: x2 + 1 #if w: 0 dropLast^1_cons w: 0 dropLast^1_nil w: 0 USABLE RULES: { } Removed DPs: #2 Number of SCCs: 1, DPs: 2 SCC { #1 #3 } POLO(Sum)... POLO(max)... QLPOS... POLO(mSum)... succeeded. #rev w: max(x1 - 18459, 0) #append w: 0 #reverse w: 0 #isEmpty w: max(x1 - 1, 0) false w: 27231 isEmpty w: max(x1 - 18459, 0) reverse w: 0 true w: 0 #last w: 0 append w: max(x1 + 45690, x2 + 91380, 0) if w: max(x1 - 1, 0) #dropLast w: max(x1 - 1, 0) dropLast w: max(x1 - 18459, 0) #last^1_cons w: max(x2 - 1, 0) last w: max(x1, 0) nil w: 0 #dropLast^1_cons w: 0 rev w: 0 #dropLast^1_nil w: 0 last^1_cons w: 0 cons w: max(x1 + x2 + 45690, 0) #if w: max(x1 - 1, x2, 0) dropLast^1_cons w: max(x1 + x2 + 1, 0) dropLast^1_nil w: 0 USABLE RULES: { 1 2 5..7 14 15 } Removed DPs: #1 Number of SCCs: 0, DPs: 0