Term Rewriting System R:
[y, x, f]
app(app(add, 0), y) -> y
app(app(add, app(s, x)), y) -> app(s, app(app(add, x), y))
app(app(mult, 0), y) -> 0
app(app(mult, app(s, x)), y) -> app(app(add, app(app(mult, x), y)), y)
app(app(app(rec, f), x), 0) -> x
app(app(app(rec, f), x), app(s, y)) -> app(app(f, app(s, y)), app(app(app(rec, f), x), y))
fact -> app(app(rec, mult), app(s, 0))

Termination of R to be shown.



   R
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
OC
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(add, app(s, x)), y) -> APP(s, app(app(add, x), y))
APP(app(add, app(s, x)), y) -> APP(app(add, x), y)
APP(app(add, app(s, x)), y) -> APP(add, x)
APP(app(mult, app(s, x)), y) -> APP(app(add, app(app(mult, x), y)), y)
APP(app(mult, app(s, x)), y) -> APP(add, app(app(mult, x), y))
APP(app(mult, app(s, x)), y) -> APP(app(mult, x), y)
APP(app(mult, app(s, x)), y) -> APP(mult, x)
APP(app(app(rec, f), x), app(s, y)) -> APP(app(f, app(s, y)), app(app(app(rec, f), x), y))
APP(app(app(rec, f), x), app(s, y)) -> APP(f, app(s, y))
APP(app(app(rec, f), x), app(s, y)) -> APP(app(app(rec, f), x), y)
FACT -> APP(app(rec, mult), app(s, 0))
FACT -> APP(rec, mult)
FACT -> APP(s, 0)

Furthermore, R contains three SCCs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
Usable Rules (Innermost)
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules


Dependency Pair:

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


Rules:


app(app(add, 0), y) -> y
app(app(add, app(s, x)), y) -> app(s, app(app(add, x), y))
app(app(mult, 0), y) -> 0
app(app(mult, app(s, x)), y) -> app(app(add, app(app(mult, x), y)), y)
app(app(app(rec, f), x), 0) -> x
app(app(app(rec, f), x), app(s, y)) -> app(app(f, app(s, y)), app(app(app(rec, f), x), y))
fact -> app(app(rec, mult), app(s, 0))


Strategy:

innermost




As we are in the innermost case, we can delete all 7 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 4
A-Transformation
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 5
Size-Change Principle
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. ADD(s(x), y) -> ADD(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
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
Usable Rules (Innermost)
           →DP Problem 3
UsableRules


Dependency Pair:

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


Rules:


app(app(add, 0), y) -> y
app(app(add, app(s, x)), y) -> app(s, app(app(add, x), y))
app(app(mult, 0), y) -> 0
app(app(mult, app(s, x)), y) -> app(app(add, app(app(mult, x), y)), y)
app(app(app(rec, f), x), 0) -> x
app(app(app(rec, f), x), app(s, y)) -> app(app(f, app(s, y)), app(app(app(rec, f), x), y))
fact -> app(app(rec, mult), app(s, 0))


Strategy:

innermost




As we are in the innermost case, we can delete all 7 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 6
A-Transformation
           →DP Problem 3
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 7
Size-Change Principle
           →DP Problem 3
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. MULT(s(x), y) -> MULT(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
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
Usable Rules (Innermost)


Dependency Pairs:

APP(app(app(rec, f), x), app(s, y)) -> APP(app(app(rec, f), x), y)
APP(app(app(rec, f), x), app(s, y)) -> APP(f, app(s, y))
APP(app(app(rec, f), x), app(s, y)) -> APP(app(f, app(s, y)), app(app(app(rec, f), x), y))


Rules:


app(app(add, 0), y) -> y
app(app(add, app(s, x)), y) -> app(s, app(app(add, x), y))
app(app(mult, 0), y) -> 0
app(app(mult, app(s, x)), y) -> app(app(add, app(app(mult, x), y)), y)
app(app(app(rec, f), x), 0) -> x
app(app(app(rec, f), x), app(s, y)) -> app(app(f, app(s, y)), app(app(app(rec, f), x), y))
fact -> app(app(rec, mult), app(s, 0))


Strategy:

innermost




As we are in the innermost case, we can delete all 1 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
             ...
               →DP Problem 8
Narrowing Transformation


Dependency Pairs:

APP(app(app(rec, f), x), app(s, y)) -> APP(app(app(rec, f), x), y)
APP(app(app(rec, f), x), app(s, y)) -> APP(f, app(s, y))
APP(app(app(rec, f), x), app(s, y)) -> APP(app(f, app(s, y)), app(app(app(rec, f), x), y))


Rules:


app(app(app(rec, f), x), 0) -> x
app(app(app(rec, f), x), app(s, y)) -> app(app(f, app(s, y)), app(app(app(rec, f), x), y))
app(app(mult, app(s, x)), y) -> app(app(add, app(app(mult, x), y)), y)
app(app(add, app(s, x)), y) -> app(s, app(app(add, x), y))
app(app(mult, 0), y) -> 0
app(app(add, 0), y) -> y


Strategy:

innermost




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

APP(app(app(rec, f), x), app(s, y)) -> APP(app(f, app(s, y)), app(app(app(rec, f), x), y))
seven new Dependency Pairs are created:

APP(app(app(rec, app(app(rec, f''), x'')), x), app(s, y'')) -> APP(app(app(f'', app(s, y'')), app(app(app(rec, f''), x''), y'')), app(app(app(rec, app(app(rec, f''), x'')), x), y''))
APP(app(app(rec, app(mult, app(s, x''))), x), app(s, y'')) -> APP(app(app(add, app(app(mult, x''), app(s, y''))), app(s, y'')), app(app(app(rec, app(mult, app(s, x''))), x), y''))
APP(app(app(rec, app(add, app(s, x''))), x), app(s, y'')) -> APP(app(s, app(app(add, x''), app(s, y''))), app(app(app(rec, app(add, app(s, x''))), x), y''))
APP(app(app(rec, app(mult, 0)), x), app(s, y'')) -> APP(0, app(app(app(rec, app(mult, 0)), x), y''))
APP(app(app(rec, app(add, 0)), x), app(s, y'')) -> APP(app(s, y''), app(app(app(rec, app(add, 0)), x), y''))
APP(app(app(rec, f''), x''), app(s, 0)) -> APP(app(f'', app(s, 0)), x'')
APP(app(app(rec, f''), x''), app(s, app(s, y''))) -> APP(app(f'', app(s, app(s, y''))), app(app(f'', app(s, y'')), app(app(app(rec, f''), x''), y'')))

The transformation is resulting in one new DP problem:



   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
             ...
               →DP Problem 9
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP(app(app(rec, f''), x''), app(s, app(s, y''))) -> APP(app(f'', app(s, app(s, y''))), app(app(f'', app(s, y'')), app(app(app(rec, f''), x''), y'')))
APP(app(app(rec, f''), x''), app(s, 0)) -> APP(app(f'', app(s, 0)), x'')
APP(app(app(rec, app(mult, app(s, x''))), x), app(s, y'')) -> APP(app(app(add, app(app(mult, x''), app(s, y''))), app(s, y'')), app(app(app(rec, app(mult, app(s, x''))), x), y''))
APP(app(app(rec, app(app(rec, f''), x'')), x), app(s, y'')) -> APP(app(app(f'', app(s, y'')), app(app(app(rec, f''), x''), y'')), app(app(app(rec, app(app(rec, f''), x'')), x), y''))
APP(app(app(rec, f), x), app(s, y)) -> APP(f, app(s, y))
APP(app(app(rec, f), x), app(s, y)) -> APP(app(app(rec, f), x), y)


Rules:


app(app(app(rec, f), x), 0) -> x
app(app(app(rec, f), x), app(s, y)) -> app(app(f, app(s, y)), app(app(app(rec, f), x), y))
app(app(mult, app(s, x)), y) -> app(app(add, app(app(mult, x), y)), y)
app(app(add, app(s, x)), y) -> app(s, app(app(add, x), y))
app(app(mult, 0), y) -> 0
app(app(add, 0), y) -> y


Strategy:

innermost



The Proof could not be continued due to a Timeout.
Termination of R could not be shown.
Duration:
1:00 minutes