Term Rewriting System R:
[x, y, z]
app(app(times, x), app(app(plus, y), app(s, z))) -> app(app(plus, app(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))), app(app(times, x), app(s, z)))
app(app(times, x), 0) -> 0
app(app(times, x), app(s, y)) -> app(app(plus, app(app(times, x), y)), x)
app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(plus, app(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))), app(app(times, x), app(s, z)))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(plus, app(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0))))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(plus, y), app(app(times, app(s, z)), 0))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, app(s, z)), 0)
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(times, app(s, z))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, x), app(s, z))
APP(app(times, x), app(s, y)) -> APP(app(plus, app(app(times, x), y)), x)
APP(app(times, x), app(s, y)) -> APP(plus, app(app(times, x), y))
APP(app(times, x), app(s, y)) -> APP(app(times, x), y)
APP(app(plus, x), app(s, y)) -> APP(s, app(app(plus, x), y))
APP(app(plus, x), app(s, y)) -> APP(app(plus, x), y)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
MRR


Dependency Pair:

APP(app(plus, x), app(s, y)) -> APP(app(plus, x), y)


Rules:


app(app(times, x), app(app(plus, y), app(s, z))) -> app(app(plus, app(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))), app(app(times, x), app(s, z)))
app(app(times, x), 0) -> 0
app(app(times, x), app(s, y)) -> app(app(plus, app(app(times, x), y)), x)
app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

APP(app(plus, x), app(s, y)) -> APP(app(plus, x), y)

none


It is proper and hence, it can be A-transformed which results in the DP problem

PLUS(x, s(y)) -> PLUS(x, y)

none


We number the DPs as follows:
  1. PLUS(x, s(y)) -> PLUS(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1=1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1=1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Modular Removal of Rules


Dependency Pairs:

APP(app(times, x), app(s, y)) -> APP(app(times, x), y)
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, x), app(s, z))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))


Rules:


app(app(times, x), app(app(plus, y), app(s, z))) -> app(app(plus, app(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))), app(app(times, x), app(s, z)))
app(app(times, x), 0) -> 0
app(app(times, x), app(s, y)) -> app(app(plus, app(app(times, x), y)), x)
app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

APP(app(times, x), app(s, y)) -> APP(app(times, x), y)
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, x), app(s, z))
APP(app(times, x), app(app(plus, y), app(s, z))) -> APP(app(times, x), app(app(plus, y), app(app(times, app(s, z)), 0)))


app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))
app(app(times, x), 0) -> 0


It is proper and hence, it can be A-transformed which results in the DP problem

TIMES(x, s(y)) -> TIMES(x, y)
TIMES(x, plus(y, s(z))) -> TIMES(x, s(z))
TIMES(x, plus(y, s(z))) -> TIMES(x, plus(y, times(s(z), 0)))


plus(x, 0) -> x
plus(x, s(y)) -> s(plus(x, y))
times(x, 0) -> 0


To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(TIMES(x1, x2))=  1 + x1 + x2  
  POL(plus(x1, x2))=  x1 + x2  
  POL(0)=  0  
  POL(times(x1, x2))=  x1 + x2  
  POL(s(x1))=  x1  

We have the following set D of usable symbols: {TIMES, plus, 0, times, s}
No Dependency Pairs can be deleted.
2 non usable rules have been deleted.

The result of this processor delivers one new DP problem.
Note that we keep the A-transformed DP problem as result of this processor.



   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
MRR
           →DP Problem 3
Modular Removal of Rules


Dependency Pairs:

TIMES(x, s(y)) -> TIMES(x, y)
TIMES(x, plus(y, s(z))) -> TIMES(x, s(z))
TIMES(x, plus(y, s(z))) -> TIMES(x, plus(y, times(s(z), 0)))


Rules:


plus(x, 0) -> x
plus(x, s(y)) -> s(plus(x, y))
times(x, 0) -> 0





We have the following set of usable rules:

plus(x, 0) -> x
plus(x, s(y)) -> s(plus(x, y))
times(x, 0) -> 0
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(TIMES(x1, x2))=  1 + x1 + x2  
  POL(plus(x1, x2))=  1 + x1 + x2  
  POL(0)=  0  
  POL(times(x1, x2))=  x1 + x2  
  POL(s(x1))=  x1  

We have the following set D of usable symbols: {TIMES, plus, 0, times, s}
The following Dependency Pairs can be deleted as the lhs is strictly greater than the corresponding rhs:

TIMES(x, plus(y, s(z))) -> TIMES(x, s(z))

The following rules can be deleted as the lhs is strictly greater than the corresponding rhs:

plus(x, 0) -> x


The result of this processor delivers one new DP problem.



   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
MRR
           →DP Problem 3
MRR
             ...
               →DP Problem 4
Modular Removal of Rules


Dependency Pairs:

TIMES(x, s(y)) -> TIMES(x, y)
TIMES(x, plus(y, s(z))) -> TIMES(x, plus(y, times(s(z), 0)))


Rules:


plus(x, s(y)) -> s(plus(x, y))
times(x, 0) -> 0





We have the following set of usable rules:

plus(x, s(y)) -> s(plus(x, y))
times(x, 0) -> 0
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(TIMES(x1, x2))=  1 + x1 + x2  
  POL(plus(x1, x2))=  x1 + x2  
  POL(0)=  0  
  POL(times(x1, x2))=  x1 + x2  
  POL(s(x1))=  1 + x1  

We have the following set D of usable symbols: {TIMES, plus, 0, times, s}
The following Dependency Pairs can be deleted as the lhs is strictly greater than the corresponding rhs:

TIMES(x, s(y)) -> TIMES(x, y)

No Rules can be deleted.

The result of this processor delivers one new DP problem.



   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
MRR
           →DP Problem 3
MRR
             ...
               →DP Problem 5
Narrowing Transformation


Dependency Pair:

TIMES(x, plus(y, s(z))) -> TIMES(x, plus(y, times(s(z), 0)))


Rules:


plus(x, s(y)) -> s(plus(x, y))
times(x, 0) -> 0





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

TIMES(x, plus(y, s(z))) -> TIMES(x, plus(y, times(s(z), 0)))
one new Dependency Pair is created:

TIMES(x, plus(y, s(z'))) -> TIMES(x, plus(y, 0))

The transformation is resulting in no new DP problems.


Termination of R successfully shown.
Duration:
0:00 minutes