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

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

PLUS(x, s(y)) -> PLUS(x, y)
TIMES(s(x), y) -> PLUS(times(x, y), y)
TIMES(s(x), y) -> TIMES(x, y)
P(s(s(x))) -> P(s(x))
FAC(s(x)) -> TIMES(fac(p(s(x))), s(x))
FAC(s(x)) -> FAC(p(s(x)))
FAC(s(x)) -> P(s(x))

Furthermore, R contains four SCCs.


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


Dependency Pair:

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


Rules:


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


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 5
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




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
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules


Dependency Pair:

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


Rules:


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


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 6
Size-Change Principle
       →DP Problem 3
UsableRules
       →DP Problem 4
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
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Usable Rules (Innermost)
       →DP Problem 4
UsableRules


Dependency Pair:

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


Rules:


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


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 7
Size-Change Principle
       →DP Problem 4
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




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


Dependency Pair:

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


Rules:


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


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 8
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
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 8
MRR
             ...
               →DP Problem 9
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
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 8
MRR
             ...
               →DP Problem 10
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
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 8
MRR
             ...
               →DP Problem 11
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.

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