Term Rewriting System R:
[x]
fac(s(x)) -> *(fac(p(s(x))), s(x))
p(s(0)) -> 0
p(s(s(x))) -> s(p(s(x)))

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:

FAC(s(x)) -> FAC(p(s(x)))
FAC(s(x)) -> P(s(x))
P(s(s(x))) -> P(s(x))

Furthermore, R contains two SCCs.


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


Dependency Pair:

P(s(s(x))) -> P(s(x))


Rules:


fac(s(x)) -> *(fac(p(s(x))), s(x))
p(s(0)) -> 0
p(s(s(x))) -> s(p(s(x)))


Strategy:

innermost




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


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


Dependency Pair:

P(s(s(x))) -> P(s(x))


Rule:

none


Strategy:

innermost




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

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

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)


Dependency Pair:

FAC(s(x)) -> FAC(p(s(x)))


Rules:


fac(s(x)) -> *(fac(p(s(x))), s(x))
p(s(0)) -> 0
p(s(s(x))) -> s(p(s(x)))


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 4
Modular Removal of Rules


Dependency Pair:

FAC(s(x)) -> FAC(p(s(x)))


Rules:


p(s(0)) -> 0
p(s(s(x))) -> s(p(s(x)))


Strategy:

innermost




We have the following set of usable rules:

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

We have the following set D of usable symbols: {0, FAC, s, p}
No Dependency Pairs can be deleted.
The following rules can be deleted as the lhs is strictly greater than the corresponding rhs:

p(s(0)) -> 0


The result of this processor delivers one new DP problem.



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


Dependency Pair:

FAC(s(x)) -> FAC(p(s(x)))


Rule:


p(s(s(x))) -> s(p(s(x)))


Strategy:

innermost




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

FAC(s(x)) -> FAC(p(s(x)))
one new Dependency Pair is created:

FAC(s(s(x''))) -> FAC(s(p(s(x''))))

The transformation is resulting in one new DP problem:



   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 6
Negative Polynomial Order


Dependency Pair:

FAC(s(s(x''))) -> FAC(s(p(s(x''))))


Rule:


p(s(s(x))) -> s(p(s(x)))


Strategy:

innermost




The following Dependency Pair can be strictly oriented using the given order.

FAC(s(s(x''))) -> FAC(s(p(s(x''))))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

p(s(s(x))) -> s(p(s(x)))


Used ordering:
Polynomial Order with Interpretation:

POL( FAC(x1) ) = max{0, x1 - 1}

POL( s(x1) ) = x1 + 1

POL( p(x1) ) = max{0, x1 - 1}


This results in one new DP problem.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 7
Dependency Graph


Dependency Pair:


Rule:


p(s(s(x))) -> s(p(s(x)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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