YES Problem 1: (VAR v_NonEmpty:S f:S g:S l:S x:S xs:S) (RULES app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) ) Problem 1: Innermost Equivalent Processor: -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) -> The term rewriting system is non-overlaping or locally confluent overlay system. Therefore, innermost termination implies termination. Problem 1: Dependency Pairs Processor: -> Pairs: APP(app(app(compose,f:S),g:S),x:S) -> APP(f:S,x:S) APP(app(app(compose,f:S),g:S),x:S) -> APP(g:S,app(f:S,x:S)) APP(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> APP(app(reverse2,xs:S),app(app(cons,x:S),l:S)) APP(reverse,l:S) -> APP(app(reverse2,l:S),nil) -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) Problem 1: SCC Processor: -> Pairs: APP(app(app(compose,f:S),g:S),x:S) -> APP(f:S,x:S) APP(app(app(compose,f:S),g:S),x:S) -> APP(g:S,app(f:S,x:S)) APP(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> APP(app(reverse2,xs:S),app(app(cons,x:S),l:S)) APP(reverse,l:S) -> APP(app(reverse2,l:S),nil) -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) ->Strongly Connected Components: ->->Cycle: ->->-> Pairs: APP(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> APP(app(reverse2,xs:S),app(app(cons,x:S),l:S)) ->->-> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) ->->Cycle: ->->-> Pairs: APP(app(app(compose,f:S),g:S),x:S) -> APP(f:S,x:S) APP(app(app(compose,f:S),g:S),x:S) -> APP(g:S,app(f:S,x:S)) ->->-> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) The problem is decomposed in 2 subproblems. Problem 1.1: Reduction Pairs Processor: -> Pairs: APP(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> APP(app(reverse2,xs:S),app(app(cons,x:S),l:S)) -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) -> Usable rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S ->Interpretation type: Linear ->Coefficients: Natural Numbers ->Dimension: 1 ->Bound: 2 ->Interpretation: [app](X1,X2) = X1 + X2 + 1 [init] = 0 [last] = 0 [compose] = 1 [cons] = 2 [fSNonEmpty] = 0 [hd] = 0 [nil] = 0 [reverse] = 1 [reverse2] = 0 [tl] = 0 [APP](X1,X2) = 2.X1 + X2 Problem 1.1: SCC Processor: -> Pairs: Empty -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.2: Subterm Processor: -> Pairs: APP(app(app(compose,f:S),g:S),x:S) -> APP(f:S,x:S) APP(app(app(compose,f:S),g:S),x:S) -> APP(g:S,app(f:S,x:S)) -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) ->Projection: pi(APP) = 1 Problem 1.2: SCC Processor: -> Pairs: Empty -> Rules: app(app(app(compose,f:S),g:S),x:S) -> app(g:S,app(f:S,x:S)) app(app(reverse2,app(app(cons,x:S),xs:S)),l:S) -> app(app(reverse2,xs:S),app(app(cons,x:S),l:S)) app(app(reverse2,nil),l:S) -> l:S app(hd,app(app(cons,x:S),xs:S)) -> x:S app(reverse,l:S) -> app(app(reverse2,l:S),nil) app(tl,app(app(cons,x:S),xs:S)) -> xs:S init -> app(app(compose,reverse),app(app(compose,tl),reverse)) last -> app(app(compose,hd),reverse) ->Strongly Connected Components: There is no strongly connected component The problem is finite.