(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(x), y) → PLUS(x, y)
TIMES(s(x), y) → PLUS(y, times(x, y))
TIMES(s(x), y) → TIMES(x, y)
MINUS(x, s(y)) → P(minus(x, y))
MINUS(x, s(y)) → MINUS(x, y)
FACITER(x, y) → IF(isZero(x), minus(x, s(0)), y, times(y, x))
FACITER(x, y) → ISZERO(x)
FACITER(x, y) → MINUS(x, s(0))
FACITER(x, y) → TIMES(y, x)
IF(false, x, y, z) → FACITER(x, z)
FACTORIAL(x) → FACITER(x, s(0))

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 6 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, s(y)) → MINUS(x, y)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [LPAR04] to enlarge Q to all left-hand sides of R.

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, s(y)) → MINUS(x, y)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(8) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, s(y)) → MINUS(x, y)

R is empty.
The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(10) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, s(y)) → MINUS(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • MINUS(x, s(y)) → MINUS(x, y)
    The graph contains the following edges 1 >= 1, 2 > 2

(13) TRUE

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(15) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [LPAR04] to enlarge Q to all left-hand sides of R.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(17) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(x), y) → PLUS(x, y)

R is empty.
The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(19) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(x), y) → PLUS(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PLUS(s(x), y) → PLUS(x, y)
    The graph contains the following edges 1 > 1, 2 >= 2

(22) TRUE

(23) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TIMES(s(x), y) → TIMES(x, y)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(24) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [LPAR04] to enlarge Q to all left-hand sides of R.

(25) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TIMES(s(x), y) → TIMES(x, y)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(26) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TIMES(s(x), y) → TIMES(x, y)

R is empty.
The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(28) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

(29) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TIMES(s(x), y) → TIMES(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(30) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • TIMES(s(x), y) → TIMES(x, y)
    The graph contains the following edges 1 > 1, 2 >= 2

(31) TRUE

(32) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(x, y) → IF(isZero(x), minus(x, s(0)), y, times(y, x))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(33) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [LPAR04] to enlarge Q to all left-hand sides of R.

(34) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(x, y) → IF(isZero(x), minus(x, s(0)), y, times(y, x))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
p(s(x)) → x
p(0) → 0
minus(x, 0) → x
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
isZero(0) → true
isZero(s(x)) → false
facIter(x, y) → if(isZero(x), minus(x, s(0)), y, times(y, x))
if(true, x, y, z) → y
if(false, x, y, z) → facIter(x, z)
factorial(x) → facIter(x, s(0))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(35) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(36) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(x, y) → IF(isZero(x), minus(x, s(0)), y, times(y, x))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))
facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

We have to consider all minimal (P,Q,R)-chains.

(37) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

facIter(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
factorial(x0)

(38) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(x, y) → IF(isZero(x), minus(x, s(0)), y, times(y, x))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))

We have to consider all minimal (P,Q,R)-chains.

(39) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule FACITER(x, y) → IF(isZero(x), minus(x, s(0)), y, times(y, x)) at position [0] we obtained the following new rules [LPAR04]:

FACITER(0, y1) → IF(true, minus(0, s(0)), y1, times(y1, 0))
FACITER(s(x0), y1) → IF(false, minus(s(x0), s(0)), y1, times(y1, s(x0)))

(40) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(0, y1) → IF(true, minus(0, s(0)), y1, times(y1, 0))
FACITER(s(x0), y1) → IF(false, minus(s(x0), s(0)), y1, times(y1, s(x0)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))

We have to consider all minimal (P,Q,R)-chains.

(41) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(42) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(s(x0), y1) → IF(false, minus(s(x0), s(0)), y1, times(y1, s(x0)))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
minus(0, x) → 0
minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))

We have to consider all minimal (P,Q,R)-chains.

(43) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(44) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(s(x0), y1) → IF(false, minus(s(x0), s(0)), y1, times(y1, s(x0)))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(0, x) → 0
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))
isZero(0)
isZero(s(x0))

We have to consider all minimal (P,Q,R)-chains.

(45) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

isZero(0)
isZero(s(x0))

(46) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(s(x0), y1) → IF(false, minus(s(x0), s(0)), y1, times(y1, s(x0)))
IF(false, x, y, z) → FACITER(x, z)

The TRS R consists of the following rules:

minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(0, x) → 0
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))

We have to consider all minimal (P,Q,R)-chains.

(47) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule FACITER(s(x0), y1) → IF(false, minus(s(x0), s(0)), y1, times(y1, s(x0))) at position [1] we obtained the following new rules [LPAR04]:

FACITER(s(y0), y1) → IF(false, p(minus(s(y0), 0)), y1, times(y1, s(y0)))

(48) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, p(minus(s(y0), 0)), y1, times(y1, s(y0)))

The TRS R consists of the following rules:

minus(x, s(y)) → p(minus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))
minus(0, x) → 0
minus(x, 0) → x
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))

We have to consider all minimal (P,Q,R)-chains.

(49) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(50) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, p(minus(s(y0), 0)), y1, times(y1, s(y0)))

The TRS R consists of the following rules:

minus(x, 0) → x
p(s(x)) → x
p(0) → 0
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))

We have to consider all minimal (P,Q,R)-chains.

(51) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule FACITER(s(y0), y1) → IF(false, p(minus(s(y0), 0)), y1, times(y1, s(y0))) at position [1,0] we obtained the following new rules [LPAR04]:

FACITER(s(y0), y1) → IF(false, p(s(y0)), y1, times(y1, s(y0)))

(52) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, p(s(y0)), y1, times(y1, s(y0)))

The TRS R consists of the following rules:

minus(x, 0) → x
p(s(x)) → x
p(0) → 0
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))

We have to consider all minimal (P,Q,R)-chains.

(53) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(54) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, p(s(y0)), y1, times(y1, s(y0)))

The TRS R consists of the following rules:

p(s(x)) → x
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)
minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))

We have to consider all minimal (P,Q,R)-chains.

(55) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(x0, 0)
minus(0, x0)
minus(x0, s(x1))

(56) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, p(s(y0)), y1, times(y1, s(y0)))

The TRS R consists of the following rules:

p(s(x)) → x
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.

(57) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule FACITER(s(y0), y1) → IF(false, p(s(y0)), y1, times(y1, s(y0))) at position [1] we obtained the following new rules [LPAR04]:

FACITER(s(y0), y1) → IF(false, y0, y1, times(y1, s(y0)))

(58) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, y0, y1, times(y1, s(y0)))

The TRS R consists of the following rules:

p(s(x)) → x
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.

(59) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(60) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, y0, y1, times(y1, s(y0)))

The TRS R consists of the following rules:

times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.

(61) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

p(s(x0))
p(0)

(62) Obligation:

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → FACITER(x, z)
FACITER(s(y0), y1) → IF(false, y0, y1, times(y1, s(y0)))

The TRS R consists of the following rules:

times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)

We have to consider all minimal (P,Q,R)-chains.

(63) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, x, y, z) → FACITER(x, z) we obtained the following new rules [LPAR04]:

IF(false, s(y_0), x1, x2) → FACITER(s(y_0), x2)

(64) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FACITER(s(y0), y1) → IF(false, y0, y1, times(y1, s(y0)))
IF(false, s(y_0), x1, x2) → FACITER(s(y_0), x2)

The TRS R consists of the following rules:

times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
plus(0, x) → x
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)

We have to consider all minimal (P,Q,R)-chains.

(65) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • IF(false, s(y_0), x1, x2) → FACITER(s(y_0), x2)
    The graph contains the following edges 2 >= 1, 4 >= 2

  • FACITER(s(y0), y1) → IF(false, y0, y1, times(y1, s(y0)))
    The graph contains the following edges 1 > 2, 2 >= 3

(66) TRUE