YES Problem 1: (VAR v_NonEmpty:S x:S y:S) (RULES half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ) Problem 1: Innermost Equivalent Processor: -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse -> The term rewriting system is non-overlaping or locally confluent overlay system. Therefore, innermost termination implies termination. Problem 1: Dependency Pairs Processor: -> Pairs: HALF(s(s(x:S))) -> HALF(x:S) HELP(x:S,y:S) -> IFB(lt(y:S,x:S),x:S,y:S) HELP(x:S,y:S) -> LT(y:S,x:S) IFA(ttrue,x:S) -> HELP(x:S,1) IFB(ttrue,x:S,y:S) -> HALF(x:S) IFB(ttrue,x:S,y:S) -> HELP(half(x:S),s(y:S)) LOGARITHM(x:S) -> IFA(lt(0,x:S),x:S) LOGARITHM(x:S) -> LT(0,x:S) LT(s(x:S),s(y:S)) -> LT(x:S,y:S) -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse Problem 1: SCC Processor: -> Pairs: HALF(s(s(x:S))) -> HALF(x:S) HELP(x:S,y:S) -> IFB(lt(y:S,x:S),x:S,y:S) HELP(x:S,y:S) -> LT(y:S,x:S) IFA(ttrue,x:S) -> HELP(x:S,1) IFB(ttrue,x:S,y:S) -> HALF(x:S) IFB(ttrue,x:S,y:S) -> HELP(half(x:S),s(y:S)) LOGARITHM(x:S) -> IFA(lt(0,x:S),x:S) LOGARITHM(x:S) -> LT(0,x:S) LT(s(x:S),s(y:S)) -> LT(x:S,y:S) -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Strongly Connected Components: ->->Cycle: ->->-> Pairs: LT(s(x:S),s(y:S)) -> LT(x:S,y:S) ->->-> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->->Cycle: ->->-> Pairs: HALF(s(s(x:S))) -> HALF(x:S) ->->-> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->->Cycle: ->->-> Pairs: HELP(x:S,y:S) -> IFB(lt(y:S,x:S),x:S,y:S) IFB(ttrue,x:S,y:S) -> HELP(half(x:S),s(y:S)) ->->-> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse The problem is decomposed in 3 subproblems. Problem 1.1: Subterm Processor: -> Pairs: LT(s(x:S),s(y:S)) -> LT(x:S,y:S) -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Projection: pi(LT) = 1 Problem 1.1: SCC Processor: -> Pairs: Empty -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.2: Subterm Processor: -> Pairs: HALF(s(s(x:S))) -> HALF(x:S) -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Projection: pi(HALF) = 1 Problem 1.2: SCC Processor: -> Pairs: Empty -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.3: Reduction Pairs Processor: -> Pairs: HELP(x:S,y:S) -> IFB(lt(y:S,x:S),x:S,y:S) IFB(ttrue,x:S,y:S) -> HELP(half(x:S),s(y:S)) -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse -> Usable rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Interpretation type: Linear ->Coefficients: All rationals ->Dimension: 1 ->Bound: 2 ->Interpretation: [half](X) = 1/2.X [help](X1,X2) = 0 [ifa](X1,X2) = 0 [ifb](X1,X2,X3) = 0 [logarithm](X) = 0 [lt](X1,X2) = 2.X2 + 1/2 [0] = 0 [1] = 0 [fSNonEmpty] = 0 [false] = 0 [logZeroError] = 0 [s](X) = X + 1 [true] = 2 [HALF](X) = 0 [HELP](X1,X2) = 2.X1 + 1 [IFA](X1,X2) = 0 [IFB](X1,X2,X3) = 1/2.X1 + X2 + 1/2 [LOGARITHM](X) = 0 [LT](X1,X2) = 0 Problem 1.3: SCC Processor: -> Pairs: IFB(ttrue,x:S,y:S) -> HELP(half(x:S),s(y:S)) -> Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x:S))) -> s(half(x:S)) help(x:S,y:S) -> ifb(lt(y:S,x:S),x:S,y:S) ifa(ffalse,x:S) -> logZeroError ifa(ttrue,x:S) -> help(x:S,1) ifb(ffalse,x:S,y:S) -> y:S ifb(ttrue,x:S,y:S) -> help(half(x:S),s(y:S)) logarithm(x:S) -> ifa(lt(0,x:S),x:S) lt(0,s(x:S)) -> ttrue lt(s(x:S),s(y:S)) -> lt(x:S,y:S) lt(x:S,0) -> ffalse ->Strongly Connected Components: There is no strongly connected component The problem is finite.